@castlabs/prestoplay 6.17.0 → 6.17.1

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 (63) hide show
  1. package/CHANGELOG.md +6 -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 +98 -98
  6. package/cjs/cl.conviva.js +31 -31
  7. package/cjs/cl.core.js +372 -369
  8. package/cjs/cl.crypto.js +8 -8
  9. package/cjs/cl.dash.js +71 -71
  10. package/cjs/cl.externs.js +1 -1
  11. package/cjs/cl.freewheel.js +21 -21
  12. package/cjs/cl.hls.js +67 -67
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +29 -29
  15. package/cjs/cl.ima.js +22 -22
  16. package/cjs/cl.mse.js +302 -302
  17. package/cjs/cl.muxdata.js +14 -14
  18. package/cjs/cl.onboard.js +3 -3
  19. package/cjs/cl.persistent.js +13 -13
  20. package/cjs/cl.playlist.js +6 -6
  21. package/cjs/cl.sessions.js +15 -15
  22. package/cjs/cl.simid.js +15 -15
  23. package/cjs/cl.smooth.js +71 -71
  24. package/cjs/cl.thumbnails.js +26 -26
  25. package/cjs/cl.tizen.js +64 -64
  26. package/cjs/cl.ttml.js +28 -28
  27. package/cjs/cl.verimatrix.js +5 -5
  28. package/cjs/cl.vimond.js +9 -9
  29. package/cjs/cl.vr.js +18 -18
  30. package/cjs/cl.vtt.js +14 -14
  31. package/cjs/cl.youbora.js +14 -14
  32. package/cl.adobe.js +3 -3
  33. package/cl.airplay.js +3 -3
  34. package/cl.broadpeak.js +5 -5
  35. package/cl.cast.js +83 -83
  36. package/cl.conviva.js +26 -26
  37. package/cl.core.js +324 -323
  38. package/cl.crypto.js +8 -8
  39. package/cl.dash.js +69 -69
  40. package/cl.externs.js +1 -1
  41. package/cl.freewheel.js +15 -15
  42. package/cl.hls.js +72 -72
  43. package/cl.hlssmpte.js +5 -5
  44. package/cl.htmlcue.js +26 -26
  45. package/cl.ima.js +15 -15
  46. package/cl.mse.js +267 -268
  47. package/cl.muxdata.js +11 -11
  48. package/cl.onboard.js +4 -4
  49. package/cl.persistent.js +10 -10
  50. package/cl.playlist.js +5 -5
  51. package/cl.sessions.js +10 -10
  52. package/cl.simid.js +13 -13
  53. package/cl.smooth.js +59 -59
  54. package/cl.thumbnails.js +19 -19
  55. package/cl.tizen.js +54 -54
  56. package/cl.ttml.js +22 -22
  57. package/cl.verimatrix.js +4 -4
  58. package/cl.vimond.js +6 -6
  59. package/cl.vr.js +14 -14
  60. package/cl.vtt.js +11 -11
  61. package/cl.youbora.js +12 -12
  62. package/package.json +1 -1
  63. package/typings.d.ts +3 -2
package/cl.core.js CHANGED
@@ -1,37 +1,37 @@
1
- let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,la,oa,ta,ua,wa,xa,ya,za,Ra,Xa,Ya,Za,ab,bb,db,eb,jb,kb,lb,mb,nb,ob,pb,rb,sb,wb,zb,Db,Gb,Hb,Ib,Lb,Nb,Qb,Rb,Vb,Wb,Yb,Ac,Fc,Kc,Vc,Wc,bd,cd,dd,fd,gd,hd,id,jd,ld,md,nd,od,qd,rd,yd,Bd,Hd,Id,Kd,Ld,Nd,Qd,Rd,Td,Xd,de,ee,ge,he,re,Je,Qe,Se,Te,Ue,Ve,We,Xe,Ye,Ze,$e,af,ef,ff,gf,hf,jf,kf,mf,nf,rf,tf,If,Lf,Rf,Yf,Zf,qg,ug,vg,wg,xg,yg,Ag,Bg,Cg,Dg,Eg,Fg,Ig,Jg,Og,Lg,Wg,Xg,ah,ch,kh,lh,vh,wh,ph,sh,yh,Ah,zh,Ch,Dh,Eh,Hh,Ih,Mh,Nh,Rh,Th,Vh,Ph,Xh,bi,di,ci,ei,fi,gi,ji,ki,ni,Ni,Ri,Si,Ti,Ui,Vi,Xi,Yi,Zi,$i,
2
- cj,fj,jj,kj,oj,sj,lj,nj,pj,tj,uj,vj,xj,yj,Fj,Nj,Rj,Wj,Vj,ik,bk,ak,tk,uk,wk,xk,yk,zk,Ak,Bk,Dk,Ck,Ek,Fk,Ik,Jk,Kk,vk,Mk,Ok,Qk,Sk,Uk,Zk,$k,al,bl,dl,el,fl,gl,hl,il,jl,pl,yl,Al,Gl,Kl,Ml,Tl,cm,Pl,Yl,hm,jm,km,ym,zm,Gm,Jm,Km,Mm,Om,Pm,Qm,Hm,Nm,Rm,Sm,Tm,Um,Vm,Wm,bn,gn,jn,ln,kn,nn,en,un,rn,tn,sn,hn,vn,wn,xn,Dn,En,Fn,In,Mn,Nn,Pn,Kn,Jn,Xn,Yn,bo,ao,eo,go,ho,co,jo,ko,lo,qo,vo,wo,xo,Bo,Co,Ao,Do,zo,yo,Fo,Ho,Jo,Ko,Lo,Mo,No,Oo,Po,Qo,Ro,So,Wo,$o,bp,dp,ep,fp,hp,ip,gp,qp,kp,lp,rp,op,sp,vp,wp,xp,tp,up,yp,zp,Cp,Gp,Hp,Kp,
3
- Mp,Np,Lp,Ip,Bp,Fp,Dp,Ep,Qp,Rp,Sp,Tp,Up,Wp,Yp,Zp,aq,cq,eq,Xp,fq,gq,bq,dq,hq,iq,nq,qq,pq,rq,sq,tq,uq,kq,wq,lq,jq,Bq,Fq,Gq,oq,Qq,Rq,Sq,Vq,Tq,Uq,Wq,Xq,Yq,Zq,$q,ar,br,cr,dr,er,gr,hr,ir,kr,mr,rr,sr,tr,vr,wr,xr,zr,Ar,yr,Br,Er,Dr,Cr,Fr,Ir,Mr,Lr,Tr,Gg,Hg;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.fa="6.17.0";_.ha="AdaptationSet";_.ia="Already destroyed. No-op";_.ja="Already released. No-op";_.ka="Autoplay is not allowed due to browser policy.";
1
+ let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,la,oa,ta,ua,wa,xa,ya,za,Ra,Xa,Ya,Za,ab,bb,db,eb,jb,kb,lb,mb,nb,ob,pb,rb,sb,wb,zb,Db,Gb,Hb,Kb,Mb,Pb,Qb,Tb,Vb,Xb,zc,Ec,Jc,Uc,Vc,ad,bd,cd,ed,fd,gd,hd,id,kd,ld,md,nd,od,qd,xd,Ad,Gd,Hd,Id,Kd,Md,Pd,Qd,Sd,Wd,ce,de,fe,ge,qe,Ie,Pe,Re,Se,Te,Ue,Ve,We,Xe,Ye,Ze,$e,df,ef,ff,gf,hf,jf,lf,mf,qf,sf,Hf,Kf,Qf,Wf,Yf,Zf,qg,ug,vg,wg,xg,yg,Ag,Bg,Cg,Dg,Eg,Fg,Ig,Jg,Og,Lg,Wg,Xg,ah,ch,kh,lh,vh,wh,ph,sh,yh,Ah,zh,Ch,Dh,Eh,Hh,Ih,Mh,Nh,Rh,Th,Vh,Ph,Xh,bi,di,ci,ei,fi,gi,ji,ki,ni,Ni,Ri,Si,Ti,Ui,Vi,Xi,Yi,Zi,$i,
2
+ cj,fj,jj,kj,oj,sj,lj,nj,pj,tj,uj,vj,xj,yj,Fj,Nj,Rj,Wj,Vj,ik,bk,ak,tk,uk,wk,xk,yk,zk,Ak,Bk,Dk,Ck,Ek,Fk,Ik,Jk,Kk,vk,Mk,Ok,Qk,Sk,Uk,Zk,$k,al,bl,dl,el,fl,gl,hl,il,jl,pl,yl,Al,Gl,Kl,Ml,Tl,cm,Pl,Yl,hm,jm,km,ym,zm,Gm,Jm,Km,Mm,Om,Pm,Qm,Hm,Nm,Rm,Sm,Tm,Um,Vm,Wm,bn,gn,jn,ln,kn,nn,en,un,rn,tn,sn,hn,vn,wn,xn,Dn,En,Fn,In,Mn,Nn,Pn,Kn,Jn,Xn,Yn,bo,ao,eo,go,ho,co,jo,ko,lo,qo,vo,wo,xo,Bo,Co,Ao,Do,zo,yo,Fo,Ho,Jo,Lo,Mo,No,Oo,Po,Qo,Ro,So,To,Uo,Vo,Zo,cp,ep,gp,hp,ip,kp,lp,jp,tp,np,op,up,rp,vp,yp,zp,Ap,wp,xp,Bp,Cp,Fp,Jp,
3
+ Kp,Np,Pp,Qp,Op,Lp,Ep,Ip,Gp,Hp,Tp,Up,Vp,Wp,Xp,Zp,aq,bq,dq,fq,hq,$p,iq,jq,eq,gq,kq,lq,qq,tq,sq,uq,vq,wq,xq,nq,zq,oq,mq,Eq,Iq,Jq,rq,Tq,Uq,Vq,Yq,Wq,Xq,Zq,$q,ar,br,cr,dr,er,fr,gr,hr,jr,kr,lr,nr,pr,ur,vr,wr,yr,zr,Ar,Cr,Dr,Br,Er,Hr,Gr,Fr,Ir,Lr,Pr,Or,Wr,Gg,Hg;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.fa="6.17.1";_.ha="AdaptationSet";_.ia="Already destroyed. No-op";_.ja="Already released. No-op";_.ka="Autoplay is not allowed due to browser policy.";
4
4
  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="Configuration is valid";ta="Content-Length";ua="Content-Type";_.va="Could not find configured DRM environment.";wa="DRM licenses loaded";xa="DRMtoday";ya="DRMtodayOnboard";za="Destroying player";_.Aa="Disable track type ";_.Ba="EXT-X-BYTERANGE";_.Ca="EXT-X-DATERANGE";_.Da="EXT-X-DISCONTINUITY";
5
5
  _.Ea="EXT-X-DISCONTINUITY-SEQUENCE";_.Fa="EXT-X-ENDLIST";_.Ga="EXT-X-KEY";_.Ha="EXT-X-MAP";_.Ia="EXT-X-MEDIA-SEQUENCE";_.Ja="EXT-X-PART-INF";_.La="EXT-X-PLAYLIST-TYPE";_.Ma="EXT-X-PRELOAD-HINT";_.Na="EXT-X-PROGRAM-DATE-TIME";_.Oa="EXT-X-SERVER-CONTROL";_.Qa="EXT-X-TARGETDURATION";Ra="Error while decoding string!";_.Sa="Error while fetching license!";_.Ta="FairPlay Certificate URL is not defined";_.Ua="FairPlay License URL is not defined";_.Va="GROUP-ID";Xa="HW_SECURE_ALL";Ya="HW_SECURE_CRYPTO";
6
6
  Za="HW_SECURE_DECODE";ab="HeaderDrm";bb="InvalidStateError";_.cb="LANGUAGE";db="License verification failed: ";eb="Load interrupted while a player release is pending";_.fb="Loading player with configuration";_.gb="MaxHeight";_.hb="MaxWidth";jb="Missing media element";kb="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";lb="No event provided!";mb="No items in the playlist";nb="No sources provided!";ob="No track data attached to the event, unable to add track!";
7
- pb="Not a persistent session.";_.qb="Not supported";rb="NotAllowedError";sb="NotSupportedError";_.tb="PLAYLIST";_.vb="PlayReady License URL is not defined";wb="Player not ready yet.";_.xb="Player sources";_.yb="Please make sure ";zb="Preloading is not supported by this player.";_.Ab="QualityLevel";_.Bb="RESOLUTION";_.Cb="Representation";Db="STANDARD";_.Eb="SW_SECURE_CRYPTO";_.Fb="SW_SECURE_DECODE";Gb="Session is closed";Hb="Signature Verification failed";Ib="Skipping Session creation. License for init data was already requested in ";
8
- _.Jb="SmoothStreamingMedia";_.Kb="TYPE";Lb="The index is not in the allowed range.";_.Mb="URI";Nb="Unable to translate ";_.Ob="Unhandled/ignored event";_.Pb="Unregistering listeners";Qb="Unsupported keySystem";Rb="Using VTTCue polyfill from 3 argument TextTrackCue.";_.Sb="VIDEO";_.Tb="VOD";Vb="Wait for preloading to finish";Wb="WebkitEmeManager.MediaKeySession.load";_.Xb="Widevine License URL is not defined";Yb="Will create EME Manager: ";_.Zb="X-ASSET-LIST";_.$b="X-ASSET-URI";_.ac="X-PLAYOUT-LIMIT";
9
- _.bc="X-RESUME-OFFSET";_.cc="ad-break-started";_.dc="ad-break-stopped";_.ec="ad-buffering";_.fc="ad-clicked";_.gc="ad-completed";_.hc="ad-first-quartile";_.ic="ad-impression";_.jc="ad-loaded";_.lc="ad-midpoint";_.mc="ad-paused";_.nc="ad-progress";_.oc="ad-resumed";_.pc="ad-skipped";_.qc="ad-started";_.rc="ad-stopped";_.sc="ad-third-quartile";_.tc="addtrack";_.uc="ads-timeline-changed";_.vc="airplay-casting-ended";_.wc="airplay-casting-started";_.xc="airplay-status-changed";_.yc="application/cea-608";
10
- _.zc="application/dash+xml";Ac="application/mp4";_.Bc='application/mp4; codecs\x3d"stpp"';_.Cc='application/mp4; codecs\x3d"wvtt"';_.Dc="application/ttml+xml";_.Ec="application/vnd.ms-sstr+xml";Fc="application/x-www-form-urlencoded";_.p="audio";_.Gc="audio/aac";_.Hc="audio/ac3";_.Ic="audio/eac3";_.Jc="audio/mp4";Kc='audio/mp4;codecs\x3d"mp4a.40.2"';_.Lc="audiobufferchanged";_.Mc="autoplaynotallowed";_.Nc="bitratechanged";_.Pc="boolean";_.Qc="bufferingended";_.Uc="bufferingstarted";Vc="canplay";
11
- Wc="canplaythrough";_.Xc="castingstarted";_.Yc="caststatuschanged";_.Zc="cdn-switch-success";_.$c="cenc";_.ad="center";bd="certificate-request";cd="change";dd="chrome";_.ed="clpp-fill";fd="clpp-hidden";gd="clpp-mc-playlist";hd="clpp-mc-playlist-item";id="clpp-mc-playlist-video-el";jd="clpp-visible";_.kd="clpp.cast.CastSender";ld="clpp.drm.HeaderDrm";md="clpp.drm.eme.AppleEmeManager";nd="clpp.interstitial.Player";od="clpp.native.Player";qd="clpp.plist.McPlaylist";rd="clpp.utils.Platform";_.sd="codecs";
12
- _.td="column-reverse";_.ud="com.adobe.primetime";_.vd="com.apple.fps";_.wd="com.apple.hls.interstitial";_.xd="com.microsoft.playready";yd="com.microsoft.playready.recommendation";_.zd="com.widevine.alpha";_.Ad="config.drm.customData is not defined";Bd="controls";_.Cd="cuechange";_.Dd="decoder";_.Ed="destroy()";_.Fd="disabled";_.Gd="div";Hd="drm.mediaKeys.end";Id="drm.mediaKeys.start";Kd="drm.onPlay.end";Ld="drm.onPlay.start";_.Md="drmexpirationupdate";Nd="drmrenewalstarted";_.Od="drmsessionpersisted";
13
- _.Pd="drmsessionupdate";Qd="drmtoday";Rd="durationchange";_.Sd="ec-3";Td="encrypted";_.Ud="end";_.Vd="ended";_.r="error";_.Wd="forced";Xd="fullscreenElement";_.Yd="function";_.Zd="height";_.$d="hidden";_.ae="html";_.be="image";_.ce="internal-error";de="itemchange";ee="keystatuseschange";_.fe="left";ge="license-renewal";he="license-request";_.ie="line-left";_.je="line-right";_.le="live-turned-static";_.me="loadeddata";_.qe="loadedmetadata";re="loadstart";_.se="main";_.te="mdat";_.ue="mdia";_.ve="message";
14
- _.we="metadata";_.xe="mimeType";_.ye="minf";_.ze="moov";_.Ae="mpd-type-changed";_.Be="mpeg-dash-callback-event";_.Ce="none";_.t="number";_.De="object";_.Ee="onBitrateChanged()";_.Fe="onPlayerError()";_.Ge="onPlayerWillDestroy";_.He="onPlayerWillRelease";_.Ie="onStateChanged()";Je="online-status-changed";_.Ke="optional";_.Le="org.w3.clearkey";_.Me="output-restricted";_.Ne="pause";_.Oe="persistent";_.Pe="persistent-license";Qe="picture-in-picture";_.Re="play";Se="player.afterLoad.end";Te="player.afterLoad.start";
15
- Ue="player.appendLoad.end";Ve="player.appendLoad.start";We="player.beforeLoad.end";Xe="player.beforeLoad.start";Ye="player.load.end";Ze="player.load.start";$e="player.setupPlaylist.end";af="player.setupPlaylist.start";_.bf="playing";_.cf="playlist-item-changed";_.df="playlist-modified";ef="playlist.next.end";ff="playlist.next.start";gf="preload-aborted";hf="preload-failed";jf="preloaded";kf="preloading";_.lf="prevent";mf="primary-before-load";nf="primary-content";_.of="progress";_.pf="px";_.qf="ratechange";
16
- rf="released";_.sf="releasing";tf="removetrack";_.uf="required";_.vf="resize";_.wf="right";_.xf="sc-playlist-ended";_.yf="sc-playlist-item-changed";_.zf="sc-playlist-live-turned-static";_.Af="sc-playlist-timeline-changed";_.Bf="seeked";_.Cf="seeking";_.Df="showing";_.Ef="simid-creative-started";_.Ff="simid-creative-stopped";_.Gf="sinf";_.Hf="smooth";If="stalled";_.Jf="start";_.Kf="statechanged";Lf="status-pending";_.Mf="stbl";_.Nf="string";_.Of="stsd";_.Pf="style";_.Qf="subtitles-htmlcue";Rf="temporary";
17
- _.Sf="text/vtt";_.Tf="text/xml";_.Uf="timeupdate";_.Vf="trak";_.Wf="ttml-xml";_.Xf="und";Yf="unknown";Zf="update";_.$f="urn:scte:scte35";_.ag="urn:scte:scte35:2014";_.bg="user-seeked";_.cg="user-seeking";_.dg="value";_.eg="vertical-lr";_.gg="vertical-rl";_.w="video";_.hg="video/mp2t";_.ig="video/mp4";_.ng="videobufferchanged";_.og="videotrackchanged";_.pg="vimond-response";qg="visibilitychange";_.rg="vtt-xml";_.sg="waiting";_.tg="waitingforkey";ug="webkit-org.w3.clearkey";vg="webkitkeyadded";wg="webkitkeyerror";
18
- xg="webkitkeymessage";yg="webkitneedkey";_.zg="width";Ag="x-dt-csl-tracking-token";Bg="x-dt-follow-up-token";Cg="x-dt-resp-code";Eg=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};Fg=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:Eg(a)}};
7
+ pb="Not a persistent session.";_.qb="Not supported";rb="NotAllowedError";sb="NotSupportedError";_.tb="PLAYLIST";_.vb="PlayReady License URL is not defined";wb="Player not ready yet.";_.xb="Player sources";_.yb="Please make sure ";zb="Preloading is not supported by this player.";_.Ab="QualityLevel";_.Bb="RESOLUTION";_.Cb="Representation";Db="STANDARD";_.Eb="SW_SECURE_CRYPTO";_.Fb="SW_SECURE_DECODE";Gb="Session is closed";Hb="Skipping Session creation. License for init data was already requested in ";
8
+ _.Ib="SmoothStreamingMedia";_.Jb="TYPE";Kb="The index is not in the allowed range.";_.Lb="URI";Mb="Unable to translate ";_.Nb="Unhandled/ignored event";_.Ob="Unregistering listeners";Pb="Unsupported keySystem";Qb="Using VTTCue polyfill from 3 argument TextTrackCue.";_.Rb="VIDEO";_.Sb="VOD";Tb="Wait for preloading to finish";Vb="WebkitEmeManager.MediaKeySession.load";_.Wb="Widevine License URL is not defined";Xb="Will create EME Manager: ";_.Yb="X-ASSET-LIST";_.Zb="X-ASSET-URI";_.$b="X-PLAYOUT-LIMIT";
9
+ _.ac="X-RESUME-OFFSET";_.bc="ad-break-started";_.cc="ad-break-stopped";_.dc="ad-buffering";_.ec="ad-clicked";_.fc="ad-completed";_.gc="ad-first-quartile";_.hc="ad-impression";_.ic="ad-loaded";_.jc="ad-midpoint";_.lc="ad-paused";_.mc="ad-progress";_.nc="ad-resumed";_.oc="ad-skipped";_.pc="ad-started";_.qc="ad-stopped";_.rc="ad-third-quartile";_.sc="addtrack";_.tc="ads-timeline-changed";_.uc="airplay-casting-ended";_.vc="airplay-casting-started";_.wc="airplay-status-changed";_.xc="application/cea-608";
10
+ _.yc="application/dash+xml";zc="application/mp4";_.Ac='application/mp4; codecs\x3d"stpp"';_.Bc='application/mp4; codecs\x3d"wvtt"';_.Cc="application/ttml+xml";_.Dc="application/vnd.ms-sstr+xml";Ec="application/x-www-form-urlencoded";_.p="audio";_.Fc="audio/aac";_.Gc="audio/ac3";_.Hc="audio/eac3";_.Ic="audio/mp4";Jc='audio/mp4;codecs\x3d"mp4a.40.2"';_.Kc="audiobufferchanged";_.Lc="autoplaynotallowed";_.Mc="bitratechanged";_.Nc="boolean";_.Pc="bufferingended";_.Qc="bufferingstarted";Uc="canplay";
11
+ Vc="canplaythrough";_.Wc="castingstarted";_.Xc="caststatuschanged";_.Yc="cdn-switch-success";_.Zc="cenc";_.$c="center";ad="certificate-request";bd="change";cd="chrome";_.dd="clpp-fill";ed="clpp-hidden";fd="clpp-mc-playlist";gd="clpp-mc-playlist-item";hd="clpp-mc-playlist-video-el";id="clpp-visible";_.jd="clpp.cast.CastSender";kd="clpp.drm.HeaderDrm";ld="clpp.drm.eme.AppleEmeManager";md="clpp.interstitial.Player";nd="clpp.native.Player";od="clpp.plist.McPlaylist";qd="clpp.utils.Platform";_.rd="codecs";
12
+ _.sd="column-reverse";_.td="com.adobe.primetime";_.ud="com.apple.fps";_.vd="com.apple.hls.interstitial";_.wd="com.microsoft.playready";xd="com.microsoft.playready.recommendation";_.yd="com.widevine.alpha";_.zd="config.drm.customData is not defined";Ad="controls";_.Bd="cuechange";_.Cd="decoder";_.Dd="destroy()";_.Ed="disabled";_.Fd="div";Gd="drm.mediaKeys.end";Hd="drm.mediaKeys.start";Id="drm.onPlay.end";Kd="drm.onPlay.start";_.Ld="drmexpirationupdate";Md="drmrenewalstarted";_.Nd="drmsessionpersisted";
13
+ _.Od="drmsessionupdate";Pd="drmtoday";Qd="durationchange";_.Rd="ec-3";Sd="encrypted";_.Td="end";_.Ud="ended";_.r="error";_.Vd="forced";Wd="fullscreenElement";_.Xd="function";_.Yd="height";_.Zd="hidden";_.$d="html";_.ae="image";_.be="internal-error";ce="itemchange";de="keystatuseschange";_.ee="left";fe="license-renewal";ge="license-request";_.he="line-left";_.ie="line-right";_.je="live-turned-static";_.le="loadeddata";_.me="loadedmetadata";qe="loadstart";_.re="main";_.se="mdat";_.te="mdia";_.ue="message";
14
+ _.ve="metadata";_.we="mimeType";_.xe="minf";_.ye="moov";_.ze="mpd-type-changed";_.Ae="mpeg-dash-callback-event";_.Be="none";_.t="number";_.Ce="object";_.De="onBitrateChanged()";_.Ee="onPlayerError()";_.Fe="onPlayerWillDestroy";_.Ge="onPlayerWillRelease";_.He="onStateChanged()";Ie="online-status-changed";_.Je="optional";_.Ke="org.w3.clearkey";_.Le="output-restricted";_.Me="pause";_.Ne="persistent";_.Oe="persistent-license";Pe="picture-in-picture";_.Qe="play";Re="player.afterLoad.end";Se="player.afterLoad.start";
15
+ Te="player.appendLoad.end";Ue="player.appendLoad.start";Ve="player.beforeLoad.end";We="player.beforeLoad.start";Xe="player.load.end";Ye="player.load.start";Ze="player.setupPlaylist.end";$e="player.setupPlaylist.start";_.af="playing";_.bf="playlist-item-changed";_.cf="playlist-modified";df="playlist.next.end";ef="playlist.next.start";ff="preload-aborted";gf="preload-failed";hf="preloaded";jf="preloading";_.kf="prevent";lf="primary-before-load";mf="primary-content";_.nf="progress";_.of="px";_.pf="ratechange";
16
+ qf="released";_.rf="releasing";sf="removetrack";_.tf="required";_.uf="resize";_.vf="right";_.wf="sc-playlist-ended";_.xf="sc-playlist-item-changed";_.yf="sc-playlist-live-turned-static";_.zf="sc-playlist-timeline-changed";_.Af="seeked";_.Bf="seeking";_.Cf="showing";_.Df="simid-creative-started";_.Ef="simid-creative-stopped";_.Ff="sinf";_.Gf="smooth";Hf="stalled";_.If="start";_.Jf="statechanged";Kf="status-pending";_.Lf="stbl";_.Mf="string";_.Nf="stsd";_.Of="style";_.Pf="subtitles-htmlcue";Qf="temporary";
17
+ _.Rf="text/vtt";_.Sf="text/xml";_.Tf="timeupdate";_.Uf="trak";_.Vf="ttml-xml";Wf="unauthenticated";_.Xf="und";Yf="unknown";Zf="update";_.$f="urn:scte:scte35";_.ag="urn:scte:scte35:2014";_.bg="user-seeked";_.cg="user-seeking";_.dg="value";_.eg="vertical-lr";_.fg="vertical-rl";_.w="video";_.hg="video/mp2t";_.ig="video/mp4";_.jg="videobufferchanged";_.og="videotrackchanged";_.pg="vimond-response";qg="visibilitychange";_.rg="vtt-xml";_.sg="waiting";_.tg="waitingforkey";ug="webkit-org.w3.clearkey";
18
+ vg="webkitkeyadded";wg="webkitkeyerror";xg="webkitkeymessage";yg="webkitneedkey";_.zg="width";Ag="x-dt-csl-tracking-token";Bg="x-dt-follow-up-token";Cg="x-dt-resp-code";Eg=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};Fg=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:Eg(a)}};
19
19
  Ig=function(a,b){if(b){var c=Gg;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&&Hg(c,a,{configurable:!0,writable:!0,value:b})}};Jg=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())})};_.x=function(a){return Jg(a())};
20
20
  _.z=function(a,b){a=a.split(".");var c=Kg;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};_.Ng=function(a){return _.A(a)||Lg(a)?a:_.Mg(a)};_.Mg=function(...a){let b={};for(let c=0;c<a.length;c++)null!=a[c]&&(b=Og(b,{merging:a[c]},1));return b.merging||null};_.Pg=function(a){for(const b in a)if(void 0!==a[b])return!0;return!1};
21
- Og=function(a,b,c){const d=c+1;if(_.A(a)||!_.Qg(a))a={};for(const e in b)c=b[e],Lg(c)||_.A(c)||_.Rg(c)||c instanceof Element?a[e]=c:_.Qg(c)&&c.buffer&&c.buffer instanceof ArrayBuffer&&_.Rg(c.subarray)?a[e]=c.subarray(0):c instanceof Array?a[e]=Og([],c,d):!_.A(c)&&_.Sg(c)&&20>d&&(a[e]=Og(a[e],c,d));return a};Lg=function(a){a=typeof a;return a===_.Nf||a===_.t||a===_.Pc};_.A=function(a){return null===a||"undefined"===typeof a};_.Qg=function(a){return typeof a===_.De};
22
- _.Rg=function(a){return typeof a===_.Yd};_.Tg=function(a){return typeof a===_.Nf};_.Ug=function(a){return typeof a===_.t};_.Sg=function(a){if(_.A(a)||!_.Qg(a))return!1;a=Object.getPrototypeOf(a);return a===Object.prototype||null===a};
21
+ Og=function(a,b,c){const d=c+1;if(_.A(a)||!_.Qg(a))a={};for(const e in b)c=b[e],Lg(c)||_.A(c)||_.Rg(c)||c instanceof Element?a[e]=c:_.Qg(c)&&c.buffer&&c.buffer instanceof ArrayBuffer&&_.Rg(c.subarray)?a[e]=c.subarray(0):c instanceof Array?a[e]=Og([],c,d):!_.A(c)&&_.Sg(c)&&20>d&&(a[e]=Og(a[e],c,d));return a};Lg=function(a){a=typeof a;return a===_.Mf||a===_.t||a===_.Nc};_.A=function(a){return null===a||"undefined"===typeof a};_.Qg=function(a){return typeof a===_.Ce};
22
+ _.Rg=function(a){return typeof a===_.Xd};_.Tg=function(a){return typeof a===_.Mf};_.Ug=function(a){return typeof a===_.t};_.Sg=function(a){if(_.A(a)||!_.Qg(a))return!1;a=Object.getPrototypeOf(a);return a===Object.prototype||null===a};
23
23
  _.Vg=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||!_.Qg(a)||!_.Qg(b))return!1;const e=c||Object.keys(a),f={};for(let g=0;g<e.length;g++){const h=e[g];if(_.A(d)||0>d.indexOf(h))if(f[h]=!0,a[h]!==b[h])return!1}if(_.A(c))for(a=Object.keys(b),b=0;b<a.length;b++)if(c=a[b],(_.A(d)||0>d.indexOf(c))&&!f[c])return!1;return!0};
24
- Wg=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:b=>b!==b)(a)};Xg=function(a){const b=new Map;for(const c of Object.keys(a))b.set(c,a[c]);return b};_.Yg=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};ah=function(a){return a&&0<=Zg[a]?Zg[a]:$g};ch=function(a){if(!a)return _.C("clpp.log",Nb+a+ca),-1;const b=bh[a.toUpperCase()];return void 0===b?(_.C("clpp.log",Nb+a+ca),-1):b};_.eh=function(a){dh.info.apply(dh,arguments)};_.fh=function(a){dh.debug.apply(dh,arguments)};
24
+ Wg=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:b=>b!==b)(a)};Xg=function(a){const b=new Map;for(const c of Object.keys(a))b.set(c,a[c]);return b};_.Yg=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};ah=function(a){return a&&0<=Zg[a]?Zg[a]:$g};ch=function(a){if(!a)return _.C("clpp.log",Mb+a+ca),-1;const b=bh[a.toUpperCase()];return void 0===b?(_.C("clpp.log",Mb+a+ca),-1):b};_.eh=function(a){dh.info.apply(dh,arguments)};_.fh=function(a){dh.debug.apply(dh,arguments)};
25
25
  _.C=function(a){dh.warn.apply(dh,arguments)};_.gh=function(a){dh.error.apply(dh,arguments)};_.jh=function(a){if(a){var b=a.a();b in _.hh?_.ih.warn("Player-Factory '"+b+"' already registered"):(_.hh[b]=a,_.ih.info("Registered Player-Factory: '"+b+"'"))}};kh=function(a){return Object.values(_.hh).find(a)||null};_.mh=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)lh(b[c]);a.a.clear()};
26
26
  _.nh=function(a,b,c,d){const e=f=>{for(const g of c)a.off(b,g,e);d(f)};for(const f of c)a.on(b,f,e)};lh=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};
27
- vh=function(a,b){a.h.debug("onMetadata_()");b.mode=_.$d;const c=[];let d=!0;const e=f=>{for(var g of c)if(f.startTime===g.startTime&&f.endTime===g.endTime)return g;g={schemeIdUri:"",value:"",startTime:0,endTime:0,id:"",type:_.oh,eventElement:null};a.o&&d&&"SCTE35-IN"===f.value.key&&0<f.startTime?(g.startTime=0,g.endTime=f.startTime):(g.startTime=f.startTime,g.endTime=f.endTime);d=!1;c.push(g);return c[c.length-1]};if(b.cues){for(const f of b.cues){if(ph(a,f))continue;const g=e(f);switch(f.value.key){case "SCTE35-IN":case "SCTE35-OUT":g.schemeIdUri=
28
- _.ag;g.type=_.qh;break;case "X-CUSTOM-ID":g.id=f.value.data}}for(const f of c)a.m.trigger(new _.E(_.rh,{detail:f}));Array.prototype.push.apply(a.g,c);sh(a,c,b);a.f.off(b,_.Cd);a.f.on(b,_.Cd,f=>{f=f.target.activeCues;f=f.length?ph(a,f[0]):a.a;var g;if(g=f){{g=f;const h=a.m.getPosition();g=g.startTime<=h&&h<g.endTime}}if(g)a.a=f,a.m.trigger(new _.E(_.th,{detail:f}));else{if(f=a.a)f=a.a,g=a.m.getPosition(),f=f.endTime<=g;f&&(f=a.a,a.a=null,a.m.trigger(new _.E(_.uh,{detail:f})))}})}};
29
- wh=function(a,b){a.j=b;a.l=a.j.textTracks;a.f.on(a.l,_.tc,c=>{c=c.track;c.kind===_.we&&vh(a,c)})};ph=function(a,b){for(const c of a.g)if(b.startTime===c.startTime&&b.endTime===c.endTime)return c;return null};sh=function(a,b,c){if(a.o){for(;0<c.cues.length;)c.removeCue(c.cues[0]);b.forEach(function(d){c.addCue(new DataCue(d.startTime,d.endTime,{key:"SCTE35-OUT",data:null}))})}};_.xh=function(a){return Array.isArray(a)?a:[a]};
27
+ vh=function(a,b){a.h.debug("onMetadata_()");b.mode=_.Zd;const c=[];let d=!0;const e=f=>{for(var g of c)if(f.startTime===g.startTime&&f.endTime===g.endTime)return g;g={schemeIdUri:"",value:"",startTime:0,endTime:0,id:"",type:_.oh,eventElement:null};a.o&&d&&"SCTE35-IN"===f.value.key&&0<f.startTime?(g.startTime=0,g.endTime=f.startTime):(g.startTime=f.startTime,g.endTime=f.endTime);d=!1;c.push(g);return c[c.length-1]};if(b.cues){for(const f of b.cues){if(ph(a,f))continue;const g=e(f);switch(f.value.key){case "SCTE35-IN":case "SCTE35-OUT":g.schemeIdUri=
28
+ _.ag;g.type=_.qh;break;case "X-CUSTOM-ID":g.id=f.value.data}}for(const f of c)a.m.trigger(new _.E(_.rh,{detail:f}));Array.prototype.push.apply(a.g,c);sh(a,c,b);a.f.off(b,_.Bd);a.f.on(b,_.Bd,f=>{f=f.target.activeCues;f=f.length?ph(a,f[0]):a.a;var g;if(g=f){{g=f;const h=a.m.getPosition();g=g.startTime<=h&&h<g.endTime}}if(g)a.a=f,a.m.trigger(new _.E(_.th,{detail:f}));else{if(f=a.a)f=a.a,g=a.m.getPosition(),f=f.endTime<=g;f&&(f=a.a,a.a=null,a.m.trigger(new _.E(_.uh,{detail:f})))}})}};
29
+ wh=function(a,b){a.j=b;a.l=a.j.textTracks;a.f.on(a.l,_.sc,c=>{c=c.track;c.kind===_.ve&&vh(a,c)})};ph=function(a,b){for(const c of a.g)if(b.startTime===c.startTime&&b.endTime===c.endTime)return c;return null};sh=function(a,b,c){if(a.o){for(;0<c.cues.length;)c.removeCue(c.cues[0]);b.forEach(function(d){c.addCue(new DataCue(d.startTime,d.endTime,{key:"SCTE35-OUT",data:null}))})}};_.xh=function(a){return Array.isArray(a)?a:[a]};
30
30
  yh=function(a,b){return a===b?!0:a.length===b.length&&a.every((c,d)=>c===b[d])};Ah=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 zh(a,b)&&zh(b,a)};zh=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};_.Bh=function(a,b={}){if(b.Ze){const c=[];for(const d of a)c.some(e=>b.Ze(d,e))||c.push(d);return c}return Array.from((new Set(a)).values())};
31
- Ch=function(a,b){b=b.track;b.kind!==_.we&&(b.mode===_.Df&&(b.mode=_.$d),a.a.on(b,_.Cd,c=>{c=c.target||c.srcElement;c.mode=_.$d;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.l.append(c,[]))}))};Dh=function(a,b,c,d){a=`${a===_.F?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.Tg(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};
31
+ Ch=function(a,b){b=b.track;b.kind!==_.ve&&(b.mode===_.Cf&&(b.mode=_.Zd),a.a.on(b,_.Bd,c=>{c=c.target||c.srcElement;c.mode=_.Zd;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.l.append(c,[]))}))};Dh=function(a,b,c,d){a=`${a===_.F?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.Tg(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};
32
32
  Eh=function(a,b){const c=b||yh;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)}};_.Fh=function(a){return null!=a};Hh=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}throw new _.Gh("No non-null, non-undefined value found");};Ih=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}};
33
33
  _.Lh=function(a){var b;a instanceof _.Lh?(Mh(this,a.cb),this.nc=a.nc,this.Ma=a.Ma,Nh(this,a.Ec),this.za=a.za,_.Oh(this,Ph(a.a)),this.bc=a.bc):a&&(b=String(a).match(Qh))?(Mh(this,b[1]||"",!0),this.nc=Rh(b[2]||""),this.Ma=Rh(b[3]||"",!0),Nh(this,b[4]),this.za=Rh(b[5]||"",!0),_.Oh(this,b[6]||"",!0),this.bc=Rh(b[7]||"")):this.a=new _.Sh(null)};Mh=function(a,b,c){a.cb=c?Rh(b,!0):b;a.cb&&(a.cb=a.cb.replace(/:$/,""))};
34
- Nh=function(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Ec=b}else a.Ec=null};_.Oh=function(a,b,c){b instanceof _.Sh?a.a=b:(c||(b=Th(b,Uh)),a.a=new _.Sh(b))};Rh=function(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""};Th=function(a,b,c){return typeof a===_.Nf?(a=encodeURI(a).replace(b,Vh),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null};Vh=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)};_.Sh=function(a){this.f=a||null};
34
+ Nh=function(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Ec=b}else a.Ec=null};_.Oh=function(a,b,c){b instanceof _.Sh?a.a=b:(c||(b=Th(b,Uh)),a.a=new _.Sh(b))};Rh=function(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""};Th=function(a,b,c){return typeof a===_.Mf?(a=encodeURI(a).replace(b,Vh),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null};Vh=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)};_.Sh=function(a){this.f=a||null};
35
35
  Ph=function(a){var b=new _.Sh;b.f=a.f;if(a.a){var c={},d;for(d in a.a)c[d]=a.a[d].concat();b.a=c;b.g=a.g}return b};Xh=function(a,b){const c=Wh[a];for(const d of c)for(const e of b)if(d.test(e.trim()))return e.trim();return a===_.G?"":null};_.I=function(a,b,c,d){d=void 0===d?{}:d;a=a.getAttribute(b);if(!a&&d.required)throw new _.H(_.F,4,4023,`Required attribute missing: ${b}`);return a?a.value:c||null};
36
36
  _.Zh=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Yh.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.$h=function(a,b){a=_.Zh(a);b=_.Zh(b);return a.split("-")[0]===b.split("-")[0]};_.ai=function(a,b){for(const c of a)if(!b(c))return!1;return!0};bi=function*(a){for(let b=0;b<a;b++)yield b};
37
37
  di=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!==b.byteLength)return!1;if(ci(a)===ci(b)&&(a.byteOffset||0)===(b.byteOffset||0))return!0;const c=_.J(a);b=_.J(b);for(const d of bi(a.byteLength))if(c[d]!==b[d])return!1;return!0};ci=function(a){return a instanceof ArrayBuffer?a:a.buffer};_.J=function(a,b=0,c=Infinity){return ei(a,b,c,Uint8Array)};
@@ -53,36 +53,36 @@ _.Pi=function(a,b){_.Tg(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});const
53
53
  _.Qi=function(a,b,c,d,e,f,g,h){e&&(d=e);e={uri:d,data:b||new ArrayBuffer(0),headers:a,status:c,fromCache:!!a["x-shaka-from-cache"],timeMs:g,responseStartMs:h,request:f};if(200<=c&&299>=c&&202!==c)return e;g=null;try{g=_.oi(b,!0)}catch(k){}_.fh("HTTP error text:",g);throw new _.H(0<=(f.fatalStatusCodes||[]).indexOf(c)?_.F:1,1,1001,{url:d,status:c,responseText:g,headers:a,request:f,response:e});};
54
54
  Ri=function(a,b){b=parseInt(b,10);Number.isNaN(b)&&(b=-1);a.bytesTotal=b;a.bytesLoaded=0;a.bytesRemaining=b};Si=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b);a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};Ti=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()};
55
55
  Ui=function(a,b,c){try{const d=a(b);if(d&&d.P&&d.abort)return c.resolve(d.P),()=>d.abort();c.resolve(d);return()=>Promise.resolve(d).then(()=>{}).catch(()=>{})}catch(d){return c.reject(d),()=>Promise.resolve()}};Vi=function(a,b){a.P.then(()=>b(!0),()=>b(!1));return a};_.Wi=function(a,b){a.a.push(Vi(b,()=>{{var c=a.a;const d=c.indexOf(b);-1<d&&c.splice(d,1)}}))};Xi=function(a,b){return _.x(function*(){const c=yield a.fetch(b);return _.li(c.data).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")})};
56
- Yi=function(a,b){return _.x(function*(){const c=yield Xi(a,b);try{const d=JSON.parse(c);if(null==d||typeof d!==_.De)throw Error("Not an object");return d}catch(d){throw new _.Gh("Failed to parse JSON response","json-failed");}})};Zi=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.x(function*(){if(!navigator.onLine)return!1;if(b){const e=_.Pi(b,c);e.method=d;c||(e.timeout=5E3);e.headers["cache-control"]="no-cache";try{yield a.fetch(e).P}catch(f){if(1002===f.code||1003===f.code)return!1}}return!0})};
56
+ Yi=function(a,b){return _.x(function*(){const c=yield Xi(a,b);try{const d=JSON.parse(c);if(null==d||typeof d!==_.Ce)throw Error("Not an object");return d}catch(d){throw new _.Gh("Failed to parse JSON response","json-failed");}})};Zi=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.x(function*(){if(!navigator.onLine)return!1;if(b){const e=_.Pi(b,c);e.method=d;c||(e.timeout=5E3);e.headers["cache-control"]="no-cache";try{yield a.fetch(e).P}catch(f){if(1002===f.code||1003===f.code)return!1}}return!0})};
57
57
  $i=function(a){return`@@scheme:${a.scheme||""}`+`@@value:${a.value}`+`@@id:${a.id||""}@@type:${a.type||""}`+`@@protocol:${a.protocol||""}`};_.aj=function(a){return a&&a!==_.Xf?a:null};
58
58
  cj=function(a){if(!a)throw new _.H(_.F,3,3101,`Invalid track type: ${a}`);if(!_.Tg(a))throw new _.H(_.F,3,3101,`Invalid track type: ${a}. Track type must be a string!`);switch(a.toLowerCase()){case _.K:return _.K;case _.L:return _.L;case _.N:return _.N;case bj:return bj}throw new _.H(_.F,3,3101,`Unknown track type: ${a}.`);};
59
- fj=function(a,b){a=cj(a);const c=_.aj(b.kind);let d=b.id;d||(d=String(_.dj++));a=new _.ej(d,c===_.we?bj:a);a.kind=c;a.label=_.aj(b.label);a.language=_.aj(b.language);a.originalLanguage=b.originalLanguage||a.language;return a};_.gj=function(a){return`${a.scheme}//`+`${a.a}${a.port?":"+a.port:""}${a.path}${a.g}${a.f}`};
59
+ fj=function(a,b){a=cj(a);const c=_.aj(b.kind);let d=b.id;d||(d=String(_.dj++));a=new _.ej(d,c===_.ve?bj:a);a.kind=c;a.label=_.aj(b.label);a.language=_.aj(b.language);a.originalLanguage=b.originalLanguage||a.language;return a};_.gj=function(a){return`${a.scheme}//`+`${a.a}${a.port?":"+a.port:""}${a.path}${a.g}${a.f}`};
60
60
  _.hj=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)},""):""};_.ij=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};
61
61
  jj=function(a,b){return a.startsWith("http:://")||a.startsWith("https:://")?a:(new URL(a,b)).toString()};kj=function(a,b){return _.x(function*(){const c=_.Pi(b);return yield Xi(a.f,c)})};oj=function(a,b,c){return _.x(function*(){const {mimeType:d,renditions:e}=yield lj(a,b,c),f=new _.ej("dummy",_.N),g=e.map((h,k)=>{k=new _.mj(`R${k}`,f);k.bandwidth=h.bandwidth;k.Hc=h.Hc;k.codec=h.codec;k.width=h.width;k.height=h.height;return k});nj(g);return{renditions:g,mimeType:d||void 0}})};
62
62
  sj=function(a){a=a.split("\n").filter(c=>c.trim().startsWith("#EXT-X-MEDIA:")).map(c=>pj(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};lj=function(a,b,c){return _.x(function*(){const d=tj(b),e=uj(b,c);return{mimeType:yield vj(a,e,d[0]?d[0].codec:null),renditions:d}})};
63
- nj=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.");};pj=function(a){const b=_.Ki(0,a);a=d=>(d=b.getAttribute(d))?d.value:void 0;var c=a(_.Kb);c=null!=c?{AUDIO:_.L,VIDEO:_.N,SUBTITLES:_.K}[c]:void 0;return{type:c,groupId:a(_.Va),name:a("NAME"),language:a(_.cb),Gh:a("AUTOSELECT"),default:a("DEFAULT"),Nh:a("FORCED"),Ye:a("CHARACTERISTICS"),uri:a(_.Mb)}};
64
- tj=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.Ki(0,b);if(c.getAttribute(_.Sb))throw Error("Playlist contains alternative video streams.");var d=_.I(c,_.Bb);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.I(c,_.ma);e=e?Number(e):null;var f=_.I(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.I(c,_.pa);c=_.wj(_.w,c?c.split(","):[]);return b={bandwidth:e,Hc:f,codec:c,width:b,height:d,mimeType:null}})};
65
- uj=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?jj(a,b):null};vj=function(a,b,c){return _.x(function*(){if(!b||!c)return null;var d=yield kj(a,b);d=[xj(d,b),yj(d,b)].filter(Boolean);return _.zj(d,_.w,c)})};xj=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?jj(a,b):null};yj=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.I(_.Ki(0,a),_.Mb))?jj(a,b):null:null};
63
+ nj=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.");};pj=function(a){const b=_.Ki(0,a);a=d=>(d=b.getAttribute(d))?d.value:void 0;var c=a(_.Jb);c=null!=c?{AUDIO:_.L,VIDEO:_.N,SUBTITLES:_.K}[c]:void 0;return{type:c,groupId:a(_.Va),name:a("NAME"),language:a(_.cb),Gh:a("AUTOSELECT"),default:a("DEFAULT"),Nh:a("FORCED"),Ye:a("CHARACTERISTICS"),uri:a(_.Lb)}};
64
+ tj=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.Ki(0,b);if(c.getAttribute(_.Rb))throw Error("Playlist contains alternative video streams.");var d=_.I(c,_.Bb);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.I(c,_.ma);e=e?Number(e):null;var f=_.I(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.I(c,_.pa);c=_.wj(_.w,c?c.split(","):[]);return b={bandwidth:e,Hc:f,codec:c,width:b,height:d,mimeType:null}})};
65
+ uj=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?jj(a,b):null};vj=function(a,b,c){return _.x(function*(){if(!b||!c)return null;var d=yield kj(a,b);d=[xj(d,b),yj(d,b)].filter(Boolean);return _.zj(d,_.w,c)})};xj=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?jj(a,b):null};yj=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.I(_.Ki(0,a),_.Lb))?jj(a,b):null:null};
66
66
  _.Bj=function(a,b,c){for(const d of _.Aj)if(d.probe(b,c))return d.create(a);return null};_.Cj=function(a){a=_.Aj.indexOf(a);0<=a&&_.Aj.splice(a,1)};Fj=function(a,b){var c=Dj;Ej.set(`${a.toLowerCase().split(";")[0]}-${c}`,{priority:c,plugin:b})};_.Jj=function(a,b){var c=[Gj,Hj,Ij,Dj];for(const d of c)if(c=Ej.get(`${a.toLowerCase().split(";")[0]}-${d}`)){const e=c.plugin(),f=e.isSupported(a,b);e.destroy();if(f)return c.plugin}return null};
67
67
  _.Kj=function(a,b){b&&(a+=';codecs\x3d"'+b+'"');return a.replace(/\s/g,"")};_.Lj=function(a){return a.split(";")[0]};_.Mj=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(","):""};Nj=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};
68
68
  Rj=function(){if(Oj)return Oj;Pj||(Pj=new _.Qj(()=>{Oj=null}));(Oj=document.querySelector(_.w)||document.querySelector(_.p))||(Oj=document.createElement(_.w));Pj.fa(1);return Oj};_.Sj=function(){return!!navigator.userAgent.match(/Edge?\//)};_.Tj=function(a){return(navigator.userAgent||"").includes(a)};_.Uj=function(a){return _.Tj("Tizen"+(a?" "+String(a):""))};
69
69
  Wj=function(a){const b={major:-1,name:Yf};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=Vj(a,c[0]));2<=c.length&&(b.minor=Vj(a,c[1]));3<=c.length&&(b.patch=Vj(a,c[2]));4<=c.length&&(b.build=Vj(a,c[3]));return b};_.Xj=function(){return _.Tj("Web0S")};_.Zj=function(){return _.Xj()&&79===_.Yj().major};
70
- _.Yj=function(){const a=ak();const b=["ie","edge","opera","firefox","safari",dd];var c=bk();const d=ck[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return Wj(c[1]);return Wj("")};_.dk=function(){return _.Tj("CrKey")};_.ek=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.Uj()};_.fk=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.ek()&&1<navigator.maxTouchPoints};_.gk=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};
70
+ _.Yj=function(){const a=ak();const b=["ie","edge","opera","firefox","safari",cd];var c=bk();const d=ck[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return Wj(c[1]);return Wj("")};_.dk=function(){return _.Tj("CrKey")};_.ek=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.Uj()};_.fk=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.ek()&&1<navigator.maxTouchPoints};_.gk=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};
71
71
  Vj=function(a,b){try{return parseInt(b,10)}catch(c){hk.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};ik=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};
72
72
  bk=function(){const a=ak();if(!a)return jk;var b=a.match(/^.+?(?=\))/);if(!b)return jk;b=b[0];if(ik(b,["iphone","ipad"]))return kk;if(ik(b,["android"]))return lk;if(ik(b,["macintosh"]))return mk;if(ik(b,["windows nt"]))return nk;if(ik(b,["tizen"]))return ok;if(ik(b,["web0s"]))return pk;if(ik(b,["linux"]))return qk;hk.warn("Unable to identify OS from user agent: "+a);return jk};ak=function(){let a=window.navigator.userAgent;return a=a.toLowerCase()};
73
- _.sk=function(){var a=bk();var b=bk();var c=ck[b];if(c){c=ak().match(c.os_version)[1];c=Wj(c);if(b===nk)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=Wj("");a:{c=ak();const e=["ie","edge","opera","firefox","safari",dd];var d=bk();d=ck[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=rk}return{os:a,osVersion:b,browser:c,browserVersion:_.Yj()}};
74
- tk=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.Vg(a,{kind:_.aj(b.kind),language:_.aj(b.language),label:_.aj(b.label)},["kind","language","label"])};uk=function(a){return a.enabled||a.selected||a.mode===_.Df||a.mode===_.$d};wk=function(a,b,c){return vk(a)&&b===_.N&&!!c.enableHlsVideoTrackInfo};
73
+ _.sk=function(){var a=bk();var b=bk();var c=ck[b];if(c){c=ak().match(c.os_version)[1];c=Wj(c);if(b===nk)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=Wj("");a:{c=ak();const e=["ie","edge","opera","firefox","safari",cd];var d=bk();d=ck[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=rk}return{os:a,osVersion:b,browser:c,browserVersion:_.Yj()}};
74
+ tk=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.Vg(a,{kind:_.aj(b.kind),language:_.aj(b.language),label:_.aj(b.label)},["kind","language","label"])};uk=function(a){return a.enabled||a.selected||a.mode===_.Cf||a.mode===_.Zd};wk=function(a,b,c){return vk(a)&&b===_.N&&!!c.enableHlsVideoTrackInfo};
75
75
  xk=function(a,b,c){return _.x(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})))})};yk=function(a,b,c){return vk(a)&&(b===_.L||b===_.K)&&!!c.enableMetadata};
76
- zk=function(a,b,c){return _.x(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.Ye&&(b.accessibility=d.Ye.split(",").map(e=>e.trim()).map(e=>({value:e,type:b.type,protocol:"HLS"}))))})};Ak=function(a,b){return a.g.filter(c=>c.type===b)};Bk=function(a){(a=a.m.getTextDisplayer())&&a.remove(0,Infinity)};Dk=function(a,b){if(a=Ck(a,b))a=Array.from(a),b===_.K&&(a=a.filter(c=>c.kind!==_.we));return a};
76
+ zk=function(a,b,c){return _.x(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.Ye&&(b.accessibility=d.Ye.split(",").map(e=>e.trim()).map(e=>({value:e,type:b.type,protocol:"HLS"}))))})};Ak=function(a,b){return a.g.filter(c=>c.type===b)};Bk=function(a){(a=a.m.getTextDisplayer())&&a.remove(0,Infinity)};Dk=function(a,b){if(a=Ck(a,b))a=Array.from(a),b===_.K&&(a=a.filter(c=>c.kind!==_.ve));return a};
77
77
  Ck=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 _.L:return a.audioTracks;case _.N:return a.videoTracks;case _.K:return a.textTracks;default:return null}};Ek=function(a,b){return(a=a.a.get(b)||null)&&a.renditions[0]};Fk=function(a,b){return(a=a.l.get(b))&&a.renditions[0]};
78
- Ik=function(a,b,c){const d=Dk(a,b);if(c){if(void 0===a.g.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.h.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 _.K:f="mode";e=_.Df;g=_.Fd;break;case _.L:f="enabled";break;case _.N:f="selected"}if(f)for(const h of d)h[f]=tk(c,h,c.type)?e:g}}else if(a.h.debug(_.Aa+b),a.a.get(b)&&d&&b===_.K){for(e of d)e.mode=
79
- _.Fd;a.a.set(b,null)}b===_.L?a.m.trigger(new _.E(_.Gk)):b===_.K&&a.m.trigger(new _.E(_.Hk))};Jk=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=_.vi(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.I.push(e)}}};
80
- Kk=function(a,b){return _.x(function*(){var c=a.m.getConfiguration(),d=_.Bj(c,b.mimeType,_.Sf);if(d){c=_.Pi(b.url);var e=yield a.m.getNetworkEngine().fetch(c).P;e&&e.data&&(c="External_"+`${a.G++}`,a.o[c]=b,d=d.a(_.J(e.data)),d={url:URL.createObjectURL(new Blob([d])),kind:b.kind,language:b.language,label:b.label,mimeType:_.Sf},Jk(a,d,c))}else a.h.warn("Track MIME type is not supported",b)})};vk=function(a){a=a.m.getLoadedSource();return!(!a||a.type!==_.Lk&&!a.url.endsWith(".m3u8"))&&_.ek()};
78
+ Ik=function(a,b,c){const d=Dk(a,b);if(c){if(void 0===a.g.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.h.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 _.K:f="mode";e=_.Cf;g=_.Ed;break;case _.L:f="enabled";break;case _.N:f="selected"}if(f)for(const h of d)h[f]=tk(c,h,c.type)?e:g}}else if(a.h.debug(_.Aa+b),a.a.get(b)&&d&&b===_.K){for(e of d)e.mode=
79
+ _.Ed;a.a.set(b,null)}b===_.L?a.m.trigger(new _.E(_.Gk)):b===_.K&&a.m.trigger(new _.E(_.Hk))};Jk=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=_.vi(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.I.push(e)}}};
80
+ Kk=function(a,b){return _.x(function*(){var c=a.m.getConfiguration(),d=_.Bj(c,b.mimeType,_.Rf);if(d){c=_.Pi(b.url);var e=yield a.m.getNetworkEngine().fetch(c).P;e&&e.data&&(c="External_"+`${a.G++}`,a.o[c]=b,d=d.a(_.J(e.data)),d={url:URL.createObjectURL(new Blob([d])),kind:b.kind,language:b.language,label:b.label,mimeType:_.Rf},Jk(a,d,c))}else a.h.warn("Track MIME type is not supported",b)})};vk=function(a){a=a.m.getLoadedSource();return!(!a||a.type!==_.Lk&&!a.url.endsWith(".m3u8"))&&_.ek()};
81
81
  Mk=function(a,b,c){c=_.xh(c).filter(e=>e);a.h.info("Find preferred tracks for",b,c);const d=Ak(a,b);c.some(e=>{const f=_.Zh(e);return(e=d.find(g=>{g=_.Zh(g.language||"");return _.$h(f,g)}))?(a.h.info("Will select track with id",e.id),Ik(a,b,e),!0):!1})};Ok=function(a){return a.name===rb&&Nk.some(b=>a.message.startsWith(b))};
82
82
  _.Rk=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.fk()&&(a=360);const b=_.Mi();b.maxAttempts=3;a={source:"",license:Pk,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,manifest:{attemptParameters:_.Mi(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0,timeline:{version:1}},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,
83
- restrictions:Qk(a),useCmsd:!1},drm:null,enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:_.se,preferredTextRole:"",preferredAudioChannelCount:2,preferredAudioCodec:[],preferredVideoCodec:[],preferSpatialAudio:!1,preferForcedSubtitles:!1,volume:null,startTime:null,loop:!1,lowLatencyMode:!1,suggestedPresentationDelay:void 0,muted:void 0,forceWaitForTracks:!1,streaming:{attemptParameters:b,bufferingGoal:10,rebufferingGoal:2,bufferBehind:30,ignoreTextStreamFailures:!1,
83
+ restrictions:Qk(a),useCmsd:!1},drm:null,enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:_.re,preferredTextRole:"",preferredAudioChannelCount:2,preferredAudioCodec:[],preferredVideoCodec:[],preferSpatialAudio:!1,preferForcedSubtitles:!1,volume:null,startTime:null,loop:!1,lowLatencyMode:!1,suggestedPresentationDelay:void 0,muted:void 0,forceWaitForTracks:!1,streaming:{attemptParameters:b,bufferingGoal:10,rebufferingGoal:2,bufferBehind:30,ignoreTextStreamFailures:!1,
84
84
  alwaysStreamText:!1,relativeTextTimestamp:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,disableAudioTracks:!1,disableVideoTracks:!1,smallGapLimit:.5,jumpLargeGaps:!0,durationBackoff:1,maxSegmentToMediaOffset:1,forceNativeTS:!1,preferNativeHlsOnSafari:!0,safeSeekOffset:5,stallEnabled:!0,stallThreshold:3,stallSkip:.5,bufferLimitUpdateInterval:.5,overridePasp:!1,enableLiveEdgeChasing:!1,chasingRate:1.15,startChasingAt:5,stopChasingAt:2,chaseJumpDistance:10,patchEdgeWhenMixedContent:!1,ignoreDrift:!1,
85
- disableFragmentSupport:!1,disableMergedFragments:!1,ignoreManagedMediaSourceStreamingHints:!1},mediaSource:{codecSwitchingStrategy:_.lf},restrictions:Qk(),tizen:{sideStreamText:_.Uj(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1},trickPlay:{speedUpMode:_.Dd,preferTrickPlayTracks:!0},playlist:{timeline:"basic",content:_.Tb,cropTimeline:!1}};if(_.Tj("Edge/")||_.Uj())a.streaming.gapDetectionThreshold=.5;_.Xj()&&(a.streaming.stallEnabled=!1);_.Zj()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=
85
+ disableFragmentSupport:!1,disableMergedFragments:!1,ignoreManagedMediaSourceStreamingHints:!1},mediaSource:{codecSwitchingStrategy:_.kf},restrictions:Qk(),tizen:{sideStreamText:_.Uj(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1},trickPlay:{speedUpMode:_.Cd,preferTrickPlayTracks:!0},playlist:{timeline:"basic",content:_.Sb,cropTimeline:!1}};if(_.Tj("Edge/")||_.Uj())a.streaming.gapDetectionThreshold=.5;_.Xj()&&(a.streaming.stallEnabled=!1);_.Zj()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=
86
86
  1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.Uj()&&(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};Qk=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}};
87
87
  _.Tk=function(...a){if(!a)return _.Rk();var b=[_.Rk()];let c=!1;for(let d of a)null!==d&&void 0!==d&&(_.Tg(d)&&(d={source:d}),d.lowLatencyMode&&!c&&(b.push({streaming:{rebufferingGoal:.1,bufferLimitUpdateInterval:.01,ignoreDrift:!0,attemptParameters:{maxAttempts:3,baseDelay:250,backoffFactor:1}},abr:{bandwidthUpgradeTarget:.6,bandwidthDowngradeTarget:.95},manifest:{lowLatencyMode:!0}}),c=!0),b.push(d),null!=d.suggestedPresentationDelay&&b.push({manifest:{suggestedPresentationDelay:d.suggestedPresentationDelay}}));
88
88
  a=_.Mg.apply(null,b);_.Tg(a.volume)&&(""===""+a.volume?a.volume=null:a.volume=Number(a.volume));if(!_.A(a.volume)&&(!_.Ug(a.volume)||Wg(a.volume)))throw new _.H(_.F,7,7100,"config.volume is not a number");if(!_.A(a.preferredTextLanguage)&&!_.Tg(a.preferredTextLanguage)&&!Array.isArray(a.preferredTextLanguage))throw new _.H(_.F,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.A(a.preferredAudioLanguage)&&!_.Tg(a.preferredAudioLanguage)&&!Array.isArray(a.preferredAudioLanguage))throw new _.H(_.F,
@@ -91,225 +91,227 @@ a=_.Mg.apply(null,b);_.Tg(a.volume)&&(""===""+a.volume?a.volume=null:a.volume=Nu
91
91
  Wg(b.rebufferingGoal))throw new _.H(_.F,7,7100,"config.streaming.rebufferingGoal is not a number");if(b.rebufferingGoal>b.bufferingGoal)throw new _.H(_.F,7,7100,"config.streaming.rebufferingGoal must be \x3e\x3d bufferingGoal");if(!_.Ug(b.bufferBehind)||Wg(b.bufferBehind))throw new _.H(_.F,7,7100,"config.streaming.bufferBehind is not a number");if(!_.Ug(b.smallGapLimit)||Wg(b.smallGapLimit))throw new _.H(_.F,7,7100,"config.streaming.smallGapLimit is not a number");if(!_.Ug(b.durationBackoff)||Wg(b.durationBackoff))throw new _.H(_.F,
92
92
  7,7100,"config.streaming.durationBackoff is not a number");b=a.manifest;if(_.A(b.availabilityWindowOverride))b.availabilityWindowOverride=NaN;else if(typeof b.availabilityWindowOverride!==_.t)throw new _.H(_.F,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");Sk(a.restrictions);Sk(a.abr.restrictions);a.abr.initialRestrictions&&Sk(a.abr.initialRestrictions)}return a};
93
93
  Sk=function(a){_.A(a.maxPixels)&&(a.maxPixels=Infinity);_.A(a.maxBandwidth)&&(a.maxBandwidth=Infinity);_.A(a.maxHeight)&&(a.maxHeight=Infinity);_.A(a.maxWidth)&&(a.maxWidth=Infinity);_.A(a.minPixels)&&(a.minPixels=0);_.A(a.minBandwidth)&&(a.minBandwidth=0);_.A(a.minHeight)&&(a.minHeight=0);_.A(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);
94
- 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(_.F,7,7100,"Restrictions contain NaN");};Uk=function(a){return typeof a===_.De&&!Array.isArray(a)&&"source"in a};_.Wk=function(a){return _.Vk.get(a)||null};
94
+ 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(_.F,7,7100,"Restrictions contain NaN");};Uk=function(a){return typeof a===_.Ce&&!Array.isArray(a)&&"source"in a};_.Wk=function(a){return _.Vk.get(a)||null};
95
95
  _.Yk=function(a){_.Vk.get(a.id())?Xk.warn("Component already in use."):_.Vk.set(a.id(),a)};Zk=function(a){return Array.from(_.Vk.values()).find(b=>b instanceof a)||null};$k=function(a){for(const b of _.Vk.values())a(b)};al=function(a){$k(b=>{b.o(a)})};bl=function(a){$k(b=>{b.g(a)})};dl=function(){$k(()=>{})};el=function(){$k(()=>{})};fl=function(a){if(null!==Zk(a))return null;a=new a;a.f();_.Yk(a);Xk.info("Installed component:",a.id());return a};
96
- gl=function(a){if(a=Zk(a))a.a(),_.Vk.delete(a.id()),Xk.info("Uninstalled component:",a.id())};hl=function(a){return _.si(a,_.vd)||_.si(a,_.xd)};il=function(a,b){3===b.type&&(a.f&&(a.h.debug("Attaching tracking token"),b.headers[Ag]=a.f),a.a&&(b.headers[Bg]=a.a))};
96
+ gl=function(a){if(a=Zk(a))a.a(),_.Vk.delete(a.id()),Xk.info("Uninstalled component:",a.id())};hl=function(a){return _.si(a,_.ud)||_.si(a,_.wd)};il=function(a,b){3===b.type&&(a.f&&(a.h.debug("Attaching tracking token"),b.headers[Ag]=a.f),a.a&&(b.headers[Bg]=a.a))};
97
97
  jl=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[Ag],a.a=b.headers[Bg],b=b.headers["x-dt-csl-renewal-info"],a.f&&a.h.debug("Loaded tracking token "+a.f),a.a&&a.h.debug("Loaded followup token "+a.a),b)?(a=JSON.parse(_.li(_.Bi(b))),{delay:a.renewalPeriod,Dh:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};_.ll=function(a){_.kl[a.I]=a};
98
98
  _.nl=function(a){const b={attemptParameters:_.Mi(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,ignoreUnrecognizedInitData:!0,Wa:{}};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!==a.ignoreUnrecognizedInitData&&
99
- (b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),a.env)){const c=_.kl[a.env]||null;if(!c)throw _.fh(_.va,_.yb+a.env+_.aa),new _.H(_.F,6,6015,`DRM environment '${a.env}' is missing.`);b.Wa=_.ml(c,a.customData)||{};_.si(a.env.toLowerCase(),Qd)&&(b.enforceSingleSession=!0)}return b};pl=function(a){a=ol[a];if(!a)return null;const b=_.sk();return b.os===lk&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};
100
- _.ml=function(a,b){const c={};var d=b?b.widevineVideoRobustness:void 0,e=b?b.widevineAudioRobustness:void 0;const f=b?b.serverCertificate:void 0;var g=a.f[_.zd];if(g){var h=g.licenseUrl;d=Ih(d,g.videoRobustness);e=Ih(e,g.audioRobustness);var k=g.modifiers,l=Hh(b?b.widevineDistinctiveIdentifierRequired:void 0,g.distinctiveIdentifierRequired,!1),m=Hh(b?b.widevinePersistentStateRequired:void 0,g.persistentStateRequired,!1);g=void 0===f?g.serverCertificate:null===f?null:typeof f===_.Nf?pl(f):f;c[_.zd]=
101
- {licenseUrl:h,videoRobustness:d,audioRobustness:e,modifiers:k,distinctiveIdentifierRequired:l,persistentStateRequired:m,serverCertificate:g}}(g=a.f[_.vd])&&(c[_.vd]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});h=b?b.playReadyVideoRobustness:void 0;b=b?b.playReadyAudioRobustness:void 0;(g=a.f[_.xd])&&(c[_.xd]={licenseUrl:g.licenseUrl,videoRobustness:h||g.videoRobustness,audioRobustness:b||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,
99
+ (b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),a.env)){const c=_.kl[a.env]||null;if(!c)throw _.fh(_.va,_.yb+a.env+_.aa),new _.H(_.F,6,6015,`DRM environment '${a.env}' is missing.`);b.Wa=_.ml(c,a.customData)||{};_.si(a.env.toLowerCase(),Pd)&&(b.enforceSingleSession=!0)}return b};pl=function(a){a=ol[a];if(!a)return null;const b=_.sk();return b.os===lk&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};
100
+ _.ml=function(a,b){const c={};var d=b?b.widevineVideoRobustness:void 0,e=b?b.widevineAudioRobustness:void 0;const f=b?b.serverCertificate:void 0;var g=a.f[_.yd];if(g){var h=g.licenseUrl;d=Ih(d,g.videoRobustness);e=Ih(e,g.audioRobustness);var k=g.modifiers,l=Hh(b?b.widevineDistinctiveIdentifierRequired:void 0,g.distinctiveIdentifierRequired,!1),m=Hh(b?b.widevinePersistentStateRequired:void 0,g.persistentStateRequired,!1);g=void 0===f?g.serverCertificate:null===f?null:typeof f===_.Mf?pl(f):f;c[_.yd]=
101
+ {licenseUrl:h,videoRobustness:d,audioRobustness:e,modifiers:k,distinctiveIdentifierRequired:l,persistentStateRequired:m,serverCertificate:g}}(g=a.f[_.ud])&&(c[_.ud]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});h=b?b.playReadyVideoRobustness:void 0;b=b?b.playReadyAudioRobustness:void 0;(g=a.f[_.wd])&&(c[_.wd]={licenseUrl:g.licenseUrl,videoRobustness:h||g.videoRobustness,audioRobustness:b||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,
102
102
  modifiers:g.modifiers});return c};_.ql=function(){throw new _.H(_.F,3,3E3);};_.rl=function(a,b,c){const d=c||0;c=b.byteLength-d;const e=_.J(a.f.buffer);b=_.J(b.buffer,d,c);try{e.set(b,a.a),a.a+=c}catch(f){_.ql()}};_.O=function(a,b){try{a.f.setUint32(a.a,b,a.g),a.a+=4}catch(c){_.ql()}};_.sl=function(a){return a.a<a.f.byteLength};_.tl=function(){throw new _.H(_.F,3,3E3,"Buffer read out of bounds.");};_.ul=function(a){try{const b=a.f.getUint8(a.a);a.a+=1;return b}catch(b){_.tl()}};
103
103
  _.vl=function(a){try{const b=a.f.getUint16(a.a,a.g);a.a+=2;return b}catch(b){_.tl()}};_.P=function(a){try{const b=a.f.getUint32(a.a,a.g);a.a+=4;return b}catch(b){_.tl()}};_.wl=function(a){try{const b=a.f.getInt32(a.a,a.g);a.a+=4;return b}catch(b){_.tl()}};_.xl=function(a){let b=0,c=0;try{!0===a.g?(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){_.tl()}if(2097151<c)throw new _.H(_.F,3,3001);a.a+=8;return c*Math.pow(2,32)+b};
104
- yl=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.ul(a);return c};_.zl=function(a,b){a.a+b>a.f.byteLength&&_.tl();var c=a.a+a.f.byteOffset;c=a.f.buffer.slice(c,c+b);a.a+=b;return _.J(c)};Al=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.Bl=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.Cl=function(a){for(;_.sl(a.reader)&&!a.parser.a;)a.parser.Hd(a.start+a.headerSize,a.reader,a.partialOkay)};
105
- _.Dl=function(a){for(let b=_.P(a.reader);0<b&&!a.parser.a;--b)a.parser.Hd(a.start+a.headerSize,a.reader,a.partialOkay)};_.El=function(a){return b=>{const c=b.reader.Da()-b.reader.getPosition();a(_.zl(b.reader,c))}};_.Fl=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};Gl=function(a){let b="";try{b=_.oi(a)}catch(c){}return b};_.Il=function(a){a=Gl(a);let b="";a.length&&(b=(new _.Hl(a)).a);return b};
106
- Kl=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.li(a)),d=_.Bi(c.sinf[0]);(new _.Jl).M(_.Gf,_.Cl).M("schi",_.Cl).M("tenc",e=>{e.reader.skip(6);_.ul(e.reader)&&(e.reader.skip(1),b=_.Di(_.zl(e.reader,16)));e.parser.stop()}).parse(d)}catch(c){}return b};
107
- Ml=function(a,b,c){if(!c||!c.byteLength)throw new _.H(_.F,6,6102);let d;typeof b===_.Nf?d=_.qi(b,!0):d=b;a=_.qi(Gl(a),!0);b=new _.Ll(12+a.byteLength+d.byteLength+c.byteLength,!0);_.O(b,a.byteLength);_.rl(b,_.J(a));_.O(b,d.byteLength);_.rl(b,_.J(d));_.O(b,c.byteLength);_.rl(b,_.J(c));return _.J(b.buffer)};_.Nl=function(a){var b=_.J(a.body);b=_.Ai(b);a.headers[ua]=Fc;a.body=_.pi("spc\x3d"+b).buffer};
108
- _.Ol=function(a){let b;try{b=_.li(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=ji(_.Bi(b))};Tl=function(a,b){b=Pl(b);if(a===_.zd)return b+Ql;if(a===_.xd)return b+Rl;if(a===_.vd)return b+Sl;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
104
+ yl=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.ul(a);return c};_.zl=function(a,b){a.a+b>a.f.byteLength&&_.tl();var c=a.a+a.f.byteOffset;c=a.f.buffer.slice(c,c+b);a.a+=b;return _.J(c)};Al=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.Bl=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.Cl=function(a){for(;_.sl(a.reader)&&!a.parser.a;)a.parser.Jd(a.start+a.headerSize,a.reader,a.partialOkay)};
105
+ _.Dl=function(a){for(let b=_.P(a.reader);0<b&&!a.parser.a;--b)a.parser.Jd(a.start+a.headerSize,a.reader,a.partialOkay)};_.El=function(a){return b=>{const c=b.reader.Da()-b.reader.getPosition();a(_.zl(b.reader,c))}};_.Fl=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};Gl=function(a){let b="";try{b=_.oi(a)}catch(c){}return b};_.Il=function(a){a=Gl(a);let b="";a.length&&(b=(new _.Hl(a)).a);return b};
106
+ Kl=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.li(a)),d=_.Bi(c.sinf[0]);(new _.Jl).M(_.Ff,_.Cl).M("schi",_.Cl).M("tenc",e=>{e.reader.skip(6);_.ul(e.reader)&&(e.reader.skip(1),b=_.Di(_.zl(e.reader,16)));e.parser.stop()}).parse(d)}catch(c){}return b};
107
+ Ml=function(a,b,c){if(!c||!c.byteLength)throw new _.H(_.F,6,6102);let d;typeof b===_.Mf?d=_.qi(b,!0):d=b;a=_.qi(Gl(a),!0);b=new _.Ll(12+a.byteLength+d.byteLength+c.byteLength,!0);_.O(b,a.byteLength);_.rl(b,_.J(a));_.O(b,d.byteLength);_.rl(b,_.J(d));_.O(b,c.byteLength);_.rl(b,_.J(c));return _.J(b.buffer)};_.Nl=function(a){var b=_.J(a.body);b=_.Ai(b);a.headers[ua]=Ec;a.body=_.pi("spc\x3d"+b).buffer};
108
+ _.Ol=function(a){let b;try{b=_.li(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=ji(_.Bi(b))};Tl=function(a,b){b=Pl(b);if(a===_.yd)return b+Ql;if(a===_.wd)return b+Rl;if(a===_.ud)return b+Sl;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
109
109
  _.Wl=function(a,b,c,d){d=void 0===d?!0:d;c=a.drm;c&&c.env.startsWith(xa)?c.customData&&(_.Vl(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)):Ul.warn(kb)};
110
110
  _.Xl=function(a,b){try{const c=_.J(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));Ul.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){Ul.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
111
- _.Zl=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.Wl(a,b,c,!1);b.headers[ua]=Fc;c={spc:_.zi(b.body)};if((a=a.drm)&&a.env.startsWith(ya)&&d){a={};var e=_.ij((new _.Hl(Yl(d))).f);d=e.keyId;if(e=e.assetId)Ul.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(Ul.info("Applying keyId from HLS manifest."),a.keyId=d);d=a;d.keyId&&(Ul.info("Adding keyID to FPS payload:",d.keyId),c.keyId=d.keyId);d.assetId&&(Ul.info("Adding assetID to FPS payload:",d.assetId),c.assetId=d.assetId)}b.body=
111
+ _.Zl=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.Wl(a,b,c,!1);b.headers[ua]=Ec;c={spc:_.zi(b.body)};if((a=a.drm)&&a.env.startsWith(ya)&&d){a={};var e=_.ij((new _.Hl(Yl(d))).f);d=e.keyId;if(e=e.assetId)Ul.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(Ul.info("Applying keyId from HLS manifest."),a.keyId=d);d=a;d.keyId&&(Ul.info("Adding keyID to FPS payload:",d.keyId),c.keyId=d.keyId);d.assetId&&(Ul.info("Adding assetID to FPS payload:",d.assetId),c.assetId=d.assetId)}b.body=
112
112
  _.ri(_.hj(c,!0))};_.$l=function(a,b){Ul.debug("Clearing response data");200===b.status&&(a=_.li(b.data).trim(),"\x3cckc\x3e"===a.substr(0,5)&&"\x3c/ckc\x3e"===a.substr(-6)&&(a=a.slice(5,-6)),b.data=_.Bi(a).buffer)};
113
113
  _.am=function(a,b,c){b=Gl(b);c=c&&c.customData?c.customData:{};b=new _.Hl(Yl(b));const d=_.ij(b.f);if(a&&a.drm&&a.drm.customData){var e=a.drm.customData;a=e.assetId;e=e.variantId;a&&_.ui(`${a}`)&&(d.assetId=a,Ul.debug("Using assetId from the configuration instead of the value from the HLS manifest."));e&&_.ui(`${e}`)&&(d.variantId=e,Ul.info("Using variantId from the configuration instead of the value from the HLS manifest."))}d.keyId?(a=["keyId"],Ul.debug("KeyId found in FPS SKD. Removing other parameters")):
114
- a=["assetId","variantId"];b.f=_.hj(d,!1,a);"/"!==b.path||b.j.includes(`${b.a}/`)||(b.path="");b=_.gj(b);return c.fpsContentId=b};_.bm=function(a,b){a=a.drm;if(!a||!a.env.startsWith(xa))Ul.warn(kb);else if(a.customData&&a.customData.merchant&&!a.env.startsWith(ya)){const c=new _.Lh(b.uris[0]);let d=c.za;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.za=d;b.uris[0]=c.toString()}};cm=function(a,b,c){_.Wl(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.Lh(b.uris[0]);c.a.add(_.Oe,a);b.uris[0]=c.toString()};
114
+ a=["assetId","variantId"];b.f=_.hj(d,!1,a);"/"!==b.path||b.j.includes(`${b.a}/`)||(b.path="");b=_.gj(b);return c.fpsContentId=b};_.bm=function(a,b){a=a.drm;if(!a||!a.env.startsWith(xa))Ul.warn(kb);else if(a.customData&&a.customData.merchant&&!a.env.startsWith(ya)){const c=new _.Lh(b.uris[0]);let d=c.za;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.za=d;b.uris[0]=c.toString()}};cm=function(a,b,c){_.Wl(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.Lh(b.uris[0]);c.a.add(_.Ne,a);b.uris[0]=c.toString()};
115
115
  Pl=function(a){if(a===dm)return"https://lic.drmtoday.com";if(a===em)return"https://lic.staging.drmtoday.com";if(a===fm)return"https://lic.test.drmtoday.com";throw Error("Unknown DRMtoday environment '"+a+"'. Can not infer DRMtoday base URL!");};Yl=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};
116
116
  _.Vl=function(a,b){if((b=b.drm)&&b.customData){var c={userId:b.customData.userId,sessionId:b.customData.sessionId,merchant:b.customData.merchant};_.Pg(c)&&(a.headers["dt-custom-data"]=btoa(JSON.stringify(c)));(b=b.customData.authToken)&&(a.headers["x-dt-auth-token"]=b)}};hm=function(a){const b={},c=a?a[Cg]:void 0;a=gm[a?a[Cg]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};
117
- jm=function(a,b=0){_.eh("Registering EME Factory: "+a.a());a={priority:b,Lb:a};for(let c=0;c<im.length;++c)if(im[c].priority<b){im.splice(c,0,a);return}im.push(a)};km=function(a){if(a){const {Lb:b}=im.find(({Lb:c})=>c.a()===a);if(b&&b.isSupported())return _.eh(Yb+b.a()),b.create();_.eh("Cannot create selected EME manager. Choosing by priority list.")}for(const {Lb:b}of im)if(b.isSupported())return _.eh(Yb+b.a()),b.create();throw Error("Missing EME managers");};
117
+ jm=function(a,b=0){_.eh("Registering EME Factory: "+a.a());a={priority:b,Lb:a};for(let c=0;c<im.length;++c)if(im[c].priority<b){im.splice(c,0,a);return}im.push(a)};km=function(a){if(a){const {Lb:b}=im.find(({Lb:c})=>c.a()===a);if(b&&b.isSupported())return _.eh(Xb+b.a()),b.create();_.eh("Cannot create selected EME manager. Choosing by priority list.")}for(const {Lb:b}of im)if(b.isSupported())return _.eh(Xb+b.a()),b.create();throw Error("Missing EME managers");};
118
118
  _.pm=function(a,b){a=_.lm(a,b);return 1!==a.length?null:a[0]};_.lm=function(a,b){return Array.prototype.filter.call(a.childNodes,c=>c instanceof Element&&c.tagName===b)};_.qm=function(a){return Array.prototype.every.call(a.childNodes,b=>b.nodeType===Node.TEXT_NODE||b.nodeType===Node.CDATA_SECTION_NODE)?a.textContent.trim():null};
119
- _.rm=function(a,b){const c=new DOMParser;let d=null,e=null;try{e=c.parseFromString(a,_.Tf)}catch(f){}e&&e.documentElement.tagName===b&&(d=e.documentElement);return d&&0<d.getElementsByTagName("parsererror").length?null:d};_.um=function(a){var b=_.Ci(a);b=parseInt(b.byteLength,10).toString(16);b=_.Ci("12"+b+a);return new sm(tm,a,b)};
119
+ _.rm=function(a,b){const c=new DOMParser;let d=null,e=null;try{e=c.parseFromString(a,_.Sf)}catch(f){}e&&e.documentElement.tagName===b&&(d=e.documentElement);return d&&0<d.getElementsByTagName("parsererror").length?null:d};_.um=function(a){var b=_.Ci(a);b=parseInt(b.byteLength,10).toString(16);b=_.Ci("12"+b+a);return new sm(tm,a,b)};
120
120
  _.wm=function(a){const b=new _.vm(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.P(b);var c=_.P(b);c=_.Bl(c);var d=_.P(b);const e=d>>>24;d&=16777215;var f=_.zl(b,16);f=_.Di(f);if(0<e){var g=_.P(b);b.skip(16*g)}g=_.P(b);const h=()=>{let u=_.ul(b),v=(u&127)>>>0,y=7;for(;128<=u&&28>=y;)u=_.ul(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(!_.sl(b))throw Error("not enough data to skip!");while(_.ul(b)&128);break;case 1:b.skip(8);break;case 2:b.skip(h());
121
121
  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(;_.sl(b);){var n=h(),q=n&7;n>>>=3;if(2===q){q=h();if(0>q)throw Error(`unable to read length of field ${n}`);q=yl(b,q);2===n?l.push(q):4===n&&(m=q)}else k(q)}_.fh("Parsed WV PSSH Box","size",a,"name",c,"version",e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.zi(m):"","keyIds",l.map(u=>_.Di(u)));return 0<l.length?_.um(_.Di(l[0])):null};
122
122
  _.xm=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=_.J(a);a.set(b,0);return a};
123
- _.Cm=function(a){a:{var b=new _.vm(new DataView(a.buffer),!0);_.P(b);for(_.vl(b);_.sl(b);)if(1===_.vl(b)){var c=_.vl(b);b=_.zl(b,c);break a}b=null}b||(b=a);a=ni(b,!0);c=_.rm(a,"WRMHEADER");a=c.getAttribute("version");var d=_.pm(c,"DATA");c=(c=_.pm(d,"LA_URL"))?_.qm(c):"";var e;if(e=_.pm(d,"KID"))if(e=_.qm(e)){var f=_.pm(d,oa);e={value:e,Sd:f?f.textContent.trim():null}}else e=null;else e=null;d=e?[e]:(e=ym(d))?[e]:(d=zm(d))?d:null;const {value:g="",Sd:h}=d&&d[0]||{};d=_.Bi(g);d=_.xm(d);d=_.Di(d);return new _.Am(_.Bm,
124
- d,c,b,a,h)};ym=function(a){a=_.pm(a,"PROTECTINFO");if(!a)return null;var b=_.pm(a,"KID");if(!b)return null;a=b.getAttribute("VALUE");if(!a)return null;const c=b.getAttribute(oa);b=b.getAttribute("ALGID");return{value:a,Sd:c,ag:b}};
125
- zm=function(a){a=_.pm(a,"PROTECTINFO");if(!a)return null;a=_.pm(a,"KIDS");if(!a)return null;var b=_.lm(a,"KID");if(!b.length)return null;a=[];for(const c of b)if(b=c.getAttribute("VALUE")){const d=c.getAttribute(oa),e=c.getAttribute("ALGID");a.push({value:b,Sd:d,ag:e})}return a.length?a:null};_.Em=function(a){Dm&&performance.mark(a)};_.Fm=function(a,b,c){Dm&&performance.measure(a,b,c)};
126
- Gm=function(a){return _.x(function*(){const b=new Promise(c=>{(new _.Qj(c)).fa(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.C("Timeout waiting for session close")})};_.Im=function(a){return Hm(a)?_.xd:a};Jm=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};
127
- Km=function(a,b){if(a.keySystem){var c=_.Im(a.keySystem);b=b[c];c===_.Le&&a.licenseServerUri||(b&&(a.licenseServerUri=b.licenseUrl||""),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=
123
+ _.Cm=function(a){a:{var b=new _.vm(new DataView(a.buffer),!0);_.P(b);for(_.vl(b);_.sl(b);)if(1===_.vl(b)){var c=_.vl(b);b=_.zl(b,c);break a}b=null}b||(b=a);a=ni(b,!0);c=_.rm(a,"WRMHEADER");a=c.getAttribute("version");var d=_.pm(c,"DATA");c=(c=_.pm(d,"LA_URL"))?_.qm(c):"";var e;if(e=_.pm(d,"KID"))if(e=_.qm(e)){var f=_.pm(d,oa);e={value:e,Td:f?f.textContent.trim():null}}else e=null;else e=null;d=e?[e]:(e=ym(d))?[e]:(d=zm(d))?d:null;const {value:g="",Td:h}=d&&d[0]||{};d=_.Bi(g);d=_.xm(d);d=_.Di(d);return new _.Am(_.Bm,
124
+ d,c,b,a,h)};ym=function(a){a=_.pm(a,"PROTECTINFO");if(!a)return null;var b=_.pm(a,"KID");if(!b)return null;a=b.getAttribute("VALUE");if(!a)return null;const c=b.getAttribute(oa);b=b.getAttribute("ALGID");return{value:a,Td:c,ag:b}};
125
+ zm=function(a){a=_.pm(a,"PROTECTINFO");if(!a)return null;a=_.pm(a,"KIDS");if(!a)return null;var b=_.lm(a,"KID");if(!b.length)return null;a=[];for(const c of b)if(b=c.getAttribute("VALUE")){const d=c.getAttribute(oa),e=c.getAttribute("ALGID");a.push({value:b,Td:d,ag:e})}return a.length?a:null};_.Em=function(a){Dm&&performance.mark(a)};_.Fm=function(a,b,c){Dm&&performance.measure(a,b,c)};
126
+ Gm=function(a){return _.x(function*(){const b=new Promise(c=>{(new _.Qj(c)).fa(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.C("Timeout waiting for session close")})};_.Im=function(a){return Hm(a)?_.wd:a};Jm=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};
127
+ Km=function(a,b){if(a.keySystem){var c=_.Im(a.keySystem);b=b[c];c===_.Ke&&a.licenseServerUri||(b&&(a.licenseServerUri=b.licenseUrl||""),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=
128
128
  b.serverCertificate||null)))}};_.Lm=function(a,b){b=_.Kj(a.mimeType,b||a.codecs);if(_.Jj(b,a.type)){a=a.type;var c=_.Jj(b,a);c&&(c=c(),b=c.convertCodecs(a,b),c.destroy())}return b};Mm=function(a){for(const b of a.audioCapabilities||[])delete b.robustness;for(const b of a.videoCapabilities||[])delete b.robustness};Om=function(a){return(a.audioCapabilities||[]).some(Nm)||(a.videoCapabilities||[]).some(Nm)};
129
129
  Pm=function(a,b){a=_.Il(b);_.fh("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+a);return a};
130
130
  Qm=function(a){var {playerConfig:b,initData:c,initDataType:d,drmInfo:e,drmSystemConfig:f,sessionContext:g,emeApi:h}=a;if("skd"===d&&"APPLE"===h){a=e.serverCertificate;let k=f&&f.modifiers&&f.modifiers.extractContentId;_.Rg(k)||(k=Pm);let l="";try{l=k(b,c,g)}catch(m){throw new _.H(_.F,6,6103);}if(!l.length)throw new _.H(_.F,6,6101,"Content ID is an empty string");c=Ml(c,l,a)}return c};Hm=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
131
131
  Nm=function(a){return null!=a.robustness&&""!==a.robustness};Rm=function(a,b,c,d,e){for(const f of a){b.includes(f.licenseServerUri)||b.push(f.licenseServerUri);f.serverCertificate&&(c.some(g=>_.Ei(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])}};
132
132
  Sm=function(a){var b=a.j;const c=a.W;c.clear();b.forEach((d,e)=>c.set(e,d));b=Array.from(c.values());b.length&&b.every(d=>"expired"===d)&&a.U(new _.H(_.F,6,6014));a.D.pe(_.Yg(c));a.o||a.h.info(wa);a.o=!0;a.B=!1};Tm=function(a){a.f.forEach((b,c)=>{const d=b.ke;let e=c.expiration;isNaN(e)&&(e=Infinity);e!==d&&(a.D.oe(c.sessionId,e),b.ke=e)})};
133
133
  Um=function(a){return _.x(function*(){a.w.release();a.w=null;a.K.release();a.K=null;a.o=!1;a.B=!1;a.F.reject();a.X.stop();a.X=null;a.S.stop();a.S=null;const b=Array.from(a.f.keys());for(const c of a.f.values())c.tc&&c.tc.stop();a.f.clear();yield Promise.all(b.map(c=>Promise.resolve().then(()=>_.x(function*(){a.h.debug("Closing session",c.sessionId);try{yield Gm(c)}catch(d){a.h.warn("Error while closing session",d)}}))));if(a.A){try{yield a.l.g(null)}catch(c){a.h.warn("Error while resetting media keys",
134
- c)}a.A=null}a.l=null;a.a=null;a.H.clear();a.G=null;a.J=[];a.g=null;a.U=null;a.D=null;a.N=0;a.L=null})};_.Ym=function(a,b){const c=b.some(e=>0<e.drmInfos.length);if(!c){var d=Xg(a.g.Wa);Jm(b,d)}if(d=Vm(a))for(const e of b)e.drmInfos=[d];for(const e of b)for(const f of e.drmInfos)Km(f,a.g.Wa);b=Wm(a,b);if(!b.size)return a.R=!0,Promise.resolve();_.Em(Id);a=_.Xm(a,b);return(c?a:a.catch(()=>{})).then(()=>{_.Em(Hd);_.Fm("DRM queryMediaKeys_()",Id,Hd)})};
134
+ c)}a.A=null}a.l=null;a.a=null;a.H.clear();a.G=null;a.J=[];a.g=null;a.U=null;a.D=null;a.N=0;a.L=null})};_.Ym=function(a,b){const c=b.some(e=>0<e.drmInfos.length);if(!c){var d=Xg(a.g.Wa);Jm(b,d)}if(d=Vm(a))for(const e of b)e.drmInfos=[d];for(const e of b)for(const f of e.drmInfos)Km(f,a.g.Wa);b=Wm(a,b);if(!b.size)return a.R=!0,Promise.resolve();_.Em(Hd);a=_.Xm(a,b);return(c?a:a.catch(()=>{})).then(()=>{_.Em(Gd);_.Fm("DRM queryMediaKeys_()",Hd,Gd)})};
135
135
  _.$m=function(a,b,c){c=void 0===c?[]:c;a.I=Zm;a.J=c;a.C=0<c.length;a.h.debug("Using Persisted Licenses: "+a.C);a.g&&a.g.enableSessionCacheForSkd&&a.h.info("Enabled session cache for SKD license requests");return _.Ym(a,b)};
136
- _.Xm=function(a,b){if(1===b.size&&b.has(""))return Promise.reject(new _.H(_.F,6,6E3));null===a.l&&(a.l=km(a.g.emeApi));for(var c of b.values())0===c.audioCapabilities.length&&delete c.audioCapabilities,0===c.videoCapabilities.length&&delete c.videoCapabilities;let d=c=new _.an;const e=(h,k,l)=>{k.drmInfos.some(m=>!!m.licenseServerUri)===h&&(d=d.catch(()=>{if(a.ra)return null;if(l===_.xd){if(_.Sj()&&!a.g.Wa[l].useLegacySystem)return k.label=yd,a.l.a(yd,[k]).catch(()=>{a.h.warn("Unable to create com.microsoft.playready.recommendation. Falling back to com.microsoft.playready.");
137
- k.label=_.xd;Mm(k);return a.l.a(l,[k])});Mm(k)}return a.l.a(l,[k]).catch(m=>{a:{if(l===_.zd&&Om(k)){const n=_.sk();if(Om(k)&&n.os===lk&&n.browser===dd){a.h.warn("requestMediaKeySystemAccess() failed",m);a.h.warn("Will try to recover by removing the robustness attribute of videoCapabilities and audioCapabilities.");Mm(k);m=a.l.a(l,[k]);break a}}throw m;}return m})}))};let f=a.g.preferredDrmSystem;if(!f){var g=_.sk();if(g.os===nk&&10<=g.osVersion.major&&"edge"===g.browser)f=_.xd;else if("safari"===
138
- g.browser)f=_.vd;else if(g.browser===dd||"firefox"===g.browser)f=_.zd}f&&(g=b.get(f))&&(e(!0,g,f),e(!1,g,f));for(const h of[!0,!1])b.forEach((k,l)=>{l!==f&&e(h,k,l)});d=d.catch(h=>{throw new _.H(_.F,6,6001,null,h);});d=d.then(h=>{if(a.ra)return null;a.H.clear();var k=h.getConfiguration();a.h.info("Got MediaKeySystemAccess with configuration",k);var l=k.audioCapabilities||[];k=k.videoCapabilities||[];for(var m of l)a.H.add(m.contentType.toLowerCase());for(var n of k)a.H.add(n.contentType.toLowerCase());
139
- {l=h.keySystem;m=b.get(_.Im(h.keySystem));n=[];k=[];const q=[],u=[];Rm(m.drmInfos,n,k,q,u);1<k.length&&_.C("Multiple unique server certificates found! Only the first will be used.");1<n.length&&_.C("Multiple unique license server URIs found! Only the first will be used.");l={keySystem:l,licenseServerUri:n[0],distinctiveIdentifierRequired:m.distinctiveIdentifier===_.uf,persistentStateRequired:m.persistentState===_.uf,audioRobustness:m.audioCapabilities?m.audioCapabilities[0].robustness:"",videoRobustness:m.videoCapabilities?
136
+ _.Xm=function(a,b){if(1===b.size&&b.has(""))return Promise.reject(new _.H(_.F,6,6E3));null===a.l&&(a.l=km(a.g.emeApi));for(var c of b.values())0===c.audioCapabilities.length&&delete c.audioCapabilities,0===c.videoCapabilities.length&&delete c.videoCapabilities;let d=c=new _.an;const e=(h,k,l)=>{k.drmInfos.some(m=>!!m.licenseServerUri)===h&&(d=d.catch(()=>{if(a.ra)return null;if(l===_.wd){if(_.Sj()&&!a.g.Wa[l].useLegacySystem)return k.label=xd,a.l.a(xd,[k]).catch(()=>{a.h.warn("Unable to create com.microsoft.playready.recommendation. Falling back to com.microsoft.playready.");
137
+ k.label=_.wd;Mm(k);return a.l.a(l,[k])});Mm(k)}return a.l.a(l,[k]).catch(m=>{a:{if(l===_.yd&&Om(k)){const n=_.sk();if(Om(k)&&n.os===lk&&n.browser===cd){a.h.warn("requestMediaKeySystemAccess() failed",m);a.h.warn("Will try to recover by removing the robustness attribute of videoCapabilities and audioCapabilities.");Mm(k);m=a.l.a(l,[k]);break a}}throw m;}return m})}))};let f=a.g.preferredDrmSystem;if(!f){var g=_.sk();if(g.os===nk&&10<=g.osVersion.major&&"edge"===g.browser)f=_.wd;else if("safari"===
138
+ g.browser)f=_.ud;else if(g.browser===cd||"firefox"===g.browser)f=_.yd}f&&(g=b.get(f))&&(e(!0,g,f),e(!1,g,f));for(const h of[!0,!1])b.forEach((k,l)=>{l!==f&&e(h,k,l)});d=d.catch(h=>{throw new _.H(_.F,6,6001,null,h);});d=d.then(h=>{if(a.ra)return null;a.H.clear();var k=h.getConfiguration();a.h.info("Got MediaKeySystemAccess with configuration",k);var l=k.audioCapabilities||[];k=k.videoCapabilities||[];for(var m of l)a.H.add(m.contentType.toLowerCase());for(var n of k)a.H.add(n.contentType.toLowerCase());
139
+ {l=h.keySystem;m=b.get(_.Im(h.keySystem));n=[];k=[];const q=[],u=[];Rm(m.drmInfos,n,k,q,u);1<k.length&&_.C("Multiple unique server certificates found! Only the first will be used.");1<n.length&&_.C("Multiple unique license server URIs found! Only the first will be used.");l={keySystem:l,licenseServerUri:n[0],distinctiveIdentifierRequired:m.distinctiveIdentifier===_.tf,persistentStateRequired:m.persistentState===_.tf,audioRobustness:m.audioCapabilities?m.audioCapabilities[0].robustness:"",videoRobustness:m.videoCapabilities?
140
140
  m.videoCapabilities[0].robustness:"",serverCertificate:k[0],initData:q,keyIds:u,periodId:null}}a.a=l;if(!a.a.licenseServerUri)throw new _.H(_.F,6,6012,a.a.keySystem);return h.createMediaKeys()}).then(h=>{a.ra||(a.h.info("Created MediaKeys for key system",a.a.keySystem),a.G=h,a.R=!0)}).catch(h=>{if(!a.ra){a.a=null;a.H.clear();if(h instanceof _.H)throw h;throw new _.H(_.F,6,6002,{browserError:h.message});}});c.reject();return d};
141
- Vm=function(a){a=Xg(a.g.Wa[_.Le]||{});if(0===a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.Ci(f);e=_.Ci(e);e={kty:"oct",kid:_.Ai(f,!1),k:_.Ai(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.pi(d),initDataType:"keyids"}];return{keySystem:_.Le,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
141
+ Vm=function(a){a=Xg(a.g.Wa[_.Ke]||{});if(0===a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.Ci(f);e=_.Ci(e);e={kty:"oct",kid:_.Ai(f,!1),k:_.Ai(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.pi(d),initDataType:"keyids"}];return{keySystem:_.Ke,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
142
142
  keyIds:[],periodId:null}};
143
- Wm=function(a,b){var c=new Set;for(var d of b)for(var e of d.drmInfos)Km(e,a.g.Wa),c.add(e);d=a.C?_.uf:_.Ke;e=a.C?[_.Pe]:[Rf];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.$c],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Ke,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.Lm(b):"";let h=null;b&&"ac-3"===b.codecs.toLowerCase()&&_.Uj()&&(h=_.Lm(b,_.Sd));const k=c?_.Lm(c):"";let l=null;c&&"ac-3"===
144
- c.codecs.toLowerCase()&&_.Uj()&&(l=_.Lm(c,_.Sd));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(q=>q.initDataType))]);m.distinctiveIdentifierRequired&&(n.distinctiveIdentifier=_.uf);m.persistentStateRequired&&(n.persistentState=_.uf);b&&_.xh(m.audioRobustness).forEach(q=>{const u={robustness:q||"",contentType:g};n.audioCapabilities.find(v=>v.robustness===u.robustness&&v.contentType===u.contentType)||
143
+ Wm=function(a,b){var c=new Set;for(var d of b)for(var e of d.drmInfos)Km(e,a.g.Wa),c.add(e);d=a.C?_.tf:_.Je;e=a.C?[_.Oe]:[Qf];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.Zc],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Je,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.Lm(b):"";let h=null;b&&"ac-3"===b.codecs.toLowerCase()&&_.Uj()&&(h=_.Lm(b,_.Rd));const k=c?_.Lm(c):"";let l=null;c&&"ac-3"===
144
+ c.codecs.toLowerCase()&&_.Uj()&&(l=_.Lm(c,_.Rd));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(q=>q.initDataType))]);m.distinctiveIdentifierRequired&&(n.distinctiveIdentifier=_.tf);m.persistentStateRequired&&(n.persistentState=_.tf);b&&_.xh(m.audioRobustness).forEach(q=>{const u={robustness:q||"",contentType:g};n.audioCapabilities.find(v=>v.robustness===u.robustness&&v.contentType===u.contentType)||
145
145
  n.audioCapabilities.push(u);h&&n.audioCapabilities.push({robustness:q||"",contentType:h})});c&&_.xh(m.videoRobustness).forEach(q=>{const u={robustness:q||"",contentType:k};n.videoCapabilities.find(v=>v.robustness===u.robustness&&v.contentType===u.contentType)||n.videoCapabilities.push(u);l&&n.videoCapabilities.push({robustness:q||"",contentType:l})})}}return a};
146
146
  bn=function(a){return _.x(function*(){if(!a.l.o())if(a.L)yield a.L;else try{a.L=a.l.g(a.G),yield a.L}catch(b){a.ra||a.U(new _.H(_.F,6,6003,b.message,b))}})};
147
- _.fn=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.C||a.I!==Zm)){var e=a.keySystem();if(!e.startsWith(_.vd)&&b===_.$c){const f=new cn(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.A.webkitCurrentPlaybackTargetIsWireless||
148
- _.Uj(2)||a.keySystem().startsWith(_.vd)||!_.dn(a,d,c,!0))&&en(a,d,null,b,c)}};gn=function(a,b){return _.x(function*(){a.h.info(`Handle encrypted event for type ${b.initDataType}`);yield bn(a);b.initData&&_.fn(a,b.initDataType,_.J(b.initData))})};jn=function(a){return _.x(function*(){_.Em(Ld);const b=a.T.map(c=>hn(a,c));a.aa=!0;a.T=[];yield Promise.all(b);_.Em(Kd);_.Fm("drm.onPlay",Ld,Kd)})};
149
- ln=function(a){const b=a.keySystem(),c=a.g.Wa[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.D.getConfiguration();return kn(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.Pi([d],a.g.attemptParameters);f.type=3;f.licenseRequestType=bd;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.h.debug("Fetching certificate");return a.D.sb.fetch(f).P}).then(f=>{a.a.serverCertificate=_.J(f.data)}).catch(f=>{var g=
147
+ _.fn=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.C||a.I!==Zm)){var e=a.keySystem();if(!e.startsWith(_.ud)&&b===_.Zc){const f=new cn(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.A.webkitCurrentPlaybackTargetIsWireless||
148
+ _.Uj(2)||a.keySystem().startsWith(_.ud)||!_.dn(a,d,c,!0))&&en(a,d,null,b,c)}};gn=function(a,b){return _.x(function*(){a.h.info(`Handle encrypted event for type ${b.initDataType}`);yield bn(a);b.initData&&_.fn(a,b.initDataType,_.J(b.initData))})};jn=function(a){return _.x(function*(){_.Em(Kd);const b=a.T.map(c=>hn(a,c));a.aa=!0;a.T=[];yield Promise.all(b);_.Em(Id);_.Fm("drm.onPlay",Kd,Id)})};
149
+ ln=function(a){const b=a.keySystem(),c=a.g.Wa[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.D.getConfiguration();return kn(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.Pi([d],a.g.attemptParameters);f.type=3;f.licenseRequestType=ad;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.h.debug("Fetching certificate");return a.D.sb.fetch(f).P}).then(f=>{a.a.serverCertificate=_.J(f.data)}).catch(f=>{var g=
150
150
  f.data.headers;g=Object.assign({message:"Error while fetching certificate!",url:f.data.url,status:f.data.status,response:f.data.response},g?{headers:g}:{},hm(g));throw new _.H(_.F,6,6100,g,f);})};
151
151
  _.mn=function(a){return _.x(function*(){if(a.G&&a.a&&a.a.serverCertificate&&a.a.serverCertificate.length)try{const b=yield a.G.setServerCertificate(a.a.serverCertificate);void 0===b||b||a.h.debug("Server certificates are not supported by the key system. The server certificate has been ignored.")}catch(b){throw new _.H(_.F,6,6004,{browserError:b.message});}})};
152
- _.pn=function(a){const b=a.a?a.a.initData||[]:[];for(const c of b){let d=!_.Uj(2);if(a.g.enforceSingleSession&&!a.keySystem().startsWith(_.vd)){const e=a.f.values();for(const f of e)_.Ei(c.initData,f.initData)?(a.h.info("Skipping Session creation. Existing init data in single session mode!"),d=!1):f.periodId===c.periodId&&(a.h.info("Skipping Session creation. Merging init data for period in single session mode "+`for Key ID ${c.keyId}.`),nn(c.initData,f)||(f.td.push(c.initData),c.keyId&&!f.Ya.includes(c.keyId)&&
153
- f.Ya.push(c.keyId),a.j.get(c.keyId)||a.j.set(c.keyId,Lf)),d=!1)}!d||a.C&&a.I===Zm||(_.dn(a,c.keyId,c.initData)&&(d=!1),d&&(a.h.info("Request new media key session on create"),en(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.J)_.on(a,c);b.length||a.J.length||(a.o||a.h.info(wa),a.o=!0,a.B=!1,a.F.resolve());return a.F};
154
- _.qn=function(a,b){if(!a.G)return _.nh(a.w,b,[Td,"msneedkey",yg,"needkey"],()=>{a.U(new _.H(_.F,6,6010))}),Promise.resolve();a.A=b;a.l.l(b);a.w.one(a.A,_.Re,()=>jn(a));a.w.on(a.A,_.tg,e=>{const f=a.B;a.B=!a.o;!f&&a.B&&(a.h.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()!==Db||a.J.length)d=bn(a);c=Promise.resolve();_.Xj()&&38===_.Yj().major||(a.a&&a.a.keySystem!==_.Le&&!a.a.serverCertificate&&(c=ln(a)),
155
- c=c.then(()=>_.mn(a)));return Promise.all([d,c]).then(()=>{a.ra||(_.pn(a),a.w.on(a.A,Td,e=>gn(a,e)))}).catch(e=>{if(!a.ra){if(6004===e.code&&a.a&&a.a.keySystem===_.zd&&1>a.N&&a.a.serverCertificate&&a.a.serverCertificate.length)return a.h.warn("Detected invalid widevine server certificate!. Retrying"),a.U(new _.H(1,6,6004)),a.a.serverCertificate=null,a.N++,_.qn(a,b);1<=a.N&&a.h.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
152
+ _.pn=function(a){const b=a.a?a.a.initData||[]:[];for(const c of b){let d=!_.Uj(2);if(a.g.enforceSingleSession&&!a.keySystem().startsWith(_.ud)){const e=a.f.values();for(const f of e)_.Ei(c.initData,f.initData)?(a.h.info("Skipping Session creation. Existing init data in single session mode!"),d=!1):f.periodId===c.periodId&&(a.h.info("Skipping Session creation. Merging init data for period in single session mode "+`for Key ID ${c.keyId}.`),nn(c.initData,f)||(f.td.push(c.initData),c.keyId&&!f.Ya.includes(c.keyId)&&
153
+ f.Ya.push(c.keyId),a.j.get(c.keyId)||a.j.set(c.keyId,Kf)),d=!1)}!d||a.C&&a.I===Zm||(_.dn(a,c.keyId,c.initData)&&(d=!1),d&&(a.h.info("Request new media key session on create"),en(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.J)_.on(a,c);b.length||a.J.length||(a.o||a.h.info(wa),a.o=!0,a.B=!1,a.F.resolve());return a.F};
154
+ _.qn=function(a,b){if(!a.G)return _.nh(a.w,b,[Sd,"msneedkey",yg,"needkey"],()=>{a.U(new _.H(_.F,6,6010))}),Promise.resolve();a.A=b;a.l.l(b);a.w.one(a.A,_.Qe,()=>jn(a));a.w.on(a.A,_.tg,e=>{const f=a.B;a.B=!a.o;!f&&a.B&&(a.h.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()!==Db||a.J.length)d=bn(a);c=Promise.resolve();_.Xj()&&38===_.Yj().major||(a.a&&a.a.keySystem!==_.Ke&&!a.a.serverCertificate&&(c=ln(a)),
155
+ c=c.then(()=>_.mn(a)));return Promise.all([d,c]).then(()=>{a.ra||(_.pn(a),a.w.on(a.A,Sd,e=>gn(a,e)))}).catch(e=>{if(!a.ra){if(6004===e.code&&a.a&&a.a.keySystem===_.yd&&1>a.N&&a.a.serverCertificate&&a.a.serverCertificate.length)return a.h.warn("Detected invalid widevine server certificate!. Retrying"),a.U(new _.H(1,6,6004)),a.a.serverCertificate=null,a.N++,_.qn(a,b);1<=a.N&&a.h.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
156
156
  kn=function(a,b){return _.x(function*(){const c=a.D.yc();if(c){var d=b&&b.drm&&b.drm.customData;d&&(yield c(d))}})};
157
- _.on=function(a,b){let c;try{a.h.debug("Attempting to load an offline session",b),c=a.G.createSession(_.Pe)}catch(e){const f=new _.H(_.F,6,6005,{browserError:e.message});a.U(f);return Promise.reject(f)}a.w.on(c,_.ve,a.da.bind(a));a.w.on(c,ee,a.ea.bind(a));const d={initData:null,loaded:!1,ke:Infinity,ub:null,Ga:new _.an,periodId:null,td:[],keyId:null,Ya:[],initDataType:null,$b:null,sessionContext:{ldlDelay:0,customData:{}}};d.Ga.catch(()=>{});a.f.set(c,d);return c.load(b).then(e=>{if(a.ra)return null;
157
+ _.on=function(a,b){let c;try{a.h.debug("Attempting to load an offline session",b),c=a.G.createSession(_.Oe)}catch(e){const f=new _.H(_.F,6,6005,{browserError:e.message});a.U(f);return Promise.reject(f)}a.w.on(c,_.ue,a.da.bind(a));a.w.on(c,de,a.ea.bind(a));const d={initData:null,loaded:!1,ke:Infinity,ub:null,Ga:new _.an,periodId:null,td:[],keyId:null,Ya:[],initDataType:null,$b:null,sessionContext:{ldlDelay:0,customData:{}}};d.Ga.catch(()=>{});a.f.set(c,d);return c.load(b).then(e=>{if(a.ra)return null;
158
158
  a.h.debug("Loaded offline session",b,e);if(!e)return a.f.delete(c),a.U(new _.H(_.F,6,6013)),null;d.loaded=!0;rn(a)&&(a.o||a.h.info(wa),a.o=!0,a.B=!1,a.F.resolve());return c},e=>{a.ra||(a.f.delete(c),a.U(new _.H(_.F,6,6005,{browserError:e.message})))})};nn=function(a,b){if(!a)return!1;for(let c=0;c<b.td.length;c++)if(_.Ei(a,b.td[c]))return!0;return!1};
159
- _.dn=function(a,b,c,d){d=void 0===d?!1:d;for(const e of a.f.keys()){const f=a.f.get(e);if(_.Ei(c,f.initData))return b?f.Ya.includes(b)?d&&a.h.info("Skipping Session creation. "+`License for init data with Key ID ${b} was already `+`requested in Session: '${e.sessionId}'. `):(f.Ya.push(b),a.j.get(b)||a.j.set(b,Lf),d&&a.h.info(Ib+`Session: '${e.sessionId}'`+`Adding Key ID ${b} to session meta-data.`)):d&&a.h.info(Ib+`Session: '${e.sessionId}'`),!0;if(nn(c,f))return d&&a.h.info("Skipping Session creation. License for init data was already requested [extra]"),
159
+ _.dn=function(a,b,c,d){d=void 0===d?!1:d;for(const e of a.f.keys()){const f=a.f.get(e);if(_.Ei(c,f.initData))return b?f.Ya.includes(b)?d&&a.h.info("Skipping Session creation. "+`License for init data with Key ID ${b} was already `+`requested in Session: '${e.sessionId}'. `):(f.Ya.push(b),a.j.get(b)||a.j.set(b,Kf),d&&a.h.info(Hb+`Session: '${e.sessionId}'`+`Adding Key ID ${b} to session meta-data.`)):d&&a.h.info(Hb+`Session: '${e.sessionId}'`),!0;if(nn(c,f))return d&&a.h.info("Skipping Session creation. License for init data was already requested [extra]"),
160
160
  !0}return!1};
161
161
  en=function(a,b,c,d,e,f,g){f=void 0===f?null:f;g=void 0===g?!1:g;_.x(function*(){if(e.length){var h=b;if(!h)try{h=sn(a,d,e,f)}catch(u){if(a.h.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.g.ignoreUnrecognizedInitData)return}if(!g&&tn(a,h,d,e)){var k=!0;if("skd"===d&&!a.g.enableSessionCacheForSkd)for(var l of a.f.keys()){var m=a.f.get(l);
162
- if(h&&m.keyId===h){a.h.warn(`Close and re-open session for ${h}`);try{yield l.close()}catch(u){a.h.warn("Unable to close session",u)}k=!1}}if(k){a.h.warn(`Skip creating a new session for ${h}`);return}}try{var n=a.C?_.Pe:Rf;var q=a.G.createSession(n);a.h.info(`Created new ${n} session for Key ID: '${h}'. `+`Init data type: ${d}.`)}catch(u){a.U(new _.H(_.F,6,6005,{browserError:u.message}));return}a.w.on(q,_.ve,a.da.bind(a));a.w.on(q,ee,a.ea.bind(a));k={$b:f,td:[],initData:e,initDataType:d,keyId:h,
163
- Ya:h?[h]:[],loaded:!1,ke:Infinity,periodId:c,ub:null,Ga:new _.an,sessionContext:{ldlDelay:0,customData:{}}};k.Ga.catch(()=>{});f&&(l=a.f.get(f),k.sessionContext=l.sessionContext);a.f.set(q,k);h&&!a.j.get(h)&&a.j.set(h,Lf);if(e)for(l=0;l<a.a.initData.length;l++)m=a.a.initData[l],m.keyId&&!k.Ya.includes(m.keyId)&&_.Ei(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),k.Ya.push(m.keyId),a.j.get(m.keyId)||a.j.set(m.keyId,Lf));l=a.D.getConfiguration();m=a.keySystem();m=a.g.Wa[m];n=(n=m.modifiers)&&n.transformInitData;
162
+ if(h&&m.keyId===h){a.h.warn(`Close and re-open session for ${h}`);try{yield l.close()}catch(u){a.h.warn("Unable to close session",u)}k=!1}}if(k){a.h.warn(`Skip creating a new session for ${h}`);return}}try{var n=a.C?_.Oe:Qf;var q=a.G.createSession(n);a.h.info(`Created new ${n} session for Key ID: '${h}'. `+`Init data type: ${d}.`)}catch(u){a.U(new _.H(_.F,6,6005,{browserError:u.message}));return}a.w.on(q,_.ue,a.da.bind(a));a.w.on(q,de,a.ea.bind(a));k={$b:f,td:[],initData:e,initDataType:d,keyId:h,
163
+ Ya:h?[h]:[],loaded:!1,ke:Infinity,periodId:c,ub:null,Ga:new _.an,sessionContext:{ldlDelay:0,customData:{}}};k.Ga.catch(()=>{});f&&(l=a.f.get(f),k.sessionContext=l.sessionContext);a.f.set(q,k);h&&!a.j.get(h)&&a.j.set(h,Kf);if(e)for(l=0;l<a.a.initData.length;l++)m=a.a.initData[l],m.keyId&&!k.Ya.includes(m.keyId)&&_.Ei(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),k.Ya.push(m.keyId),a.j.get(m.keyId)||a.j.set(m.keyId,Kf));l=a.D.getConfiguration();m=a.keySystem();m=a.g.Wa[m];n=(n=m.modifiers)&&n.transformInitData;
164
164
  _.Rg(n)||(n=Qm);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(_.F,6,6016,u));k.Ga&&k.Ga.reject(u);a.U(h);return}a.h.info(`Generate License Request for key ID: '${h}'`);q.generateRequest(d,e.buffer).catch(u=>{if(!a.ra){var v=null;u.errorCode&&u.errorCode.systemCode&&(v=u.errorCode.systemCode,0>v&&(v+=Math.pow(2,32)),v="0x"+v.toString(16));a.U(new _.H(_.F,6,6006,{browserError:u.message,
165
- error:u,extended:v},u))}})}else a.h.warn("Empty init data")})};un=function(a){let b=Infinity;a=a.f.keys();for(const c of a)isNaN(c.expiration)||(b=Math.min(b,c.expiration));return b};rn=function(a){a=a.f.values();return _.ai(a,b=>b.loaded)};tn=function(a,b,c,d){if(!b&&c!==_.Gf)return!1;d=b||Kl(d);for(const e of a.f.values())if(b&&e.keyId===b||b&&e.Ya.includes(b)||c===_.Gf&&(e.keyId||Kl(e.initData))===d)return!0;return!1};
166
- sn=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.g.Wa[f];f=a.D.getConfiguration();g=g&&g.modifiers&&g.modifiers.extractContentId;_.Rg(g)||(g=Pm);try{var h={ldlDelay:0,customData:{}};e&&(h=a.f.get(e).sessionContext);var k=g(f,c,h);a.h.debug(`Extracted Content ID '${k}' from SKD`);var l=k;break a}catch(m){a.h.warn("Unable to extract Content ID from SKD",m)}l=""}return l}if(b===_.Gf)return Kl(c)||"";if(b===_.$c){l=a.keySystem();try{if(l.match(/^com\.widevine\.alpha/)){const m=
165
+ error:u,extended:v},u))}})}else a.h.warn("Empty init data")})};un=function(a){let b=Infinity;a=a.f.keys();for(const c of a)isNaN(c.expiration)||(b=Math.min(b,c.expiration));return b};rn=function(a){a=a.f.values();return _.ai(a,b=>b.loaded)};tn=function(a,b,c,d){if(!b&&c!==_.Ff)return!1;d=b||Kl(d);for(const e of a.f.values())if(b&&e.keyId===b||b&&e.Ya.includes(b)||c===_.Ff&&(e.keyId||Kl(e.initData))===d)return!0;return!1};
166
+ sn=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.g.Wa[f];f=a.D.getConfiguration();g=g&&g.modifiers&&g.modifiers.extractContentId;_.Rg(g)||(g=Pm);try{var h={ldlDelay:0,customData:{}};e&&(h=a.f.get(e).sessionContext);var k=g(f,c,h);a.h.debug(`Extracted Content ID '${k}' from SKD`);var l=k;break a}catch(m){a.h.warn("Unable to extract Content ID from SKD",m)}l=""}return l}if(b===_.Ff)return Kl(c)||"";if(b===_.Zc){l=a.keySystem();try{if(l.match(/^com\.widevine\.alpha/)){const m=
167
167
  _.wm(c);if(m)return m.a}else if(Hm(l)){{f=new _.vm(new DataView(c.buffer,c.byteOffset,c.byteLength),!1);g=_.P(f);const m=_.P(f);h=_.Bl(m);const n=_.P(f);c=n>>>24;k=n&16777215;const q=_.zl(f,16),u=_.Di(q);if(0<c){const D=_.P(f);f.skip(16*D)}const v=_.P(f),y=_.zl(f,v),B=_.Cm(y);_.fh("Parsed PR PSSH Box","size",g,"name",h,"version",c,"flags",k,"size",v,"systemId",u,"keyId",B.a);e=B}if(e)return e.a}}catch(m){throw a.h.warn("Unable to extract Key ID from PSSH data.",{error:m,keySystem:l}),m;}}return""};
168
168
  hn=function(a,b){const c=b.target,d=a.f.get(c);var e=a.keySystem();let f=!1;e.match(/^com\.widevine\.alpha/)&&b.message&&2===b.message.byteLength?(f=!0,a.h.info("WV Server certificate request for "+`SID:'${c.sessionId} `+`from msg '${b.messageType}'`)):a.h.info("License request for "+`SID:'${c.sessionId}'/KID:'${d.keyId}' `+`from msg '${b.messageType}'`);let g=a.a.licenseServerUri;e=a.g.Wa[e];"individualization-request"===b.messageType&&e&&e.individualizationServer&&(g=e.individualizationServer);
169
- const h=_.Pi([g],a.g.attemptParameters);h.type=3;h.body=b.message;h.method="POST";h.licenseRequestType=b.messageType===he&&d.$b?ge:f?bd:b.messageType;h.sessionId=c.sessionId;if(h.licenseRequestType===ge)a.D.onEvent(new _.E(Nd));Hm(a.a.keySystem)&&vn(a,h);il(a.K,h);const k=Math.floor(b.timeStamp),l=Date.now();return wn(a,h,d.sessionContext).then(()=>{_.Em(`drm.license.req.${k}.start`);a.h.debug("Sending DRM license request to",g,h);return a.D.sb.fetch(h).P}).then(m=>{_.Em(`drm.license.req.${k}.end`);
169
+ const h=_.Pi([g],a.g.attemptParameters);h.type=3;h.body=b.message;h.method="POST";h.licenseRequestType=b.messageType===ge&&d.$b?fe:f?ad:b.messageType;h.sessionId=c.sessionId;if(h.licenseRequestType===fe)a.D.onEvent(new _.E(Md));Hm(a.a.keySystem)&&vn(a,h);il(a.K,h);const k=Math.floor(b.timeStamp),l=Date.now();return wn(a,h,d.sessionContext).then(()=>{_.Em(`drm.license.req.${k}.start`);a.h.debug("Sending DRM license request to",g,h);return a.D.sb.fetch(h).P}).then(m=>{_.Em(`drm.license.req.${k}.end`);
170
170
  _.Fm(`drm.license.req.${k}`,`drm.license.req.${k}.start`,`drm.license.req.${k}.end`);if(a.ra)return Promise.reject();const n=Date.now()-l;var q=xn(a,m);let u="";q&&(u=` RID:${q}`);q=m&&m.data?m.data.byteLength:-1;f?a.h.info("WV Server certificate response for "+`SID:'${c.sessionId}' `+`${q} bytes `+`in ${n}ms${u}`):a.h.info("License response for "+`SID:'${c.sessionId}'/`+`KID:'${d.keyId}' `+`${q} bytes `+`in ${n}ms${u}`);const v=jl(a.K,m);_.Em(`drm.sess.update.${k}.start`);return c.update(m.data).then(()=>
171
- {_.Em(`drm.sess.update.${k}.end`);_.Fm(`drm.sess.update.${k}`,`drm.sess.update.${k}.start`,`drm.sess.update.${k}.end`);if(!f){var y=un(a),B=v?Date.now()+1E3*v.delay:Number.NaN;y=new _.E(_.Pd,{keySystem:a.keySystem(),expirationTime:y,expectedRenewalTime:B});a.D.onEvent(y);d&&(d.ub&&d.ub.resolve(),d.$b&&(y=d.$b,a.h.info(`Closing expired session '${y.sessionId}'`),Gm(y).catch(()=>{a.h.warn("Unable to close expired session in time")}),(y=a.f.get(d.$b))&&y.tc&&y.tc.stop(),a.f.delete(d.$b),d.$b=null),(new _.Qj(()=>
172
- {a.ra||(d.loaded=!0,d.Ga&&d.Ga.resolve(),rn(a)&&(a.o||a.h.info(wa),a.o=!0,a.B=!1,a.F.resolve()))})).fa(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||v&&hl(a.keySystem()))&&(y=new _.Qj(()=>{!a.ra&&a.K&&(a.h.info("Updating CSL Sessions"),Hm(a.keySystem())?en(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):a.keySystem().startsWith(_.vd)&&c.update(_.pi("renew")))}),d.tc=y,y.fa(v?v.delay:d.sessionContext.ldlDelay)))}})},m=>_.x(function*(){if(!a.ra){var n=m.data.headers;n=Object.assign({message:_.Sa,
171
+ {_.Em(`drm.sess.update.${k}.end`);_.Fm(`drm.sess.update.${k}`,`drm.sess.update.${k}.start`,`drm.sess.update.${k}.end`);if(!f){var y=un(a),B=v?Date.now()+1E3*v.delay:Number.NaN;y=new _.E(_.Od,{keySystem:a.keySystem(),expirationTime:y,expectedRenewalTime:B});a.D.onEvent(y);d&&(d.ub&&d.ub.resolve(),d.$b&&(y=d.$b,a.h.info(`Closing expired session '${y.sessionId}'`),Gm(y).catch(()=>{a.h.warn("Unable to close expired session in time")}),(y=a.f.get(d.$b))&&y.tc&&y.tc.stop(),a.f.delete(d.$b),d.$b=null),(new _.Qj(()=>
172
+ {a.ra||(d.loaded=!0,d.Ga&&d.Ga.resolve(),rn(a)&&(a.o||a.h.info(wa),a.o=!0,a.B=!1,a.F.resolve()))})).fa(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||v&&hl(a.keySystem()))&&(y=new _.Qj(()=>{!a.ra&&a.K&&(a.h.info("Updating CSL Sessions"),Hm(a.keySystem())?en(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):a.keySystem().startsWith(_.ud)&&c.update(_.pi("renew")))}),d.tc=y,y.fa(v?v.delay:d.sessionContext.ldlDelay)))}})},m=>_.x(function*(){if(!a.ra){var n=m.data.headers;n=Object.assign({message:_.Sa,
173
173
  url:m.data.url,status:m.data.status,response:m.data.response},n?{headers:n}:{},hm(n));n=new _.H(_.F,6,6007,n,m);a.U(n);d&&d.ub&&d.ub.reject(n);d&&d.Ga&&d.Ga.reject(n)}})).catch(m=>{a.ra||(m===Gb?a.h.info("Ignore update for closed sessions"):(m=new _.H(_.F,6,6008,{browserError:m.message}),a.U(m),d&&d.ub&&d.ub.reject(m),d&&d.Ga&&d.Ga.reject(m)))})};
174
174
  vn=function(a,b){var c=ni(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){a.h.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(_.dg).textContent;b.body=_.Bi(a.querySelector("Challenge").textContent).buffer}else a.h.debug("PlayReady request is already unwrapped."),b.headers[ua]="text/xml; charset\x3dutf-8"};
175
- wn=function(a,b,c){return _.x(function*(){const d=a.D.getConfiguration();yield kn(a,d);const e=a.keySystem();var f=a.g.Wa[e];const g=(f=f&&f.modifiers)&&f.licenseRequest,h=f&&f.licenseResponse;g?b.requestModifiers.push(k=>g(d,k,c)):e.startsWith(_.vd)&&b.requestModifiers.push(k=>_.Nl(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.vd)&&b.responseModifiers.push(k=>_.Ol(k))})};
175
+ wn=function(a,b,c){return _.x(function*(){const d=a.D.getConfiguration();yield kn(a,d);const e=a.keySystem();var f=a.g.Wa[e];const g=(f=f&&f.modifiers)&&f.licenseRequest,h=f&&f.licenseResponse;g?b.requestModifiers.push(k=>g(d,k,c)):e.startsWith(_.ud)&&b.requestModifiers.push(k=>_.Nl(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.ud)&&b.responseModifiers.push(k=>_.Ol(k))})};
176
176
  xn=function(a,b){if(!b||!b.headers)return"";if(b=b.headers["x-dt-li"])try{return JSON.parse(_.li(_.Bi(b))).ti}catch(c){a.h.warn("Unable to parse DRMtoday Request ID",c)}return""};_.An=function(a,b){a&&b&&(_.yn.set(a,b),_.zn.info(`Registered TextDisplayerFactory: '${a}'`))};
177
177
  _.Bn=function(a,b){b=b.find(c=>(c=_.yn.get(c))?c.isSupported(a):!1);if(null==b)return _.zn.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;_.zn.info(`Chosen the text displayer: ${b}`);return _.yn.get(b)};_.Cn=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})}}};
178
178
  Dn=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};En=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};Fn=function(a){return a.a.map(b=>_.Ng(b))};
179
179
  _.Gn=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:[]}};In=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Hn.value().get(b),c.one(a,b,d))};
180
- Mn=function(a){a.h.debug("Start watching for video events for "+a.m.namespace());const b=a.m,c=d=>Jn(a,d.type);a.a.on(b,_.Vd,()=>{a.g||(a.j=!1,Kn(a,_.Ln))});a.a.on(b,Vc,c);a.a.on(b,_.bf,()=>{a.F=!0;a.j=!1;Jn(a,_.bf)});a.a.on(b,_.Ne,()=>{a.F=!1;a.j=!1;Jn(a,_.Ne)});a.a.on(b,_.Uf,c);a.a.on(b,_.qf,c);a.a.on(b,_.Bf,d=>{a.g=!1;a.j=!1;Jn(a,d.type)});a.a.on(b,_.Cf,d=>{a.g=!0;Jn(a,d.type)});a.a.on(b,If,c);a.a.on(b,_.sg,()=>{a.j=!0;Jn(a,_.sg)});a.a.on(b,_.r,d=>a.U(d));a.a.on(b,_.qe,c);a.a.on(b,Wc,()=>{a.C=
181
- !0;Jn(a,Wc)});a.a.on(b,_.cg,d=>{a.g=!0;Jn(a,d.type)});a.a.on(b,_.bg,d=>{a.g=!1;a.j=!1;Jn(a,d.type)})};Nn=function(a,b){return Object.keys(b)[a]};Pn=function(a,b){const c={type:_.Kf};b===_.Uc||b===_.Qc?(c.reason=a.w,b===_.Uc?c.timeSinceLastStateChangeMS=a.H:c.bufferedTimeMS=a.B):(a.f===_.On&&(c.reason=a.w),a.A===_.On&&(c.reason=a.w,c.bufferedTimeMS=a.B),c.currentState=a.f,c.previousState=a.A,c.timeSinceLastStateChangeMS=a.H);return c};
182
- Kn=function(a,b){if(a.f===b)return!1;var c=Date.now();const d=a.f===_.On;a.A=a.f;a.f=b;a.A===_.Ln&&(a.I=c,a.o=0);a.o||(a.o=a.I||c);a.H=c-a.o;a.o=c;b===_.On?(a.K=a.o,a.w=a.g?1:2,a.h.info("Buffering started. Reason: "+Nn(a.w-1,_.Qn)),b=Pn(a,_.Uc),a.Vb(_.Uc,b)):d&&(a.B=a.o-a.K,a.h.info("Buffering finished. Reason: "+Nn(a.w-1,_.Qn)+". Buffering time: "+a.B+" ms"),b=Pn(a,_.Qc),a.Vb(_.Qc,b));b=Nn(a.A,_.Rn);c=Nn(a.f,_.Rn);a.h.info(`Player state change: ${b} -> ${c}`);a.Vb(_.Kf,Pn(a,""));return!0};
183
- Jn=function(a,b){if(a.f===_.Sn)a.h.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.g||(a.j=!1,Kn(a,_.Ln));else if(b!==_.Uf){var e=a.m.getPosition();e=null!==e&&void 0!==e&&0<=e?a.m.getBufferInfo().va(e,!0):-1;a.G=e;e=a.m.getSurface().getMedia();a.l=e?e.readyState:null;a.J=a.m.getPlaybackRate()||1;e=typeof a.l===_.t&&2>a.l&&2===e.networkState;var f=typeof a.l===_.t&&0>=a.G&&a.f===_.Tn,g=typeof a.l===_.t&&2>=a.l&&a.j;e=a.g||
184
- f||e||g;!a.L||a.m.isLive()||a.f!==_.On||e||(f=b===_.Bf&&4===a.l,(g=a.A===_.Un)&&!a.C?e=!0:g||a.C||f||(e=!0));f=!1;e?f=Kn(a,_.On):c?f=Kn(a,_.Vn):a.F&&(f=Kn(a,_.Wn));f&&(a.C=!1);a.h.debug("Video state check for event "+b+":: seeking: "+a.g+", waiting: "+a.j+", playing: "+a.F+", paused: "+c+", readyState: "+a.l+", rate: "+a.J+", buffer: "+a.G+", ended: "+d+". Changed state: "+f+", Current state: "+Nn(a.f,_.Rn))}}};
185
- Xn=function(a){a=(new _.Lh(a)).za;if(!a)return null;a=a.toUpperCase();return _.ti(a,".MPD")?_.zc:_.ti(a,".M3U8")?_.Lk:_.ti(a,".MP4")?_.ig:_.ti(a,"MANIFEST")||_.ti(a,".ISM")?_.Ec:null};_.Zn=function(a){let b;Uk(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.Nf||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=Yn(b[c]);d&&a.push(d)}return a};
186
- Yn=function(a){let b=null;_.Tg(a)&&(a={url:a});typeof a===_.De&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.A(a.drmProtected)||typeof a.drmProtected!==_.Pc||(b.drmProtected=a.drmProtected),_.A(a.isLive)||typeof a.isLive!==_.Pc||(b.isLive=a.isLive),_.A(a.name)||typeof a.name!==_.Nf||(b.name=a.name),_.A(a.Hb)||typeof a.Hb!==_.Nf||(b.Hb=a.Hb),_.A(a.audioMimeType)||typeof a.audioMimeType!==_.Nf||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=Xn(a.url),b.type?$n.debug("Detect media type "+
187
- b.type+" for "+a.url):$n.warn("Unable to detect media type for "+a.url));return b};bo=function(a){return a.w?ao():new Promise(b=>{if(a.a){const c=a.a;a.g.off(c,_.r);a.g.off(c,_.vf);a.a=null}b()})};ao=function(){return Promise.reject(new _.H(_.F,7,7E3))};
188
- eo=function(a,b){return a.w?ao():new Promise(c=>{a.a||(a.g.on(b,_.r,()=>{{const d=co(a);if(d)a.onError(d)}}),a.g.on(b,_.vf,()=>{const d=b.videoWidth,e=b.videoHeight,f=a.getTrackManager();f&&0<d&&0<e&&(f.w={width:d,height:e});a.trigger(new _.E(_.Nc,{detail:{width:d,height:e}}))}),a.a=b);c()})};
189
- go=function(a){return _.x(function*(){if(a.w)return ao();var b=a.ca[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),Promise.resolve();b=_.nl(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.o=new _.fo({sb:c,onError:d=>a.onError(d),pe:()=>{},oe:(d,e)=>{a.trigger(new _.E(_.Md,{expirationTime:e}))},onEvent:d=>{d instanceof _.E?a.dispatchEvent(d):a.log.debug(_.Ob,
180
+ Mn=function(a){a.h.debug("Start watching for video events for "+a.m.namespace());const b=a.m,c=d=>Jn(a,d.type);a.a.on(b,_.Ud,()=>{a.g||(a.j=!1,Kn(a,_.Ln))});a.a.on(b,Uc,c);a.a.on(b,_.af,()=>{a.F=!0;a.j=!1;Jn(a,_.af)});a.a.on(b,_.Me,()=>{a.F=!1;a.j=!1;Jn(a,_.Me)});a.a.on(b,_.Tf,c);a.a.on(b,_.pf,c);a.a.on(b,_.Af,d=>{a.g=!1;a.j=!1;Jn(a,d.type)});a.a.on(b,_.Bf,d=>{a.g=!0;Jn(a,d.type)});a.a.on(b,Hf,c);a.a.on(b,_.sg,()=>{a.j=!0;Jn(a,_.sg)});a.a.on(b,_.r,d=>a.U(d));a.a.on(b,_.me,c);a.a.on(b,Vc,()=>{a.C=
181
+ !0;Jn(a,Vc)});a.a.on(b,_.cg,d=>{a.g=!0;Jn(a,d.type)});a.a.on(b,_.bg,d=>{a.g=!1;a.j=!1;Jn(a,d.type)})};Nn=function(a,b){return Object.keys(b)[a]};Pn=function(a,b){const c={type:_.Jf};b===_.Qc||b===_.Pc?(c.reason=a.w,b===_.Qc?c.timeSinceLastStateChangeMS=a.H:c.bufferedTimeMS=a.B):(a.f===_.On&&(c.reason=a.w),a.A===_.On&&(c.reason=a.w,c.bufferedTimeMS=a.B),c.currentState=a.f,c.previousState=a.A,c.timeSinceLastStateChangeMS=a.H);return c};
182
+ Kn=function(a,b){if(a.f===b)return!1;var c=Date.now();const d=a.f===_.On;a.A=a.f;a.f=b;a.A===_.Ln&&(a.I=c,a.o=0);a.o||(a.o=a.I||c);a.H=c-a.o;a.o=c;b===_.On?(a.K=a.o,a.w=a.g?1:2,a.h.info("Buffering started. Reason: "+Nn(a.w-1,_.Qn)),b=Pn(a,_.Qc),a.Vb(_.Qc,b)):d&&(a.B=a.o-a.K,a.h.info("Buffering finished. Reason: "+Nn(a.w-1,_.Qn)+". Buffering time: "+a.B+" ms"),b=Pn(a,_.Pc),a.Vb(_.Pc,b));b=Nn(a.A,_.Rn);c=Nn(a.f,_.Rn);a.h.info(`Player state change: ${b} -> ${c}`);a.Vb(_.Jf,Pn(a,""));return!0};
183
+ Jn=function(a,b){if(a.f===_.Sn)a.h.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.g||(a.j=!1,Kn(a,_.Ln));else if(b!==_.Tf){var e=a.m.getPosition();e=null!==e&&void 0!==e&&0<=e?a.m.getBufferInfo().va(e,!0):-1;a.G=e;e=a.m.getSurface().getMedia();a.l=e?e.readyState:null;a.J=a.m.getPlaybackRate()||1;e=typeof a.l===_.t&&2>a.l&&2===e.networkState;var f=typeof a.l===_.t&&0>=a.G&&a.f===_.Tn,g=typeof a.l===_.t&&2>=a.l&&a.j;e=a.g||
184
+ f||e||g;!a.L||a.m.isLive()||a.f!==_.On||e||(f=b===_.Af&&4===a.l,(g=a.A===_.Un)&&!a.C?e=!0:g||a.C||f||(e=!0));f=!1;e?f=Kn(a,_.On):c?f=Kn(a,_.Vn):a.F&&(f=Kn(a,_.Wn));f&&(a.C=!1);a.h.debug("Video state check for event "+b+":: seeking: "+a.g+", waiting: "+a.j+", playing: "+a.F+", paused: "+c+", readyState: "+a.l+", rate: "+a.J+", buffer: "+a.G+", ended: "+d+". Changed state: "+f+", Current state: "+Nn(a.f,_.Rn))}}};
185
+ Xn=function(a){a=(new _.Lh(a)).za;if(!a)return null;a=a.toUpperCase();return _.ti(a,".MPD")?_.yc:_.ti(a,".M3U8")?_.Lk:_.ti(a,".MP4")?_.ig:_.ti(a,"MANIFEST")||_.ti(a,".ISM")?_.Dc:null};_.Zn=function(a){let b;Uk(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.Mf||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=Yn(b[c]);d&&a.push(d)}return a};
186
+ Yn=function(a){let b=null;_.Tg(a)&&(a={url:a});typeof a===_.Ce&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.A(a.drmProtected)||typeof a.drmProtected!==_.Nc||(b.drmProtected=a.drmProtected),_.A(a.isLive)||typeof a.isLive!==_.Nc||(b.isLive=a.isLive),_.A(a.name)||typeof a.name!==_.Mf||(b.name=a.name),_.A(a.Hb)||typeof a.Hb!==_.Mf||(b.Hb=a.Hb),_.A(a.audioMimeType)||typeof a.audioMimeType!==_.Mf||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=Xn(a.url),b.type?$n.debug("Detect media type "+
187
+ b.type+" for "+a.url):$n.warn("Unable to detect media type for "+a.url));return b};bo=function(a){return a.w?ao():new Promise(b=>{if(a.a){const c=a.a;a.g.off(c,_.r);a.g.off(c,_.uf);a.a=null}b()})};ao=function(){return Promise.reject(new _.H(_.F,7,7E3))};
188
+ eo=function(a,b){return a.w?ao():new Promise(c=>{a.a||(a.g.on(b,_.r,()=>{{const d=co(a);if(d)a.onError(d)}}),a.g.on(b,_.uf,()=>{const d=b.videoWidth,e=b.videoHeight,f=a.getTrackManager();f&&0<d&&0<e&&(f.w={width:d,height:e});a.trigger(new _.E(_.Mc,{detail:{width:d,height:e}}))}),a.a=b);c()})};
189
+ go=function(a){return _.x(function*(){if(a.w)return ao();var b=a.ca[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),Promise.resolve();b=_.nl(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.o=new _.fo({sb:c,onError:d=>a.onError(d),pe:()=>{},oe:(d,e)=>{a.trigger(new _.E(_.Ld,{expirationTime:e}))},onEvent:d=>{d instanceof _.E?a.dispatchEvent(d):a.log.debug(_.Nb,
190
190
  d.type)},getConfiguration:()=>a.getConfiguration(),yc:()=>a.yc()});a.o.g=b;yield _.$m(a.o,[{id:0,language:_.Xf,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,xa:0,mimeType:_.ig,codecs:"",encrypted:!0,keyId:null,language:_.Xf,originalLanguage:_.Xf,label:null,type:_.w,primary:!1,frameRate:void 0,Sh:void 0,
191
191
  trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,spatialAudio:!1,Eh:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}]);yield _.qn(a.o,a.a);return Promise.resolve()})};ho=function(a,b){In(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.g,()=>{a.getState()!==_.Sn&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
192
192
  co=function(a){if(null===a.ca||!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(_.F,3,3016,{code:b,Mh:c,message:a.a.error.message})};
193
- jo=function(a){if(a.w)return new _.io(ao(),()=>{});const b=a.ca[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.H;c&&ho(a,c);if(d.preload!==_.Ce)a.g.one(d,_.qe,()=>{const g=Date.now()/1E3-e;a.f.A=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.Uj()||_.Xj())&&d.load();const f=new _.an;a.g.one(d,If,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.B||(a.B=(new _.Qj(()=>{f.reject(new _.H(_.F,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
194
- uri:b.url},d.error))})).fa(g))});In(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.g,()=>f.resolve());d.error?f.reject(co(a)):d.preload===_.Ce&&(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.g.one(d,_.r,()=>{f.reject(co(a))});return new _.io(f,
193
+ jo=function(a){if(a.w)return new _.io(ao(),()=>{});const b=a.ca[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.H;c&&ho(a,c);if(d.preload!==_.Be)a.g.one(d,_.me,()=>{const g=Date.now()/1E3-e;a.f.A=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.Uj()||_.Xj())&&d.load();const f=new _.an;a.g.one(d,Hf,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.B||(a.B=(new _.Qj(()=>{f.reject(new _.H(_.F,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
194
+ uri:b.url},d.error))})).fa(g))});In(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.g,()=>f.resolve());d.error?f.reject(co(a)):d.preload===_.Be&&(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.g.one(d,_.r,()=>{f.reject(co(a))});return new _.io(f,
195
195
  ()=>{const g=new _.H(_.F,7,7001);f.reject(g);return Promise.resolve()})};ko=function(a,b){In(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.g,()=>{if(a.isLive()&&a.getState()!==_.Sn){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)}))}})};
196
- lo=function(a,b){let c=!1;a.g.on(b,_.Cf,()=>{c=b.paused});a.g.on(b,_.Bf,()=>{.2>b.duration-b.currentTime&&b.paused&&!c&&(a.log.warn("Player was auto-paused during seek to the end, auto-resuming."),b.play())})};_.oo=function(a){a&&(0<=mo.indexOf(a)?no.warn(`Factory '${a.name()}' is already registered`):(mo.push(a),no.info(`Factory ${a.name()}' has been registered.`)))};qo=function(a,b){let c=mo.find(d=>d.isSupported(a,b));c||(c=new po);no.info(`Chosen ads: ${c.name()}`);return c};
197
- _.ro=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};_.so=function(a,b){a.classList.add(b)};_.to=function(a,b){if(a&&typeof b===_.De)for(const c in b)a.style[c]=b[c]};_.uo=function(a){return document.createElement(a)};
196
+ lo=function(a,b){let c=!1;a.g.on(b,_.Bf,()=>{c=b.paused});a.g.on(b,_.Af,()=>{.2>b.duration-b.currentTime&&b.paused&&!c&&(a.log.warn("Player was auto-paused during seek to the end, auto-resuming."),b.play())})};_.oo=function(a){a&&(0<=mo.indexOf(a)?no.warn(`Factory '${a.name()}' is already registered`):(mo.push(a),no.info(`Factory ${a.name()}' has been registered.`)))};qo=function(a,b){let c=mo.find(d=>d.isSupported(a,b));c||(c=new po);no.info(`Chosen ads: ${c.name()}`);return c};
197
+ _.ro=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};_.so=function(a,b){a.classList.add(b)};_.to=function(a,b){if(a&&typeof b===_.Ce)for(const c in b)a.style[c]=b[c]};_.uo=function(a){return document.createElement(a)};
198
198
  vo=function(a,b){const c=new MutationObserver(()=>{const d=Array.from(a.g.values());zh(Array.from(b.classList),Array.from(d))||b.classList.add(...d)});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};wo=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.g.add(b))};
199
- xo=function(a,b,c){(_.Xj()&&53===_.Yj().major||_.Xj()&&68===_.Yj().major||_.Zj())&&!b.hasAttribute(Bd)&&(b.style.opacity="0",b.setAttribute(Bd,""),a.j.one(b,Rd,()=>{b.removeAttribute(Bd);b.style.opacity="1";c&&(c.style.opacity="1")}))};
200
- Bo=function(a){a.a.on(window,"offline",()=>{yo(a,!1)});a.a.on(window,"online",()=>{a.f||zo(a)});a.a.on(a.m,If,()=>Ao(a));a.a.on(a.m,"suspend",()=>Ao(a));a.a.on(a.m,_.sg,()=>Ao(a));a.a.on(a.m,_.bf,()=>{a.f||zo(a)});a.a.on(a.m,_.of,()=>{a.f||zo(a)});a.a.on(a.m,_.Kf,()=>{switch(a.m.getState()){case _.On:Ao(a);break;default:Ao(a)}})};Co=function(a){a.g&&(a.g.stop(),a.g=null)};Ao=function(a){a.f&&zo(a)};
201
- Do=function(a){return _.x(function*(){var b=a.m.getConfiguration().connectivityCheck;b&&a.m&&(b=yield Zi(a.j,b.url,b.attemptParameters,b.method),yo(a,b))})};zo=function(a){a.m.getConfiguration().connectivityCheck&&(Co(a),a.g=(new _.Qj(()=>Do(a))).fa(5))};yo=function(a,b){Co(a);a.f!==b&&(a.f=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.E(Je,{online:a.f})))};Fo=function(){for(let a=0;a<Eo.length;++a)Eo[a].rc()};
202
- _.Go=function(a,b){b=b||0;a={priority:b,rc:a};for(let c=0;c<Eo.length;c++)if(Eo[c].priority<b){Eo.splice(c,0,a);return}Eo.push(a)};Ho=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};Jo=function(a){if(!a.a){var b=a.license.split(".");if(3!==b.length)throw Error("Expected to find 3 data sections in JWT raw data");b=new Io(b[0],b[1],b[2]);a.a=b}return a.a};
203
- Ko=function(a){switch((a.ca[0]||{src:"",type:""}).type){case _.zc:a="dash";break;case _.Ec:a="ss";break;case _.Lk:a="hls";break;case _.ig:a="mp4";break;default:a=""}return a};Lo=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};Mo=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
204
- No=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};Oo=function(a){a=a.drmInfo;return(new _.Lh(a&&a.licenseServerUri||"")).Ma};Po=function(a){const b=a.configuration;let c="no";b.drm&&!_.Vg(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(Qd)||Oo(a).endsWith("drmtoday.com"))&&(c=Qd);return c};Qo=function(a){a=a.drmInfo;let b="";if(a)switch(a.keySystem){case _.zd:b="wv";break;case _.xd:b="pr";break;case _.vd:b="fps"}return b};
205
- Ro=function(a){a=a.drmInfo;let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};So=function(a){a=a.drmInfo;let b="";if(a)switch(a.videoRobustness){case Za:case Xa:b="L1";break;case Ya:b="L2";break;case _.Fb:case _.Eb:b="L3"}return b};
206
- Wo=function(a,b){const c="ie"===_.sk().browser;var d=b.configuration;const e=[...Array.from(_.Vk.keys()),...b.Df];b={"CL-KEY":a.license,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.fa,"CL-USER-ID":Lo(d),"CL-ASSET-ID":Mo(d),"CL-SESSION-ID":No(d),"CL-PLAYBACK-TYPE":b.isLive?To:Uo,"CL-CONTENT-TYPE":Ko(b),"CL-PLUGINS":e.join(" "),"CL-DRM":Po(b),"CL-DRM-CDM":Qo(b),"CL-DRM-SEC-LEVEL":So(b),"CL-DRM-OFFLINE":Ro(b),"CL-DRM-IP":Oo(b)};c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=d);d=
207
- _.Pi(["https://downloads.castlabs.com/r/register/"]);d.method="GET";d.headers=b;return(new _.Vo).fetch(d).P.then(f=>{200===f.status&&c&&window.localStorage.setItem("cl_et",f.headers.etag);return Promise.resolve()}).catch(f=>{a:{var g=Jo(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";if(403===h){h=k;k="";try{k=JSON.parse(decodeURIComponent(f.responseText)).message}catch(l){}f=k;f=h+(": "+f)}else f=k+
208
- "!";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.h.error(db+k);g=Promise.reject(new _.H(_.F,7,g,k))}}return g})};_.Yo=function(a){a&&(0<=Xo.indexOf(a)||Xo.push(a))};$o=function(a,b){a.B=new Zo(b);a.B.verify().catch(c=>{setTimeout(()=>{a.h.error(db+c);a.trigger(new _.E(_.r,{detail:new _.H(_.F,7,7101)}));a.destroy()},1E3)})};
209
- bp=function(a,b){a.S=b;for(const c of a.S)(b=c.id())&&(a.H[b]=c);_.ap(a,"onPlayerCreated")};_.cp=function(a,b){null!=b&&b===a.a?a.a.forwardEventsTo(a):(a.a&&(a.a.stopForwardingEventsTo(a),a.a.destroy(),a.a=null),b&&(b.init(a.g,a.A),b.setNetworkEngine(a.getNetworkEngine()),b.forwardEventsTo(a),a.a=b))};
210
- dp=function(a,b){_.x(function*(){a.g.getMedia()||a.g.getCastElement();a.B||(a.B=new Zo(a.f.license));try{a.h.debug("Verifying license remotely"),yield Wo(a.B,b),a.h.debug("License verified remotely")}catch(c){a.h.debug("License rejected by remote",c),setTimeout(Ho,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)}})};_.ap=function(a,b,...c){if(!a.T)return Promise.resolve();const d=a.S.map(e=>e[b].call(e,a,...c)).filter(e=>e instanceof Promise);return Promise.all(d)};
211
- ep=function(a){return _.x(function*(){if(a.L)return a.h.debug("The player is already released. No-op"),new Promise(b=>b());a.W.off(document,qg);a.trigger(new _.E(_.sf));a.g&&a.g.release();a.j&&(yield a.j.dispose(),a.j=null);if(a.a){let b=null;const c=a.a.on(_.Kf,d=>{b=d});return _.ap(a,_.He).then(()=>{a.a.stopForwardingEventsTo(a);return Promise.all([a.a.release(),a.F.release()])}).then(()=>{a.h.debug("Releasing player completed");b&&(a.h.debug("Re-post state change event after release"),a.trigger(b))}).finally(()=>
212
- {a.a.off(_.Kf,c);a.trigger(new _.E(rf))})}a.trigger(new _.E(rf));return new Promise(b=>b())})};fp=function(a,b){const c=kh(d=>d.f(_.tb)&&a.every(e=>2===d.canPlay(e,b)));if(!c)throw new _.H(_.F,7,7003,"No compatible player implementing playlist mode found!");return Promise.resolve({player:c.create(),sourceIndex:0})};hp=function(a,b,c){return _.x(function*(){if(2===(a.a?a.a.canPlay(b[0],c):0)&&!a.N)return{player:a.a,sourceIndex:0};a.N=!1;return gp(a,b,c)})};
213
- ip=function(a,b,c){return a.J===_.tb?fp(b,c):hp(a,b,c)};
214
- gp=function(a,b,c){return new Promise((d,e)=>{var f;if(b){var g=f=null;for(var h=0;h<b.length;h++);h=Object.values(_.hh);for(let k=0;k<b.length;k++)for(let l=0;l<h.length;l++){const m={Lb:h[l],confidence:h[l].canPlay(b[k],c)};if(null===f||f.confidence<m.confidence)f=m,g=k}f&&typeof g===_.t&&0<f.confidence?(_.ih.debug("Player Factory '"+f.Lb.a()+"' can play",b[g]),f=new jp(f.Lb,g)):(_.ih.error("No compatible Player Factory found for sources:",b),f=null)}else f=null;f?(e=f.Lb.create(),d({player:e,sourceIndex:f.sourceIndex})):
199
+ xo=function(a,b,c){(_.Xj()&&53===_.Yj().major||_.Xj()&&68===_.Yj().major||_.Zj())&&!b.hasAttribute(Ad)&&(b.style.opacity="0",b.setAttribute(Ad,""),a.j.one(b,Qd,()=>{b.removeAttribute(Ad);b.style.opacity="1";c&&(c.style.opacity="1")}))};
200
+ Bo=function(a){a.a.on(window,"offline",()=>{yo(a,!1)});a.a.on(window,"online",()=>{a.f||zo(a)});a.a.on(a.m,Hf,()=>Ao(a));a.a.on(a.m,"suspend",()=>Ao(a));a.a.on(a.m,_.sg,()=>Ao(a));a.a.on(a.m,_.af,()=>{a.f||zo(a)});a.a.on(a.m,_.nf,()=>{a.f||zo(a)});a.a.on(a.m,_.Jf,()=>{switch(a.m.getState()){case _.On:Ao(a);break;default:Ao(a)}})};Co=function(a){a.g&&(a.g.stop(),a.g=null)};Ao=function(a){a.f&&zo(a)};
201
+ Do=function(a){return _.x(function*(){var b=a.m.getConfiguration().connectivityCheck;b&&a.m&&(b=yield Zi(a.j,b.url,b.attemptParameters,b.method),yo(a,b))})};zo=function(a){a.m.getConfiguration().connectivityCheck&&(Co(a),a.g=(new _.Qj(()=>Do(a))).fa(5))};yo=function(a,b){Co(a);a.f!==b&&(a.f=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.E(Ie,{online:a.f})))};Fo=function(){for(let a=0;a<Eo.length;++a)Eo[a].rc()};
202
+ _.Go=function(a,b){b=b||0;a={priority:b,rc:a};for(let c=0;c<Eo.length;c++)if(Eo[c].priority<b){Eo.splice(c,0,a);return}Eo.push(a)};Ho=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};
203
+ Jo=function(a){var b=Io;const c={kty:"RSA",n:b.n,e:b.e},d=a.g+"."+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=_.pi(d),n=_.Bi(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(new _.Gh("Signature Verification failed",Wf))}).catch(g)}else f()})};
204
+ Lo=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 Ko(b[0],b[1],b[2]);a.a=b}return a.a};Mo=function(a){return _.x(function*(){var b=Lo(a);try{yield Jo(b)}catch(c){if(c&&c.code===Wf)throw c;{b=window.location.href;const d=new _.Lh(b);b=d.cb||d.Ma?d:new _.Lh("//"+b)}if(!/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(b.Ma))throw c;}})};
205
+ No=function(a){switch((a.ca[0]||{src:"",type:""}).type){case _.yc:a="dash";break;case _.Dc:a="ss";break;case _.Lk:a="hls";break;case _.ig:a="mp4";break;default:a=""}return a};Oo=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};Po=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
206
+ Qo=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};Ro=function(a){a=a.drmInfo;return(new _.Lh(a&&a.licenseServerUri||"")).Ma};So=function(a){const b=a.configuration;let c="no";b.drm&&!_.Vg(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(Pd)||Ro(a).endsWith("drmtoday.com"))&&(c=Pd);return c};To=function(a){a=a.drmInfo;let b="";if(a)switch(a.keySystem){case _.yd:b="wv";break;case _.wd:b="pr";break;case _.ud:b="fps"}return b};
207
+ Uo=function(a){a=a.drmInfo;let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};Vo=function(a){a=a.drmInfo;let b="";if(a)switch(a.videoRobustness){case Za:case Xa:b="L1";break;case Ya:b="L2";break;case _.Fb:case _.Eb:b="L3"}return b};
208
+ Zo=function(a,b){const c="ie"===_.sk().browser;var d=b.configuration;const e=[...Array.from(_.Vk.keys()),...b.Df];b={"CL-KEY":a.f,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.fa,"CL-USER-ID":Oo(d),"CL-ASSET-ID":Po(d),"CL-SESSION-ID":Qo(d),"CL-PLAYBACK-TYPE":b.isLive?Wo:Xo,"CL-CONTENT-TYPE":No(b),"CL-PLUGINS":e.join(" "),"CL-DRM":So(b),"CL-DRM-CDM":To(b),"CL-DRM-SEC-LEVEL":Vo(b),"CL-DRM-OFFLINE":Uo(b),"CL-DRM-IP":Ro(b)};c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=d);d=_.Pi(["https://downloads.castlabs.com/r/register/"]);
209
+ d.method="GET";d.headers=b;return(new _.Yo).fetch(d).P.then(f=>{200===f.status&&c&&window.localStorage.setItem("cl_et",f.headers.etag);return Promise.resolve()}).catch(f=>{a:{var g=Lo(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";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.";
210
+ break;default:g=Promise.resolve();break a}a.h.error(db+k);g=Promise.reject(new _.H(_.F,7,g,k))}}return g})};_.ap=function(a){a&&(0<=$o.indexOf(a)||$o.push(a))};cp=function(a,b){a.B=new bp(b);Mo(a.B).catch(c=>{setTimeout(()=>{a.h.error(db+c);a.trigger(new _.E(_.r,{detail:new _.H(_.F,7,7101)}));a.destroy()},1E3)})};ep=function(a,b){a.S=b;for(const c of a.S)(b=c.id())&&(a.H[b]=c);_.dp(a,"onPlayerCreated")};
211
+ _.fp=function(a,b){null!=b&&b===a.a?a.a.forwardEventsTo(a):(a.a&&(a.a.stopForwardingEventsTo(a),a.a.destroy(),a.a=null),b&&(b.init(a.g,a.A),b.setNetworkEngine(a.getNetworkEngine()),b.forwardEventsTo(a),a.a=b))};
212
+ gp=function(a,b){_.x(function*(){a.g.getMedia()||a.g.getCastElement();a.B||(a.B=new bp(a.f.license));try{a.h.debug("Verifying license remotely"),yield Zo(a.B,b),a.h.debug("License verified remotely")}catch(c){a.h.debug("License rejected by remote",c),setTimeout(Ho,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)}})};_.dp=function(a,b,...c){if(!a.T)return Promise.resolve();const d=a.S.map(e=>e[b].call(e,a,...c)).filter(e=>e instanceof Promise);return Promise.all(d)};
213
+ hp=function(a){return _.x(function*(){if(a.L)return a.h.debug("The player is already released. No-op"),new Promise(b=>b());a.W.off(document,qg);a.trigger(new _.E(_.rf));a.g&&a.g.release();a.j&&(yield a.j.dispose(),a.j=null);if(a.a){let b=null;const c=a.a.on(_.Jf,d=>{b=d});return _.dp(a,_.Ge).then(()=>{a.a.stopForwardingEventsTo(a);return Promise.all([a.a.release(),a.F.release()])}).then(()=>{a.h.debug("Releasing player completed");b&&(a.h.debug("Re-post state change event after release"),a.trigger(b))}).finally(()=>
214
+ {a.a.off(_.Jf,c);a.trigger(new _.E(qf))})}a.trigger(new _.E(qf));return new Promise(b=>b())})};ip=function(a,b){const c=kh(d=>d.f(_.tb)&&a.every(e=>2===d.canPlay(e,b)));if(!c)throw new _.H(_.F,7,7003,"No compatible player implementing playlist mode found!");return Promise.resolve({player:c.create(),sourceIndex:0})};kp=function(a,b,c){return _.x(function*(){if(2===(a.a?a.a.canPlay(b[0],c):0)&&!a.N)return{player:a.a,sourceIndex:0};a.N=!1;return jp(a,b,c)})};
215
+ lp=function(a,b,c){return a.J===_.tb?ip(b,c):kp(a,b,c)};
216
+ jp=function(a,b,c){return new Promise((d,e)=>{var f;if(b){var g=f=null;for(var h=0;h<b.length;h++);h=Object.values(_.hh);for(let k=0;k<b.length;k++)for(let l=0;l<h.length;l++){const m={Lb:h[l],confidence:h[l].canPlay(b[k],c)};if(null===f||f.confidence<m.confidence)f=m,g=k}f&&typeof g===_.t&&0<f.confidence?(_.ih.debug("Player Factory '"+f.Lb.a()+"' can play",b[g]),f=new mp(f.Lb,g)):(_.ih.error("No compatible Player Factory found for sources:",b),f=null)}else f=null;f?(e=f.Lb.create(),d({player:e,sourceIndex:f.sourceIndex})):
215
217
  (d=new _.E(_.r,{detail:new _.H(_.F,7,7003)}),a.trigger(d),e(d))})};
216
- _.mp=function(a,b,c){return _.x(function*(){if(a.K)throw new _.H(_.F,7,7E3,"Player is already destroyed.");if(!a.g)throw new _.H(_.F,7,7E3,"No surface associated with this player!");_.Em(Xe);yield a.release();const d=c||_.Zn(b);if(!b||0===d.length)throw new _.H(_.F,7,7003,nb);a.X=d;a.f=_.Tk(a.A,b,{source:d});a.L=!1;const e=yield ip(a,d,a.f);_.cp(a,e.player);a.a&&a.a.setSourceIndex(e.sourceIndex);kp(a);a.a&&a.a.setCdnErrorCallback(a.I);lp(a,a.f);if(a.f.pauseWhenInBackground)a.W.on(document,qg,()=>
217
- {document.hidden?(a.h.debug("Player is hidden: pausing..."),a.pause()):(a.h.debug("Player is visible: resuming..."),a.play())});bl(a);yield _.ap(a,"onContentWillLoad",d[e.sourceIndex]);_.Em(We);_.Fm("player.beforeLoad",Xe,We)})};_.np=function(a){return _.x(function*(){a.g.getMedia()||a.g.getCastElement();a.trigger(new _.E(re));yield Promise.all([a.a.load(a.f),a.j.load()])})};
218
- _.pp=function(a){return _.x(function*(){_.Em(Te);dp(a,{configuration:a.getConfiguration(),ca:a.mf(),drmInfo:a.getDrmInfo(),Df:Object.keys(a.H),isLive:a.isLive()});op(a);dl();yield _.ap(a,"onContentLoaded");a.f.autoplay&&(yield a.play());_.Em(Se);_.Fm("player.afterLoad",Te,Se)})};qp=function(a){return _.x(function*(){if(a.a){var b=a.a;b.Mf?(a.trigger(new _.E(re)),yield b.Mf(),yield _.pp(a)):a.h.warn(zb)}else a.h.warn(wb)})};
219
- kp=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.x(function*(){a.vc&&a.Ud&&(a.Ud=!1,yield a.vc(b))}))};lp=function(a,b){a.j=qo(a,b).create(a)};
220
- rp=function(a){const b=_.xh(a.f.preferredTextLanguage).filter(f=>f),c=a.f.preferForcedSubtitles,d=a.getTrackManager().ia().filter(f=>c?f.kind===_.Wd:f.kind!==_.Wd);if(0===d.length)c&&a.h.warn("Forced subtitles are configured to be preferred, but no forced subtitles are available.");else{if(c&&0===b.length){var e=a.getTrackManager().la();e&&e.language?(e=_.Zh(e.language||""),b.push(e)):(e=a.getTrackManager().Fa())&&e.language&&(e=_.Zh(e.language||""),b.push(e));0===b.length&&a.h.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=>
221
- {const g=_.Zh(f);if(f=d.find(h=>{h=_.Zh(h.language||"");return _.$h(h,g)}))return a.getTrackManager().Ha(f),!0;c&&a.h.warn("Forced subtitles are configured to be preferred, but no forced subtitles match the preferred languages: ",b);return!1})}};op=function(a){_.x(function*(){const b=[];if(a.f.remoteTextTracks)for(const c of a.f.remoteTextTracks)b.push(a.getTrackManager().addTextTrack(c));yield Promise.all(b);rp(a)})};sp=function(a){a.G.forEach(b=>b());a.G=[]};
222
- vp=function(a,b){return _.x(function*(){try{_.Em(af);a.J=_.tb;a.T=!1;const c=b.slice(1).map(d=>({config:d,ca:_.Zn(d)}));yield _.mp(a,b[0]);c.forEach(d=>{tp(a,d.config,d.ca)});a.trigger(new _.E(re));yield a.a.setupPlaylist(b);yield _.pp(a);c.forEach(d=>{up(a,d.config,d.ca)});_.Em($e);_.Fm("player.setupPlaylist",af,$e)}catch(c){if(a.l)throw a.h.info(eb),new _.H(_.F,7,7E3);throw c;}})};
223
- wp=function(a,b){const c=d=>{a.C=a.o.findIndex(e=>e.id===d.id)};a.addEventListener(_.yf,c);a.G.push(()=>{a.removeEventListener(_.yf,c)});if(b.endTime){const d=b.endTime,e=()=>{a.getPosition()>=d&&(a.removeEventListener(_.Uf,e),a.h.info("Playlist end time reached. Stopping playback."),a.trigger(new _.E(_.xf)),a.pause())};a.addEventListener(_.Uf,e);a.G.push(()=>{a.removeEventListener(_.Uf,e)})}};
224
- xp=function(a,b){return _.x(function*(){try{_.Em(Ve);const c=_.Zn(b);tp(a,b,c);yield a.a.appendLoad(b);up(a,b,c);_.Em(Ue);_.Fm("player.appendLoad",Ve,Ue)}catch(c){if(a.l)throw a.h.info(eb),new _.H(_.F,7,7E3,{id:b.id});throw c;}})};
225
- tp=function(a,b,c){if(0===c.length)throw new _.H(_.F,7,7003,{message:nb,id:b.id});if(1<c.length)throw new _.H(_.F,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(_.F,7,7003,{message:"Source not supported by the current player!",id:b.id,source:c[0]});};up=function(a,b,c){dp(a,{configuration:b,ca:c,drmInfo:a.getDrmInfo(),Df:Object.keys(a.H),isLive:c[0].isLive})};
226
- yp=function(a,b){const c=document.getElementById(a);if(!c)throw Error("Anchor element not found");c.classList.add(gd);return Array.from({length:3}).map(()=>{const d=document.createElement(_.w);d.classList.add(id);const e=document.createElement(_.Gd);e.classList.add(hd);e.appendChild(d);c.appendChild(e);return new Q(d,b)})};
227
- zp=function(a,b,c){const d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.h.info(`Show video element .${b}`),d.classList.add(jd)):(a.h.info(`Hide video element .${b}`),d.classList.remove(jd)),a.A&&a.A(d,c))};Cp=function(a,b){return _.x(function*(){const c=yield a.w.get();a.f=b;b.role=Ap;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();zp(a,c,!0);yield c.load(b.config);Bp(a,b);b.config.autoplay||(yield c.play())})};
228
- Gp=function(a){_.x(function*(){if(0===a.a)yield Dp(a);else if(a.a===a.g.length-1)yield Ep(a);else{const b=[a.a-1,a.a+1];a.h.info(`Preload items (indices: ${b})`);yield Promise.all(b.map(c=>Fp(a,c)))}})};
229
- Hp=function(a,b){return _.x(function*(){if(b.player){if(b.state===kf){a.h.info(Vb);try{yield b.preloadPromise}catch(c){}}a.f=b;b.role=Ap;zp(a,b.player,!0);b.state===jf?(_.Em(ff),a.o.preloadMedia?yield b.player.play():yield qp(b.player),_.Em(ef),_.Fm("playlist.next",ff,ef)):b.state===hf&&(yield b.player.load(b.config));Bp(a,b);b.config.autoplay||(yield b.player.play())}})};
230
- Kp=function(a,b){return _.x(function*(){a.h.info(`Stop current playback (index: ${b.index})`);b.player.pause();zp(a,b.player,!1);yield Ip(a,b);b.player=null;b.videoEl=null;b.role=Jp})};Mp=function(a){return Promise.all(Array.from(a.l.keys()).map(b=>Lp(a,b)))};Np=function(a){return _.x(function*(){yield a.w.destroy();const b=document.getElementById(a.o.anchorId);b&&(b.classList.remove(gd),b.innerHTML="")})};
231
- Lp=function(a,b){return _.x(function*(){const c=a.l.get(b);c&&(a.h.info(`Stop preloading item (index: ${b})`),c.player&&(yield Ip(a,c)),a.l.delete(b))})};Ip=function(a,b){return _.x(function*(){b.disposers.forEach(c=>c());b.disposers=[];b.player&&(yield a.w.release(b.player))})};Bp=function(a,b){if(a.o.autoplayNext){const c=()=>{a.h.info("Automatically transition to next item");a.Cf()};b.player.on(_.Vd,c);const d=b.player;b.disposers.push(()=>{d.off(_.Vd,c)})}};
232
- Fp=function(a,b){return _.x(function*(){const c=yield a.w.get(),d=a.g[b];d.player=c;d.videoEl=c.getSurface().getMedia();d.role=Jp;d.state=kf;a.trigger(new _.E(Zf));try{a.l.set(b,d),a.o.preloadMedia?(d.config.autoplay&&(a.h.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=jf,a.trigger(new _.E(Zf))}catch(e){7001===e.code?(a.h.info(`Preload aborted (index: ${b})`),d.state=gf):
233
- (a.h.warn(`Preload failed (index: ${b})`,e),a.trigger(new _.E(_.r,{detail:e})),d.state=hf),a.trigger(new _.E(Zf))}})};Dp=function(a){return _.x(function*(){const b=a.a+1;a.h.info(`Preload following item (index: ${b})`);yield Fp(a,b)})};Ep=function(a){return _.x(function*(){const b=a.a-1;a.h.info(`Preload preceding item (index: ${b})`);yield Fp(a,b)})};
234
- _.Pp=function(a){if(Op.has(a))return Op.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);Op.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),Op.set(a,b),b):!1};Qp=function(a,b){b=b.replace(/mp2t/i,"mp4");a===_.p&&(b=b.replace(_.w,_.p));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};
235
- Rp=function(a,b,c){a.classList.add(gd);return Array.from({length:b}).map(()=>{const d=document.createElement(_.w);d.classList.add(id);const e=document.createElement(_.Gd);e.classList.add(hd);e.appendChild(d);a.appendChild(e);return new Q(d,c)})};
236
- Sp=function(a,b,c){if(!a.A){var d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.h.info(`Show video element .${b}`),d.classList.add(jd),d.classList.remove("clpp-hide")):(a.h.info(`Hide video element .${b}`),d.classList.remove(jd),d.classList.add("clpp-hide")),a.w&&a.w(d,c))}};Tp=function(a){return _.x(function*(){const b=a.a;b&&("loaded"!==b.state&&(yield b.bd),yield b.player.play(),b.state=_.bf,b.jc&&b.jc())})};Up=function(a,b){a.A=b;const c=a.a&&a.a.player;c&&Sp(a,c,!b)};
237
- Wp=function(a,b){return _.x(function*(){if(b.player){if(b.state===kf){a.h.info(Vb);try{yield b.preloadPromise}catch(c){}}a.a=b;b.role=Vp;Sp(a,b.player,!0);b.state="loading";b.state===jf?yield b.player.play():b.state===hf&&(yield b.player.load(b.config));b.config.autoplay||(yield b.player.play());b.state=_.bf}})};Yp=function(a,b){return _.x(function*(){yield Xp(a,b);b.config.autoplay||(yield b.player.play());b.state=_.bf})};
238
- Zp=function(a,b){const c=b.transition;if(c){if(c.ic){const d=c.ic,e=()=>{a.h.info(`Transition onEnded to (ID: ${d})`);a.play(d)};b.player.on(_.Vd,e);b.disposers.push(()=>{b.player.off(_.Vd,e)})}if(c.vf){const d=e=>{const f=c.vf.find(g=>g.cueId===e.detail.id);f&&(a.h.info(`Transition onCue to (ID: ${f.itemId})`),a.play(f.itemId))};b.player.on(_.th,d);b.disposers.push(()=>{b.player.off(_.th,d)})}if(c.Af){const d=c.Af,e=()=>{b.player.getPosition()>=d.position&&(a.h.info(`Transition onPosition to (ID: ${d.itemId})`),
239
- a.play(d.itemId))};b.player.on(_.Uf,e);b.disposers.push(()=>{b.player.off(_.Uf,e)})}}};aq=function(a,b){return _.x(function*(){a.h.info(`Stop current playback (ID: ${b.id})`);b.disposers.forEach(d=>d());b.disposers=[];const c=b.player;b.player=null;b.videoEl=null;b.role=$p;c.pause();yield a.l.release(c);Sp(a,c,!1)})};cq=function(a){return Promise.all(Array.from(a.f.keys()).map(b=>bq(a,b)))};
240
- eq=function(a,b){_.x(function*(){if(0!==b.length){a.h.info(`Preload items (IDs: ${b})`);var c=a.j.filter(d=>b.includes(d.id))||[];yield Promise.all(c.map(d=>dq(a,d)))}})};Xp=function(a,b){return _.x(function*(){const c=yield a.l.get();a.a=b;b.role=Vp;a.a.player=c;a.a.videoEl=c.getSurface().getMedia();Sp(a,c,!0);b.primary&&a.trigger(new _.E(mf,{detail:{player:c}}));b.state="loading";b.bd=yield c.load(b.config);b.state="loaded"})};
241
- fq=function(a){return _.x(function*(){yield a.l.destroy();const b=a.o.anchorEl;b&&(b.classList.remove(gd),b.innerHTML="")})};gq=function(a){a.a&&(a.a.disposers.forEach(b=>b()),a.a.disposers=[],Zp(a,a.a),cq(a),eq(a,a.a.next))};bq=function(a,b){return _.x(function*(){const c=a.f.get(b);c&&(a.h.info(`Stop preloading item (ID: ${b})`),c.player&&(yield a.l.release(c.player)),a.f.delete(b))})};
242
- dq=function(a,b){return _.x(function*(){const c=b.id,d=yield a.l.get();b.player=d;b.videoEl=d.getSurface().getMedia();b.role=$p;b.state=kf;a.trigger(new _.E(Zf));try{a.f.set(c,b),b.config.autoplay&&(a.h.warn(la+`Force disabling autoplay (ID: ${c})`),b.config.autoplay=!1),b.primary&&a.trigger(new _.E(mf,{detail:{player:d}})),b.preloadPromise=d.load(b.config),yield b.preloadPromise,b.state=jf,a.trigger(new _.E(Zf))}catch(e){7001===e.code?(a.h.info(`Preload aborted (ID: ${c})`),b.state=gf):(a.h.warn(`Preload failed (ID: ${c})`,
243
- e),a.trigger(new _.E(_.r,{detail:e})),b.state=hf),a.trigger(new _.E(Zf))}})};hq=function(a){return a&&a.ASSETS&&Array.isArray(a.ASSETS)?a.ASSETS.every(b=>typeof b.URI===_.Nf&&typeof b.DURATION===_.t):!1};iq=function(a){a.j.forEach(b=>b());a.j=[]};
244
- nq=function(a,b){const c=()=>_.x(function*(){var e=b.getPosition();if(e=jq(a,e))a.h.info(`Interstitial ${e.cueId} coming up `+`at ${e.startTime} s`),(yield kq(a,e))&&lq(a,e,b)});b.addEventListener(_.Uf,c);a.j.push(()=>{b.removeEventListener(_.Uf,c)});const d=()=>{a.trigger(new _.E(mq))};b.on(_.Vd,d);a.j.push(()=>{b.off(_.Vd,d)})};
245
- qq=function(a,b,c){return _.x(function*(){if(b.source){yield a.unload();var d=_.Ng(b);if(a.f.yospace.enabled){var e=_.Zn(b);1!==e.length&&a.h.warn("Multiple sources found this is currently not supported, only the first one will be used.");e=yield oq(a.l,e[0].url);d.source={url:e,type:_.Lk}}a.a.ld([{id:nf,primary:!0,config:d,next:[]}]);yield a.a.load(nf);(d=a.a.xb())&&d.ud()?(d=Array.from(d.ud().cues()),pq(a,d,c)||(Up(a.a,!1),c||(yield Tp(a.a)))):a.h.error("Failed to get cue timeline after load")}else a.h.error("Config must be of type cl.api.PlayerConfiguration")})};
246
- pq=function(a,b,c){var d=b.filter(f=>f.schemeIdUri===_.wd&&f.Ta);a.h.info("Interstitial cues found",d);if(!rq(a,d))return!1;b=d.find(f=>f.startTime<a.f.prerollMarginSec);const e=d.filter(f=>f.startTime<a.f.resolutionOffsetSec&&!(f.startTime<a.f.prerollMarginSec));d=d.filter(f=>!(f.startTime<a.f.resolutionOffsetSec));b&&sq(a,b,c);0<e.length&&e.forEach(f=>tq(a,f));d.forEach(f=>uq(a,f));a.trigger(new _.E(vq,{detail:a.Oc()}));return!!b};
247
- rq=function(a,b){const c=b.sort((g,h)=>g.startTime-h.startTime),d=a.f.resolutionOffsetSec,e=[];for(let g=0;g<c.length-1;g++){const h=c[g],k=c[g+1];k&&k.startTime-h.endTime<d&&e.push(`Interstitials ${h.id} and ${k.id} `+`are too close to each other (less than ${d} s).`);k&&k.startTime<=h.endTime&&e.push(`Interstitials ${h.id} and ${k.id} `+"overlap.")}const f=[];b.forEach(g=>{const h=g.Ta[_.$b],k=g.Ta[_.ac];g.Ta[_.Zb]||h?null!=k&&1>k&&a.h.warn(`Interstitial cue ${g.id} is invalid `+"X-PLAYOUT-LIMIT is less than 1 s.",
218
+ _.pp=function(a,b,c){return _.x(function*(){if(a.K)throw new _.H(_.F,7,7E3,"Player is already destroyed.");if(!a.g)throw new _.H(_.F,7,7E3,"No surface associated with this player!");_.Em(We);yield a.release();const d=c||_.Zn(b);if(!b||0===d.length)throw new _.H(_.F,7,7003,nb);a.X=d;a.f=_.Tk(a.A,b,{source:d});a.L=!1;const e=yield lp(a,d,a.f);_.fp(a,e.player);a.a&&a.a.setSourceIndex(e.sourceIndex);np(a);a.a&&a.a.setCdnErrorCallback(a.I);op(a,a.f);if(a.f.pauseWhenInBackground)a.W.on(document,qg,()=>
219
+ {document.hidden?(a.h.debug("Player is hidden: pausing..."),a.pause()):(a.h.debug("Player is visible: resuming..."),a.play())});bl(a);yield _.dp(a,"onContentWillLoad",d[e.sourceIndex]);_.Em(Ve);_.Fm("player.beforeLoad",We,Ve)})};_.qp=function(a){return _.x(function*(){a.g.getMedia()||a.g.getCastElement();a.trigger(new _.E(qe));yield Promise.all([a.a.load(a.f),a.j.load()])})};
220
+ _.sp=function(a){return _.x(function*(){_.Em(Se);gp(a,{configuration:a.getConfiguration(),ca:a.mf(),drmInfo:a.getDrmInfo(),Df:Object.keys(a.H),isLive:a.isLive()});rp(a);dl();yield _.dp(a,"onContentLoaded");a.f.autoplay&&(yield a.play());_.Em(Re);_.Fm("player.afterLoad",Se,Re)})};tp=function(a){return _.x(function*(){if(a.a){var b=a.a;b.Mf?(a.trigger(new _.E(qe)),yield b.Mf(),yield _.sp(a)):a.h.warn(zb)}else a.h.warn(wb)})};
221
+ np=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.x(function*(){a.vc&&a.Vd&&(a.Vd=!1,yield a.vc(b))}))};op=function(a,b){a.j=qo(a,b).create(a)};
222
+ up=function(a){const b=_.xh(a.f.preferredTextLanguage).filter(f=>f),c=a.f.preferForcedSubtitles,d=a.getTrackManager().ia().filter(f=>c?f.kind===_.Vd:f.kind!==_.Vd);if(0===d.length)c&&a.h.warn("Forced subtitles are configured to be preferred, but no forced subtitles are available.");else{if(c&&0===b.length){var e=a.getTrackManager().la();e&&e.language?(e=_.Zh(e.language||""),b.push(e)):(e=a.getTrackManager().Fa())&&e.language&&(e=_.Zh(e.language||""),b.push(e));0===b.length&&a.h.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=>
223
+ {const g=_.Zh(f);if(f=d.find(h=>{h=_.Zh(h.language||"");return _.$h(h,g)}))return a.getTrackManager().Ha(f),!0;c&&a.h.warn("Forced subtitles are configured to be preferred, but no forced subtitles match the preferred languages: ",b);return!1})}};rp=function(a){_.x(function*(){const b=[];if(a.f.remoteTextTracks)for(const c of a.f.remoteTextTracks)b.push(a.getTrackManager().addTextTrack(c));yield Promise.all(b);up(a)})};vp=function(a){a.G.forEach(b=>b());a.G=[]};
224
+ yp=function(a,b){return _.x(function*(){try{_.Em($e);a.J=_.tb;a.T=!1;const c=b.slice(1).map(d=>({config:d,ca:_.Zn(d)}));yield _.pp(a,b[0]);c.forEach(d=>{wp(a,d.config,d.ca)});a.trigger(new _.E(qe));yield a.a.setupPlaylist(b);yield _.sp(a);c.forEach(d=>{xp(a,d.config,d.ca)});_.Em(Ze);_.Fm("player.setupPlaylist",$e,Ze)}catch(c){if(a.l)throw a.h.info(eb),new _.H(_.F,7,7E3);throw c;}})};
225
+ zp=function(a,b){const c=d=>{a.C=a.o.findIndex(e=>e.id===d.id)};a.addEventListener(_.xf,c);a.G.push(()=>{a.removeEventListener(_.xf,c)});if(b.endTime){const d=b.endTime,e=()=>{a.getPosition()>=d&&(a.removeEventListener(_.Tf,e),a.h.info("Playlist end time reached. Stopping playback."),a.trigger(new _.E(_.wf)),a.pause())};a.addEventListener(_.Tf,e);a.G.push(()=>{a.removeEventListener(_.Tf,e)})}};
226
+ Ap=function(a,b){return _.x(function*(){try{_.Em(Ue);const c=_.Zn(b);wp(a,b,c);yield a.a.appendLoad(b);xp(a,b,c);_.Em(Te);_.Fm("player.appendLoad",Ue,Te)}catch(c){if(a.l)throw a.h.info(eb),new _.H(_.F,7,7E3,{id:b.id});throw c;}})};
227
+ wp=function(a,b,c){if(0===c.length)throw new _.H(_.F,7,7003,{message:nb,id:b.id});if(1<c.length)throw new _.H(_.F,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(_.F,7,7003,{message:"Source not supported by the current player!",id:b.id,source:c[0]});};xp=function(a,b,c){gp(a,{configuration:b,ca:c,drmInfo:a.getDrmInfo(),Df:Object.keys(a.H),isLive:c[0].isLive})};
228
+ Bp=function(a,b){const c=document.getElementById(a);if(!c)throw Error("Anchor element not found");c.classList.add(fd);return Array.from({length:3}).map(()=>{const d=document.createElement(_.w);d.classList.add(hd);const e=document.createElement(_.Fd);e.classList.add(gd);e.appendChild(d);c.appendChild(e);return new Q(d,b)})};
229
+ Cp=function(a,b,c){const d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.h.info(`Show video element .${b}`),d.classList.add(id)):(a.h.info(`Hide video element .${b}`),d.classList.remove(id)),a.A&&a.A(d,c))};Fp=function(a,b){return _.x(function*(){const c=yield a.w.get();a.f=b;b.role=Dp;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();Cp(a,c,!0);yield c.load(b.config);Ep(a,b);b.config.autoplay||(yield c.play())})};
230
+ Jp=function(a){_.x(function*(){if(0===a.a)yield Gp(a);else if(a.a===a.g.length-1)yield Hp(a);else{const b=[a.a-1,a.a+1];a.h.info(`Preload items (indices: ${b})`);yield Promise.all(b.map(c=>Ip(a,c)))}})};
231
+ Kp=function(a,b){return _.x(function*(){if(b.player){if(b.state===jf){a.h.info(Tb);try{yield b.preloadPromise}catch(c){}}a.f=b;b.role=Dp;Cp(a,b.player,!0);b.state===hf?(_.Em(ef),a.o.preloadMedia?yield b.player.play():yield tp(b.player),_.Em(df),_.Fm("playlist.next",ef,df)):b.state===gf&&(yield b.player.load(b.config));Ep(a,b);b.config.autoplay||(yield b.player.play())}})};
232
+ Np=function(a,b){return _.x(function*(){a.h.info(`Stop current playback (index: ${b.index})`);b.player.pause();Cp(a,b.player,!1);yield Lp(a,b);b.player=null;b.videoEl=null;b.role=Mp})};Pp=function(a){return Promise.all(Array.from(a.l.keys()).map(b=>Op(a,b)))};Qp=function(a){return _.x(function*(){yield a.w.destroy();const b=document.getElementById(a.o.anchorId);b&&(b.classList.remove(fd),b.innerHTML="")})};
233
+ Op=function(a,b){return _.x(function*(){const c=a.l.get(b);c&&(a.h.info(`Stop preloading item (index: ${b})`),c.player&&(yield Lp(a,c)),a.l.delete(b))})};Lp=function(a,b){return _.x(function*(){b.disposers.forEach(c=>c());b.disposers=[];b.player&&(yield a.w.release(b.player))})};Ep=function(a,b){if(a.o.autoplayNext){const c=()=>{a.h.info("Automatically transition to next item");a.Cf()};b.player.on(_.Ud,c);const d=b.player;b.disposers.push(()=>{d.off(_.Ud,c)})}};
234
+ Ip=function(a,b){return _.x(function*(){const c=yield a.w.get(),d=a.g[b];d.player=c;d.videoEl=c.getSurface().getMedia();d.role=Mp;d.state=jf;a.trigger(new _.E(Zf));try{a.l.set(b,d),a.o.preloadMedia?(d.config.autoplay&&(a.h.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=hf,a.trigger(new _.E(Zf))}catch(e){7001===e.code?(a.h.info(`Preload aborted (index: ${b})`),d.state=ff):
235
+ (a.h.warn(`Preload failed (index: ${b})`,e),a.trigger(new _.E(_.r,{detail:e})),d.state=gf),a.trigger(new _.E(Zf))}})};Gp=function(a){return _.x(function*(){const b=a.a+1;a.h.info(`Preload following item (index: ${b})`);yield Ip(a,b)})};Hp=function(a){return _.x(function*(){const b=a.a-1;a.h.info(`Preload preceding item (index: ${b})`);yield Ip(a,b)})};
236
+ _.Sp=function(a){if(Rp.has(a))return Rp.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);Rp.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),Rp.set(a,b),b):!1};Tp=function(a,b){b=b.replace(/mp2t/i,"mp4");a===_.p&&(b=b.replace(_.w,_.p));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};
237
+ Up=function(a,b,c){a.classList.add(fd);return Array.from({length:b}).map(()=>{const d=document.createElement(_.w);d.classList.add(hd);const e=document.createElement(_.Fd);e.classList.add(gd);e.appendChild(d);a.appendChild(e);return new Q(d,c)})};
238
+ Vp=function(a,b,c){if(!a.A){var d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.h.info(`Show video element .${b}`),d.classList.add(id),d.classList.remove("clpp-hide")):(a.h.info(`Hide video element .${b}`),d.classList.remove(id),d.classList.add("clpp-hide")),a.w&&a.w(d,c))}};Wp=function(a){return _.x(function*(){const b=a.a;b&&("loaded"!==b.state&&(yield b.bd),yield b.player.play(),b.state=_.af,b.jc&&b.jc())})};Xp=function(a,b){a.A=b;const c=a.a&&a.a.player;c&&Vp(a,c,!b)};
239
+ Zp=function(a,b){return _.x(function*(){if(b.player){if(b.state===jf){a.h.info(Tb);try{yield b.preloadPromise}catch(c){}}a.a=b;b.role=Yp;Vp(a,b.player,!0);b.state="loading";b.state===hf?yield b.player.play():b.state===gf&&(yield b.player.load(b.config));b.config.autoplay||(yield b.player.play());b.state=_.af}})};aq=function(a,b){return _.x(function*(){yield $p(a,b);b.config.autoplay||(yield b.player.play());b.state=_.af})};
240
+ bq=function(a,b){const c=b.transition;if(c){if(c.ic){const d=c.ic,e=()=>{a.h.info(`Transition onEnded to (ID: ${d})`);a.play(d)};b.player.on(_.Ud,e);b.disposers.push(()=>{b.player.off(_.Ud,e)})}if(c.vf){const d=e=>{const f=c.vf.find(g=>g.cueId===e.detail.id);f&&(a.h.info(`Transition onCue to (ID: ${f.itemId})`),a.play(f.itemId))};b.player.on(_.th,d);b.disposers.push(()=>{b.player.off(_.th,d)})}if(c.Af){const d=c.Af,e=()=>{b.player.getPosition()>=d.position&&(a.h.info(`Transition onPosition to (ID: ${d.itemId})`),
241
+ a.play(d.itemId))};b.player.on(_.Tf,e);b.disposers.push(()=>{b.player.off(_.Tf,e)})}}};dq=function(a,b){return _.x(function*(){a.h.info(`Stop current playback (ID: ${b.id})`);b.disposers.forEach(d=>d());b.disposers=[];const c=b.player;b.player=null;b.videoEl=null;b.role=cq;c.pause();yield a.l.release(c);Vp(a,c,!1)})};fq=function(a){return Promise.all(Array.from(a.f.keys()).map(b=>eq(a,b)))};
242
+ hq=function(a,b){_.x(function*(){if(0!==b.length){a.h.info(`Preload items (IDs: ${b})`);var c=a.j.filter(d=>b.includes(d.id))||[];yield Promise.all(c.map(d=>gq(a,d)))}})};$p=function(a,b){return _.x(function*(){const c=yield a.l.get();a.a=b;b.role=Yp;a.a.player=c;a.a.videoEl=c.getSurface().getMedia();Vp(a,c,!0);b.primary&&a.trigger(new _.E(lf,{detail:{player:c}}));b.state="loading";b.bd=yield c.load(b.config);b.state="loaded"})};
243
+ iq=function(a){return _.x(function*(){yield a.l.destroy();const b=a.o.anchorEl;b&&(b.classList.remove(fd),b.innerHTML="")})};jq=function(a){a.a&&(a.a.disposers.forEach(b=>b()),a.a.disposers=[],bq(a,a.a),fq(a),hq(a,a.a.next))};eq=function(a,b){return _.x(function*(){const c=a.f.get(b);c&&(a.h.info(`Stop preloading item (ID: ${b})`),c.player&&(yield a.l.release(c.player)),a.f.delete(b))})};
244
+ gq=function(a,b){return _.x(function*(){const c=b.id,d=yield a.l.get();b.player=d;b.videoEl=d.getSurface().getMedia();b.role=cq;b.state=jf;a.trigger(new _.E(Zf));try{a.f.set(c,b),b.config.autoplay&&(a.h.warn(la+`Force disabling autoplay (ID: ${c})`),b.config.autoplay=!1),b.primary&&a.trigger(new _.E(lf,{detail:{player:d}})),b.preloadPromise=d.load(b.config),yield b.preloadPromise,b.state=hf,a.trigger(new _.E(Zf))}catch(e){7001===e.code?(a.h.info(`Preload aborted (ID: ${c})`),b.state=ff):(a.h.warn(`Preload failed (ID: ${c})`,
245
+ e),a.trigger(new _.E(_.r,{detail:e})),b.state=gf),a.trigger(new _.E(Zf))}})};kq=function(a){return a&&a.ASSETS&&Array.isArray(a.ASSETS)?a.ASSETS.every(b=>typeof b.URI===_.Mf&&typeof b.DURATION===_.t):!1};lq=function(a){a.j.forEach(b=>b());a.j=[]};
246
+ qq=function(a,b){const c=()=>_.x(function*(){var e=b.getPosition();if(e=mq(a,e))a.h.info(`Interstitial ${e.cueId} coming up `+`at ${e.startTime} s`),(yield nq(a,e))&&oq(a,e,b)});b.addEventListener(_.Tf,c);a.j.push(()=>{b.removeEventListener(_.Tf,c)});const d=()=>{a.trigger(new _.E(pq))};b.on(_.Ud,d);a.j.push(()=>{b.off(_.Ud,d)})};
247
+ tq=function(a,b,c){return _.x(function*(){if(b.source){yield a.unload();var d=_.Ng(b);if(a.f.yospace.enabled){var e=_.Zn(b);1!==e.length&&a.h.warn("Multiple sources found this is currently not supported, only the first one will be used.");e=yield rq(a.l,e[0].url);d.source={url:e,type:_.Lk}}a.a.ld([{id:mf,primary:!0,config:d,next:[]}]);yield a.a.load(mf);(d=a.a.xb())&&d.vd()?(d=Array.from(d.vd().cues()),sq(a,d,c)||(Xp(a.a,!1),c||(yield Wp(a.a)))):a.h.error("Failed to get cue timeline after load")}else a.h.error("Config must be of type cl.api.PlayerConfiguration")})};
248
+ sq=function(a,b,c){var d=b.filter(f=>f.schemeIdUri===_.vd&&f.Ta);a.h.info("Interstitial cues found",d);if(!uq(a,d))return!1;b=d.find(f=>f.startTime<a.f.prerollMarginSec);const e=d.filter(f=>f.startTime<a.f.resolutionOffsetSec&&!(f.startTime<a.f.prerollMarginSec));d=d.filter(f=>!(f.startTime<a.f.resolutionOffsetSec));b&&vq(a,b,c);0<e.length&&e.forEach(f=>wq(a,f));d.forEach(f=>xq(a,f));a.trigger(new _.E(yq,{detail:a.Oc()}));return!!b};
249
+ uq=function(a,b){const c=b.sort((g,h)=>g.startTime-h.startTime),d=a.f.resolutionOffsetSec,e=[];for(let g=0;g<c.length-1;g++){const h=c[g],k=c[g+1];k&&k.startTime-h.endTime<d&&e.push(`Interstitials ${h.id} and ${k.id} `+`are too close to each other (less than ${d} s).`);k&&k.startTime<=h.endTime&&e.push(`Interstitials ${h.id} and ${k.id} `+"overlap.")}const f=[];b.forEach(g=>{const h=g.Ta[_.Zb],k=g.Ta[_.$b];g.Ta[_.Yb]||h?null!=k&&1>k&&a.h.warn(`Interstitial cue ${g.id} is invalid `+"X-PLAYOUT-LIMIT is less than 1 s.",
248
250
  g):f.push(`Interstitial cue ${g.id} is invalid `+"it contains neither X-ASSET-LIST nor X-ASSET-URI.")});0<f.length?a.h.error("Invalid interstitials, all interstitials will "+`be skipped. ${f.join(" ")}`):0<e.length&&a.h.warn("Unsupported format of interstitials, playback may not "+`behave correctly. ${e.join(" ")}`);return 0===f.length};
249
- sq=function(a,b,c){_.x(function*(){const d=uq(a,b),e=yield kq(a,d),f=d.Ba?d.Ba.length:0;e&&0<f?wq(a,d,c):(e?a.h.warn("Preroll interstitial has no assets, skipping"):a.h.error("Preroll interstitial failed, skipping"),Up(a.a,!1),c||(yield Tp(a.a)))})};
250
- tq=function(a,b){return _.x(function*(){const c=uq(a,b);a.h.info(`Interstitial ${c.cueId} coming up `+`at ${c.startTime} s`);if(yield kq(a,c)){const e=a.a.getCurrentItem();if(!e)a.h.error("Cannot schedule interstitial "+`${c.cueId}, no primary content not found in `+"playlist");else if(e.player){var d=e.player;e.state===_.bf?lq(a,c,d):e.jc=()=>{lq(a,c,d)}}}})};
251
- uq=function(a,b){{const c=b.Ta[_.bc];b={cueId:b.id,startTime:b.startTime,endTime:b.endTime,state:xq,Pe:b.Ta[_.Zb],Qe:b.Ta[_.$b],Ba:null,resumePosition:null==c?b.endTime:b.startTime+c,playoutLimit:b.Ta[_.ac]}}a.g.push(b);return b};
252
- kq=function(a,b){return _.x(function*(){b.state=yq;const c={id:b.cueId,startTime:b.startTime,endTime:b.endTime,resumePosition:b.resumePosition,itemCount:-1,playoutLimit:b.playoutLimit};a.trigger(new _.E(zq,{detail:c}));if(b.Pe)try{a.h.info(`Load X-ASSET-LIST for ${b.cueId}`),a.trigger(new _.E(Aq,{detail:c})),b.Ba=yield Bq(a,b.Pe),b.state=Cq,c.itemCount=b.Ba.length}catch(d){a.h.error("Failed to load X-ASSET-LIST",d),b.state=Dq}finally{a.trigger(new _.E(Eq,{detail:c}))}else b.Qe?(b.Ba=[{URI:b.Qe,DURATION:b.endTime-
253
- b.startTime}],b.state=Cq):b.state=Dq;return b.state===Cq})};wq=function(a,b,c){_.x(function*(){const d=a.a.getCurrentItem();if(d){var e=Fq(a,b,"preroll");a.a.ld(e);Gq(a,d,b,e,!0);gq(a.a);b.state=Cq;c?yield a.a.load(e[0].id):yield a.a.play(e[0].id);Up(a.a,!1)}})};
254
- lq=function(a,b,c){if(b.Ba)if(0===b.Ba.length){const g=()=>{c.seek(b.resumePosition)};c.on(_.th,g);a.j.push(()=>{c.off(_.th,g)});a.h.info(`Interstitial ${b.cueId} scheduled to `+"be skipped")}else{var d=a.a.getCurrentItem();if(d){var e=Fq(a,b);a.a.ld(e);var f=e[0].id;Gq(a,d,b,e,!1);d.next=[f];d.transition={vf:[{cueId:b.cueId,itemId:f}]};gq(a.a);b.state=Cq;a.h.info(`Interstitial ${b.cueId} scheduled for `+`${b.startTime} s`);a.trigger(new _.E(Hq,{detail:{id:b.cueId,startTime:b.startTime,endTime:b.endTime,
255
- resumePosition:b.resumePosition,itemCount:e.length,playoutLimit:b.playoutLimit}}))}}};jq=function(a,b){return a.g.find(c=>{const d=c.startTime-b;return c.state===xq&&0<d&&d<=a.f.resolutionOffsetSec})||null};Bq=function(a,b){return _.x(function*(){var c=a.a.xb();if(!c)throw Error("No player found");c=c.getNetworkEngine();const d=_.Pi(b);c=yield Yi(c,d);if(!hq(c))throw new _.Gh("Invalid X-ASSET-LIST list response");return Promise.resolve(c.ASSETS)})};
256
- Fq=function(a,b,c){c=void 0===c?"":c;let d=0,e=b.Ba.map((f,g)=>{const h=`${b.cueId}-${g}`;g=g===b.Ba.length-1?nf:`${b.cueId}-${g+1}`;d+=f.DURATION;f={id:h,config:{source:{url:f.URI,type:_.Lk}},next:[g],transition:{ic:g},duration:f.DURATION,$e:d,Oh:b.cueId};return a.f.interstitialAssetConverter?a.f.interstitialAssetConverter(f):f});e.forEach((f,g)=>{f.jc=()=>{a.h.info(`Playing interstitial asset ${f.id}`,f);a.trigger(new _.E(Iq,{detail:{id:f.id,podId:b.cueId,uri:f.config.source.url,duration:f.duration,
257
- podOrder:g+1,podCount:b.Ba.length}}))}});if(null!=b.playoutLimit){const f=b.playoutLimit;a.h.info(`Playout limit for ${b.cueId} is `+`${f} s`);e=e.filter(k=>k.$e-k.duration<=f);const g=e[e.length-1],h=Math.abs(g.$e-f);1>h?g.transition.ic=nf:(g.transition.ic=void 0,g.transition.Af={position:g.duration-h,itemId:nf});g.next=[nf]}e[0].jc=()=>{a.h.info(`Playing interstitial ${c} ${b.cueId} with `+`${b.Ba.length} assets and will resume primary `+`content at ${b.resumePosition} s.`,e);a.h.info(`Playing interstitial asset ${e[0].id}`,
258
- e[0]);a.trigger(new _.E(Jq,{detail:{id:b.cueId,startTime:b.startTime,endTime:b.endTime,resumePosition:b.resumePosition,itemCount:e.length,playoutLimit:b.playoutLimit}}));a.trigger(new _.E(Iq,{detail:{id:e[0].id,podId:b.cueId,uri:b.Ba[0].URI,duration:b.Ba[0].DURATION,podOrder:1,podCount:b.Ba.length}}))};return e};
259
- Gq=function(a,b,c,d,e){b.jc=()=>{a.h.info("Resuming primary content at "+`${b.config.startTime} s.`);a.trigger(new _.E(Kq,{detail:{id:c.cueId}}));c.state=Lq;a.a.removeItems(d.map(f=>f.id));b.next=[];e&&a.trigger(new _.E(Mq))};b.config.startTime=c.resumePosition};
260
- oq=function(a,b){var c=Nq;return _.x(function*(){a.a=null;if(typeof YospaceAdManagement!==_.De)throw new _.H(_.F,7,7003,"Yospace SDK not found.");if(typeof b!==_.Nf)throw new _.H(_.F,7,7003,"Yospace URL must be a string.");a:switch(c){case Nq:var d=YospaceAdManagement.SessionVOD.create(b);break a;case Oq:d=YospaceAdManagement.SessionLive.create(b);break a;case Pq:d=YospaceAdManagement.SessionDVRLive.create(b);break a;default:throw new _.H(_.F,7,7003,`Yospace stream type unknown ${c}.`);}d=yield d;
261
- if(d.getSessionState()!==YospaceAdManagement.SessionState.INITIALISED)throw new _.H(_.F,7,7003,"Yospace session failed to initialize");a.a=d;return d.getPlaybackUrl()})};Qq=function(a,b){a.size=void 0===b?0:1;a.h.debug("Setting key status to",b);a.a=b};
262
- Rq=function(a,b){a.f=b;_.mh(a.a);if(!b)return Promise.resolve();a.a.on(b,Td,c=>{_.fh("AppleEmeManager.cancelNativeMediaEncryptedEvent_",c);"MediaEncryptedEvent"in window&&c instanceof MediaEncryptedEvent&&(a.h.info("Cancel native MediaEncryptedEvent when using Apple-prefixed EME"),c.stopImmediatePropagation())});a.a.on(b,yg,c=>{{a.h.debug("Handle webkitNeedKey event");c=_.J(c.initData);if(_.ii(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=ni(c.subarray(4),
263
- !0);c=_.pi(c);const d=new Event(Td);d.initDataType="skd";d.initData=ji(c);a.f.dispatchEvent(d)}});In(b,HTMLMediaElement.HAVE_METADATA,a.a,()=>b.webkitSetMediaKeys(a.g));return Promise.resolve()};Sq=function(a,b){Qq(a.keyStatuses,b);b=new _.E(ee);a.dispatchEvent(b)};
264
- Vq=function(a,b){a.a=b;_.mh(a.f);b&&(a.f.on(b,a.g+"needkey",c=>{{const d=new Event(Td);d.initDataType=_.$c;d.initData=ji(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.g+"keymessage",c=>{{const e=Tq(a,c.sessionId);if(e){var d=void 0===e.keyStatuses.getStatus();c=new _.E(_.ve,{messageType:d?he:ge,message:c.message});d=e;_.fh("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.gh("Session not found",c.sessionId)}}),a.f.on(b,a.g+"keyadded",c=>{(c=Tq(a,
265
- c.sessionId))&&c.ready()}),a.f.on(b,a.g+"keyerror",c=>{var d=Tq(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?Uq(d,_.Me):1===e?Uq(d,"expired"):Uq(d,_.ce))}}}))};
266
- Tq=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};Uq=function(a,b){Qq(a.keyStatuses,b);b=new _.E(ee);a.dispatchEvent(b)};Wq=function(a,b){return a.w?a.w+b.charAt(0).toUpperCase()+b.slice(1):b};
267
- Xq=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===_.Pe)if(c)d=_.J(_.pi("LOAD_SESSION|"+c));else{const f=_.pi("PERSISTENT|"),g=new Uint8Array(f.byteLength+b.byteLength);g.set(f,0);g.set(_.J(b),f.byteLength);d=g}else d=_.J(b)}catch(f){return Promise.reject(f)}a.f=new _.an;const e=Wq(a,"generateKeyRequest");try{a.j[e](a.g,d)}catch(f){if(f.name!==bb)return a.f=null,Promise.reject(f);(new _.Qj(()=>{try{a.j[e](a.g,d)}catch(g){a.f.reject(g),
268
- a.f=null}})).fa(.01)}return a.f};Yq=function(a,b,c){if(a.a)a.a.then(()=>Yq(a,b,c)).catch(()=>Yq(a,b,c));else{a.a=b;if(a.g===ug){var d=_.li(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=_.Bi(e.keys[0].k);e=_.Bi(e.keys[0].kid)}else d=_.J(c),e=null;var f=Wq(a,"addKey");try{a.j[f](a.g,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
269
- Zq=function(a){const b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();let c;typeof Event===_.Yd?c=new Event(b,a):(c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable));a.target.dispatchEvent(c)};$q=function(a){a=a.target;if(a.webkitPresentationMode===Qe){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)};
270
- ar=function(){return this.webkitSupportsPresentationMode(Qe)?(this.webkitSetPresentationMode(Qe),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};br=function(){const a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};
271
- cr=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};dr=function(a,b,c){return new window.TextTrackCue(a,b,c)};er=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};gr=function(a,b,c){if("input"===a)switch(this.type){case "range":a=cd}fr.call(this,a,b,c)};hr=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};
272
- ir=function(a){return hr()-a.a};kr=function(a){const b=new jr;b.a=a.a;return b};_.lr=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};_.nr=function(a,b,c,d){return _.x(function*(){try{return new (yield mr(a,b,c,d))}catch(e){throw e.a(_.F),e;}})};
273
- mr=function(a,b,c,d){return _.x(function*(){if(d){var e=_.or[d.toLowerCase()];if(e)return e;_.C("Could not determine manifest type using MIME type ",d)}if(e=_.pr(a)){const f=_.qr[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 rr(a,b,c))){if(e=_.or[d])return e;_.C("Could not determine manifest type using MIME type",d)}throw new _.H(_.F,4,4E3,{url:a});})};
274
- _.pr=function(a){a=(new _.Lh(a)).za.split("/").pop().split(".");return 1===a.length?"":a.pop().toLowerCase()};rr=function(a,b,c){return _.x(function*(){var d=_.Pi(a);Ni(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).P).headers["content-type"])?d.toLowerCase():""})};sr=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};
275
- tr=function(a,b,c){return b.read().then(({done:d,value:e})=>{null!=e&&(sr(a,e),Si(c,e.byteLength,ir(a.g)),a.g.a=hr());return d?(d=a.a.buffer,a.a.byteLength!==a.f&&(d=d.slice(0,a.f)),Promise.resolve(d)):Promise.resolve().then(()=>tr(a,b,c))})};
276
- vr=function(a){const b=a.uris[a.uriIndex],c=new ur,d=new jr,e=kr(d);let f=0,g;const h=new _.an;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=ir(e));m.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!k&&(m=m.getResponseHeader(ta),Ri(a,m),k=!0)};c.onload=function(m){m=m.target;var n=(m.getAllResponseHeaders()||"").trim().split("\r\n");
277
- const q={};for(const u of n)n=u.split(": "),q[n[0].toLowerCase()]=n.slice(1).join(": ");try{const u=ir(e);l||Si(a,m.response?m.response.length:0,u);const v=_.Qi(q,m.response,m.status,b,m.responseURL,a,u,g);a.rateLimitBps?Ti(a.rateLimitBps,ir(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");
278
- for(var q of n)n=q.split(": "),u[n[0].toLowerCase()]=n.slice(1).join(": ")}q=_.Qi(u,m.response,m.status,b,m.responseURL,a,ir(e),g);h.resolve(q)}};c.ontimeout=function(){h.reject(new _.H(1,1,1003,{url:b,request:a}))};c.onprogress=function(m){const n=ir(d);d.a=hr();if(100<n||m.lengthComputable&&m.loaded===m.total)Si(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{P:h,request:a,abort:()=>{c.abort();h.reject(new _.H(1,1,
279
- 7001,{url:b,request:a}));return Promise.resolve()}}};wr=function(a){let b=null;a.g!==a.f&&(b={start:a.g,end:a.f,length:a.f-a.g,data:new DataView(a.j.a.buffer,a.g,a.f-a.g),count:-1});return b};xr=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.g),d));c.a.set(e)}c.a.set(b,c.f);c.f+=b.byteLength}a.a=a.g;a.f=a.j.f;a.l=new DataView(a.j.a.buffer,0,a.j.f)};
280
- zr=function(a){if(0<=a.o&&a.f<a.o)return null;let b=yr(a);for(;null!==b;){if(b.name===_.te){const c={start:a.g,end:b.end,length:b.end-a.g,data:new DataView(a.j.a.buffer,a.g,b.end-a.g),count:1};a.g=b.end;return c}b=yr(a)}return null};
281
- Ar=function(a,b,c,d){return b.read().then(e=>{var {done:f,value:g}=e;d&&g&&(d(g.byteLength,ir(a.w)),a.w.a=hr());if(f)return e=wr(a),(e=c(!0,e))?e.then(()=>a.j.a.buffer):Promise.resolve(a.j.a.buffer);let h=Promise.resolve();if(null!=g){xr(a,g);var k=zr(a);for(e=[];k;)e.push(k),k=zr(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=
282
- c(!1,k))&&(h=e)}}return h.then(()=>Ar(a,b,c,d))})};
283
- yr=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=Br(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=Br(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(_.F,3,3E3);}if(2097151<f)throw new _.H(_.F,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};
284
- Br=function(a){const b=a.l.getUint32(a.a,!1);a.a+=4;return b};
285
- Er=function(a){a.g=a.B.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=Cr(e.request.baseDelay,1E3));const f=a.f*(1+(2*Math.random()-1)*Cr(e.request.fuzzFactor,.5));a.f*=Cr(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.l=h;Dr(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)});
286
- let b=0,c=0,d=0;return a.g.then(e=>{const f=e.request;f.currentAttempt+=1;b=f.currentAttempt;c=f.maxAttempts;d=f.uris.length;return e.P}).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 Er(a);g&&e.a(_.F);a.w.reject(e)}else a.w.reject(e)})};Dr=function(a,b,c){a.o=setTimeout(b,c)};Cr=function(a,b){return null===a||void 0===a?b:a};
287
- Fr=function(a){var b=a.split("\x3d");const c=b[0];b=b[1];if(!c)throw new _.Gh("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 _.Gh(`Parsing CMSD, not recognized value type of ${a}`);};
288
- Ir=function(a){return b=>{if(a.a){a:{b=b.headers;for(const [d,e]of Object.entries(b))if("cmsd-dynamic"===d.toLowerCase()){b=e;break a}b=null}if(b){try{const d=new Map,e=b.split(";");for(b=0;b<e.length;b++){const {key:f,value:g}=Fr(e[b]);Object.values(Gr).includes(f)&&d.set(f,g)}var c=d}catch(d){Hr.error("CmsdManager parseCmsdDynamicHeader_ failed:",d),c=null}a.f=c}}}};
289
- Mr=function(a){var b=new Jr;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new Kr,d={Ic:!1,Jf:!1};b={P:Lr(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.Ic||(d.Ic=!0,c.abort());return Promise.resolve()}};if(a=a.timeout){const e=window.setTimeout(()=>{d.Jf=!0;c.abort()},a);b.P=b.P.finally(()=>{window.clearTimeout(e)})}return b};
290
- Lr=function(a,b,c,d){return _.x(function*(){let e,f,g;const h=new jr,k=kr(h);try{e=yield Nr(a,c);g=ir(h);const m=e.headers.get(ta);Ri(b,m);const n=m?parseInt(m,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const q=e.body.getReader();f=yield Ar(new Or(n,!b.disableMergedFragments),q,(u,v)=>{if(d.Ic)return null;v&&v.data&&(Si(b,v.data.byteLength,ir(h)),h.a=hr());return b.onFragment&&v?b.rateLimitBps?Ti(b.rateLimitBps,ir(k),b.bytesLoaded).then(()=>b.onFragment(v)):b.onFragment(v):null},
291
- b.onProgress)}else{const q=e.body.getReader();f=yield tr(new Pr(n),q,b);b.rateLimitBps&&(yield Ti(b.rateLimitBps,ir(k),f.byteLength))}}catch(m){if(d.Ic)throw new _.H(1,1,7001,{url:a,request:b});if(d.Jf)throw new _.H(1,1,1003,{url:a,request:b});_.gh("Error while fetching data:",m);throw new _.H(1,1,1002,{url:a,error:m,request:b,status:-1},m);}const l={};e.headers.forEach((m,n)=>{l[n.trim()]=m});if(d.Ic)throw new _.H(1,1,7001,{url:a,request:b});return _.Qi(l,f,e.status,a,e.url,b,ir(k),g)})};
292
- Tr=function(a){try{const b=a.uris[a.uriIndex],c=_.Qr(b);return{P:Promise.resolve({uri:b,data:c.data,request:a,headers:{"content-type":c.contentType}}),request:a,abort:()=>Promise.resolve()}}catch(b){return{P:Promise.reject(b),request:a,abort:()=>Promise.resolve()}}};
293
- _.Qr=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.gh("Bad data URI, failed to parse scheme"),new _.H(_.F,1,1004,{uri:a});b=b.slice(1).join(":").split(",");if(2>b.length)throw _.gh("Bad data URI, failed to extract encoding and MIME type"),new _.H(_.F,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?_.Bi(a).buffer:_.pi(a).buffer,contentType:c}};
294
- _.Vr=function(a,b){a=_.Kj(_.Lj(a),_.Mj(a));_.Ur[a]=b};_.Wr=function(a){a=_.Kj(_.Lj(a),_.Mj(a));return _.Ur[a]||null};_.Xr=function(a){a=_.Kj(_.Lj(a),_.Mj(a));delete _.Ur[a]};_.bs=function(a){if(!a.w)return null;const b=a.H;switch(a.w){case Yr:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case Zr:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case $r:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case as:return`2px 2px 3px ${b}, 2px 2px 4px ${b}, `+`2px 2px 5px ${b}`;default:return _.Ce}};
295
- Gg="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;Hg=typeof Object.defineProperties==_.Yd?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
251
+ vq=function(a,b,c){_.x(function*(){const d=xq(a,b),e=yield nq(a,d),f=d.Ba?d.Ba.length:0;e&&0<f?zq(a,d,c):(e?a.h.warn("Preroll interstitial has no assets, skipping"):a.h.error("Preroll interstitial failed, skipping"),Xp(a.a,!1),c||(yield Wp(a.a)))})};
252
+ wq=function(a,b){return _.x(function*(){const c=xq(a,b);a.h.info(`Interstitial ${c.cueId} coming up `+`at ${c.startTime} s`);if(yield nq(a,c)){const e=a.a.getCurrentItem();if(!e)a.h.error("Cannot schedule interstitial "+`${c.cueId}, no primary content not found in `+"playlist");else if(e.player){var d=e.player;e.state===_.af?oq(a,c,d):e.jc=()=>{oq(a,c,d)}}}})};
253
+ xq=function(a,b){{const c=b.Ta[_.ac];b={cueId:b.id,startTime:b.startTime,endTime:b.endTime,state:Aq,Pe:b.Ta[_.Yb],Qe:b.Ta[_.Zb],Ba:null,resumePosition:null==c?b.endTime:b.startTime+c,playoutLimit:b.Ta[_.$b]}}a.g.push(b);return b};
254
+ nq=function(a,b){return _.x(function*(){b.state=Bq;const c={id:b.cueId,startTime:b.startTime,endTime:b.endTime,resumePosition:b.resumePosition,itemCount:-1,playoutLimit:b.playoutLimit};a.trigger(new _.E(Cq,{detail:c}));if(b.Pe)try{a.h.info(`Load X-ASSET-LIST for ${b.cueId}`),a.trigger(new _.E(Dq,{detail:c})),b.Ba=yield Eq(a,b.Pe),b.state=Fq,c.itemCount=b.Ba.length}catch(d){a.h.error("Failed to load X-ASSET-LIST",d),b.state=Gq}finally{a.trigger(new _.E(Hq,{detail:c}))}else b.Qe?(b.Ba=[{URI:b.Qe,DURATION:b.endTime-
255
+ b.startTime}],b.state=Fq):b.state=Gq;return b.state===Fq})};zq=function(a,b,c){_.x(function*(){const d=a.a.getCurrentItem();if(d){var e=Iq(a,b,"preroll");a.a.ld(e);Jq(a,d,b,e,!0);jq(a.a);b.state=Fq;c?yield a.a.load(e[0].id):yield a.a.play(e[0].id);Xp(a.a,!1)}})};
256
+ oq=function(a,b,c){if(b.Ba)if(0===b.Ba.length){const g=()=>{c.seek(b.resumePosition)};c.on(_.th,g);a.j.push(()=>{c.off(_.th,g)});a.h.info(`Interstitial ${b.cueId} scheduled to `+"be skipped")}else{var d=a.a.getCurrentItem();if(d){var e=Iq(a,b);a.a.ld(e);var f=e[0].id;Jq(a,d,b,e,!1);d.next=[f];d.transition={vf:[{cueId:b.cueId,itemId:f}]};jq(a.a);b.state=Fq;a.h.info(`Interstitial ${b.cueId} scheduled for `+`${b.startTime} s`);a.trigger(new _.E(Kq,{detail:{id:b.cueId,startTime:b.startTime,endTime:b.endTime,
257
+ resumePosition:b.resumePosition,itemCount:e.length,playoutLimit:b.playoutLimit}}))}}};mq=function(a,b){return a.g.find(c=>{const d=c.startTime-b;return c.state===Aq&&0<d&&d<=a.f.resolutionOffsetSec})||null};Eq=function(a,b){return _.x(function*(){var c=a.a.xb();if(!c)throw Error("No player found");c=c.getNetworkEngine();const d=_.Pi(b);c=yield Yi(c,d);if(!kq(c))throw new _.Gh("Invalid X-ASSET-LIST list response");return Promise.resolve(c.ASSETS)})};
258
+ Iq=function(a,b,c){c=void 0===c?"":c;let d=0,e=b.Ba.map((f,g)=>{const h=`${b.cueId}-${g}`;g=g===b.Ba.length-1?mf:`${b.cueId}-${g+1}`;d+=f.DURATION;f={id:h,config:{source:{url:f.URI,type:_.Lk}},next:[g],transition:{ic:g},duration:f.DURATION,$e:d,Oh:b.cueId};return a.f.interstitialAssetConverter?a.f.interstitialAssetConverter(f):f});e.forEach((f,g)=>{f.jc=()=>{a.h.info(`Playing interstitial asset ${f.id}`,f);a.trigger(new _.E(Lq,{detail:{id:f.id,podId:b.cueId,uri:f.config.source.url,duration:f.duration,
259
+ podOrder:g+1,podCount:b.Ba.length}}))}});if(null!=b.playoutLimit){const f=b.playoutLimit;a.h.info(`Playout limit for ${b.cueId} is `+`${f} s`);e=e.filter(k=>k.$e-k.duration<=f);const g=e[e.length-1],h=Math.abs(g.$e-f);1>h?g.transition.ic=mf:(g.transition.ic=void 0,g.transition.Af={position:g.duration-h,itemId:mf});g.next=[mf]}e[0].jc=()=>{a.h.info(`Playing interstitial ${c} ${b.cueId} with `+`${b.Ba.length} assets and will resume primary `+`content at ${b.resumePosition} s.`,e);a.h.info(`Playing interstitial asset ${e[0].id}`,
260
+ e[0]);a.trigger(new _.E(Mq,{detail:{id:b.cueId,startTime:b.startTime,endTime:b.endTime,resumePosition:b.resumePosition,itemCount:e.length,playoutLimit:b.playoutLimit}}));a.trigger(new _.E(Lq,{detail:{id:e[0].id,podId:b.cueId,uri:b.Ba[0].URI,duration:b.Ba[0].DURATION,podOrder:1,podCount:b.Ba.length}}))};return e};
261
+ Jq=function(a,b,c,d,e){b.jc=()=>{a.h.info("Resuming primary content at "+`${b.config.startTime} s.`);a.trigger(new _.E(Nq,{detail:{id:c.cueId}}));c.state=Oq;a.a.removeItems(d.map(f=>f.id));b.next=[];e&&a.trigger(new _.E(Pq))};b.config.startTime=c.resumePosition};
262
+ rq=function(a,b){var c=Qq;return _.x(function*(){a.a=null;if(typeof YospaceAdManagement!==_.Ce)throw new _.H(_.F,7,7003,"Yospace SDK not found.");if(typeof b!==_.Mf)throw new _.H(_.F,7,7003,"Yospace URL must be a string.");a:switch(c){case Qq:var d=YospaceAdManagement.SessionVOD.create(b);break a;case Rq:d=YospaceAdManagement.SessionLive.create(b);break a;case Sq:d=YospaceAdManagement.SessionDVRLive.create(b);break a;default:throw new _.H(_.F,7,7003,`Yospace stream type unknown ${c}.`);}d=yield d;
263
+ if(d.getSessionState()!==YospaceAdManagement.SessionState.INITIALISED)throw new _.H(_.F,7,7003,"Yospace session failed to initialize");a.a=d;return d.getPlaybackUrl()})};Tq=function(a,b){a.size=void 0===b?0:1;a.h.debug("Setting key status to",b);a.a=b};
264
+ Uq=function(a,b){a.f=b;_.mh(a.a);if(!b)return Promise.resolve();a.a.on(b,Sd,c=>{_.fh("AppleEmeManager.cancelNativeMediaEncryptedEvent_",c);"MediaEncryptedEvent"in window&&c instanceof MediaEncryptedEvent&&(a.h.info("Cancel native MediaEncryptedEvent when using Apple-prefixed EME"),c.stopImmediatePropagation())});a.a.on(b,yg,c=>{{a.h.debug("Handle webkitNeedKey event");c=_.J(c.initData);if(_.ii(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=ni(c.subarray(4),
265
+ !0);c=_.pi(c);const d=new Event(Sd);d.initDataType="skd";d.initData=ji(c);a.f.dispatchEvent(d)}});In(b,HTMLMediaElement.HAVE_METADATA,a.a,()=>b.webkitSetMediaKeys(a.g));return Promise.resolve()};Vq=function(a,b){Tq(a.keyStatuses,b);b=new _.E(de);a.dispatchEvent(b)};
266
+ Yq=function(a,b){a.a=b;_.mh(a.f);b&&(a.f.on(b,a.g+"needkey",c=>{{const d=new Event(Sd);d.initDataType=_.Zc;d.initData=ji(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.g+"keymessage",c=>{{const e=Wq(a,c.sessionId);if(e){var d=void 0===e.keyStatuses.getStatus();c=new _.E(_.ue,{messageType:d?ge:fe,message:c.message});d=e;_.fh("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.gh("Session not found",c.sessionId)}}),a.f.on(b,a.g+"keyadded",c=>{(c=Wq(a,
267
+ c.sessionId))&&c.ready()}),a.f.on(b,a.g+"keyerror",c=>{var d=Wq(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?Xq(d,_.Le):1===e?Xq(d,"expired"):Xq(d,_.be))}}}))};
268
+ Wq=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};Xq=function(a,b){Tq(a.keyStatuses,b);b=new _.E(de);a.dispatchEvent(b)};Zq=function(a,b){return a.w?a.w+b.charAt(0).toUpperCase()+b.slice(1):b};
269
+ $q=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===_.Oe)if(c)d=_.J(_.pi("LOAD_SESSION|"+c));else{const f=_.pi("PERSISTENT|"),g=new Uint8Array(f.byteLength+b.byteLength);g.set(f,0);g.set(_.J(b),f.byteLength);d=g}else d=_.J(b)}catch(f){return Promise.reject(f)}a.f=new _.an;const e=Zq(a,"generateKeyRequest");try{a.j[e](a.g,d)}catch(f){if(f.name!==bb)return a.f=null,Promise.reject(f);(new _.Qj(()=>{try{a.j[e](a.g,d)}catch(g){a.f.reject(g),
270
+ a.f=null}})).fa(.01)}return a.f};ar=function(a,b,c){if(a.a)a.a.then(()=>ar(a,b,c)).catch(()=>ar(a,b,c));else{a.a=b;if(a.g===ug){var d=_.li(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=_.Bi(e.keys[0].k);e=_.Bi(e.keys[0].kid)}else d=_.J(c),e=null;var f=Zq(a,"addKey");try{a.j[f](a.g,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
271
+ br=function(a){const b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();let c;typeof Event===_.Xd?c=new Event(b,a):(c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable));a.target.dispatchEvent(c)};cr=function(a){a=a.target;if(a.webkitPresentationMode===Pe){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)};
272
+ dr=function(){return this.webkitSupportsPresentationMode(Pe)?(this.webkitSetPresentationMode(Pe),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};er=function(){const a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};
273
+ fr=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};gr=function(a,b,c){return new window.TextTrackCue(a,b,c)};hr=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};jr=function(a,b,c){if("input"===a)switch(this.type){case "range":a=bd}ir.call(this,a,b,c)};kr=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};
274
+ lr=function(a){return kr()-a.a};nr=function(a){const b=new mr;b.a=a.a;return b};_.or=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};_.qr=function(a,b,c,d){return _.x(function*(){try{return new (yield pr(a,b,c,d))}catch(e){throw e.a(_.F),e;}})};
275
+ pr=function(a,b,c,d){return _.x(function*(){if(d){var e=_.rr[d.toLowerCase()];if(e)return e;_.C("Could not determine manifest type using MIME type ",d)}if(e=_.sr(a)){const f=_.tr[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 ur(a,b,c))){if(e=_.rr[d])return e;_.C("Could not determine manifest type using MIME type",d)}throw new _.H(_.F,4,4E3,{url:a});})};
276
+ _.sr=function(a){a=(new _.Lh(a)).za.split("/").pop().split(".");return 1===a.length?"":a.pop().toLowerCase()};ur=function(a,b,c){return _.x(function*(){var d=_.Pi(a);Ni(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).P).headers["content-type"])?d.toLowerCase():""})};vr=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};
277
+ wr=function(a,b,c){return b.read().then(({done:d,value:e})=>{null!=e&&(vr(a,e),Si(c,e.byteLength,lr(a.g)),a.g.a=kr());return d?(d=a.a.buffer,a.a.byteLength!==a.f&&(d=d.slice(0,a.f)),Promise.resolve(d)):Promise.resolve().then(()=>wr(a,b,c))})};
278
+ yr=function(a){const b=a.uris[a.uriIndex],c=new xr,d=new mr,e=nr(d);let f=0,g;const h=new _.an;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=lr(e));m.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!k&&(m=m.getResponseHeader(ta),Ri(a,m),k=!0)};c.onload=function(m){m=m.target;var n=(m.getAllResponseHeaders()||"").trim().split("\r\n");
279
+ const q={};for(const u of n)n=u.split(": "),q[n[0].toLowerCase()]=n.slice(1).join(": ");try{const u=lr(e);l||Si(a,m.response?m.response.length:0,u);const v=_.Qi(q,m.response,m.status,b,m.responseURL,a,u,g);a.rateLimitBps?Ti(a.rateLimitBps,lr(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");
280
+ for(var q of n)n=q.split(": "),u[n[0].toLowerCase()]=n.slice(1).join(": ")}q=_.Qi(u,m.response,m.status,b,m.responseURL,a,lr(e),g);h.resolve(q)}};c.ontimeout=function(){h.reject(new _.H(1,1,1003,{url:b,request:a}))};c.onprogress=function(m){const n=lr(d);d.a=kr();if(100<n||m.lengthComputable&&m.loaded===m.total)Si(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{P:h,request:a,abort:()=>{c.abort();h.reject(new _.H(1,1,
281
+ 7001,{url:b,request:a}));return Promise.resolve()}}};zr=function(a){let b=null;a.g!==a.f&&(b={start:a.g,end:a.f,length:a.f-a.g,data:new DataView(a.j.a.buffer,a.g,a.f-a.g),count:-1});return b};Ar=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.g),d));c.a.set(e)}c.a.set(b,c.f);c.f+=b.byteLength}a.a=a.g;a.f=a.j.f;a.l=new DataView(a.j.a.buffer,0,a.j.f)};
282
+ Cr=function(a){if(0<=a.o&&a.f<a.o)return null;let b=Br(a);for(;null!==b;){if(b.name===_.se){const c={start:a.g,end:b.end,length:b.end-a.g,data:new DataView(a.j.a.buffer,a.g,b.end-a.g),count:1};a.g=b.end;return c}b=Br(a)}return null};
283
+ Dr=function(a,b,c,d){return b.read().then(e=>{var {done:f,value:g}=e;d&&g&&(d(g.byteLength,lr(a.w)),a.w.a=kr());if(f)return e=zr(a),(e=c(!0,e))?e.then(()=>a.j.a.buffer):Promise.resolve(a.j.a.buffer);let h=Promise.resolve();if(null!=g){Ar(a,g);var k=Cr(a);for(e=[];k;)e.push(k),k=Cr(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=
284
+ c(!1,k))&&(h=e)}}return h.then(()=>Dr(a,b,c,d))})};
285
+ Br=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=Er(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=Er(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(_.F,3,3E3);}if(2097151<f)throw new _.H(_.F,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};
286
+ Er=function(a){const b=a.l.getUint32(a.a,!1);a.a+=4;return b};
287
+ Hr=function(a){a.g=a.B.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=Fr(e.request.baseDelay,1E3));const f=a.f*(1+(2*Math.random()-1)*Fr(e.request.fuzzFactor,.5));a.f*=Fr(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.l=h;Gr(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)});
288
+ let b=0,c=0,d=0;return a.g.then(e=>{const f=e.request;f.currentAttempt+=1;b=f.currentAttempt;c=f.maxAttempts;d=f.uris.length;return e.P}).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 Hr(a);g&&e.a(_.F);a.w.reject(e)}else a.w.reject(e)})};Gr=function(a,b,c){a.o=setTimeout(b,c)};Fr=function(a,b){return null===a||void 0===a?b:a};
289
+ Ir=function(a){var b=a.split("\x3d");const c=b[0];b=b[1];if(!c)throw new _.Gh("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 _.Gh(`Parsing CMSD, not recognized value type of ${a}`);};
290
+ Lr=function(a){return b=>{if(a.a){a:{b=b.headers;for(const [d,e]of Object.entries(b))if("cmsd-dynamic"===d.toLowerCase()){b=e;break a}b=null}if(b){try{const d=new Map,e=b.split(";");for(b=0;b<e.length;b++){const {key:f,value:g}=Ir(e[b]);Object.values(Jr).includes(f)&&d.set(f,g)}var c=d}catch(d){Kr.error("CmsdManager parseCmsdDynamicHeader_ failed:",d),c=null}a.f=c}}}};
291
+ Pr=function(a){var b=new Mr;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new Nr,d={Ic:!1,Jf:!1};b={P:Or(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.Ic||(d.Ic=!0,c.abort());return Promise.resolve()}};if(a=a.timeout){const e=window.setTimeout(()=>{d.Jf=!0;c.abort()},a);b.P=b.P.finally(()=>{window.clearTimeout(e)})}return b};
292
+ Or=function(a,b,c,d){return _.x(function*(){let e,f,g;const h=new mr,k=nr(h);try{e=yield Qr(a,c);g=lr(h);const m=e.headers.get(ta);Ri(b,m);const n=m?parseInt(m,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const q=e.body.getReader();f=yield Dr(new Tr(n,!b.disableMergedFragments),q,(u,v)=>{if(d.Ic)return null;v&&v.data&&(Si(b,v.data.byteLength,lr(h)),h.a=kr());return b.onFragment&&v?b.rateLimitBps?Ti(b.rateLimitBps,lr(k),b.bytesLoaded).then(()=>b.onFragment(v)):b.onFragment(v):null},
293
+ b.onProgress)}else{const q=e.body.getReader();f=yield wr(new Ur(n),q,b);b.rateLimitBps&&(yield Ti(b.rateLimitBps,lr(k),f.byteLength))}}catch(m){if(d.Ic)throw new _.H(1,1,7001,{url:a,request:b});if(d.Jf)throw new _.H(1,1,1003,{url:a,request:b});_.gh("Error while fetching data:",m);throw new _.H(1,1,1002,{url:a,error:m,request:b,status:-1},m);}const l={};e.headers.forEach((m,n)=>{l[n.trim()]=m});if(d.Ic)throw new _.H(1,1,7001,{url:a,request:b});return _.Qi(l,f,e.status,a,e.url,b,lr(k),g)})};
294
+ Wr=function(a){try{const b=a.uris[a.uriIndex],c=_.Vr(b);return{P:Promise.resolve({uri:b,data:c.data,request:a,headers:{"content-type":c.contentType}}),request:a,abort:()=>Promise.resolve()}}catch(b){return{P:Promise.reject(b),request:a,abort:()=>Promise.resolve()}}};
295
+ _.Vr=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.gh("Bad data URI, failed to parse scheme"),new _.H(_.F,1,1004,{uri:a});b=b.slice(1).join(":").split(",");if(2>b.length)throw _.gh("Bad data URI, failed to extract encoding and MIME type"),new _.H(_.F,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?_.Bi(a).buffer:_.pi(a).buffer,contentType:c}};
296
+ _.Yr=function(a,b){a=_.Kj(_.Lj(a),_.Mj(a));_.Xr[a]=b};_.Zr=function(a){a=_.Kj(_.Lj(a),_.Mj(a));return _.Xr[a]||null};_.$r=function(a){a=_.Kj(_.Lj(a),_.Mj(a));delete _.Xr[a]};_.es=function(a){if(!a.w)return null;const b=a.H;switch(a.w){case as:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case bs:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case cs:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case ds:return`2px 2px 3px ${b}, 2px 2px 4px ${b}, `+`2px 2px 5px ${b}`;default:return _.Be}};
297
+ Gg="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;Hg=typeof Object.defineProperties==_.Xd?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
296
298
  Ig("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.g(function(){h.l()})}this.a.push(g)};var e=Gg.setTimeout;c.prototype.g=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=
297
- g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.a=null};c.prototype.j=function(g){this.g(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.g)}};b.prototype.C=function(g){if(g===this)this.g(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.F(g);else{a:switch(typeof g){case _.De:var h=null!=g;break a;case _.Yd:h=!0;break a;default:h=!1}h?this.B(g):this.o(g)}};
298
- b.prototype.B=function(g){var h=void 0;try{h=g.then}catch(k){this.g(k);return}typeof h==_.Yd?this.G(h,g):this.o(g)};b.prototype.g=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();
299
- g.nd(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(q,u){return typeof q==_.Yd?function(v){try{l(q(v))}catch(y){m(y)}}:u}var l,m,n=new b(function(q,u){l=q;m=u});this.nd(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.nd=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: "+
299
+ g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.a=null};c.prototype.j=function(g){this.g(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.g)}};b.prototype.C=function(g){if(g===this)this.g(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.F(g);else{a:switch(typeof g){case _.Ce:var h=null!=g;break a;case _.Xd:h=!0;break a;default:h=!1}h?this.B(g):this.o(g)}};
300
+ b.prototype.B=function(g){var h=void 0;try{h=g.then}catch(k){this.g(k);return}typeof h==_.Xd?this.G(h,g):this.o(g)};b.prototype.g=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();
301
+ g.nd(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(q,u){return typeof q==_.Xd?function(v){try{l(q(v))}catch(y){m(y)}}:u}var l,m,n=new b(function(q,u){l=q;m=u});this.nd(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.nd=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: "+
300
302
  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=Fg(g),m=l.next();!m.done;m=l.next())d(m.value).nd(h,k)})};b.all=function(g){var h=Fg(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(y){q[v]=y;u--;0==u&&l(q)}}var q=[],u=0;do q.push(void 0),u++,d(k.value).nd(n(q.length-1),m),k=h.next();while(!k.done)})};return b});var Kg=this||self;
301
- Kg.a=!0;_.z("clpp.utils.obj.cloneItem",_.Ng);_.z("clpp.utils.obj.merge",_.Mg);var bh={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.z("clpp.log.Level",bh);var $g=3,Zg={},cs=[];_.z("clpp.log.getLoggers",function(){return _.Ng(Zg)});_.z("clpp.log.addInterceptor",function(a){a&&cs.push(a)});_.z("clpp.log.removeInterceptor",function(a){a&&(a=cs.indexOf(a),0<=a&&cs.splice(a,1))});_.z("clpp.log.getTagLevel",ah);_.z("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=Zg[a]});_.z("clpp.log.setTagLevel",function(a,b){a&&(_.Tg(b)&&(b=ch(b)),Zg[a]=b)});
303
+ Kg.a=!0;_.z("clpp.utils.obj.cloneItem",_.Ng);_.z("clpp.utils.obj.merge",_.Mg);var bh={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.z("clpp.log.Level",bh);var $g=3,Zg={},fs=[];_.z("clpp.log.getLoggers",function(){return _.Ng(Zg)});_.z("clpp.log.addInterceptor",function(a){a&&fs.push(a)});_.z("clpp.log.removeInterceptor",function(a){a&&(a=fs.indexOf(a),0<=a&&fs.splice(a,1))});_.z("clpp.log.getTagLevel",ah);_.z("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=Zg[a]});_.z("clpp.log.setTagLevel",function(a,b){a&&(_.Tg(b)&&(b=ch(b)),Zg[a]=b)});
302
304
  _.z("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.Tg(a)&&(a=ch(a));$g=a});_.z("clpp.log.getLogLevel",function(){return $g});
303
305
  _.R=class{constructor(a){(this.tag=a)&&void 0===Zg[a]&&(Zg[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=ah(this.tag);if(0<=d){if(d<c)return}else if($g<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,
304
- arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of cs)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)}kg(a){return a?
305
- this.tag?new _.R(this.tag+"."+a):new _.R(a):this}};_.z("clpp.log.Logger",_.R);_.R.prototype.createChild=_.R.prototype.kg;_.R.prototype.error=_.R.prototype.error;_.R.prototype.warn=_.R.prototype.warn;_.R.prototype.debug=_.R.prototype.debug;_.R.prototype.info=_.R.prototype.info;_.R.prototype.log=_.R.prototype.log;var dh=new _.R("clpp");_.z("clpp.log.info",_.eh);_.z("clpp.log.debug",_.fh);_.z("clpp.log.warn",_.C);_.z("clpp.log.error",_.gh);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var jp;jp=class{constructor(a,b){this.Lb=a;this.sourceIndex=b}};_.ih=new _.R("clpp.players");_.hh={};_.ds=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 es,fs;es=class{constructor(a,b,c,d){this.f=a;this.rc=b;this.a=c;this.gh=!!d}Vb(a){try{this.rc.handleEvent?this.rc.handleEvent(a):this.rc.call(this.a,a)}catch(b){_.gh("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}}};
306
+ arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of fs)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)}kg(a){return a?
307
+ this.tag?new _.R(this.tag+"."+a):new _.R(a):this}};_.z("clpp.log.Logger",_.R);_.R.prototype.createChild=_.R.prototype.kg;_.R.prototype.error=_.R.prototype.error;_.R.prototype.warn=_.R.prototype.warn;_.R.prototype.debug=_.R.prototype.debug;_.R.prototype.info=_.R.prototype.info;_.R.prototype.log=_.R.prototype.log;var dh=new _.R("clpp");_.z("clpp.log.info",_.eh);_.z("clpp.log.debug",_.fh);_.z("clpp.log.warn",_.C);_.z("clpp.log.error",_.gh);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var mp;mp=class{constructor(a,b){this.Lb=a;this.sourceIndex=b}};_.ih=new _.R("clpp.players");_.hh={};_.gs=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 hs,is;hs=class{constructor(a,b,c,d){this.f=a;this.rc=b;this.a=c;this.gh=!!d}Vb(a){try{this.rc.handleEvent?this.rc.handleEvent(a):this.rc.call(this.a,a)}catch(b){_.gh("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}}};
306
308
  _.E=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(){}};
307
- fs=class{constructor(a){this.a=new _.ds;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].Vb(a),b[c].gh&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new es(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new es(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].rc===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};var gs;_.hs=class{constructor(){this.a=new _.ds}release(){_.mh(this)}on(a,b,c,d=!1){a=new gs(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||(lh(f),this.a.remove(b,f))}}};gs=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 is=class{constructor(a){this.m=a;this.o=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.j=null;this.f=new _.hs;this.a=this.l=null;this.g=[];this.h=new _.R("clpp.native.Metadata")}release(){this.f.release();this.g=[];this.a=null}destroy(){const a=this;return _.x(function*(){a.release();a.l=null;a.j=null})}getTimelineCues(){return this.g}};_.ps=class{constructor(a,b,c,d){d=void 0===d?_.js:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.ks;this.writingMode=_.ls;this.lineInterpretation=_.ms;this.line=null;this.lineAlign=_.ns;this.direction=os;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}wc(a){return this.payload===a.payload&&this.startTime===a.startTime&&this.endTime===a.endTime&&this.payloadType===
308
- a.payloadType}};_.z("clpp.text.Cue",_.ps);_.ps.positionAlign={LEFT:_.ie,RIGHT:_.je,CENTER:_.ad,AUTO:"auto"};_.js="text";_.ps.payloadType={TEXT:_.js,VTT_XML:_.rg,TTML_XML:_.Wf};_.ks=_.ad;_.qs={LEFT:_.fe,RIGHT:_.wf,CENTER:_.ks,START:_.fe,END:_.wf};_.ps.textAlign=_.qs;var os="ltr";_.ps.direction={HORIZONTAL_LEFT_TO_RIGHT:os,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.ls="horizontal-tb";_.ps.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.ls,VERTICAL_LEFT_TO_RIGHT:_.eg,VERTICAL_RIGHT_TO_LEFT:_.gg};_.ms=0;
309
- _.ps.lineInterpretation={LINE_NUMBER:_.ms,PERCENTAGE:1};_.ns=_.Jf;_.rs={CENTER:_.ad,START:_.ns,END:_.Ud};_.ps.lineAlign=_.rs;_.us=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.ss;this.scroll=ts;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.z("clpp.text.CueRegion",_.us);_.ss=1;_.us.units={PX:0,PERCENTAGE:_.ss,LINES:2};var ts="";
310
- _.us.scrollMode={NONE:ts,UP:"up"};_.us.displayAlign={BEFORE:"flex-end",CENTER:_.ad,AFTER:"flex-start"};_.us.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.td,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var vs=class{constructor(a){this.m=a;this.l=a.getTextDisplayer();this.f=this.g=null;this.a=new _.hs;this.j=!1;this.h=new _.R("clpp.native.CueHandler")}destroy(){this.a.release();this.j=!1;this.l=this.a=this.g=this.f=null;return Promise.resolve()}start(a){this.j?this.h.warn("Already started. Ignoring request..."):(this.j=!0,this.g=a,this.f=this.g.textTracks,this.a.on(this.f,_.tc,b=>Ch(this,b)),this.a.on(this.f,cd,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.Df&&(d.mode=
311
- _.$d)}}}))}o(a){const b=new _.ps(a.startTime,a.endTime,a.text,_.rg);if(_.Tg(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.eg;break;case "rl":b.writingMode=_.gg}_.Ug(a.size)&&(b.size=a.size);if(_.Tg(a.align))switch(a.align){case _.fe:case _.Jf:b.textAlign=_.fe;break;case _.ad:b.textAlign=_.ks;break;case _.wf:case _.Ud:b.textAlign=_.wf}_.Ug(a.position)&&(b.position=a.position);if(_.Tg(a.positionAlign))switch(a.positionAlign){case _.ie:b.positionAlign=_.ie;break;case _.ad:b.positionAlign=
312
- _.ad;break;case _.je:b.positionAlign=_.je}_.Ug(a.line)&&(b.line=a.line);if(_.Tg(a.lineAlign))switch(a.lineAlign){case _.Jf:b.lineAlign=_.ns;break;case _.ad:b.lineAlign=_.ad;break;case _.Ud:b.lineAlign=_.Ud}typeof a.snapToLines===_.Pc&&(b.lineInterpretation=a.snapToLines?_.ms:1);return b}};_.H=class extends Error{constructor(a,b,c,d,e){super(Dh(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.data=!d||_.Tg(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=Dh(this.severity,this.category,this.code,this.data))}toString(){let a=this.message;this.cause&&(a+=`\n Caused by ${this.cause}`);return a}};_.z("clpp.Error",_.H);_.F=2;_.H.Severity={RECOVERABLE:1,FATAL:_.F};
309
+ is=class{constructor(a){this.a=new _.gs;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].Vb(a),b[c].gh&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new hs(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new hs(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].rc===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};var js;_.ks=class{constructor(){this.a=new _.gs}release(){_.mh(this)}on(a,b,c,d=!1){a=new js(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||(lh(f),this.a.remove(b,f))}}};js=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 ls=class{constructor(a){this.m=a;this.o=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.j=null;this.f=new _.ks;this.a=this.l=null;this.g=[];this.h=new _.R("clpp.native.Metadata")}release(){this.f.release();this.g=[];this.a=null}destroy(){const a=this;return _.x(function*(){a.release();a.l=null;a.j=null})}getTimelineCues(){return this.g}};_.ss=class{constructor(a,b,c,d){d=void 0===d?_.ms:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.ns;this.writingMode=_.os;this.lineInterpretation=_.ps;this.line=null;this.lineAlign=_.qs;this.direction=rs;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}wc(a){return this.payload===a.payload&&this.startTime===a.startTime&&this.endTime===a.endTime&&this.payloadType===
310
+ a.payloadType}};_.z("clpp.text.Cue",_.ss);_.ss.positionAlign={LEFT:_.he,RIGHT:_.ie,CENTER:_.$c,AUTO:"auto"};_.ms="text";_.ss.payloadType={TEXT:_.ms,VTT_XML:_.rg,TTML_XML:_.Vf};_.ns=_.$c;_.ts={LEFT:_.ee,RIGHT:_.vf,CENTER:_.ns,START:_.ee,END:_.vf};_.ss.textAlign=_.ts;var rs="ltr";_.ss.direction={HORIZONTAL_LEFT_TO_RIGHT:rs,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.os="horizontal-tb";_.ss.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.os,VERTICAL_LEFT_TO_RIGHT:_.eg,VERTICAL_RIGHT_TO_LEFT:_.fg};_.ps=0;
311
+ _.ss.lineInterpretation={LINE_NUMBER:_.ps,PERCENTAGE:1};_.qs=_.If;_.us={CENTER:_.$c,START:_.qs,END:_.Td};_.ss.lineAlign=_.us;_.xs=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.vs;this.scroll=ws;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.z("clpp.text.CueRegion",_.xs);_.vs=1;_.xs.units={PX:0,PERCENTAGE:_.vs,LINES:2};var ws="";
312
+ _.xs.scrollMode={NONE:ws,UP:"up"};_.xs.displayAlign={BEFORE:"flex-end",CENTER:_.$c,AFTER:"flex-start"};_.xs.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.sd,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var ys=class{constructor(a){this.m=a;this.l=a.getTextDisplayer();this.f=this.g=null;this.a=new _.ks;this.j=!1;this.h=new _.R("clpp.native.CueHandler")}destroy(){this.a.release();this.j=!1;this.l=this.a=this.g=this.f=null;return Promise.resolve()}start(a){this.j?this.h.warn("Already started. Ignoring request..."):(this.j=!0,this.g=a,this.f=this.g.textTracks,this.a.on(this.f,_.sc,b=>Ch(this,b)),this.a.on(this.f,bd,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.Cf&&(d.mode=
313
+ _.Zd)}}}))}o(a){const b=new _.ss(a.startTime,a.endTime,a.text,_.rg);if(_.Tg(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.eg;break;case "rl":b.writingMode=_.fg}_.Ug(a.size)&&(b.size=a.size);if(_.Tg(a.align))switch(a.align){case _.ee:case _.If:b.textAlign=_.ee;break;case _.$c:b.textAlign=_.ns;break;case _.vf:case _.Td:b.textAlign=_.vf}_.Ug(a.position)&&(b.position=a.position);if(_.Tg(a.positionAlign))switch(a.positionAlign){case _.he:b.positionAlign=_.he;break;case _.$c:b.positionAlign=
314
+ _.$c;break;case _.ie:b.positionAlign=_.ie}_.Ug(a.line)&&(b.line=a.line);if(_.Tg(a.lineAlign))switch(a.lineAlign){case _.If:b.lineAlign=_.qs;break;case _.$c:b.lineAlign=_.$c;break;case _.Td:b.lineAlign=_.Td}typeof a.snapToLines===_.Nc&&(b.lineInterpretation=a.snapToLines?_.ps:1);return b}};_.H=class extends Error{constructor(a,b,c,d,e){super(Dh(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.data=!d||_.Tg(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=Dh(this.severity,this.category,this.code,this.data))}toString(){let a=this.message;this.cause&&(a+=`\n Caused by ${this.cause}`);return a}};_.z("clpp.Error",_.H);_.F=2;_.H.Severity={RECOVERABLE:1,FATAL:_.F};
313
315
  _.H.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,PLUGIN:9,ADS:10};
314
316
  _.H.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_MODIFIER_ERROR:1006,RESPONSE_MODIFIER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,FETCH_OR_APPEND_ERROR:2010,INVALID_MP4:2011,
315
317
  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,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,
@@ -320,64 +322,64 @@ HLS_DISCONTINUITY_NOT_SUPPORTED:4045,HLS_UNSUPPORTED_FEATURE:4046,HLS_INCOMPATIB
320
322
  EXPIRED:6014,REQUESTED_DRM_ENVIRONMENT_UNAVAILABLE:6015,INIT_DATA_TRANSFORM_ERROR:6016,CERTIFICATE_REQUEST_FAILED:6100,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,NO_VIDEO_ELEMENT:7002,CANNOT_LOAD_SOURCE:7003,MEDIA_ELEMENT_NOT_FOUND:7004,INVALID_MEDIA_ELEMENT:7005,INVALID_CONTAINER_ELEMENT:7006,INVALID_ARGUMENT:7007,
321
323
  WRONG_ORDER_OF_OPERATIONS:7008,NOT_SUPPORTED:7009,INVALID_CONFIGURATION:7100,INVALID_LICENSE:7101,NO_ELEMENT:7102,USER_ID_NOT_PROVIDED:7103,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,
322
324
  YOUBORA_SDK_VERSION_NOT_SUPPORTED:9102,VIMOND_INVALID_CONFIGURATION:9200,VIMOND_SESSION_ERROR:9201,MUXDATA_INVALID_CONFIGURATION:9300,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};
323
- _.Gh=class extends Error{constructor(a,b){super(a);this.code=b}};var Qh=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;Dg=_.Lh.prototype;Dg.cb="";Dg.nc="";Dg.Ma="";Dg.Ec=null;Dg.za="";Dg.bc="";Dg.toString=function(){var a=[],b=this.cb;b&&a.push(Th(b,ws,!0),":");if(b=this.Ma){a.push("//");var c=this.nc;c&&a.push(Th(c,ws,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Ec;null!=b&&a.push(":",String(b))}if(b=this.za)this.Ma&&"/"!=b.charAt(0)&&a.push("/"),a.push(Th(b,"/"==b.charAt(0)?xs:ys,!0));(b=this.a.toString())&&a.push("?",b);(b=this.bc)&&a.push("#",Th(b,zs));return a.join("")};
325
+ _.Gh=class extends Error{constructor(a,b){super(a);this.code=b}};var Qh=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;Dg=_.Lh.prototype;Dg.cb="";Dg.nc="";Dg.Ma="";Dg.Ec=null;Dg.za="";Dg.bc="";Dg.toString=function(){var a=[],b=this.cb;b&&a.push(Th(b,zs,!0),":");if(b=this.Ma){a.push("//");var c=this.nc;c&&a.push(Th(c,zs,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Ec;null!=b&&a.push(":",String(b))}if(b=this.za)this.Ma&&"/"!=b.charAt(0)&&a.push("/"),a.push(Th(b,"/"==b.charAt(0)?As:Bs,!0));(b=this.a.toString())&&a.push("?",b);(b=this.bc)&&a.push("#",Th(b,Cs));return a.join("")};
324
326
  Dg.resolve=function(a){var b=new _.Lh(this);"data"===b.cb&&(b=new _.Lh);var c=!!a.cb;c?Mh(b,a.cb):c=!!a.nc;c?b.nc=a.nc:c=!!a.Ma;c?b.Ma=a.Ma:c=null!=a.Ec;var d=a.za;if(c)Nh(b,a.Ec);else if(c=!!a.za){if("/"!=d.charAt(0))if(this.Ma&&!this.za)d="/"+d;else{var e=b.za.lastIndexOf("/");-1!=e&&(d=b.za.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):
325
- ".."==h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.za=d:c=""!==a.a.toString();c?_.Oh(b,Ph(a.a)):c=!!a.bc;c&&(b.bc=a.bc);return b};var ws=/[#\/\?@]/g,ys=/[#\?:]/g,xs=/[#\?]/g,Uh=/[#\?@]/g,zs=/#/g;_.Sh.prototype.a=null;_.Sh.prototype.g=null;
327
+ ".."==h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.za=d:c=""!==a.a.toString();c?_.Oh(b,Ph(a.a)):c=!!a.bc;c&&(b.bc=a.bc);return b};var zs=/[#\/\?@]/g,Bs=/[#\?:]/g,As=/[#\?]/g,Uh=/[#\?@]/g,Cs=/#/g;_.Sh.prototype.a=null;_.Sh.prototype.g=null;
326
328
  _.Sh.prototype.add=function(a,b){if(!this.a&&(this.a={},this.g=0,this.f))for(var c=this.f.split("\x26"),d=0;d<c.length;d++){var e=c[d].indexOf("\x3d"),f=null;if(0<=e){var g=c[d].substring(0,e);f=c[d].substring(e+1)}else g=c[d];g=decodeURIComponent(g.replace(/\+/g," "));f=f||"";this.add(g,decodeURIComponent(f.replace(/\+/g," ")))}this.f=null;(c=this.a.hasOwnProperty(a)&&this.a[a])||(this.a[a]=c=[]);c.push(b);null!==this.g&&this.g++;return this};
327
- _.Sh.prototype.toString=function(){if(this.f)return this.f;if(!this.a)return"";var a=[],b;for(b in this.a)for(var c=encodeURIComponent(b),d=this.a[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="\x3d"+encodeURIComponent(d[e]));a.push(f)}return this.f=a.join("\x26")};var Wh;_.G="text";_.As=1/15;Wh={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/]};Wh[_.G]=[/^vtt$/,/^wvtt/,/^stpp/];var Bs;Bs={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av0?1/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.wj=(a,b)=>{const c=Bs[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===_.G?"":null};_.Cs={text:{mp4:Ac,m4s:Ac,m4i:Ac,cmft:Ac,vtt:_.Sf,ttml:_.Dc},video:{mp4:_.ig,m4s:_.ig,m4i:_.ig,m4v:_.ig,cmfv:_.ig,ts:_.hg},audio:{mp4:_.Jc,m4s:_.Jc,m4i:_.Jc,m4a:_.Jc,cmfa:_.Jc,ts:_.hg,aac:_.Gc,ec3:_.Ic,ac3:_.Hc},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.zj=(a,b,c)=>a.map(d=>{d=_.Ds(d)||"";return d=(d=_.Cs[b][d])?d:b===_.G?c&&"vtt"!==c?Ac:_.Sf:null}).filter(Boolean)[0]||null;
328
- _.Ds=a=>{a=(new _.Lh(a)).za.split(".");return 1>=a.length?null:a.pop()};_.Ji=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}};_.Ii=class{constructor(a,b){this.name=a;this.value=b}};var Yh=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",
329
- "cs"],["dan","da"],["deu","de"],[_.Gd,"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",
329
+ _.Sh.prototype.toString=function(){if(this.f)return this.f;if(!this.a)return"";var a=[],b;for(b in this.a)for(var c=encodeURIComponent(b),d=this.a[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="\x3d"+encodeURIComponent(d[e]));a.push(f)}return this.f=a.join("\x26")};var Wh;_.G="text";_.Ds=1/15;Wh={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/]};Wh[_.G]=[/^vtt$/,/^wvtt/,/^stpp/];var Es;Es={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av0?1/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.wj=(a,b)=>{const c=Es[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===_.G?"":null};_.Fs={text:{mp4:zc,m4s:zc,m4i:zc,cmft:zc,vtt:_.Rf,ttml:_.Cc},video:{mp4:_.ig,m4s:_.ig,m4i:_.ig,m4v:_.ig,cmfv:_.ig,ts:_.hg},audio:{mp4:_.Ic,m4s:_.Ic,m4i:_.Ic,m4a:_.Ic,cmfa:_.Ic,ts:_.hg,aac:_.Fc,ec3:_.Hc,ac3:_.Gc},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.zj=(a,b,c)=>a.map(d=>{d=_.Gs(d)||"";return d=(d=_.Fs[b][d])?d:b===_.G?c&&"vtt"!==c?zc:_.Rf:null}).filter(Boolean)[0]||null;
330
+ _.Gs=a=>{a=(new _.Lh(a)).za.split(".");return 1>=a.length?null:a.pop()};_.Ji=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}};_.Ii=class{constructor(a,b){this.name=a;this.value=b}};var Yh=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",
331
+ "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",
330
332
  "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",
331
333
  "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",
332
334
  "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",
333
- "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var Es=class{};_.z("clpp.utils.BufferUtils",Es);Es.toArrayBuffer=ji;Es.toDataView=_.ii;Es.toInt32Array=_.hi;Es.toUint32Array=gi;Es.toUint16Array=fi;Es.toUint8Array=_.J;Es.equal=di;var mi=new _.R("clpp.utils.strings");_.z("clpp.utils.strings.fromUtf8",_.li);_.z("clpp.utils.strings.fromBytesAutoDetect",_.oi);_.z("clpp.utils.strings.toUtf8",_.pi);_.z("clpp.utils.strings.toUtf16",_.qi);_.z("clpp.utils.strings.toByteArray",_.ri);_.z("clpp.utils.strings.startsWith",_.si);_.z("clpp.utils.strings.endsWith",_.ti);_.z("clpp.utils.strings.bitrateToString",_.wi);
335
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var Hs=class{};_.z("clpp.utils.BufferUtils",Hs);Hs.toArrayBuffer=ji;Hs.toDataView=_.ii;Hs.toInt32Array=_.hi;Hs.toUint32Array=gi;Hs.toUint16Array=fi;Hs.toUint8Array=_.J;Hs.equal=di;var mi=new _.R("clpp.utils.strings");_.z("clpp.utils.strings.fromUtf8",_.li);_.z("clpp.utils.strings.fromBytesAutoDetect",_.oi);_.z("clpp.utils.strings.toUtf8",_.pi);_.z("clpp.utils.strings.toUtf16",_.qi);_.z("clpp.utils.strings.toByteArray",_.ri);_.z("clpp.utils.strings.startsWith",_.si);_.z("clpp.utils.strings.endsWith",_.ti);_.z("clpp.utils.strings.bitrateToString",_.wi);
334
336
  _.z("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)))});
335
- _.z("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 xi=document.createElement("span");var Fs=class{};_.z("clpp.utils.Uint8ArrayUtils",Fs);Fs.toStandardBase64=_.zi;Fs.concat=_.Fi;Fs.equal=_.Ei;Fs.toHex=_.Di;Fs.fromHex=_.Ci;Fs.fromBase64=_.Bi;Fs.toBase64Url=_.Ai;_.Gs=new _.R("clpp.hls.Utils");_.Hi=class{constructor(a){this.f=a;this.a=0}};_.Hs=new Set([_.Ea,_.Fa,"EXT-X-I-FRAMES-ONLY",_.Ia,_.Ja,_.La,_.Oa,_.Qa]);_.Is=new Set(["EXTINF",_.Ba,_.Da,_.Ga,_.Ha,_.Na]);_.Js=new Set(["EXT-X-PART",_.Ma]);_.Ks=new Set([_.Ca]);var Li=[403,401];_.z("clpp.net.DEFAULT_FATAL_STATUS_CODES",Li);_.z("clpp.net.makeRequest",_.Pi);_.Oi=6;_.z("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.Oi});_.an=class{constructor(){let a,b;const c=new Promise((d,e)=>{a=d;b=e});c.resolve=a;c.reject=b;return c}resolve(){}reject(){}};_.io=class{constructor(a,b){this.P=a;this.A=b;this.a=!1}abort(){this.a=!0;return this.A()}pd(a,b){const c=new _.an;let d=()=>{c.reject(new _.H(_.F,7,7001));return this.abort()};this.P.then(e=>{this.a?c.reject(new _.H(_.F,7,7001)):a?d=Ui(a,e,c):c.resolve(e)},e=>{b?d=Ui(b,e,c):c.reject(e)});return new _.io(c,()=>d())}};_.io.aborted=function(){const a=Promise.reject(new _.H(_.F,7,7001));a.catch(()=>{});return new _.io(a,()=>Promise.resolve())};_.io.prototype.chain=_.io.prototype.pd;_.Ls=class{constructor(){this.a=[]}destroy(){const a=[];for(const b of this.a)b.P.catch(()=>{}),a.push(b.abort());this.a=[];return Promise.all(a)}};_.Vo=class{constructor(){this.f=[];this.g=[];this.j=[];this.w=!1;this.o=new _.Ls;this.a={};this.l=0;this.a.data=Tr;!window.fetch||!window.AbortController||_.Uj(6)||_.Xj()&&68<_.sk().browserVersion.major?(this.a.http=vr,this.a.https=vr):(this.a.http=Mr,this.a.https=Mr)}oh(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.f=[];this.g=[];return this.o.destroy()}Nd(a){this.f.push(a)}qc(a){this.g.push(a)}we(a){this.f=
336
- this.f.filter(b=>b!==a)}ed(a){this.g=this.g.filter(b=>b!==a)}fetch(a){if(this.w)return new Ms(Promise.reject(new _.H(1,1,7001,{url:a.uris[a.uriIndex],request:a})));this.l&&0<this.l&&(a.rateLimitBps=this.l);var b=[];for(const f of this.f)b.push(f);if(a.requestModifiers)for(const f of a.requestModifiers)b.push(f);a.requestModifiers=b;b=[];for(var c of this.g)b.push(c);if(a.responseModifiers)for(var d of a.responseModifiers)b.push(d);a.responseModifiers=b;let e;d=c=new _.an;try{for(const f of a.requestModifiers)d=
337
- d.then(g=>{if(e.a)throw new _.H(_.F,1,7001,g?{url:g.uris[g.uriIndex],request:g}:null);return f(g)||g}).catch(g=>{if(g instanceof _.H)throw g;throw new _.H(_.F,1,1006,null,g);});d=d.then(f=>{var g=new _.Lh(f.uris[f.uriIndex]);var h=g.cb;h||(h=location.protocol,h=h.slice(0,-1),Mh(g,h),f.uris[f.uriIndex]=g.toString());h=this.a[h];if(!h)throw new _.H(_.F,1,1E3,{url:g.toString()});g=h;return{request:f,plugin:g}});e=new Ms(d);for(const f of a.responseModifiers)e.then(g=>{const h=()=>{if(e.a)throw new _.H(_.F,
337
+ _.z("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 xi=document.createElement("span");var Is=class{};_.z("clpp.utils.Uint8ArrayUtils",Is);Is.toStandardBase64=_.zi;Is.concat=_.Fi;Is.equal=_.Ei;Is.toHex=_.Di;Is.fromHex=_.Ci;Is.fromBase64=_.Bi;Is.toBase64Url=_.Ai;_.Js=new _.R("clpp.hls.Utils");_.Hi=class{constructor(a){this.f=a;this.a=0}};_.Ks=new Set([_.Ea,_.Fa,"EXT-X-I-FRAMES-ONLY",_.Ia,_.Ja,_.La,_.Oa,_.Qa]);_.Ls=new Set(["EXTINF",_.Ba,_.Da,_.Ga,_.Ha,_.Na]);_.Ms=new Set(["EXT-X-PART",_.Ma]);_.Ns=new Set([_.Ca]);var Li=[403,401];_.z("clpp.net.DEFAULT_FATAL_STATUS_CODES",Li);_.z("clpp.net.makeRequest",_.Pi);_.Oi=6;_.z("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.Oi});_.an=class{constructor(){let a,b;const c=new Promise((d,e)=>{a=d;b=e});c.resolve=a;c.reject=b;return c}resolve(){}reject(){}};_.io=class{constructor(a,b){this.P=a;this.A=b;this.a=!1}abort(){this.a=!0;return this.A()}pd(a,b){const c=new _.an;let d=()=>{c.reject(new _.H(_.F,7,7001));return this.abort()};this.P.then(e=>{this.a?c.reject(new _.H(_.F,7,7001)):a?d=Ui(a,e,c):c.resolve(e)},e=>{b?d=Ui(b,e,c):c.reject(e)});return new _.io(c,()=>d())}};_.io.aborted=function(){const a=Promise.reject(new _.H(_.F,7,7001));a.catch(()=>{});return new _.io(a,()=>Promise.resolve())};_.io.prototype.chain=_.io.prototype.pd;_.Os=class{constructor(){this.a=[]}destroy(){const a=[];for(const b of this.a)b.P.catch(()=>{}),a.push(b.abort());this.a=[];return Promise.all(a)}};_.Yo=class{constructor(){this.f=[];this.g=[];this.j=[];this.w=!1;this.o=new _.Os;this.a={};this.l=0;this.a.data=Wr;!window.fetch||!window.AbortController||_.Uj(6)||_.Xj()&&68<_.sk().browserVersion.major?(this.a.http=yr,this.a.https=yr):(this.a.http=Pr,this.a.https=Pr)}oh(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.f=[];this.g=[];return this.o.destroy()}Od(a){this.f.push(a)}qc(a){this.g.push(a)}we(a){this.f=
338
+ this.f.filter(b=>b!==a)}ed(a){this.g=this.g.filter(b=>b!==a)}fetch(a){if(this.w)return new Ps(Promise.reject(new _.H(1,1,7001,{url:a.uris[a.uriIndex],request:a})));this.l&&0<this.l&&(a.rateLimitBps=this.l);var b=[];for(const f of this.f)b.push(f);if(a.requestModifiers)for(const f of a.requestModifiers)b.push(f);a.requestModifiers=b;b=[];for(var c of this.g)b.push(c);if(a.responseModifiers)for(var d of a.responseModifiers)b.push(d);a.responseModifiers=b;let e;d=c=new _.an;try{for(const f of a.requestModifiers)d=
339
+ d.then(g=>{if(e.a)throw new _.H(_.F,1,7001,g?{url:g.uris[g.uriIndex],request:g}:null);return f(g)||g}).catch(g=>{if(g instanceof _.H)throw g;throw new _.H(_.F,1,1006,null,g);});d=d.then(f=>{var g=new _.Lh(f.uris[f.uriIndex]);var h=g.cb;h||(h=location.protocol,h=h.slice(0,-1),Mh(g,h),f.uris[f.uriIndex]=g.toString());h=this.a[h];if(!h)throw new _.H(_.F,1,1E3,{url:g.toString()});g=h;return{request:f,plugin:g}});e=new Ps(d);for(const f of a.responseModifiers)e.then(g=>{const h=()=>{if(e.a)throw new _.H(_.F,
338
340
  1,7001,g?{url:g.request.uris[g.request.uriIndex],request:g.request}:null);};h();const k=f(g)||g;h();return k}).catch(g=>{if(g instanceof _.H&&g.data&&g.data.response){const h=f(g.data.response);if(h&&h.then)return h.then(()=>Promise.reject(g))}return Promise.reject(g)}).catch(g=>{if(g instanceof _.H)throw g;throw new _.H(_.F,1,1007,null,g);});for(const f of this.j)e.catch(g=>{g instanceof _.H&&g.data&&g.data.response||f({uri:a.uris[a.uriIndex],data:(new Uint8Array(0)).buffer,status:-1,timeMs:0,headers:{},
339
- request:a});return Promise.reject(g)}).catch(g=>{if(g instanceof _.H)throw g;throw new _.H(_.F,1,1007,null,g);});_.Wi(this.o,e);c.resolve(a);return e}catch(f){return new Ms(Promise.reject(f))}}};_.z("clpp.net.NetworkEngine",_.Vo);_.Vo.prototype.fetch=_.Vo.prototype.fetch;_.Vo.prototype.removeResponseModifier=_.Vo.prototype.ed;_.Vo.prototype.removeRequestModifier=_.Vo.prototype.we;_.Vo.prototype.addResponseModifier=_.Vo.prototype.qc;_.Vo.prototype.addRequestModifier=_.Vo.prototype.Nd;
340
- _.Vo.prototype.setRateLimit=_.Vo.prototype.oh;var bj;
341
+ request:a});return Promise.reject(g)}).catch(g=>{if(g instanceof _.H)throw g;throw new _.H(_.F,1,1007,null,g);});_.Wi(this.o,e);c.resolve(a);return e}catch(f){return new Ps(Promise.reject(f))}}};_.z("clpp.net.NetworkEngine",_.Yo);_.Yo.prototype.fetch=_.Yo.prototype.fetch;_.Yo.prototype.removeResponseModifier=_.Yo.prototype.ed;_.Yo.prototype.removeRequestModifier=_.Yo.prototype.we;_.Yo.prototype.addResponseModifier=_.Yo.prototype.qc;_.Yo.prototype.addRequestModifier=_.Yo.prototype.Od;
342
+ _.Yo.prototype.setRateLimit=_.Yo.prototype.oh;var bj;
341
343
  _.ej=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=[]}wc(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&&Ah(this.roles,
342
344
  a.roles)&&Ah(this.accessibility,a.accessibility,$i)}toString(){return`Track type: ${this.type} id: ${this.id}
343
- renditions size: ${this.renditions.length}`}};_.z("clpp.Track",_.ej);_.ej.prototype.toString=_.ej.prototype.toString;_.mj=class{constructor(a,b){this.track=b;this.id=a;this.originalId=this.drm=this.drmInfo=this.codec=this.Hc=this.bandwidth=this.height=this.width=null}};_.z("clpp.Rendition",_.mj);_.dj=1;_.N=_.w;_.L=_.p;_.K="text";bj=_.we;_.Ns={VIDEO:_.N,AUDIO:_.L,TEXT:_.K,METADATA:bj};_.ej.Type=_.Ns;_.Hl=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;
344
- _.si(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.g=b.hash}};_.z("clpp.utils.url.queryString",_.hj);var Os=class{constructor(a){this.f=a;this.h=new _.R("clpp.native.hls.HlsMetadataParser");this.a=Eh(this.g.bind(this),(b,c)=>b[0]===c[0]&&b[1].enableHlsVideoTrackInfo===c[1].enableHlsVideoTrackInfo&&b[1].enableMetadata===c[1].enableMetadata)}g(a,b){const c=this;return _.x(function*(){let d=null;try{d=yield kj(c,a)}catch(f){return c.h.warn("Failed to fetch playlist in order metadata from HLS playlist.",f.message),Promise.resolve({})}const e={};try{if(b.enableHlsVideoTrackInfo){const f=yield oj(c,d,
345
- a);e.renditions=f.renditions;e.mimeType=f.mimeType}}catch(f){c.h.warn("Failed to parse video metadata from HLS playlist.",f.message)}try{const f=yield sj(d);e.Bc=f}catch(f){c.h.warn("Failed to parse metadata from HLS playlist.",f.message)}return e})}};_.Aj=[];_.S=class{Rd(){return!0}tg(a){return this.getVideoTracks().find(b=>_.Vg(b,a,a&&Object.keys(a)))}pg(a){return this.getAudioTracks().find(b=>_.Vg(b,a,a&&Object.keys(a)))}rg(a){return this.ia().find(b=>_.Vg(b,a,a&&Object.keys(a)))}sg(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.Vg(b,a,a&&Object.keys(a)))}og(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.Vg(b,a,a&&Object.keys(a)))}qg(a){return this.ia().flatMap(b=>b.renditions).find(b=>_.Vg(b,a,a&&Object.keys(a)))}};
345
+ renditions size: ${this.renditions.length}`}};_.z("clpp.Track",_.ej);_.ej.prototype.toString=_.ej.prototype.toString;_.mj=class{constructor(a,b){this.track=b;this.id=a;this.originalId=this.drm=this.drmInfo=this.codec=this.Hc=this.bandwidth=this.height=this.width=null}};_.z("clpp.Rendition",_.mj);_.dj=1;_.N=_.w;_.L=_.p;_.K="text";bj=_.ve;_.Qs={VIDEO:_.N,AUDIO:_.L,TEXT:_.K,METADATA:bj};_.ej.Type=_.Qs;_.Hl=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;
346
+ _.si(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.g=b.hash}};_.z("clpp.utils.url.queryString",_.hj);var Rs=class{constructor(a){this.f=a;this.h=new _.R("clpp.native.hls.HlsMetadataParser");this.a=Eh(this.g.bind(this),(b,c)=>b[0]===c[0]&&b[1].enableHlsVideoTrackInfo===c[1].enableHlsVideoTrackInfo&&b[1].enableMetadata===c[1].enableMetadata)}g(a,b){const c=this;return _.x(function*(){let d=null;try{d=yield kj(c,a)}catch(f){return c.h.warn("Failed to fetch playlist in order metadata from HLS playlist.",f.message),Promise.resolve({})}const e={};try{if(b.enableHlsVideoTrackInfo){const f=yield oj(c,d,
347
+ a);e.renditions=f.renditions;e.mimeType=f.mimeType}}catch(f){c.h.warn("Failed to parse video metadata from HLS playlist.",f.message)}try{const f=yield sj(d);e.Bc=f}catch(f){c.h.warn("Failed to parse metadata from HLS playlist.",f.message)}return e})}};_.Aj=[];_.S=class{Sd(){return!0}tg(a){return this.getVideoTracks().find(b=>_.Vg(b,a,a&&Object.keys(a)))}pg(a){return this.getAudioTracks().find(b=>_.Vg(b,a,a&&Object.keys(a)))}rg(a){return this.ia().find(b=>_.Vg(b,a,a&&Object.keys(a)))}sg(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.Vg(b,a,a&&Object.keys(a)))}og(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.Vg(b,a,a&&Object.keys(a)))}qg(a){return this.ia().flatMap(b=>b.renditions).find(b=>_.Vg(b,a,a&&Object.keys(a)))}};
346
348
  _.z("clpp.TrackManager",_.S);_.S.prototype.isAbrEnabled=_.S.prototype.oa;_.S.prototype.addTextTrack=_.S.prototype.addTextTrack;_.S.prototype.findTextRendition=_.S.prototype.qg;_.S.prototype.findAudioRendition=_.S.prototype.og;_.S.prototype.findVideoRendition=_.S.prototype.sg;_.S.prototype.findTextTrack=_.S.prototype.rg;_.S.prototype.findAudioTrack=_.S.prototype.pg;_.S.prototype.findVideoTrack=_.S.prototype.tg;_.S.prototype.setTextRendition=_.S.prototype.fb;_.S.prototype.setAudioRendition=_.S.prototype.eb;
347
349
  _.S.prototype.setVideoRendition=_.S.prototype.Va;_.S.prototype.setTextTrack=_.S.prototype.Ha;_.S.prototype.setAudioTrack=_.S.prototype.ta;_.S.prototype.setVideoTrack=_.S.prototype.gb;_.S.prototype.getTextTrack=_.S.prototype.qa;_.S.prototype.getAudioTrack=_.S.prototype.la;_.S.prototype.getVideoTrack=_.S.prototype.Fa;_.S.prototype.getLoadingTextRendition=_.S.prototype.mb;_.S.prototype.getLoadingAudioRendition=_.S.prototype.lb;_.S.prototype.getLoadingVideoRendition=_.S.prototype.$a;
348
- _.S.prototype.getTextRendition=_.S.prototype.Ea;_.S.prototype.getAudioRendition=_.S.prototype.Na;_.S.prototype.getVideoRendition=_.S.prototype.ma;_.S.prototype.getTextTracks=_.S.prototype.ia;_.S.prototype.getAudioTracks=_.S.prototype.getAudioTracks;_.S.prototype.getVideoTracks=_.S.prototype.getVideoTracks;_.S.prototype.canSelectVideoTracks=_.S.prototype.Rd;var Ej=new Map,Dj=1,Ij=2,Hj=3,Gj=4;_.Ps=(new Map).set(_.sd,_.sd).set("frameRate","framerate").set("bandwidth","bitrate").set(_.zg,_.zg).set(_.Zd,_.Zd).set("channelsCount","channels");_.Qs=class{constructor(a){this.f=a;this.a=null}fa(a){return Nj(this,a,!1)}hb(a){return Nj(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.Qj=class{constructor(a){this.f=a;this.a=null}Ge(){this.stop();this.f();return this}fa(a){this.stop();this.a=(new _.Qs(()=>{this.f()})).fa(a);return this}hb(a){this.stop();this.a=(new _.Qs(()=>{this.f()})).hb(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.z("clpp.utils.Timer",_.Qj);_.Qj.prototype.stop=_.Qj.prototype.stop;_.Qj.prototype.tickEvery=_.Qj.prototype.hb;_.Qj.prototype.tickAfter=_.Qj.prototype.fa;_.Qj.prototype.tickNow=_.Qj.prototype.Ge;var Rs=class{};_.z(rd,Rs);Rs.getInfo=_.sk;
349
- var Pj=null,Oj=null,hk=new _.R(rd),lk="android",kk="ios",qk="linux",mk="osx",nk="windows",ok="tizen",pk="webos",jk=Yf,rk=Yf,ck={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,
350
+ _.S.prototype.getTextRendition=_.S.prototype.Ea;_.S.prototype.getAudioRendition=_.S.prototype.Na;_.S.prototype.getVideoRendition=_.S.prototype.ma;_.S.prototype.getTextTracks=_.S.prototype.ia;_.S.prototype.getAudioTracks=_.S.prototype.getAudioTracks;_.S.prototype.getVideoTracks=_.S.prototype.getVideoTracks;_.S.prototype.canSelectVideoTracks=_.S.prototype.Sd;var Ej=new Map,Dj=1,Ij=2,Hj=3,Gj=4;_.Ss=(new Map).set(_.rd,_.rd).set("frameRate","framerate").set("bandwidth","bitrate").set(_.zg,_.zg).set(_.Yd,_.Yd).set("channelsCount","channels");_.Ts=class{constructor(a){this.f=a;this.a=null}fa(a){return Nj(this,a,!1)}hb(a){return Nj(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.Qj=class{constructor(a){this.f=a;this.a=null}Ge(){this.stop();this.f();return this}fa(a){this.stop();this.a=(new _.Ts(()=>{this.f()})).fa(a);return this}hb(a){this.stop();this.a=(new _.Ts(()=>{this.f()})).hb(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.z("clpp.utils.Timer",_.Qj);_.Qj.prototype.stop=_.Qj.prototype.stop;_.Qj.prototype.tickEvery=_.Qj.prototype.hb;_.Qj.prototype.tickAfter=_.Qj.prototype.fa;_.Qj.prototype.tickNow=_.Qj.prototype.Ge;var Us=class{};_.z(qd,Us);Us.getInfo=_.sk;
351
+ var Pj=null,Oj=null,hk=new _.R(qd),lk="android",kk="ios",qk="linux",mk="osx",nk="windows",ok="tizen",pk="webos",jk=Yf,rk=Yf,ck={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,
350
352
  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,
351
353
  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},
352
- 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 T=class extends _.S{constructor(){super();this.h=new _.R("clpp.native.TrackManager");this.m=null;this.f=new _.hs;this.g=[];this.G=0;this.o={};this.I=[];this.a=new Map;this.w=null;this.l=new Map;this.A=!0;this.N=this.B.bind(this,_.K);this.S=this.F.bind(this,_.K);this.R=this.C.bind(this,_.K);this.T=this.B.bind(this,_.N);this.X=this.F.bind(this,_.N);this.W=this.C.bind(this,_.N);this.J=this.B.bind(this,_.L);this.L=this.F.bind(this,_.L);this.K=this.C.bind(this,_.L);this.j=null}Rd(){return!_.ek()}B(a,
353
- b){const c=this;return _.x(function*(){if(b){var d=b.track;if(d){var e=a===_.N,f=a===_.K,g=a===_.L||e,h=b.target,k=c.g.find(n=>tk(n,d,a));if(k)c.h.warn("Track from event already exists",d,k);else{var l=fj(a,d),m=uk(d);if(f){if(d.kind===_.we)return;let n;void 0!==d.id?n=c.o[d.id]:n=Object.values(c.o).find(q=>tk(l,q,a));l.kind&&"captions"===l.kind&&(l.mimeType=_.yc);n&&(l.src=n.url,l.mimeType=n.mimeType)}else if(k=c.g.find(n=>n.type===a&&_.Vg(n,l,["kind","label","language"]))){k.id=d.id;m&&(c.h.debug(`Setting native ${a} track active`),
354
- c.a.set(a,k));c.h.debug("Track from event seems to already exists, flipped native track to",d);return}try{l.renditions.push(new _.mj(l.id,l));c.g.push(l);const n=c.m.getConfiguration().safari;wk(c,a,n)?yield xk(c,l,n):yk(c,a,n)&&(yield zk(c,l,n));c.h.debug(a+" Track added",l);c.m.trigger(new _.E(_.Ss));const q=Ak(c,a).length,u=!(!h||!h.length),v=h&&h.length||0;f=()=>{c.h.debug(`Setting native ${a} track active. `+`Native track active: ${m}. `+`Number of tracks: ${q}`,d);c.a.set(a,l)};m?f():1===q&&
355
- g&&(e?f():u&&1!==v||f())}catch(n){c.h.error("Error while converting track data",n)}}}else c.h.warn(ob)}else c.h.warn(lb)})}F(a,b){if(b){var c=b.track;c?a===_.K&&c.kind!==_.we&&(b=this.g.find(d=>tk(d,c,a)))&&(this.g.splice(this.g.indexOf(b),1),(this.a.get(a)||null)===b&&(this.a.set(a,null),Bk(this)),this.h.debug(a+" Track removed, id: ",b.id)):this.h.warn(ob)}else this.h.warn(lb)}C(a,b){this.h.debug(a+" Track changed",b);a===_.K&&Bk(this);const c=Dk(this,a);if(c)for(let d=0;d<c.length;++d)if(uk(c[d])){if(b=
356
- this.g.find(e=>tk(e,c[d],a)))this.a.set(a,b),this.h.debug("Track change detected, id:",b.id),b===this.l.get(a)&&this.l.set(a,null),a===_.L?this.m.trigger(new _.E(_.Gk)):a===_.K&&this.m.trigger(new _.E(_.Hk));break}}initialize(a){this.m=a;this.j=new Os(a.getNetworkEngine())}load(){this.A=!1;var a=Ck(this,_.K);a&&(this.f.on(a,_.tc,this.N),this.f.on(a,tf,this.S),this.f.on(a,cd,this.R));if(a=Ck(this,_.L))this.f.on(a,_.tc,this.J),this.f.on(a,tf,this.L),this.f.on(a,cd,this.K);if(a=Ck(this,_.N))this.f.on(a,
357
- _.tc,this.T),this.f.on(a,tf,this.X),this.f.on(a,cd,this.W);this.f.one(this.m,Wc,this.H.bind(this))}release(){this.A=!0;this.g=[];this.o={};this.a.clear();this.l.clear();this.f.release()}destroy(){this.release();this.m=null}getVideoTracks(){return Ak(this,_.N)}getAudioTracks(){return Ak(this,_.L)}ia(){return Ak(this,_.K)}ma(){const a=this.a.get(_.N)||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]||
354
+ 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 T=class extends _.S{constructor(){super();this.h=new _.R("clpp.native.TrackManager");this.m=null;this.f=new _.ks;this.g=[];this.G=0;this.o={};this.I=[];this.a=new Map;this.w=null;this.l=new Map;this.A=!0;this.N=this.B.bind(this,_.K);this.S=this.F.bind(this,_.K);this.R=this.C.bind(this,_.K);this.T=this.B.bind(this,_.N);this.X=this.F.bind(this,_.N);this.W=this.C.bind(this,_.N);this.J=this.B.bind(this,_.L);this.L=this.F.bind(this,_.L);this.K=this.C.bind(this,_.L);this.j=null}Sd(){return!_.ek()}B(a,
355
+ b){const c=this;return _.x(function*(){if(b){var d=b.track;if(d){var e=a===_.N,f=a===_.K,g=a===_.L||e,h=b.target,k=c.g.find(n=>tk(n,d,a));if(k)c.h.warn("Track from event already exists",d,k);else{var l=fj(a,d),m=uk(d);if(f){if(d.kind===_.ve)return;let n;void 0!==d.id?n=c.o[d.id]:n=Object.values(c.o).find(q=>tk(l,q,a));l.kind&&"captions"===l.kind&&(l.mimeType=_.xc);n&&(l.src=n.url,l.mimeType=n.mimeType)}else if(k=c.g.find(n=>n.type===a&&_.Vg(n,l,["kind","label","language"]))){k.id=d.id;m&&(c.h.debug(`Setting native ${a} track active`),
356
+ c.a.set(a,k));c.h.debug("Track from event seems to already exists, flipped native track to",d);return}try{l.renditions.push(new _.mj(l.id,l));c.g.push(l);const n=c.m.getConfiguration().safari;wk(c,a,n)?yield xk(c,l,n):yk(c,a,n)&&(yield zk(c,l,n));c.h.debug(a+" Track added",l);c.m.trigger(new _.E(_.Vs));const q=Ak(c,a).length,u=!(!h||!h.length),v=h&&h.length||0;f=()=>{c.h.debug(`Setting native ${a} track active. `+`Native track active: ${m}. `+`Number of tracks: ${q}`,d);c.a.set(a,l)};m?f():1===q&&
357
+ g&&(e?f():u&&1!==v||f())}catch(n){c.h.error("Error while converting track data",n)}}}else c.h.warn(ob)}else c.h.warn(lb)})}F(a,b){if(b){var c=b.track;c?a===_.K&&c.kind!==_.ve&&(b=this.g.find(d=>tk(d,c,a)))&&(this.g.splice(this.g.indexOf(b),1),(this.a.get(a)||null)===b&&(this.a.set(a,null),Bk(this)),this.h.debug(a+" Track removed, id: ",b.id)):this.h.warn(ob)}else this.h.warn(lb)}C(a,b){this.h.debug(a+" Track changed",b);a===_.K&&Bk(this);const c=Dk(this,a);if(c)for(let d=0;d<c.length;++d)if(uk(c[d])){if(b=
358
+ this.g.find(e=>tk(e,c[d],a)))this.a.set(a,b),this.h.debug("Track change detected, id:",b.id),b===this.l.get(a)&&this.l.set(a,null),a===_.L?this.m.trigger(new _.E(_.Gk)):a===_.K&&this.m.trigger(new _.E(_.Hk));break}}initialize(a){this.m=a;this.j=new Rs(a.getNetworkEngine())}load(){this.A=!1;var a=Ck(this,_.K);a&&(this.f.on(a,_.sc,this.N),this.f.on(a,sf,this.S),this.f.on(a,bd,this.R));if(a=Ck(this,_.L))this.f.on(a,_.sc,this.J),this.f.on(a,sf,this.L),this.f.on(a,bd,this.K);if(a=Ck(this,_.N))this.f.on(a,
359
+ _.sc,this.T),this.f.on(a,sf,this.X),this.f.on(a,bd,this.W);this.f.one(this.m,Vc,this.H.bind(this))}release(){this.A=!0;this.g=[];this.o={};this.a.clear();this.l.clear();this.f.release()}destroy(){this.release();this.m=null}getVideoTracks(){return Ak(this,_.N)}getAudioTracks(){return Ak(this,_.L)}ia(){return Ak(this,_.K)}ma(){const a=this.a.get(_.N)||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]||
358
360
  null}Na(){return Ek(this,_.L)}Ea(){return Ek(this,_.K)}$a(){return Fk(this,_.N)}lb(){return Fk(this,_.L)}mb(){return Fk(this,_.K)}Fa(){return this.a.get(_.N)||null}la(){return this.a.get(_.L)||null}qa(){return this.a.get(_.K)||null}gb(a){Ik(this,_.N,a)}ta(a){Ik(this,_.L,a)}Ha(a){Ik(this,_.K,a)}Va(a){Ik(this,_.N,a&&a.track)}eb(a){Ik(this,_.L,a&&a.track)}fb(a){Ik(this,_.K,a&&a.track)}addTextTrack(a){const b=this;return _.x(function*(){if(a.mimeType.match(/text\/vtt/)){const c="External_"+`${b.G++}`;
359
- b.o[c]=a;Jk(b,a,c)}else yield Kk(b,a)})}oa(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;return _.x(function*(){const b=a.m.getConfiguration();Mk(a,_.L,b.preferredAudioLanguage);if(!Dk(a,_.K).some(c=>uk(c))){const c=Ck(a,_.K);yield new Promise(d=>{a.f.one(c,cd,d);(new _.Qj(d)).fa(1)})}a.A||Mk(a,_.K,b.preferredTextLanguage)})}};T.prototype.isAbrEnabled=T.prototype.oa;T.prototype.addTextTrack=T.prototype.addTextTrack;T.prototype.setTextRendition=T.prototype.fb;
361
+ b.o[c]=a;Jk(b,a,c)}else yield Kk(b,a)})}oa(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;return _.x(function*(){const b=a.m.getConfiguration();Mk(a,_.L,b.preferredAudioLanguage);if(!Dk(a,_.K).some(c=>uk(c))){const c=Ck(a,_.K);yield new Promise(d=>{a.f.one(c,bd,d);(new _.Qj(d)).fa(1)})}a.A||Mk(a,_.K,b.preferredTextLanguage)})}};T.prototype.isAbrEnabled=T.prototype.oa;T.prototype.addTextTrack=T.prototype.addTextTrack;T.prototype.setTextRendition=T.prototype.fb;
360
362
  T.prototype.setAudioRendition=T.prototype.eb;T.prototype.setVideoRendition=T.prototype.Va;T.prototype.setTextTrack=T.prototype.Ha;T.prototype.setAudioTrack=T.prototype.ta;T.prototype.setVideoTrack=T.prototype.gb;T.prototype.getTextTrack=T.prototype.qa;T.prototype.getAudioTrack=T.prototype.la;T.prototype.getVideoTrack=T.prototype.Fa;T.prototype.getLoadingTextRendition=T.prototype.mb;T.prototype.getLoadingAudioRendition=T.prototype.lb;T.prototype.getLoadingVideoRendition=T.prototype.$a;
361
- T.prototype.getTextRendition=T.prototype.Ea;T.prototype.getAudioRendition=T.prototype.Na;T.prototype.getVideoRendition=T.prototype.ma;T.prototype.getTextTracks=T.prototype.ia;T.prototype.getAudioTracks=T.prototype.getAudioTracks;T.prototype.getVideoTracks=T.prototype.getVideoTracks;T.prototype.canSelectVideoTracks=T.prototype.Rd;_.Ts=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(Lb);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(Lb);}Ca(){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)}ha(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
363
+ T.prototype.getTextRendition=T.prototype.Ea;T.prototype.getAudioRendition=T.prototype.Na;T.prototype.getVideoRendition=T.prototype.ma;T.prototype.getTextTracks=T.prototype.ia;T.prototype.getAudioTracks=T.prototype.getAudioTracks;T.prototype.getVideoTracks=T.prototype.getVideoTracks;T.prototype.canSelectVideoTracks=T.prototype.Sd;_.Ws=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(Kb);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(Kb);}Ca(){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)}ha(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
362
364
  1)}qb(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}va(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.ha(),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=
363
- "";for(let b=0;b<this.length;b++)0<b&&(a+=" "),a+=`${this.start(b).toFixed(3)}-${this.end(b).toFixed(3)}`;return a}};_.z("clpp.BufferInfo",_.Ts);_.Ts.prototype.bufferedAheadOf=_.Ts.prototype.va;_.Ts.prototype.isBuffered=_.Ts.prototype.qb;_.Ts.prototype.bufferEnd=_.Ts.prototype.ha;_.Ts.prototype.bufferStart=_.Ts.prototype.Ca;_.Ts.prototype.end=_.Ts.prototype.end;_.Ts.prototype.start=_.Ts.prototype.start;_.Us=class{constructor(){this.Mc=new fs(this);this.Kc=[]}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}on(a,b,c){return this.Mc.on(a,b,c)}one(a,b,c){return this.Mc.one(a,b,c)}off(a,b){return this.Mc.off(a,b)}forwardEventsTo(a){a&&(0<=this.Kc.indexOf(a)||this.Kc.push(a))}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}stopForwardingEventsTo(a){a&&(a=this.Kc.indexOf(a),0<=a&&this.Kc.splice(a,1))}trigger(a){this.Mc.trigger(a);for(const b of this.Kc)b.dispatchEvent(a)}};
364
- _.Us.prototype.off=_.Us.prototype.off;_.Us.prototype.one=_.Us.prototype.one;_.Us.prototype.on=_.Us.prototype.on;_.Us.prototype.removeEventListener=_.Us.prototype.removeEventListener;_.Us.prototype.addEventListener=_.Us.prototype.addEventListener;_.z("clpp.events.ERROR",_.r);_.z("clpp.events.LOADEDMETADATA",_.qe);_.z("clpp.events.BUFFERING_ENDED",_.Qc);_.z("clpp.events.BUFFERING_STARTED",_.Uc);_.z("clpp.events.STATE_CHANGED",_.Kf);_.Gk="audiotrackchanged";_.z("clpp.events.AUDIO_TRACK_CHANGED",_.Gk);_.Hk="texttrackchanged";_.z("clpp.events.TEXT_TRACK_CHANGED",_.Hk);_.z("clpp.events.VIDEO_TRACK_CHANGED",_.og);_.z("clpp.events.BITRATE_CHANGED",_.Nc);_.Ss="tracksadded";_.z("clpp.events.TRACKS_ADDED",_.Ss);_.z("clpp.events.LOAD_START",re);
365
- _.z("clpp.events.RELEASING",_.sf);_.z("clpp.events.RELEASED",rf);_.z("clpp.events.DESTROYING","destroying");_.z("clpp.events.DESTROYED","destroyed");_.z("clpp.events.VIDEO_BUFFER_CHANGED",_.ng);_.z("clpp.events.AUDIO_BUFFER_CHANGED",_.Lc);_.z("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.z("clpp.events.DRM_SESSION_UPDATE",_.Pd);_.z("clpp.events.DRM_SESSION_PERSISTED",_.Od);_.z("clpp.events.DRM_RENEWAL_STARTED",Nd);_.z("clpp.events.DRM_EXPIRATION_UPDATE",_.Md);
366
- _.z("clpp.events.AUTOPLAY_NOT_ALLOWED",_.Mc);_.z("clpp.events.PLAY",_.Re);_.z("clpp.events.SEEKING",_.Cf);_.z("clpp.events.SEEKED",_.Bf);_.z("clpp.events.USER_SEEKING",_.cg);_.z("clpp.events.USER_SEEKED",_.bg);_.Qn={SEEKING:1,NO_DATA:2};_.z("clpp.events.BufferingReasons",_.Qn);_.z("clpp.events.ADS_TIMELINE_CHANGED",_.uc);_.z("clpp.events.AD_LOADED",_.jc);_.z("clpp.events.AD_BREAK_STARTED",_.cc);_.z("clpp.events.AD_STARTED",_.qc);_.z("clpp.events.AD_BUFFERING",_.ec);_.z("clpp.events.AD_PROGRESS",_.nc);
367
- _.z("clpp.events.AD_FIRST_QUARTILE",_.hc);_.z("clpp.events.AD_MIDPOINT",_.lc);_.z("clpp.events.AD_THIRD_QUARTILE",_.sc);_.z("clpp.events.AD_PAUSED",_.mc);_.z("clpp.events.AD_RESUMED",_.oc);_.z("clpp.events.AD_SKIPPED",_.pc);_.z("clpp.events.AD_CLICKED",_.fc);_.z("clpp.events.AD_IMPRESSION",_.ic);_.z("clpp.events.AD_COMPLETED",_.gc);_.z("clpp.events.AD_STOPPED",_.rc);_.z("clpp.events.AD_BREAK_STOPPED",_.dc);_.z("clpp.events.SIMID_CREATIVE_STARTED",_.Ef);_.z("clpp.events.SIMID_CREATIVE_STOPPED",_.Ff);
368
- _.z("clpp.events.CASTING_STARTED",_.Xc);_.z("clpp.events.CASTING_ENDED","castingended");_.z("clpp.events.CAST_STATUS_CHANGED",_.Yc);_.z("clpp.events.AIRPLAY_STATUS_CHANGED",_.xc);_.z("clpp.events.AIRPLAY_CASTING_STARTED",_.wc);_.z("clpp.events.AIRPLAY_CASTING_ENDED",_.vc);_.rh="timeline-cue-added";_.z("clpp.events.TIMELINE_CUE_ADDED",_.rh);_.th="timeline-cue-enter";_.z("clpp.events.TIMELINE_CUE_ENTER",_.th);_.uh="timeline-cue-exit";_.z("clpp.events.TIMELINE_CUE_EXIT",_.uh);
369
- _.z("clpp.events.MPD_TYPE_CHANGED",_.Ae);_.z("clpp.events.LIVE_TURNED_STATIC",_.le);_.z("clpp.events.VIMOND_RESPONSE",_.pg);_.z("clpp.events.PLAYLIST_ITEM_CHANGED",_.cf);_.z("clpp.events.PLAYLIST_MODIFIED",_.df);_.z("clpp.events.SC_PLAYLIST_TIMELINE_CHANGED",_.Af);_.z("clpp.events.SC_PLAYLIST_ITEM_CHANGED",_.yf);_.z("clpp.events.SC_PLAYLIST_ENDED",_.xf);_.z("clpp.events.SC_PLAYLIST_LIVE_TURNED_STATIC",_.zf);_.z("clpp.events.CDN_SWITCH_SUCCESS",_.Zc);_.z("clpp.events.ONLINE_STATUS_CHANGED",Je);var Nk=["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"];_.z("clpp.version",_.fa);_.z("clpp.name",_.ra);_.Lk="application/x-mpegurl";_.z("clpp.Type",{DASH:_.zc,HLS:_.Lk,SMOOTH_STREAMING:_.Ec,MP4:_.ig});_.qh="scte35";_.oh=Yf;_.z("clpp.TimelineCueType",{SCTE35:_.qh,DASH_CALLBACK:_.Be,HLS_DATERANGE:"hls-daterange",UNKNOWN:_.oh});_.z("clpp.SpeedUpMode",{DECODER:_.Dd,SEEK:"seek"});_.z("clpp.CodecSwitchingStrategy",{PREVENT:_.lf,SMOOTH:_.Hf});var Vs=class{};_.z("clpp.utils.PlayerConfiguration",Vs);Vs.create=_.Tk;var Ws=["abort",Vc,Wc,Rd,"emptied",Td,_.Vd,_.r,"interruptbegin","interruptend",_.me,_.qe,re,"mozaudioavailable",_.Ne,_.Re,_.bf,_.of,_.qf,_.Bf,_.Cf,If,"suspend",_.Uf,"volumechange",_.sg,_.tg,_.vf,yg,xg,vg,wg];_.Xs=class extends _.Us{constructor(a){super();this.log=new _.R(a);this.configuration=this.Ja=_.Rk();this.ca=this.C=null;this.Uc=this.te=!1;this.Oe=new _.R("clpp.video.events");this.Wb=null;this.yd=-1;this.Zf=this.Wf.bind(this);this.qe=new _.Vo;this.L=new _.hs;this.sc=this.vc=this.R=null}init(a,b){this.configuration=this.Ja=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 Ws)this.L.on(a,c,this.Zf,c!==_.r);
365
+ "";for(let b=0;b<this.length;b++)0<b&&(a+=" "),a+=`${this.start(b).toFixed(3)}-${this.end(b).toFixed(3)}`;return a}};_.z("clpp.BufferInfo",_.Ws);_.Ws.prototype.bufferedAheadOf=_.Ws.prototype.va;_.Ws.prototype.isBuffered=_.Ws.prototype.qb;_.Ws.prototype.bufferEnd=_.Ws.prototype.ha;_.Ws.prototype.bufferStart=_.Ws.prototype.Ca;_.Ws.prototype.end=_.Ws.prototype.end;_.Ws.prototype.start=_.Ws.prototype.start;_.Xs=class{constructor(){this.Mc=new is(this);this.Kc=[]}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}on(a,b,c){return this.Mc.on(a,b,c)}one(a,b,c){return this.Mc.one(a,b,c)}off(a,b){return this.Mc.off(a,b)}forwardEventsTo(a){a&&(0<=this.Kc.indexOf(a)||this.Kc.push(a))}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}stopForwardingEventsTo(a){a&&(a=this.Kc.indexOf(a),0<=a&&this.Kc.splice(a,1))}trigger(a){this.Mc.trigger(a);for(const b of this.Kc)b.dispatchEvent(a)}};
366
+ _.Xs.prototype.off=_.Xs.prototype.off;_.Xs.prototype.one=_.Xs.prototype.one;_.Xs.prototype.on=_.Xs.prototype.on;_.Xs.prototype.removeEventListener=_.Xs.prototype.removeEventListener;_.Xs.prototype.addEventListener=_.Xs.prototype.addEventListener;_.z("clpp.events.ERROR",_.r);_.z("clpp.events.LOADEDMETADATA",_.me);_.z("clpp.events.BUFFERING_ENDED",_.Pc);_.z("clpp.events.BUFFERING_STARTED",_.Qc);_.z("clpp.events.STATE_CHANGED",_.Jf);_.Gk="audiotrackchanged";_.z("clpp.events.AUDIO_TRACK_CHANGED",_.Gk);_.Hk="texttrackchanged";_.z("clpp.events.TEXT_TRACK_CHANGED",_.Hk);_.z("clpp.events.VIDEO_TRACK_CHANGED",_.og);_.z("clpp.events.BITRATE_CHANGED",_.Mc);_.Vs="tracksadded";_.z("clpp.events.TRACKS_ADDED",_.Vs);_.z("clpp.events.LOAD_START",qe);
367
+ _.z("clpp.events.RELEASING",_.rf);_.z("clpp.events.RELEASED",qf);_.z("clpp.events.DESTROYING","destroying");_.z("clpp.events.DESTROYED","destroyed");_.z("clpp.events.VIDEO_BUFFER_CHANGED",_.jg);_.z("clpp.events.AUDIO_BUFFER_CHANGED",_.Kc);_.z("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.z("clpp.events.DRM_SESSION_UPDATE",_.Od);_.z("clpp.events.DRM_SESSION_PERSISTED",_.Nd);_.z("clpp.events.DRM_RENEWAL_STARTED",Md);_.z("clpp.events.DRM_EXPIRATION_UPDATE",_.Ld);
368
+ _.z("clpp.events.AUTOPLAY_NOT_ALLOWED",_.Lc);_.z("clpp.events.PLAY",_.Qe);_.z("clpp.events.SEEKING",_.Bf);_.z("clpp.events.SEEKED",_.Af);_.z("clpp.events.USER_SEEKING",_.cg);_.z("clpp.events.USER_SEEKED",_.bg);_.Qn={SEEKING:1,NO_DATA:2};_.z("clpp.events.BufferingReasons",_.Qn);_.z("clpp.events.ADS_TIMELINE_CHANGED",_.tc);_.z("clpp.events.AD_LOADED",_.ic);_.z("clpp.events.AD_BREAK_STARTED",_.bc);_.z("clpp.events.AD_STARTED",_.pc);_.z("clpp.events.AD_BUFFERING",_.dc);_.z("clpp.events.AD_PROGRESS",_.mc);
369
+ _.z("clpp.events.AD_FIRST_QUARTILE",_.gc);_.z("clpp.events.AD_MIDPOINT",_.jc);_.z("clpp.events.AD_THIRD_QUARTILE",_.rc);_.z("clpp.events.AD_PAUSED",_.lc);_.z("clpp.events.AD_RESUMED",_.nc);_.z("clpp.events.AD_SKIPPED",_.oc);_.z("clpp.events.AD_CLICKED",_.ec);_.z("clpp.events.AD_IMPRESSION",_.hc);_.z("clpp.events.AD_COMPLETED",_.fc);_.z("clpp.events.AD_STOPPED",_.qc);_.z("clpp.events.AD_BREAK_STOPPED",_.cc);_.z("clpp.events.SIMID_CREATIVE_STARTED",_.Df);_.z("clpp.events.SIMID_CREATIVE_STOPPED",_.Ef);
370
+ _.z("clpp.events.CASTING_STARTED",_.Wc);_.z("clpp.events.CASTING_ENDED","castingended");_.z("clpp.events.CAST_STATUS_CHANGED",_.Xc);_.z("clpp.events.AIRPLAY_STATUS_CHANGED",_.wc);_.z("clpp.events.AIRPLAY_CASTING_STARTED",_.vc);_.z("clpp.events.AIRPLAY_CASTING_ENDED",_.uc);_.rh="timeline-cue-added";_.z("clpp.events.TIMELINE_CUE_ADDED",_.rh);_.th="timeline-cue-enter";_.z("clpp.events.TIMELINE_CUE_ENTER",_.th);_.uh="timeline-cue-exit";_.z("clpp.events.TIMELINE_CUE_EXIT",_.uh);
371
+ _.z("clpp.events.MPD_TYPE_CHANGED",_.ze);_.z("clpp.events.LIVE_TURNED_STATIC",_.je);_.z("clpp.events.VIMOND_RESPONSE",_.pg);_.z("clpp.events.PLAYLIST_ITEM_CHANGED",_.bf);_.z("clpp.events.PLAYLIST_MODIFIED",_.cf);_.z("clpp.events.SC_PLAYLIST_TIMELINE_CHANGED",_.zf);_.z("clpp.events.SC_PLAYLIST_ITEM_CHANGED",_.xf);_.z("clpp.events.SC_PLAYLIST_ENDED",_.wf);_.z("clpp.events.SC_PLAYLIST_LIVE_TURNED_STATIC",_.yf);_.z("clpp.events.CDN_SWITCH_SUCCESS",_.Yc);_.z("clpp.events.ONLINE_STATUS_CHANGED",Ie);var Nk=["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"];_.z("clpp.version",_.fa);_.z("clpp.name",_.ra);_.Lk="application/x-mpegurl";_.z("clpp.Type",{DASH:_.yc,HLS:_.Lk,SMOOTH_STREAMING:_.Dc,MP4:_.ig});_.qh="scte35";_.oh=Yf;_.z("clpp.TimelineCueType",{SCTE35:_.qh,DASH_CALLBACK:_.Ae,HLS_DATERANGE:"hls-daterange",UNKNOWN:_.oh});_.z("clpp.SpeedUpMode",{DECODER:_.Cd,SEEK:"seek"});_.z("clpp.CodecSwitchingStrategy",{PREVENT:_.kf,SMOOTH:_.Gf});var Ys=class{};_.z("clpp.utils.PlayerConfiguration",Ys);Ys.create=_.Tk;var Zs=["abort",Uc,Vc,Qd,"emptied",Sd,_.Ud,_.r,"interruptbegin","interruptend",_.le,_.me,qe,"mozaudioavailable",_.Me,_.Qe,_.af,_.nf,_.pf,_.Af,_.Bf,Hf,"suspend",_.Tf,"volumechange",_.sg,_.tg,_.uf,yg,xg,vg,wg];_.$s=class extends _.Xs{constructor(a){super();this.log=new _.R(a);this.configuration=this.Ja=_.Rk();this.ca=this.C=null;this.Uc=this.te=!1;this.Oe=new _.R("clpp.video.events");this.Wb=null;this.zd=-1;this.Zf=this.Wf.bind(this);this.qe=new _.Yo;this.L=new _.ks;this.sc=this.vc=this.R=null}init(a,b){this.configuration=this.Ja=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 Zs)this.L.on(a,c,this.Zf,c!==_.r);
370
372
  this.Wb||(this.Wb=this.Nf());this.Wb.initialize(this);this.C.showMediaElement()}release(){this.R&&(this.R.destroy(),this.R=null);return Promise.resolve()}destroy(){this.L.release();return this.qe.release()}canPlay(a,b){return _.hh[this.namespace()].canPlay(a,b)}getTimeline(){return null}setupPlaylist(){return Promise.reject(_.qb)}appendLoad(){return Promise.reject(_.qb)}seekWith(){return Promise.reject(_.qb)}play(){if(!this.ca)return Promise.reject("No sources specified yet. You need to load content before calling play.");
371
- 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||""};Ok(c)?(this.trigger(new _.E(_.Mc)),this.log.warn(_.ka)):c.name===rb&&this.log.warn('Unrecognized "NotAllowedError" on play(). '+`${b.name}: ${b.message}`);throw b;})}pause(){return this.ca?new Promise((a,b)=>{const c=this.getState();if(c!==_.On&&c!==_.Ln&&c!==_.Wn&&c!==_.Vn)b();else if(this.C.getMedia().pause(),this.getState()===
372
- _.Wn)this.L.one(this,_.Kf,()=>{a()});else a()}):Promise.reject("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.vc=a}setCdnErrorCallback(a){this.sc=a}yc(){return this.vc}getSurface(){return this.C}getBufferInfo(a){const b=this.getSurface().getMedia();return new _.Ts(b?b.buffered:void 0,a)}getPosition(){return this.getMediaPosition()}getMediaPosition(){const a=
373
+ 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||""};Ok(c)?(this.trigger(new _.E(_.Lc)),this.log.warn(_.ka)):c.name===rb&&this.log.warn('Unrecognized "NotAllowedError" on play(). '+`${b.name}: ${b.message}`);throw b;})}pause(){return this.ca?new Promise((a,b)=>{const c=this.getState();if(c!==_.On&&c!==_.Ln&&c!==_.Wn&&c!==_.Vn)b();else if(this.C.getMedia().pause(),this.getState()===
374
+ _.Wn)this.L.one(this,_.Jf,()=>{a()});else a()}):Promise.reject("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.vc=a}setCdnErrorCallback(a){this.sc=a}yc(){return this.vc}getSurface(){return this.C}getBufferInfo(a){const b=this.getSurface().getMedia();return new _.Ws(b?b.buffered:void 0,a)}getPosition(){return this.getMediaPosition()}getMediaPosition(){const a=
373
375
  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!==_.t||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)?(this.log.info("Skip seek. Delta "+Math.abs(d)+" \x3c 0.1"),Promise.resolve()):new Promise((e,f)=>{const g=
374
- ()=>{this.trigger(new _.E(_.cg));this.L.on(c,_.Bf,h);this.L.on(c,_.Uf,h);this.L.on(c,_.of,h);this.log.info("Seeking to "+a+". Delta "+d);this.Uc=this.te=!0;c.currentTime=a},h=l=>{const m=this.getMediaPosition(),n=.1>=Math.abs(a-m);var q=.25<m-a;const u=c.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA,v=l.type===_.Bf,y=l.type===_.of,B=l.type===_.Uf,D=y&&u;q=v||n&&D||B&&q;this.log.debug("Checking seeking state after "+l.type+" event. Seek completed:",q,"Current Time:",m,"Target Time:",a,"Native Event:",
375
- v,"Time reached",n,"Timeupdate:",B,"Progress:",y,"ReadyState:",u,"Progress Ready:",D);q?(this.Uc=this.te=!1,this.L.off(c,_.Bf,h),this.L.off(c,_.Uf,h),this.L.off(c,_.of,h),this.Ne(),this.trigger(new _.E(_.bg)),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,_.qe,g)};this.getState()===_.Tn?(this.log.debug("Player is in IDLE state. Postpone seek."),this.L.one(this,_.Kf,()=>{switch(this.getState()){case _.On:case _.Wn:case _.Vn:this.log.debug("Valid seek state reached.");
376
+ ()=>{this.trigger(new _.E(_.cg));this.L.on(c,_.Af,h);this.L.on(c,_.Tf,h);this.L.on(c,_.nf,h);this.log.info("Seeking to "+a+". Delta "+d);this.Uc=this.te=!0;c.currentTime=a},h=l=>{const m=this.getMediaPosition(),n=.1>=Math.abs(a-m);var q=.25<m-a;const u=c.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA,v=l.type===_.Af,y=l.type===_.nf,B=l.type===_.Tf,D=y&&u;q=v||n&&D||B&&q;this.log.debug("Checking seeking state after "+l.type+" event. Seek completed:",q,"Current Time:",m,"Target Time:",a,"Native Event:",
377
+ v,"Time reached",n,"Timeupdate:",B,"Progress:",y,"ReadyState:",u,"Progress Ready:",D);q?(this.Uc=this.te=!1,this.L.off(c,_.Af,h),this.L.off(c,_.Tf,h),this.L.off(c,_.nf,h),this.Ne(),this.trigger(new _.E(_.bg)),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,_.me,g)};this.getState()===_.Tn?(this.log.debug("Player is in IDLE state. Postpone seek."),this.L.one(this,_.Jf,()=>{switch(this.getState()){case _.On:case _.Wn:case _.Vn:this.log.debug("Valid seek state reached.");
376
378
  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?_.Ug(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
377
- 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===_.Pc&&(b.muted=a)}getDuration(){return this.getMediaDuration()}getMediaDuration(){return this.ca?this.C.getMedia().duration:-1}getTrackManager(){return this.Wb}getPlaybackRate(){const a=this.C.getMedia();return a&&a.playbackRate||
378
- 1}setPlaybackRate(a){const b=this.C.getMedia();void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.yd=a}getSourceIndex(){return this.yd}getLoadedSource(){return this.ca&&-1!==this.yd?this.ca[this.yd]:null}getPeriods(){return[]}getNetworkEngine(){return this.qe}setNetworkEngine(a){this.qe=a}getTextDisplayer(){return this.R}getTimelineCues(){return[]}resetAbr(){}Wf(a){var b=this.getSurface().getMedia();const c=this.getPosition();let d="Received Video Element Event: '"+a.type+"' with playhead at: "+
379
- c;if(a.type===_.Uf||a.type===_.of)this.Oe.debug(d);else{let e="";switch(a.type){case _.qf:e=`Rate: ${this.getPlaybackRate()}`;break;case Rd:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.Re:case _.bf:case "suspend":case _.sg:case If:case _.Cf:case _.Bf:case _.Uf:case _.of:case Vc:case Wc:b=this.getBufferInfo().va(c);e=`State ${this.getSurface().getMedia().readyState} `+`Buffer: ${b}`;break;case _.vf:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&
380
- (d+=". "+e);this.Oe.info(d)}a.type!==_.r&&this.trigger(new _.E(a.type,{detail:a}))}Ne(){}};_.Xs.prototype.getTextDisplayer=_.Xs.prototype.getTextDisplayer;_.Xs.prototype.setNetworkEngine=_.Xs.prototype.setNetworkEngine;_.Xs.prototype.getNetworkEngine=_.Xs.prototype.getNetworkEngine;var Xk;Xk=new _.R("clpp.Components");_.Vk=new Map;_.z("clpp.install",function(a){fl(a)});_.z("clpp.uninstall",function(a){gl(a)});var Ys=class{constructor(){this.a=this.f=null;this.h=new _.R("clpp.drm.csl")}release(){this.a=this.f=null}};_.z("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.Eb,SW_SECURE_DECODE:_.Fb,HW_SECURE_CRYPTO:Ya,HW_SECURE_DECODE:Za,HW_SECURE_ALL:Xa});_.z("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.z("clpp.drm.KeySystem",{NONE:_.Ce,CLEAR_KEY:_.Le,WIDEVINE:_.zd,PLAYREADY:_.xd,FAIRPLAY:_.vd,PRIMETIME:_.ud});_.kl={};_.z("clpp.drm.registerDrmEnvironment",_.ll);var ol={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,
379
+ 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.ca?this.C.getMedia().duration:-1}getTrackManager(){return this.Wb}getPlaybackRate(){const a=this.C.getMedia();return a&&a.playbackRate||
380
+ 1}setPlaybackRate(a){const b=this.C.getMedia();void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.zd=a}getSourceIndex(){return this.zd}getLoadedSource(){return this.ca&&-1!==this.zd?this.ca[this.zd]:null}getPeriods(){return[]}getNetworkEngine(){return this.qe}setNetworkEngine(a){this.qe=a}getTextDisplayer(){return this.R}getTimelineCues(){return[]}resetAbr(){}Wf(a){var b=this.getSurface().getMedia();const c=this.getPosition();let d="Received Video Element Event: '"+a.type+"' with playhead at: "+
381
+ c;if(a.type===_.Tf||a.type===_.nf)this.Oe.debug(d);else{let e="";switch(a.type){case _.pf:e=`Rate: ${this.getPlaybackRate()}`;break;case Qd:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.Qe:case _.af:case "suspend":case _.sg:case Hf:case _.Bf:case _.Af:case _.Tf:case _.nf:case Uc:case Vc:b=this.getBufferInfo().va(c);e=`State ${this.getSurface().getMedia().readyState} `+`Buffer: ${b}`;break;case _.uf:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&
382
+ (d+=". "+e);this.Oe.info(d)}a.type!==_.r&&this.trigger(new _.E(a.type,{detail:a}))}Ne(){}};_.$s.prototype.getTextDisplayer=_.$s.prototype.getTextDisplayer;_.$s.prototype.setNetworkEngine=_.$s.prototype.setNetworkEngine;_.$s.prototype.getNetworkEngine=_.$s.prototype.getNetworkEngine;var Xk;Xk=new _.R("clpp.Components");_.Vk=new Map;_.z("clpp.install",function(a){fl(a)});_.z("clpp.uninstall",function(a){gl(a)});var at=class{constructor(){this.a=this.f=null;this.h=new _.R("clpp.drm.csl")}release(){this.a=this.f=null}};_.z("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.Eb,SW_SECURE_DECODE:_.Fb,HW_SECURE_CRYPTO:Ya,HW_SECURE_DECODE:Za,HW_SECURE_ALL:Xa});_.z("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.z("clpp.drm.KeySystem",{NONE:_.Be,CLEAR_KEY:_.Ke,WIDEVINE:_.yd,PLAYREADY:_.wd,FAIRPLAY:_.ud,PRIMETIME:_.td});_.kl={};_.z("clpp.drm.registerDrmEnvironment",_.ll);var ol={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,
381
383
  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,
382
384
  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,
383
385
  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,
@@ -391,103 +393,102 @@ c;if(a.type===_.Uf||a.type===_.of)this.Oe.debug(d);else{let e="";switch(a.type){
391
393
  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,
392
394
  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,
393
395
  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,
394
- 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]};_.Zs=class{constructor(a){this.I=a;this.f={}}Qa(a,b){this.f[a]=b}};_.z("clpp.drm.DrmEnvironment",_.Zs);_.Zs.prototype.setDrmSystem=_.Zs.prototype.Qa;_.Ll=class{constructor(a,b){b=void 0===b?!1:b;this.f=_.Ug(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.g=b;this.buffer=this.f.buffer}getPosition(){return this.a}Da(){return this.f.byteLength}seek(a){(0>a||a>=this.f.byteLength)&&_.ql();this.a=a}};_.vm=class{constructor(a,b){this.f=a;this.g=void 0===b?!0:b;this.a=0}getPosition(){return this.a}Da(){return this.f.byteLength}skip(a){this.a+a>this.f.byteLength&&_.tl();this.a+=a}seek(a){if(0>a||a>=this.f.byteLength)throw _.tl();this.a=a}};
395
- _.z("clpp.utils.dataview.DataViewReader",_.vm);_.Jl=class{constructor(){this.g=[];this.f=[];this.a=!1;this.h=new _.R("clpp.mp4")}M(a,b){a=Al(a);this.g[a]=$s;this.f[a]=b;return this}ba(a,b){a=Al(a);this.g[a]=at;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.J(a);a=new _.vm(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.sl(a)&&!this.a;)this.Hd(0,a,b)}Hd(a,b,c){const d=b.getPosition();let e=_.P(b);var f=_.P(b);let g=!1;this.h.debug("Parsing MP4 box",_.Bl(f));switch(e){case 0:e=b.Da()-d;break;case 1:e=_.xl(b),g=!0}const h=
396
- this.f[f];if(h){let m=null;var k=null;this.g[f]===at&&(k=_.P(b),m=k>>>24,k&=16777215);f=b.getPosition()-d;var l=d+e;c&&l>b.Da()&&(l=b.Da());l-=b.getPosition();b=0<l?_.zl(b,l):new Uint8Array(0);b=new _.vm(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.Da()-b.getPosition()),b.skip(a)}};_.z("clpp.utils.Mp4Parser",_.Jl);_.Jl.typeToString=_.Bl;
397
- _.Jl.allData=_.El;_.Jl.sampleDescription=_.Dl;_.Jl.children=_.Cl;_.Jl.prototype.parseNext=_.Jl.prototype.Hd;_.Jl.prototype.parse=_.Jl.prototype.parse;_.Jl.prototype.stop=_.Jl.prototype.stop;_.Jl.prototype.fullBox=_.Jl.prototype.ba;_.Jl.prototype.box=_.Jl.prototype.M;_.Jl.headerSize=_.Fl;var $s=0,at=1;var bt=class{};_.z("clpp.utils.FairplayUtils",bt);bt.parseFairPlayResponse=_.Ol;bt.formatFairPlayRequest=_.Nl;bt.createFairplayPayload=Ml;bt.extractContentId=_.Il;bt.extractExtXKeyUri=Gl;var Ul=new _.R("clpp.drm.DrmToday"),dm="PRODUCTION",em="STAGING",fm="TEST",ct={PRODUCTION:dm,STAGING:em,TEST:fm};_.z("clpp.drm.DrmToday.Environment",ct);_.z("clpp.drm.DrmToday.WidevineCertificates",{V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"});
396
+ 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]};_.bt=class{constructor(a){this.I=a;this.f={}}Qa(a,b){this.f[a]=b}};_.z("clpp.drm.DrmEnvironment",_.bt);_.bt.prototype.setDrmSystem=_.bt.prototype.Qa;_.Ll=class{constructor(a,b){b=void 0===b?!1:b;this.f=_.Ug(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.g=b;this.buffer=this.f.buffer}getPosition(){return this.a}Da(){return this.f.byteLength}seek(a){(0>a||a>=this.f.byteLength)&&_.ql();this.a=a}};_.vm=class{constructor(a,b){this.f=a;this.g=void 0===b?!0:b;this.a=0}getPosition(){return this.a}Da(){return this.f.byteLength}skip(a){this.a+a>this.f.byteLength&&_.tl();this.a+=a}seek(a){if(0>a||a>=this.f.byteLength)throw _.tl();this.a=a}};
397
+ _.z("clpp.utils.dataview.DataViewReader",_.vm);_.Jl=class{constructor(){this.g=[];this.f=[];this.a=!1;this.h=new _.R("clpp.mp4")}M(a,b){a=Al(a);this.g[a]=ct;this.f[a]=b;return this}ba(a,b){a=Al(a);this.g[a]=dt;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.J(a);a=new _.vm(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.sl(a)&&!this.a;)this.Jd(0,a,b)}Jd(a,b,c){const d=b.getPosition();let e=_.P(b);var f=_.P(b);let g=!1;this.h.debug("Parsing MP4 box",_.Bl(f));switch(e){case 0:e=b.Da()-d;break;case 1:e=_.xl(b),g=!0}const h=
398
+ this.f[f];if(h){let m=null;var k=null;this.g[f]===dt&&(k=_.P(b),m=k>>>24,k&=16777215);f=b.getPosition()-d;var l=d+e;c&&l>b.Da()&&(l=b.Da());l-=b.getPosition();b=0<l?_.zl(b,l):new Uint8Array(0);b=new _.vm(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.Da()-b.getPosition()),b.skip(a)}};_.z("clpp.utils.Mp4Parser",_.Jl);_.Jl.typeToString=_.Bl;
399
+ _.Jl.allData=_.El;_.Jl.sampleDescription=_.Dl;_.Jl.children=_.Cl;_.Jl.prototype.parseNext=_.Jl.prototype.Jd;_.Jl.prototype.parse=_.Jl.prototype.parse;_.Jl.prototype.stop=_.Jl.prototype.stop;_.Jl.prototype.fullBox=_.Jl.prototype.ba;_.Jl.prototype.box=_.Jl.prototype.M;_.Jl.headerSize=_.Fl;var ct=0,dt=1;var et=class{};_.z("clpp.utils.FairplayUtils",et);et.parseFairPlayResponse=_.Ol;et.formatFairPlayRequest=_.Nl;et.createFairplayPayload=Ml;et.extractContentId=_.Il;et.extractExtXKeyUri=Gl;var Ul=new _.R("clpp.drm.DrmToday"),dm="PRODUCTION",em="STAGING",fm="TEST",ft={PRODUCTION:dm,STAGING:em,TEST:fm};_.z("clpp.drm.DrmToday.Environment",ft);_.z("clpp.drm.DrmToday.WidevineCertificates",{V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"});
398
400
  var Ql="/license-proxy-widevine/cenc/",Rl="/license-proxy-headerauth/drmtoday/RightsManager.asmx",Sl="/license-server-fairplay/",gm={"00000":"Success","01000":"General Internal Error","02000":"General Request Error","03000":"General Request Authentication Error",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",42E3:"General Playready error",
399
- 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"},dt=[Xa,Za,Ya,_.Fb,_.Eb],et=[_.Fb,_.Eb],ft=["3000","2000","150"],
400
- gt=["2000","150"];
401
- for(const a of Object.keys(ct)){let b=xa;a!==dm&&(b+=`_${a}`);const c=new _.Zs(b);let d=null;switch(a){case dm:d=pl("V1_PROD");break;case em:d=pl("V2");break;case fm:d=null}c.Qa(_.zd,{licenseUrl:Tl(_.zd,a),videoRobustness:dt,audioRobustness:et,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:d,modifiers:{licenseRequest:_.Wl,licenseResponse:_.Xl}});c.Qa(_.vd,{licenseUrl:Tl(_.vd,a),certificateUrl:Pl(a)+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.Zl,licenseResponse:_.$l,
402
- extractContentId:_.am,certificateRequest:_.bm}});c.Qa(_.xd,{licenseUrl:Tl(_.xd,a),videoRobustness:ft,audioRobustness:gt,modifiers:{licenseRequest:cm}});_.ll(c)};var ht=class{};_.z("clpp.drm.eme.EmeFactory",ht);var im=[];ht.Apis={STANDARD:Db,APPLE:"APPLE",WEBKIT:"WEBKIT",NOP:"NOP"};var tm,it,sm;_.Bm=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];tm=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];it=class{constructor(a,b,c){this.j=new Uint8Array(a);this.a=b;this.f=c}};sm=class extends it{};_.Am=class extends it{constructor(a,b,c,d,e,f){f=void 0===f?null:f;super(a,b,d);this.version=e;this.g=c;this.l=f}};var Dm=!!(performance&&performance.mark&&performance.measure);var cn=class{constructor(a){this.f=[];this.g=[];this.a=[];8<=a.byteLength&&(new _.Jl).ba("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=_.Di(_.zl(a.reader,16)),c=[];if(0<a.version){var d=_.P(a.reader);for(let e=0;e<d;++e){const f=_.Di(_.zl(a.reader,16));c.push(f)}}d=_.P(a.reader);a.reader.skip(d);this.g.push.apply(this.g,c);this.f.push(b);this.a.push({start:a.start,end:a.start+a.size-1});
403
- a.reader.getPosition()!==a.reader.Da()&&_.C("Mismatch between box size and data size!")}}};var Zm,jt;
404
- _.fo=class{constructor(a){this.D=a;this.H=new Set;this.A=this.G=this.l=null;this.R=!1;this.a=null;this.I=jt;this.w=new _.hs;this.K=new Ys;this.f=new Map;this.J=[];this.F=new _.an;this.g=null;this.U=b=>{this.o=!0;this.B=!1;this.F.reject(b);a.onError(b)};this.j=new Map;this.W=new Map;this.S=new _.Qj(()=>Sm(this));this.ra=!1;this.Y=new _.an;this.C=!1;this.T=[];this.aa=!1;this.N=0;this.h=new _.R("clpp.drm.DrmEngine");this.X=(new _.Qj(()=>{Tm(this)})).hb(1);this.F.catch(()=>{});this.o=this.B=!1;this.L=
401
+ 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"},gt=[Xa,Za,Ya,_.Fb,_.Eb],ht=[_.Fb,_.Eb],it=["3000","2000","150"],
402
+ jt=["2000","150"];
403
+ for(const a of Object.keys(ft)){let b=xa;a!==dm&&(b+=`_${a}`);const c=new _.bt(b);let d=null;switch(a){case dm:d=pl("V1_PROD");break;case em:d=pl("V2");break;case fm:d=null}c.Qa(_.yd,{licenseUrl:Tl(_.yd,a),videoRobustness:gt,audioRobustness:ht,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:d,modifiers:{licenseRequest:_.Wl,licenseResponse:_.Xl}});c.Qa(_.ud,{licenseUrl:Tl(_.ud,a),certificateUrl:Pl(a)+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.Zl,licenseResponse:_.$l,
404
+ extractContentId:_.am,certificateRequest:_.bm}});c.Qa(_.wd,{licenseUrl:Tl(_.wd,a),videoRobustness:it,audioRobustness:jt,modifiers:{licenseRequest:cm}});_.ll(c)};var kt=class{};_.z("clpp.drm.eme.EmeFactory",kt);var im=[];kt.Apis={STANDARD:Db,APPLE:"APPLE",WEBKIT:"WEBKIT",NOP:"NOP"};var tm,lt,sm;_.Bm=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];tm=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];lt=class{constructor(a,b,c){this.j=new Uint8Array(a);this.a=b;this.f=c}};sm=class extends lt{};_.Am=class extends lt{constructor(a,b,c,d,e,f){f=void 0===f?null:f;super(a,b,d);this.version=e;this.g=c;this.l=f}};var Dm=!!(performance&&performance.mark&&performance.measure);var cn=class{constructor(a){this.f=[];this.g=[];this.a=[];8<=a.byteLength&&(new _.Jl).ba("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=_.Di(_.zl(a.reader,16)),c=[];if(0<a.version){var d=_.P(a.reader);for(let e=0;e<d;++e){const f=_.Di(_.zl(a.reader,16));c.push(f)}}d=_.P(a.reader);a.reader.skip(d);this.g.push.apply(this.g,c);this.f.push(b);this.a.push({start:a.start,end:a.start+a.size-1});
405
+ a.reader.getPosition()!==a.reader.Da()&&_.C("Mismatch between box size and data size!")}}};var Zm,mt;
406
+ _.fo=class{constructor(a){this.D=a;this.H=new Set;this.A=this.G=this.l=null;this.R=!1;this.a=null;this.I=mt;this.w=new _.ks;this.K=new at;this.f=new Map;this.J=[];this.F=new _.an;this.g=null;this.U=b=>{this.o=!0;this.B=!1;this.F.reject(b);a.onError(b)};this.j=new Map;this.W=new Map;this.S=new _.Qj(()=>Sm(this));this.ra=!1;this.Y=new _.an;this.C=!1;this.T=[];this.aa=!1;this.N=0;this.h=new _.R("clpp.drm.DrmEngine");this.X=(new _.Qj(()=>{Tm(this)})).hb(1);this.F.catch(()=>{});this.o=this.B=!1;this.L=
405
407
  null}destroy(){const a=this;return _.x(function*(){a.ra?yield a.Y:(a.ra=!0,yield Um(a),a.Y.resolve())})}keySystem(){return this.a?_.Im(this.a.keySystem):""}getDrmInfo(){return this.a}da(a){const b=this;return _.x(function*(){if(!b.C||b.I!==Zm){var c=Math.floor(a.timeStamp),d=`drm.msg.${c}.start`,e=`drm.msg.${c}.end`;_.Em(d);!b.g.delayLicenseRequestUntilPlayed||b.A&&!b.A.paused||b.aa?yield hn(b,a):b.T.push(a);_.Em(e);_.Fm(`drm.sess.msg.${c}`,d,e)}})}ea(a){const b=a.target;this.h.info("Key status changed for session",
406
- b.sessionId);const c=this.f.get(b);let d=!1;b.keyStatuses.forEach((e,f)=>{if(typeof f===_.Nf){var g=f;f=e;e=g}if(Hm(this.a.keySystem)&&16===f.byteLength&&_.Sj()){g=_.ii(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!==Lf&&(c.loaded=!0);c&&c.Ga&&c.Ga.resolve();"expired"===e&&(d=!0);f=_.J(f);let h=_.Di(f);"00"===h&&c&&c.keyId?h=c.keyId:this.a.keySystem.startsWith(_.vd)&&16!==f.byteLength&&(h=ki(f));(f=h||"")?this.h.info(`Key status for Key ID '${h}': ${e}`):
407
- this.h.info(`Key status global keys: ${e}`);this.j.set(f,e);c&&!c.keyId&&this.f.forEach((k,l)=>{l===b||k.keyId!==h||k.loaded||(k.loaded=!0)})});c&&c.loaded&&c.Ya.forEach(e=>{this.j.get(e)===Lf&&(this.h.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.j.set(e,_.Me))});for(a=0;a<this.a.initData.length;a++){const e=this.a.initData[a];e.keyId&&this.j.get(e.keyId)===Lf&&_.Ei(e.initData,c.initData)&&(this.h.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.j.set(e.keyId,
408
- _.Me))}a=b.expiration-Date.now();(0>a||d&&1E3>a)&&c&&!c.ub&&(this.h.debug("Session has expired",b.sessionId),(a=this.f.get(b))&&a.tc&&a.tc.stop(),this.f.delete(b),b.close().catch(()=>{}));rn(this)&&(this.F.resolve(),1!==this.f.size||d?this.S.fa(.5):Sm(this))}};Zm=0;jt=3;_.yn=new Map;_.zn=new _.R("clpp.text");var kt=class{constructor(){this.a=null;this.f=[]}};var lt=class{constructor(){this.g=this.f=this.j=null;this.a=[]}};_.mt=class{constructor(){this.f=this.o=this.A=this.C=this.j=this.l=this.g=this.w=NaN;this.a=new kt;this.B=new lt}getStats(){return{width:this.w,height:this.g,streamBandwidth:this.o,decodedFrames:this.j,droppedFrames:this.l,corruptedFrames:this.C,estimatedBandwidth:this.f,loadLatency:this.A,playTime:Dn(this.a,_.Wn),pauseTime:Dn(this.a,_.Vn),bufferingTime:Dn(this.a,_.On),stateHistory:En(this.a),switchHistory:Fn(this.B)}}};_.nt=class{constructor(a){this.f=a;this.a=void 0}value(){void 0===this.a&&(this.a=this.f());return this.a}};var Hn=new _.nt(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.qe],[HTMLMediaElement.HAVE_CURRENT_DATA,_.me],[HTMLMediaElement.HAVE_FUTURE_DATA,Vc],[HTMLMediaElement.HAVE_ENOUGH_DATA,Wc]]));var pt=class{constructor(a){this.h=new _.R("clpp.StateManager");this.m=a;this.a=new _.hs;this.f=_.Tn;this.A=_.ot;this.H=0;this.w=-1;this.K=this.o=this.I=this.B=0;this.j=this.g=this.F=!1;this.G=0;this.l=null;this.J=0;this.L=_.ek();this.C=!1;this.I=Date.now();Mn(this)}Vb(a,b){this.m&&this.m.trigger(new _.E(a,{detail:b}))}getState(){return Pn(this,"")}U(a){(a=a&&a.detail)&&a.severity&&a.severity===_.F&&Kn(this,_.Sn)}destroy(){this.h.debug("Stop watching for video events for "+this.m.namespace());this.a.release()}};_.z("clpp.utils.media.detectType",Xn);var $n=new _.R("clpp.sources");var qt=class extends _.Xs{constructor(){super(od);this.w=this.G=!1;this.l=this.A=this.o=this.a=this.j=null;this.g=new _.hs;this.F=this.B=this.f=this.H=null}init(a,b){super.init(a,b);this.j=new pt(this);Kn(this.j,_.Tn)}namespace(){return od}unload(){const a=this;return _.x(function*(){if(a.ca){a.log.debug("Releasing player with source",a.ca);a.B&&(a.B.stop(),a.B=null);const b=a.getTrackManager();b&&b.release();a.A&&(a.A.destroy(),a.A=null);a.R&&(a.R.destroy(),a.R=null);a.l&&a.l.release();a.o&&(a.o.destroy(),
409
- a.o=null);_.mh(a.g);a.f&&(a.f=new _.mt);a.F=null;a.ca=null;a.G=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());yield bo(a)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.j&&Kn(this.j,_.Tn)})}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();a&&a.destroy();this.l&&(this.l.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",
410
- b)}),this.l=null);this.j&&(this.j.destroy(),this.j=null);this.f=null})}getDrmInfo(){return this.o?this.o.getDrmInfo():null}detach(){}getTrackManager(){return this.Wb}load(a){const b=this;return _.x(function*(){if(b.w)return ao();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()/1E3;b.f=new _.mt;b.g.on(b,_.Kf,()=>{b.f&&_.Cn(b.f.a,b.getState())});Kn(b.j,_.Un);b.ca=_.Zn(a);b.configuration=_.Tk(b.Ja,
411
- a);b.log.debug(_.fb,b.configuration);b.log.debug(_.xb,b.ca);const d=_.Bn(b.configuration,[_.ae,"native"]);b.R=d.create(b);b.R.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.Wk(_.Qf)&&!_.gk()&&(b.A=new vs(b),b.A.start(c));b.l?b.l.release():b.l=new is(b);wh(b.l,c);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.A(b.configuration.volume)||b.setVolume(b.configuration.volume);_.A(b.configuration.muted)||b.setMuted(b.configuration.muted);b.g.one(c,Vc,()=>{b.trigger(new _.E(_.Ss))});null==
412
- b.configuration.startTime&&ko(b,c);_.ek()&&lo(b,c);try{yield eo(b,c),yield go(b),yield jo(b).P}catch(e){b.G=!1,b.onError(e)}})}onError(a){this.G||(a.severity===_.F&&null!==this.j&&Kn(this.j,_.Sn),this.trigger(new _.E(_.r,{detail:a})))}Nf(){return new T}getState(){return null!==this.j?this.j.getState().currentState:_.ot}getPresentationStartTime(){if(this.a&&this.a.getStartDate&&this.isLive()){const a=this.a.getStartDate();return isNaN(a.getTime())?(this.log.warn("EXT-X-PROGRAM-DATETIME required to get presentation start time as Date!"),
408
+ b.sessionId);const c=this.f.get(b);let d=!1;b.keyStatuses.forEach((e,f)=>{if(typeof f===_.Mf){var g=f;f=e;e=g}if(Hm(this.a.keySystem)&&16===f.byteLength&&_.Sj()){g=_.ii(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!==Kf&&(c.loaded=!0);c&&c.Ga&&c.Ga.resolve();"expired"===e&&(d=!0);f=_.J(f);let h=_.Di(f);"00"===h&&c&&c.keyId?h=c.keyId:this.a.keySystem.startsWith(_.ud)&&16!==f.byteLength&&(h=ki(f));(f=h||"")?this.h.info(`Key status for Key ID '${h}': ${e}`):
409
+ this.h.info(`Key status global keys: ${e}`);this.j.set(f,e);c&&!c.keyId&&this.f.forEach((k,l)=>{l===b||k.keyId!==h||k.loaded||(k.loaded=!0)})});c&&c.loaded&&c.Ya.forEach(e=>{this.j.get(e)===Kf&&(this.h.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.j.set(e,_.Le))});for(a=0;a<this.a.initData.length;a++){const e=this.a.initData[a];e.keyId&&this.j.get(e.keyId)===Kf&&_.Ei(e.initData,c.initData)&&(this.h.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.j.set(e.keyId,
410
+ _.Le))}a=b.expiration-Date.now();(0>a||d&&1E3>a)&&c&&!c.ub&&(this.h.debug("Session has expired",b.sessionId),(a=this.f.get(b))&&a.tc&&a.tc.stop(),this.f.delete(b),b.close().catch(()=>{}));rn(this)&&(this.F.resolve(),1!==this.f.size||d?this.S.fa(.5):Sm(this))}};Zm=0;mt=3;_.yn=new Map;_.zn=new _.R("clpp.text");var nt=class{constructor(){this.a=null;this.f=[]}};var ot=class{constructor(){this.g=this.f=this.j=null;this.a=[]}};_.pt=class{constructor(){this.f=this.o=this.A=this.C=this.j=this.l=this.g=this.w=NaN;this.a=new nt;this.B=new ot}getStats(){return{width:this.w,height:this.g,streamBandwidth:this.o,decodedFrames:this.j,droppedFrames:this.l,corruptedFrames:this.C,estimatedBandwidth:this.f,loadLatency:this.A,playTime:Dn(this.a,_.Wn),pauseTime:Dn(this.a,_.Vn),bufferingTime:Dn(this.a,_.On),stateHistory:En(this.a),switchHistory:Fn(this.B)}}};_.qt=class{constructor(a){this.f=a;this.a=void 0}value(){void 0===this.a&&(this.a=this.f());return this.a}};var Hn=new _.qt(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.me],[HTMLMediaElement.HAVE_CURRENT_DATA,_.le],[HTMLMediaElement.HAVE_FUTURE_DATA,Uc],[HTMLMediaElement.HAVE_ENOUGH_DATA,Vc]]));var st=class{constructor(a){this.h=new _.R("clpp.StateManager");this.m=a;this.a=new _.ks;this.f=_.Tn;this.A=_.rt;this.H=0;this.w=-1;this.K=this.o=this.I=this.B=0;this.j=this.g=this.F=!1;this.G=0;this.l=null;this.J=0;this.L=_.ek();this.C=!1;this.I=Date.now();Mn(this)}Vb(a,b){this.m&&this.m.trigger(new _.E(a,{detail:b}))}getState(){return Pn(this,"")}U(a){(a=a&&a.detail)&&a.severity&&a.severity===_.F&&Kn(this,_.Sn)}destroy(){this.h.debug("Stop watching for video events for "+this.m.namespace());this.a.release()}};_.z("clpp.utils.media.detectType",Xn);var $n=new _.R("clpp.sources");var tt=class extends _.$s{constructor(){super(nd);this.w=this.G=!1;this.l=this.A=this.o=this.a=this.j=null;this.g=new _.ks;this.F=this.B=this.f=this.H=null}init(a,b){super.init(a,b);this.j=new st(this);Kn(this.j,_.Tn)}namespace(){return nd}unload(){const a=this;return _.x(function*(){if(a.ca){a.log.debug("Releasing player with source",a.ca);a.B&&(a.B.stop(),a.B=null);const b=a.getTrackManager();b&&b.release();a.A&&(a.A.destroy(),a.A=null);a.R&&(a.R.destroy(),a.R=null);a.l&&a.l.release();a.o&&(a.o.destroy(),
411
+ a.o=null);_.mh(a.g);a.f&&(a.f=new _.pt);a.F=null;a.ca=null;a.G=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());yield bo(a)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.j&&Kn(this.j,_.Tn)})}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();a&&a.destroy();this.l&&(this.l.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",
412
+ b)}),this.l=null);this.j&&(this.j.destroy(),this.j=null);this.f=null})}getDrmInfo(){return this.o?this.o.getDrmInfo():null}detach(){}getTrackManager(){return this.Wb}load(a){const b=this;return _.x(function*(){if(b.w)return ao();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()/1E3;b.f=new _.pt;b.g.on(b,_.Jf,()=>{b.f&&_.Cn(b.f.a,b.getState())});Kn(b.j,_.Un);b.ca=_.Zn(a);b.configuration=_.Tk(b.Ja,
413
+ a);b.log.debug(_.fb,b.configuration);b.log.debug(_.xb,b.ca);const d=_.Bn(b.configuration,[_.$d,"native"]);b.R=d.create(b);b.R.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.Wk(_.Pf)&&!_.gk()&&(b.A=new ys(b),b.A.start(c));b.l?b.l.release():b.l=new ls(b);wh(b.l,c);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.A(b.configuration.volume)||b.setVolume(b.configuration.volume);_.A(b.configuration.muted)||b.setMuted(b.configuration.muted);b.g.one(c,Uc,()=>{b.trigger(new _.E(_.Vs))});null==
414
+ b.configuration.startTime&&ko(b,c);_.ek()&&lo(b,c);try{yield eo(b,c),yield go(b),yield jo(b).P}catch(e){b.G=!1,b.onError(e)}})}onError(a){this.G||(a.severity===_.F&&null!==this.j&&Kn(this.j,_.Sn),this.trigger(new _.E(_.r,{detail:a})))}Nf(){return new T}getState(){return null!==this.j?this.j.getState().currentState:_.rt}getPresentationStartTime(){if(this.a&&this.a.getStartDate&&this.isLive()){const a=this.a.getStartDate();return isNaN(a.getTime())?(this.log.warn("EXT-X-PROGRAM-DATETIME required to get presentation start time as Date!"),
413
415
  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 _.Gn();this.f&&_.Cn(this.f.a,this.getState());var a=this.a,b=this.f,c=a.videoHeight;b.w=a.videoWidth;b.g=c;a.getVideoPlaybackQuality&&(c=a.getVideoPlaybackQuality(),a=this.f,
414
416
  b=Number(c.totalVideoFrames),a.l=Number(c.droppedVideoFrames),a.j=b,this.f.C=Number(c.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.ma())a.bandwidth&&(this.f.o=a.bandwidth),a.Hc&&(this.f.f=a.Hc);return this.f.getStats()}getTimelineCues(){return this.l?this.l.getTimelineCues():[]}};
415
- _.jh(new class{a(){return od}canPlay(a,b){a=a.type||"";const c=a===_.zc,d=a===_.Ec,e=a===_.Lk;var f;_.dk()||c||d||e&&!_.ek()?f=0:f=""!==Rj().canPlayType(a)?e&&_.ek()&&(window.ManagedMediaSource||window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}f(a){return a===_.na}create(){return new qt}});_.z("clpp.ads.PodType",{PREROLL:0,MIDROLL:1,POSTROLL:2});_.z("clpp.ads.Technology",{CLIENT_SIDE:0,SERVER_SIDE:1});_.z("clpp.ads.ErrorType",{LOAD:0,PLAY:1,OTHER:2});var no=new _.R("clpp.ads"),mo=[];_.z("clpp.utils.dom.createHTMLElement",_.uo);var rt=class{constructor(a){this.a=null;this.g=new Set;this.f=null;this.set(a||null)}set(a){this.g.clear();this.f&&(this.f.disconnect(),this.f=null);if(this.a=a)this.f=vo(this,a)}get(){return this.a}};var ut=class{constructor(a,b){this.h=new _.R("clpp.PlayerSurface");this.w=_.Mg(st,b);this.f=new rt;this.g=null;this.a=new rt;this.l=tt;tt+=1;this.o=`clpp-video-${this.l}`;this.j=new _.hs;if(null==a)throw new _.H(_.F,7,7102,"No Media element was provided");if(!(a instanceof Element||(a=document.getElementById(a),a)))throw new _.H(_.F,7,7004,"Media element not found");b=this.w;this.h.debug("Initializing Player Surface on ",a);if("cast-media-player"===a.tagName.toLowerCase())this.g=a;else{if(!(a instanceof
416
- HTMLMediaElement))throw new _.H(_.F,7,7005,"Media element is not instance of HTMLMediaElement");if(!a.hasAttribute("crossorigin")){var c=b.crossorigin;this.h.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(_.F,7,7006,"Container element is not a direct parent of media element");d=b.containerEl}else{c=document.createElement(_.Gd);a.parentNode?a.parentNode.replaceChild(c,
417
- a):this.h.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),_.so(c,f);c.style.cssText=a.style.cssText;a.removeAttribute(_.Pf);for(d of[_.zg,_.Zd])f=a.getAttribute(d),f=parseInt(f,10),isNaN(f)||(c.style[d]=`${f}px`),_.Uj()||a.removeAttribute(d);c.appendChild(a);d=c}d&&(this.a.set(d),wo(this.a,"clpp-container"),
418
- wo(this.a,this.o),wo(this.f,_.ed),wo(this.f,"clpp-video"));b.webOSStartupPatch&&xo(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.g}isFullscreen(){return!!document.fullscreenElement}hideMediaElement(){const a=this.getMedia();a?_.so(a,fd):this.h.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove(fd):
419
- this.h.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&&_.so(a,_.ed);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){_.so(a,fd)}show(a){a.classList.remove(fd)}release(){this.j.release()}};
420
- ut.prototype.removeElementFromContainer=ut.prototype.removeElementFromContainer;ut.prototype.addElementToContainer=ut.prototype.addElementToContainer;ut.prototype.getCastElement=ut.prototype.getCastElement;ut.prototype.getContainer=ut.prototype.getContainer;ut.prototype.getMedia=ut.prototype.getMedia;var st={disableContainer:!1,webOSStartupPatch:!0,crossorigin:"anonymous",containerEl:null},tt=1;var vt=class{constructor(a){this.m=a;this.j=this.m.getNetworkEngine();this.a=new _.hs;this.g=null;this.f=!0;Bo(this)}release(){this.a.release();Co(this);this.m=null}};_.z("clpp.polyfill.installAll",Fo);var Eo=[];_.z("clpp.polyfill.register",_.Go);var Io=class{constructor(a,b,c){this.g=a;this.f=b;JSON.parse(_.li(_.Bi(a)));this.a=JSON.parse(_.li(_.Bi(b)));this.j=c}verify(a,b){const c={kty:"RSA",n:a.n,e:a.e},d=this.g+"."+this.f,e=this.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=_.pi(d),n=_.Bi(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(Hb)}).catch(g)}else b?
421
- g("Web Crypto API is not supported"):f()})}};var wt={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},Pk="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var Zo=class{constructor(a){this.license=a;this.a=null;this.h=new _.R("clpp.utils.LicenseKey")}verify(){return(new Promise((a,b)=>{try{const c=Jo(this);a(c)}catch(c){b()}})).then(a=>a.verify(wt)).catch(a=>{if(a&&a!==Hb){{var b=window.location.href;const c=new _.Lh(b);b=c.cb||c.Ma?c:new _.Lh("//"+b)}if(/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(b.Ma))return Promise.resolve()}throw a;})}},Uo="vod",To="live";var Q=class extends _.Us{constructor(a,b,c){super();Fo();this.h=new _.R("clpp.Player");if(!a)throw new _.H(_.F,7,7102);this.W=new _.hs;this.f=this.A=b||_.Rk();this.l=null;void 0===this.f.license&&(this.f.license=Pk,this.h.warn("You are using the embedded demo license!"));if(!this.f.license)throw this.h.error("You provided null or empty string as your license. Please check your license configuration."),new _.H(_.F,7,7101,"No license provided in configuration!");this.g=new ut(a,c);this.a=this.B=null;
422
- this.F=new _.Vo;this.j=null;this.S=[];this.T=!0;this.H={};this.X=null;this.L=!0;this.N=this.K=!1;this.I=this.vc=null;this.Ud=!1;this.aa=new vt(this);this.on(_.Kf,()=>{this.getState()===_.Sn&&(this.a?this.a.unload():Promise.resolve())});this.on(_.wc,this.Y.bind(this));this.on(_.vc,this.Y.bind(this));$o(this,this.f.license);this.g.getMedia()&&(a=this.g.getMedia(),a.hasAttribute("autoplay")&&(a.removeAttribute("autoplay"),this.h.debug("Removed autoplay attribute from video element. Auto play will be handled by configuration."),
423
- void 0===this.f.autoplay&&(this.f.autoplay=!0,this.h.debug("Setting autoplay in configuration since it was specified in the video element"))));a=[];for(const d of Xo)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.h.error("Error while creating player plugin",e)}bp(this,a);this.J=_.na;al(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,b)}onError(a){if(null!==this.a)this.a.onError(a);else a=new _.E(_.r,{detail:a}),this.trigger(a)}cc(a){a=
424
- this.H[a];void 0===a&&(a=null);return a}getSurface(){return this.g}getConfiguration(){return _.Ng(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.h.info("Player release already in progress"),this.l;this.h.debug("Releasing player");this.l=ep(this);return this.l.finally(()=>{this.h.debug("Player released");this.l=null})}destroy(){if(this.K)return this.h.debug("The player is already destroyed. No-op"),
425
- new Promise(a=>a());this.K=!0;return this.release().then(()=>{this.h.debug(za);this.trigger(new _.E("destroying"));return _.ap(this,_.Ge)}).then(()=>{this.a&&this.a.stopForwardingEventsTo(this);this.Mc.clear();this.aa.release();if(this.a)return this.a.destroy()}).then(()=>this.F.destroy()).then(()=>{el();this.a=null;this.trigger(new _.E("destroyed"))})}load(a){const b=this;return _.x(function*(){try{_.Em(Ze);b.J=_.na;b.T=!0;const c=_.Zn(a);yield _.mp(b,Uk(a)?a:{},c);yield _.np(b);yield _.pp(b);_.Em(Ye);
426
- _.Fm("player.load",Ze,Ye)}catch(c){if(b.l)throw b.h.info(eb),new _.H(_.F,7,7E3);throw c;}})}preload(a){const b=this;return _.x(function*(){yield _.mp(b,a);if(b.a){var c=b.a;c.preload?yield c.preload(b.f):b.h.warn(zb)}else b.h.warn(wb)})}use(a){(a=fl(a))&&a.o(this)}remove(a){return(this.getState()<=_.Tn||this.L)&&null!==Zk(a)?(gl(a),this.N=!0):!1}play(){return this.a?this.j&&this.a.namespace()!==_.kd?this.j.start(this.a):this.a.play():Promise.reject("No player initialized. You need to load content before calling play.")}pause(){return this.a?
427
- 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 _.Ts}getState(){return this.a?this.a.getState():_.Tn}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()===
417
+ _.jh(new class{a(){return nd}canPlay(a,b){a=a.type||"";const c=a===_.yc,d=a===_.Dc,e=a===_.Lk;var f;_.dk()||c||d||e&&!_.ek()?f=0:f=""!==Rj().canPlayType(a)?e&&_.ek()&&(window.ManagedMediaSource||window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}f(a){return a===_.na}create(){return new tt}});_.z("clpp.ads.PodType",{PREROLL:0,MIDROLL:1,POSTROLL:2});_.z("clpp.ads.Technology",{CLIENT_SIDE:0,SERVER_SIDE:1});_.z("clpp.ads.ErrorType",{LOAD:0,PLAY:1,OTHER:2});var no=new _.R("clpp.ads"),mo=[];_.z("clpp.utils.dom.createHTMLElement",_.uo);var ut=class{constructor(a){this.a=null;this.g=new Set;this.f=null;this.set(a||null)}set(a){this.g.clear();this.f&&(this.f.disconnect(),this.f=null);if(this.a=a)this.f=vo(this,a)}get(){return this.a}};var xt=class{constructor(a,b){this.h=new _.R("clpp.PlayerSurface");this.w=_.Mg(vt,b);this.f=new ut;this.g=null;this.a=new ut;this.l=wt;wt+=1;this.o=`clpp-video-${this.l}`;this.j=new _.ks;if(null==a)throw new _.H(_.F,7,7102,"No Media element was provided");if(!(a instanceof Element||(a=document.getElementById(a),a)))throw new _.H(_.F,7,7004,"Media element not found");b=this.w;this.h.debug("Initializing Player Surface on ",a);if("cast-media-player"===a.tagName.toLowerCase())this.g=a;else{if(!(a instanceof
418
+ HTMLMediaElement))throw new _.H(_.F,7,7005,"Media element is not instance of HTMLMediaElement");if(!a.hasAttribute("crossorigin")){var c=b.crossorigin;this.h.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(_.F,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,
419
+ a):this.h.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),_.so(c,f);c.style.cssText=a.style.cssText;a.removeAttribute(_.Of);for(d of[_.zg,_.Yd])f=a.getAttribute(d),f=parseInt(f,10),isNaN(f)||(c.style[d]=`${f}px`),_.Uj()||a.removeAttribute(d);c.appendChild(a);d=c}d&&(this.a.set(d),wo(this.a,"clpp-container"),
420
+ wo(this.a,this.o),wo(this.f,_.dd),wo(this.f,"clpp-video"));b.webOSStartupPatch&&xo(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.g}isFullscreen(){return!!document.fullscreenElement}hideMediaElement(){const a=this.getMedia();a?_.so(a,ed):this.h.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove(ed):
421
+ this.h.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&&_.so(a,_.dd);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){_.so(a,ed)}show(a){a.classList.remove(ed)}release(){this.j.release()}};
422
+ xt.prototype.removeElementFromContainer=xt.prototype.removeElementFromContainer;xt.prototype.addElementToContainer=xt.prototype.addElementToContainer;xt.prototype.getCastElement=xt.prototype.getCastElement;xt.prototype.getContainer=xt.prototype.getContainer;xt.prototype.getMedia=xt.prototype.getMedia;var vt={disableContainer:!1,webOSStartupPatch:!0,crossorigin:"anonymous",containerEl:null},wt=1;var yt=class{constructor(a){this.m=a;this.j=this.m.getNetworkEngine();this.a=new _.ks;this.g=null;this.f=!0;Bo(this)}release(){this.a.release();Co(this);this.m=null}};_.z("clpp.polyfill.installAll",Fo);var Eo=[];_.z("clpp.polyfill.register",_.Go);var Ko=class{constructor(a,b,c){this.g=a;this.f=b;JSON.parse(_.li(_.Bi(a)));this.a=JSON.parse(_.li(_.Bi(b)));this.j=c}};var Io={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},Pk="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var bp=class{constructor(a){this.f=a;this.a=null;this.h=new _.R("clpp.utils.LicenseKey")}},Xo="vod",Wo="live";var Q=class extends _.Xs{constructor(a,b,c){super();Fo();this.h=new _.R("clpp.Player");if(!a)throw new _.H(_.F,7,7102);this.W=new _.ks;this.f=this.A=b||_.Rk();this.l=null;void 0===this.f.license&&(this.f.license=Pk,this.h.warn("You are using the embedded demo license!"));if(!this.f.license)throw this.h.error("You provided null or empty string as your license. Please check your license configuration."),new _.H(_.F,7,7101,"No license provided in configuration!");this.g=new xt(a,c);this.a=this.B=null;
423
+ this.F=new _.Yo;this.j=null;this.S=[];this.T=!0;this.H={};this.X=null;this.L=!0;this.N=this.K=!1;this.I=this.vc=null;this.Vd=!1;this.aa=new yt(this);this.on(_.Jf,()=>{this.getState()===_.Sn&&(this.a?this.a.unload():Promise.resolve())});this.on(_.vc,this.Y.bind(this));this.on(_.uc,this.Y.bind(this));cp(this,this.f.license);this.g.getMedia()&&(a=this.g.getMedia(),a.hasAttribute("autoplay")&&(a.removeAttribute("autoplay"),this.h.debug("Removed autoplay attribute from video element. Auto play will be handled by configuration."),
424
+ void 0===this.f.autoplay&&(this.f.autoplay=!0,this.h.debug("Setting autoplay in configuration since it was specified in the video element"))));a=[];for(const d of $o)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.h.error("Error while creating player plugin",e)}ep(this,a);this.J=_.na;al(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,b)}onError(a){if(null!==this.a)this.a.onError(a);else a=new _.E(_.r,{detail:a}),this.trigger(a)}cc(a){a=
425
+ this.H[a];void 0===a&&(a=null);return a}getSurface(){return this.g}getConfiguration(){return _.Ng(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.h.info("Player release already in progress"),this.l;this.h.debug("Releasing player");this.l=hp(this);return this.l.finally(()=>{this.h.debug("Player released");this.l=null})}destroy(){if(this.K)return this.h.debug("The player is already destroyed. No-op"),
426
+ new Promise(a=>a());this.K=!0;return this.release().then(()=>{this.h.debug(za);this.trigger(new _.E("destroying"));return _.dp(this,_.Fe)}).then(()=>{this.a&&this.a.stopForwardingEventsTo(this);this.Mc.clear();this.aa.release();if(this.a)return this.a.destroy()}).then(()=>this.F.destroy()).then(()=>{el();this.a=null;this.trigger(new _.E("destroyed"))})}load(a){const b=this;return _.x(function*(){try{_.Em(Ye);b.J=_.na;b.T=!0;const c=_.Zn(a);yield _.pp(b,Uk(a)?a:{},c);yield _.qp(b);yield _.sp(b);_.Em(Xe);
427
+ _.Fm("player.load",Ye,Xe)}catch(c){if(b.l)throw b.h.info(eb),new _.H(_.F,7,7E3);throw c;}})}preload(a){const b=this;return _.x(function*(){yield _.pp(b,a);if(b.a){var c=b.a;c.preload?yield c.preload(b.f):b.h.warn(zb)}else b.h.warn(wb)})}use(a){(a=fl(a))&&a.o(this)}remove(a){return(this.getState()<=_.Tn||this.L)&&null!==Zk(a)?(gl(a),this.N=!0):!1}play(){return this.a?this.j&&this.a.namespace()!==_.jd?this.j.start(this.a):this.a.play():Promise.reject("No player initialized. You need to load content before calling play.")}pause(){return this.a?
428
+ 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 _.Ws}getState(){return this.a?this.a.getState():_.Tn}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()===
428
429
  _.Sn?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}}dc(){const a=this.a;return a&&a.dc?a.dc():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.j}namespace(){return this.a&&
429
430
  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.a&&this.a.isMuted()||!1}setMuted(a){this.a&&this.a.setMuted(a)}getNetworkEngine(){return this.F}setNetworkEngine(a){this.F=a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&this.a.isLive()}getStats(){return this.a?this.a.getStats():null}mf(){return Object.freeze(this.X)}getLoadedSource(){return this.a&&
430
- this.a.getLoadedSource()}getTimelineCues(){return this.a?this.a.getTimelineCues():[]}ud(){return this.a?this.a.ud():null}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.vc=a;kp(this)}setCdnErrorCallback(a){this.I=a;this.a&&this.a.setCdnErrorCallback(this.I)}Y(){this.Ud=!0}};_.z("clpp.Player",Q);Q.registerPlugin=_.Yo;Q.prototype.setCdnErrorCallback=Q.prototype.setCdnErrorCallback;Q.prototype.setDrmCustomDataModifier=Q.prototype.setDrmCustomDataModifier;Q.prototype.resetAbr=Q.prototype.resetAbr;
431
+ this.a.getLoadedSource()}getTimelineCues(){return this.a?this.a.getTimelineCues():[]}vd(){return this.a?this.a.vd():null}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.vc=a;np(this)}setCdnErrorCallback(a){this.I=a;this.a&&this.a.setCdnErrorCallback(this.I)}Y(){this.Vd=!0}};_.z("clpp.Player",Q);Q.registerPlugin=_.ap;Q.prototype.setCdnErrorCallback=Q.prototype.setCdnErrorCallback;Q.prototype.setDrmCustomDataModifier=Q.prototype.setDrmCustomDataModifier;Q.prototype.resetAbr=Q.prototype.resetAbr;
431
432
  Q.prototype.getTimelineCues=Q.prototype.getTimelineCues;Q.prototype.getLoadedSource=Q.prototype.getLoadedSource;Q.prototype.getSources=Q.prototype.mf;Q.prototype.getStats=Q.prototype.getStats;Q.prototype.isLive=Q.prototype.isLive;Q.prototype.getTextDisplayer=Q.prototype.getTextDisplayer;Q.prototype.setNetworkEngine=Q.prototype.setNetworkEngine;Q.prototype.getNetworkEngine=Q.prototype.getNetworkEngine;Q.prototype.setMuted=Q.prototype.setMuted;Q.prototype.isMuted=Q.prototype.isMuted;
432
433
  Q.prototype.setPlaybackRate=Q.prototype.setPlaybackRate;Q.prototype.getPlaybackRate=Q.prototype.getPlaybackRate;Q.prototype.namespace=Q.prototype.namespace;Q.prototype.getAdsManager=Q.prototype.getAdsManager;Q.prototype.getDuration=Q.prototype.getDuration;Q.prototype.setVolume=Q.prototype.setVolume;Q.prototype.getVolume=Q.prototype.getVolume;Q.prototype.getTimelineOffset=Q.prototype.dc;Q.prototype.getSeekRange=Q.prototype.getSeekRange;Q.prototype.getPresentationStartTime=Q.prototype.getPresentationStartTime;
433
434
  Q.prototype.seek=Q.prototype.seek;Q.prototype.getPosition=Q.prototype.getPosition;Q.prototype.isPaused=Q.prototype.isPaused;Q.prototype.isEnded=Q.prototype.isEnded;Q.prototype.getState=Q.prototype.getState;Q.prototype.getBufferInfo=Q.prototype.getBufferInfo;Q.prototype.getTrackManager=Q.prototype.getTrackManager;Q.prototype.pause=Q.prototype.pause;Q.prototype.play=Q.prototype.play;Q.prototype.remove=Q.prototype.remove;Q.prototype.use=Q.prototype.use;Q.prototype.load=Q.prototype.load;
434
- Q.prototype.destroy=Q.prototype.destroy;Q.prototype.release=Q.prototype.release;Q.prototype.getDrmInfo=Q.prototype.getDrmInfo;Q.prototype.getConfiguration=Q.prototype.getConfiguration;Q.prototype.getSurface=Q.prototype.getSurface;Q.prototype.getPlugin=Q.prototype.cc;Q.prototype.off=Q.prototype.off;Q.prototype.one=Q.prototype.one;Q.prototype.on=Q.prototype.on;_.Tn=0;_.Un=1;_.On=2;_.Wn=3;_.Vn=4;_.Ln=5;_.Sn=6;_.ot=7;
435
- _.Rn={IDLE:_.Tn,PREPARING:_.Un,BUFFERING:_.On,PLAYING:_.Wn,PAUSED:_.Vn,ENDED:_.Ln,ERROR:_.Sn,UNSET:_.ot};Q.State=_.Rn;var Xo=[];var xt=class extends Q{constructor(a,b,c){super(a,b,c);a={manifest:{timeline:{version:2},keepTimelineLive:!0},streaming:{preferNativeHlsOnSafari:!1,enableLiveEdgeChasing:!1,startAtSegmentBoundary:!1}};this.A=_.Mg(this.A,a);this.f=_.Mg(this.f,a);this.C=0;this.o=[];this.R=!1;this.w=null;this.G=[]}open(a,b){const c=this;return _.x(function*(){if(c.w)throw new _.H(_.F,7,7008,`Cannot call open() while ${c.w}() is ongoing!`);if(0!==a)throw new _.H(_.F,7,7007,"The index parameter only supports the value of 0.");
435
+ Q.prototype.destroy=Q.prototype.destroy;Q.prototype.release=Q.prototype.release;Q.prototype.getDrmInfo=Q.prototype.getDrmInfo;Q.prototype.getConfiguration=Q.prototype.getConfiguration;Q.prototype.getSurface=Q.prototype.getSurface;Q.prototype.getPlugin=Q.prototype.cc;Q.prototype.off=Q.prototype.off;Q.prototype.one=Q.prototype.one;Q.prototype.on=Q.prototype.on;_.Tn=0;_.Un=1;_.On=2;_.Wn=3;_.Vn=4;_.Ln=5;_.Sn=6;_.rt=7;
436
+ _.Rn={IDLE:_.Tn,PREPARING:_.Un,BUFFERING:_.On,PLAYING:_.Wn,PAUSED:_.Vn,ENDED:_.Ln,ERROR:_.Sn,UNSET:_.rt};Q.State=_.Rn;var $o=[];var zt=class extends Q{constructor(a,b,c){super(a,b,c);a={manifest:{timeline:{version:2},keepTimelineLive:!0},streaming:{preferNativeHlsOnSafari:!1,enableLiveEdgeChasing:!1,startAtSegmentBoundary:!1}};this.A=_.Mg(this.A,a);this.f=_.Mg(this.f,a);this.C=0;this.o=[];this.R=!1;this.w=null;this.G=[]}open(a,b){const c=this;return _.x(function*(){if(c.w)throw new _.H(_.F,7,7008,`Cannot call open() while ${c.w}() is ongoing!`);if(0!==a)throw new _.H(_.F,7,7007,"The index parameter only supports the value of 0.");
436
437
  if(0===b.length)throw new _.H(_.F,7,7003,nb);if(b.some(g=>!g.id||!g.source))throw new _.H(_.F,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(_.F,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(_.F,7,7100,"Unsupported `playlist.timeline` config value!");e=d.startTime;if(null!=e&&(typeof e!==_.t||0>e))throw new _.H(_.F,
437
- 7,7100,"Invalid `playlist.startTime` config value!");f=d.endTime;if(null!=f&&(typeof f!==_.t||0>f||null!=e&&f<=e))throw new _.H(_.F,7,7100,"Invalid `playlist.endTime` config value!");if("DVR"===d.content&&!f)throw new _.H(_.F,7,7100,"`playlist.endTime` config value is required for DVR content!");}try{sp(c),c.w="open",yield vp(c,b),c.C=0,c.o=b,c.R=!0,wp(c,b[0].playlist||{})}finally{c.w=null}})}$f(a){const b=this;return _.x(function*(){if(b.w)throw new _.H(_.F,7,7008,`Cannot call addItem() while ${b.w}() is ongoing!`);
438
- if(!b.R)throw new _.H(_.F,7,7008,"open() must be called before addItem()!");if(!a.id||!a.source)throw new _.H(_.F,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(_.F,7,7100,"A config with this `id` already exists in the playlist!");try{b.w="addItem",b.o.push(a),yield xp(b,a)}finally{b.w=null}})}getCurrentItem(){return this.o[this.C]||null}getCurrentItemIndex(){return this.C}Bg(){return[...this.o]}Qc(){return this.o.length}getTimeline(){return this.a?
439
- this.a.getTimeline():null}seekWith(a){return this.a?this.a.seekWith(a):Promise.resolve()}release(){this.o=[];this.C=0;this.R=!1;return super.release()}destroy(){sp(this);return super.destroy()}setCdnErrorCallback(){throw new _.H(1,7,7009,"CDN switching is not supported!");}};_.z("clpp.plist.ScPlaylist",xt);xt.prototype.setCdnErrorCallback=xt.prototype.setCdnErrorCallback;xt.prototype.destroy=xt.prototype.destroy;xt.prototype.release=xt.prototype.release;xt.prototype.seekWith=xt.prototype.seekWith;
440
- xt.prototype.getTimeline=xt.prototype.getTimeline;xt.prototype.getSize=xt.prototype.Qc;xt.prototype.getPlaylist=xt.prototype.Bg;xt.prototype.getCurrentItemIndex=xt.prototype.getCurrentItemIndex;xt.prototype.getCurrentItem=xt.prototype.getCurrentItem;xt.prototype.addItem=xt.prototype.$f;xt.prototype.open=xt.prototype.open;var yt=class{constructor(a){this.a=a.map(b=>({videoId:b.getSurface().getMedia().id,player:b,md:!0,ready:Promise.resolve()}));this.h=new _.R("clpp.plist.PlayerPool")}has(){return this.a.some(a=>a.md)}get(){const a=this;return _.x(function*(){const b=a.a.find(c=>c.md);if(!b)throw Error("No available players in the pool");b.md=!1;yield b.ready;return b.player})}release(a){const b=this.a.find(c=>c.player===a);if(!b)return Promise.resolve();b.md=!0;b.ready=new Promise(c=>{a.release().catch(d=>{this.h.error("Failed to unload player",
441
- d)}).then(c)});return b.ready}destroy(){const a=this;return _.x(function*(){yield Promise.all(a.a.map(b=>b.player.destroy()))})}};var zt=class extends _.Us{constructor(a){super();this.o=_.Mg({transition:_.Ne,preloadMedia:!1},a);this.g=[];this.a=0;const b=yp(a.anchorId,this.o.config);this.w=new yt(b);this.f=null;this.j=!1;this.l=new Map;this.A=a.toggleVisible;this.h=new _.R(qd);this.w.a.forEach(c=>zp(this,c.player,!1))}Pc(){return this.f}xb(){return this.f?this.f.player:null}jf(){return this.l.get(this.a+1)||null}kf(){return this.l.get(this.a-1)||null}$d(){return[this.kf(),this.jf()].filter(Boolean)}lh(a){if(0<this.g.length)throw Error("Cannot re-set items in the playlist");
438
+ 7,7100,"Invalid `playlist.startTime` config value!");f=d.endTime;if(null!=f&&(typeof f!==_.t||0>f||null!=e&&f<=e))throw new _.H(_.F,7,7100,"Invalid `playlist.endTime` config value!");if("DVR"===d.content&&!f)throw new _.H(_.F,7,7100,"`playlist.endTime` config value is required for DVR content!");}try{vp(c),c.w="open",yield yp(c,b),c.C=0,c.o=b,c.R=!0,zp(c,b[0].playlist||{})}finally{c.w=null}})}$f(a){const b=this;return _.x(function*(){if(b.w)throw new _.H(_.F,7,7008,`Cannot call addItem() while ${b.w}() is ongoing!`);
439
+ if(!b.R)throw new _.H(_.F,7,7008,"open() must be called before addItem()!");if(!a.id||!a.source)throw new _.H(_.F,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(_.F,7,7100,"A config with this `id` already exists in the playlist!");try{b.w="addItem",b.o.push(a),yield Ap(b,a)}finally{b.w=null}})}getCurrentItem(){return this.o[this.C]||null}getCurrentItemIndex(){return this.C}Bg(){return[...this.o]}Qc(){return this.o.length}getTimeline(){return this.a?
440
+ this.a.getTimeline():null}seekWith(a){return this.a?this.a.seekWith(a):Promise.resolve()}release(){this.o=[];this.C=0;this.R=!1;return super.release()}destroy(){vp(this);return super.destroy()}setCdnErrorCallback(){throw new _.H(1,7,7009,"CDN switching is not supported!");}};_.z("clpp.plist.ScPlaylist",zt);zt.prototype.setCdnErrorCallback=zt.prototype.setCdnErrorCallback;zt.prototype.destroy=zt.prototype.destroy;zt.prototype.release=zt.prototype.release;zt.prototype.seekWith=zt.prototype.seekWith;
441
+ zt.prototype.getTimeline=zt.prototype.getTimeline;zt.prototype.getSize=zt.prototype.Qc;zt.prototype.getPlaylist=zt.prototype.Bg;zt.prototype.getCurrentItemIndex=zt.prototype.getCurrentItemIndex;zt.prototype.getCurrentItem=zt.prototype.getCurrentItem;zt.prototype.addItem=zt.prototype.$f;zt.prototype.open=zt.prototype.open;var At=class{constructor(a){this.a=a.map(b=>({videoId:b.getSurface().getMedia().id,player:b,md:!0,ready:Promise.resolve()}));this.h=new _.R("clpp.plist.PlayerPool")}has(){return this.a.some(a=>a.md)}get(){const a=this;return _.x(function*(){const b=a.a.find(c=>c.md);if(!b)throw Error("No available players in the pool");b.md=!1;yield b.ready;return b.player})}release(a){const b=this.a.find(c=>c.player===a);if(!b)return Promise.resolve();b.md=!0;b.ready=new Promise(c=>{a.release().catch(d=>{this.h.error("Failed to unload player",
442
+ d)}).then(c)});return b.ready}destroy(){const a=this;return _.x(function*(){yield Promise.all(a.a.map(b=>b.player.destroy()))})}};var Bt=class extends _.Xs{constructor(a){super();this.o=_.Mg({transition:_.Me,preloadMedia:!1},a);this.g=[];this.a=0;const b=Bp(a.anchorId,this.o.config);this.w=new At(b);this.f=null;this.j=!1;this.l=new Map;this.A=a.toggleVisible;this.h=new _.R(od);this.w.a.forEach(c=>Cp(this,c.player,!1))}Pc(){return this.f}xb(){return this.f?this.f.player:null}jf(){return this.l.get(this.a+1)||null}kf(){return this.l.get(this.a-1)||null}$d(){return[this.kf(),this.jf()].filter(Boolean)}lh(a){if(0<this.g.length)throw Error("Cannot re-set items in the playlist");
442
443
  this.h.info("Set items",a);this.g=a.map((b,c)=>({config:b,index:c,preloadPromise:Promise.resolve(),disposers:[]}))}kh(a){if(0===this.g.length)throw Error(mb);if(0>a||a>this.g.length-1)throw Error("Index out of bounds");this.a=a}Ac(){return this.a<this.g.length-1}nf(){return 0<this.a}ah(){const a=this;return _.x(function*(){if(a.j)a.h.warn("Cannot play first item while busy");else if(0===a.g.length)a.h.warn(mb);else{a.j=!0;a.h.info(`First (index: ${a.a})`);var b=a.g[a.a];try{a.h.info(`First loading (index: ${a.a})`),
443
- yield Cp(a,b),a.h.info(`First playing (index: ${a.a})`)}catch(c){throw a.h.error(`First failed (index: ${a.a})`),c;}finally{a.j=!1,Gp(a)}}})}Cf(){const a=this;return _.x(function*(){if(a.j)a.h.warn("Cannot play next item while busy");else if(a.Ac()){a.j=!0;a.a+=1;a.h.info(`Next (index: ${a.a})`);var b=a.f;a.o.transition===_.Ne&&b.player.pause();Lp(a,a.a+-2);a.l.delete(a.a);var c=a.g[a.a];try{a.h.info(`Next loading (index: ${a.a})`),yield Hp(a,c),a.h.info(`Next playing (index: ${a.a})`)}catch(d){throw a.h.error(`Next failed (index: ${a.a})`),
444
- d;}finally{a.j=!1,b&&Kp(a,b),Gp(a)}}else a.h.warn("There are no more items in the playlist")})}bh(){const a=this;return _.x(function*(){if(a.j)a.h.warn("Cannot play previous item while busy");else if(a.nf()){a.j=!0;--a.a;a.h.info(`Previous (index: ${a.a})`);var b=a.f;a.o.transition===_.Ne&&b.player.pause();Lp(a,a.a+2);a.l.delete(a.a);var c=a.g[a.a];try{a.h.info(`Previous loading (index: ${a.a})`),yield Hp(a,c),a.h.info(`Previous playing (index: ${a.a})`)}catch(d){throw a.h.error(`Previous failed (index: ${a.a})`),
445
- d;}finally{a.j=!1,b&&Kp(a,b),Gp(a)}}else a.h.warn("There are no more previous items in the playlist")})}destroy(){const a=this;return _.x(function*(){a.h.info("Destroy");yield Promise.all([Mp(a),a.f?Kp(a,a.f):Promise.resolve()]);yield Np(a)})}};_.z(qd,zt);zt.prototype.destroy=zt.prototype.destroy;zt.prototype.playPrev=zt.prototype.bh;zt.prototype.playNext=zt.prototype.Cf;zt.prototype.playFirst=zt.prototype.ah;zt.prototype.hasPrev=zt.prototype.nf;zt.prototype.hasNext=zt.prototype.Ac;
446
- zt.prototype.setIndex=zt.prototype.kh;zt.prototype.setItems=zt.prototype.lh;zt.prototype.getPreloading=zt.prototype.$d;zt.prototype.getPrev=zt.prototype.kf;zt.prototype.getNext=zt.prototype.jf;zt.prototype.getCurrentPlayer=zt.prototype.xb;zt.prototype.getCurrent=zt.prototype.Pc;var Jp="preload",Ap=_.se;var Op=new Map;var Ct=class{constructor(a){this.g=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]===_.Gc;if(!window.muxjs||!c&&!d)return!1;if(d)return _.Pp(Kc);if(b)return _.Pp(Qp(b,a));b=Qp(_.p,a);a=Qp(_.w,a);return _.Pp(b)||_.Pp(a)}isMuxed(a,b){return 1<this.demuxMimeTypes(a,b).size}demuxMimeTypes(a,
447
- b){const c=new Map;c.set(a,b);try{const d=_.Lj(b),e=_.Mj(b).split(","),f=new Map,g=Xh(_.p,e),h=Xh(_.w,e);g&&f.set(_.p,this.convertCodecs(_.p,_.Kj(d,g)));h&&f.set(_.w,this.convertCodecs(_.w,_.Kj(d,h)));return f}catch(d){return c}}convertCodecs(a,b){return b.toLowerCase().split(";")[0]===_.Gc?Kc:"mp2t"===b.toLowerCase().split(";")[0].split("/")[1]?Qp(a,b):b}getOriginalMimeType(){return this.g}transmux(a){const b=[],c=[];let d=[],e=null;a=_.J(a);const f=h=>{d=h.captions;const k=new Uint8Array(h.data.byteLength+
448
- h.initSegment.byteLength);k.set(h.initSegment,0);k.set(h.data,h.initSegment.byteLength);h.type===At?b.push(k):h.type===Bt&&c.push(k)},g=()=>{e={video:_.Fi(...b),captions:d,audio:_.Fi(...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(_.F,3,3018);return e}};Fj(_.Gc,()=>new Ct(_.Gc));Fj(_.hg,()=>new Ct(_.hg));var Bt=_.p,At=_.w;var Dt=class extends _.Us{constructor(a){super();this.o=_.Mg({Tg:2},a);this.j=[];const b=Rp(a.anchorEl,this.o.Tg+1,this.o.mg);this.l=new yt(b);this.a=null;this.g=!1;this.f=new Map;this.A=!1;this.w=a.toggleVisible;this.h=new _.R("clpp.interstitial.MultiController");this.l.a.forEach(c=>Sp(this,c.player,!1))}getCurrentItem(){return this.a}xb(){return this.a?this.a.player:null}$d(){return Array.from(this.f.values())}ld(a){this.h.info("Add items",a);this.j=this.j.concat(a.map(b=>Object.assign({},b,{state:"idle",
449
- disposers:[],preloadPromise:Promise.resolve(),bd:Promise.resolve()})))}removeItems(a){this.h.info("Remove items",a);a?this.j=this.j.filter(b=>!a.includes(b.id)):this.j=[]}Ac(){return 0<this.f.size}play(a){const b=this;return _.x(function*(){if(b.g)b.h.warn(`Cannot play item while busy (ID: ${a})`);else{var c=b.getItem(a);if(c){b.h.info(`Play item (ID: ${a})`);b.g=!0;var d=b.a;d&&d.player.pause();var e=b.f.has(a);e&&b.f.delete(a);try{b.h.info(`Item loading (ID: ${a})`),e?yield Wp(b,c):yield Yp(b,c),
450
- c.jc&&c.jc(),b.trigger(new _.E(de,{detail:c})),Zp(b,c),b.h.info(`Item playing (ID: ${a})`)}catch(f){throw b.h.error(`Item failed (ID: ${a})`),f;}finally{b.g=!1,d&&aq(b,d),cq(b),eq(b,c.next)}}else b.h.warn(`Item not found (ID: ${a})`)}})}load(a){const b=this;return _.x(function*(){if(b.g)b.h.warn(`Cannot load item while busy (ID: ${a})`);else{var c=b.getItem(a);if(c){b.h.info(`Load item (ID: ${a})`);b.g=!0;var d=b.a;d&&d.player.pause();var e=b.f.has(a);e&&b.f.delete(a);try{b.h.info(`Item loading (ID: ${a})`),
451
- e?b.h.error("Loading preloaded items is not supported"):yield Xp(b,c),b.trigger(new _.E(de,{detail:c})),Zp(b,c),b.h.info(`Item loaded (ID: ${a})`)}catch(f){throw b.h.error(`Item failed (ID: ${a})`),f;}finally{b.g=!1,d&&aq(b,d),cq(b),eq(b,c.next)}}else b.h.warn(`Item not found (ID: ${a})`)}})}getItem(a){return this.j.find(b=>b.id===a)||null}release(){const a=this;return _.x(function*(){yield Promise.all([cq(a),a.a?aq(a,a.a):Promise.resolve()]);a.a=null;a.g=!1;a.removeItems();Up(a,!0)})}destroy(){const a=
452
- this;return _.x(function*(){a.h.info("Destroy");yield a.release();yield fq(a)})}};Dt.prototype.destroy=Dt.prototype.destroy;Dt.prototype.release=Dt.prototype.release;Dt.prototype.getItem=Dt.prototype.getItem;Dt.prototype.load=Dt.prototype.load;Dt.prototype.play=Dt.prototype.play;Dt.prototype.hasNext=Dt.prototype.Ac;Dt.prototype.removeItems=Dt.prototype.removeItems;Dt.prototype.addItems=Dt.prototype.ld;Dt.prototype.getPreloading=Dt.prototype.$d;Dt.prototype.getCurrentPlayer=Dt.prototype.xb;
453
- Dt.prototype.getCurrentItem=Dt.prototype.getCurrentItem;var $p="preload",Vp=_.se;var It=class extends _.Us{constructor(a){super();this.l=new Et;this.f=_.Mg({prerollMarginSec:.5,resolutionOffsetSec:35,yospace:{enabled:!1}},a);this.h=new _.R(nd);this.o=null;this.a=new Dt({mg:this.f.config,anchorEl:a.anchorEl,preloadMedia:!0});Up(this.a,!0);this.a.on(de,b=>{const c=b.detail;c.primary&&(this.o=c.player.getDuration());this.trigger(new _.E(Ft,b));iq(this);c.primary&&nq(this,c.player)});this.j=[];this.a.on(mf,b=>{this.trigger(new _.E(Gt,{detail:{player:b.detail.player}}))});this.g=[]}load(a){const b=
454
- this;return _.x(function*(){yield qq(b,a,!1);b.trigger(new _.E(Ht));b.a.getCurrentItem().primary&&b.trigger(new _.E(Mq))})}Oc(){const a=this.o;return a?this.g.map(b=>({cueId:b.cueId,startTime:b.startTime,endTime:b.endTime,primaryDuration:a})):[]}Hg(){return this.l.a}Sg(a){const b=this;return _.x(function*(){yield qq(b,a,!0)})}unload(){const a=this;return _.x(function*(){yield a.a.release();a.g=[];a.l.release()})}destroy(){const a=this;return _.x(function*(){yield a.a.destroy();a.g=[];a.l.release()})}wh(){const a=
455
- this;return _.x(function*(){yield Tp(a.a);a.trigger(new _.E(Ht));a.a.getCurrentItem().primary&&a.trigger(new _.E(Mq))})}getPosition(){const a=this.a.xb();return a?a.getPosition():null}xb(){return this.a.xb()}getCurrentItem(){return this.a.getCurrentItem()}};_.z(nd,It);It.prototype.getCurrentItem=It.prototype.getCurrentItem;It.prototype.getCurrentPlayer=It.prototype.xb;It.prototype.getPosition=It.prototype.getPosition;It.prototype.unpause=It.prototype.wh;It.prototype.destroy=It.prototype.destroy;
456
- It.prototype.unload=It.prototype.unload;It.prototype.loadPaused=It.prototype.Sg;It.prototype.getYospaceSession=It.prototype.Hg;It.prototype.getCues=It.prototype.Oc;It.prototype.load=It.prototype.load;
457
- var xq="new",yq="preparing",Cq="ready",Lq="completed",Dq="failed",zq="interstitial-preload-started",Aq="x-asset-list-request-started",Eq="x-asset-list-request-ended",Hq="interstitial-scheduled",Jq="interstitial-started",Kq="interstitial-ended",Iq="interstitial-item-started",Gt="primary-player-changed",Ft="item-changed",Ht="playback-started",Mq="primary-started",mq="primary-ended",vq="cues-changed";
458
- _.z("clpp.interstitial.Event",{RESOLUTION_STARTED:zq,ASSET_LIST_STARTED:Aq,ASSET_LIST_ENDED:Eq,SCHEDULED:Hq,STARTED:Jq,ENDED:Kq,ITEM_STARTED:Iq,PRIMARY_PLAYER_CHANGED:Gt,ITEM_CHANGED:Ft,PLAYBACK_STARTED:Ht,PRIMARY_STARTED:Mq,PRIMARY_ENDED:mq,CUES_CHANGED:vq});var Et=class{constructor(){this.a=null}release(){this.a&&(this.a.shutdown(),this.a=null)}},Nq=_.Tb,Oq="LIVE",Pq="DVR";var U=class{vb(){}wb(){}Cb(){}getId(){}getCreativeId(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getSkipTimeOffset(){}gc(){}Mb(){}getMediaUrl(){}zb(){}yb(){}nb(){}ab(){}getPodIndex(){}Nb(){}Ob(){}Bb(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}};_.z("clpp.ads.IAd",U);U.prototype.getWrapperCreativeIds=U.prototype.getWrapperCreativeIds;U.prototype.getWrapperAdSystems=U.prototype.getWrapperAdSystems;U.prototype.getWrapperAdIds=U.prototype.getWrapperAdIds;
444
+ yield Fp(a,b),a.h.info(`First playing (index: ${a.a})`)}catch(c){throw a.h.error(`First failed (index: ${a.a})`),c;}finally{a.j=!1,Jp(a)}}})}Cf(){const a=this;return _.x(function*(){if(a.j)a.h.warn("Cannot play next item while busy");else if(a.Ac()){a.j=!0;a.a+=1;a.h.info(`Next (index: ${a.a})`);var b=a.f;a.o.transition===_.Me&&b.player.pause();Op(a,a.a+-2);a.l.delete(a.a);var c=a.g[a.a];try{a.h.info(`Next loading (index: ${a.a})`),yield Kp(a,c),a.h.info(`Next playing (index: ${a.a})`)}catch(d){throw a.h.error(`Next failed (index: ${a.a})`),
445
+ d;}finally{a.j=!1,b&&Np(a,b),Jp(a)}}else a.h.warn("There are no more items in the playlist")})}bh(){const a=this;return _.x(function*(){if(a.j)a.h.warn("Cannot play previous item while busy");else if(a.nf()){a.j=!0;--a.a;a.h.info(`Previous (index: ${a.a})`);var b=a.f;a.o.transition===_.Me&&b.player.pause();Op(a,a.a+2);a.l.delete(a.a);var c=a.g[a.a];try{a.h.info(`Previous loading (index: ${a.a})`),yield Kp(a,c),a.h.info(`Previous playing (index: ${a.a})`)}catch(d){throw a.h.error(`Previous failed (index: ${a.a})`),
446
+ d;}finally{a.j=!1,b&&Np(a,b),Jp(a)}}else a.h.warn("There are no more previous items in the playlist")})}destroy(){const a=this;return _.x(function*(){a.h.info("Destroy");yield Promise.all([Pp(a),a.f?Np(a,a.f):Promise.resolve()]);yield Qp(a)})}};_.z(od,Bt);Bt.prototype.destroy=Bt.prototype.destroy;Bt.prototype.playPrev=Bt.prototype.bh;Bt.prototype.playNext=Bt.prototype.Cf;Bt.prototype.playFirst=Bt.prototype.ah;Bt.prototype.hasPrev=Bt.prototype.nf;Bt.prototype.hasNext=Bt.prototype.Ac;
447
+ Bt.prototype.setIndex=Bt.prototype.kh;Bt.prototype.setItems=Bt.prototype.lh;Bt.prototype.getPreloading=Bt.prototype.$d;Bt.prototype.getPrev=Bt.prototype.kf;Bt.prototype.getNext=Bt.prototype.jf;Bt.prototype.getCurrentPlayer=Bt.prototype.xb;Bt.prototype.getCurrent=Bt.prototype.Pc;var Mp="preload",Dp=_.re;var Rp=new Map;var Et=class{constructor(a){this.g=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]===_.Fc;if(!window.muxjs||!c&&!d)return!1;if(d)return _.Sp(Jc);if(b)return _.Sp(Tp(b,a));b=Tp(_.p,a);a=Tp(_.w,a);return _.Sp(b)||_.Sp(a)}isMuxed(a,b){return 1<this.demuxMimeTypes(a,b).size}demuxMimeTypes(a,
448
+ b){const c=new Map;c.set(a,b);try{const d=_.Lj(b),e=_.Mj(b).split(","),f=new Map,g=Xh(_.p,e),h=Xh(_.w,e);g&&f.set(_.p,this.convertCodecs(_.p,_.Kj(d,g)));h&&f.set(_.w,this.convertCodecs(_.w,_.Kj(d,h)));return f}catch(d){return c}}convertCodecs(a,b){return b.toLowerCase().split(";")[0]===_.Fc?Jc:"mp2t"===b.toLowerCase().split(";")[0].split("/")[1]?Tp(a,b):b}getOriginalMimeType(){return this.g}transmux(a){const b=[],c=[];let d=[],e=null;a=_.J(a);const f=h=>{d=h.captions;const k=new Uint8Array(h.data.byteLength+
449
+ h.initSegment.byteLength);k.set(h.initSegment,0);k.set(h.data,h.initSegment.byteLength);h.type===Ct?b.push(k):h.type===Dt&&c.push(k)},g=()=>{e={video:_.Fi(...b),captions:d,audio:_.Fi(...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(_.F,3,3018);return e}};Fj(_.Fc,()=>new Et(_.Fc));Fj(_.hg,()=>new Et(_.hg));var Dt=_.p,Ct=_.w;var Ft=class extends _.Xs{constructor(a){super();this.o=_.Mg({Tg:2},a);this.j=[];const b=Up(a.anchorEl,this.o.Tg+1,this.o.mg);this.l=new At(b);this.a=null;this.g=!1;this.f=new Map;this.A=!1;this.w=a.toggleVisible;this.h=new _.R("clpp.interstitial.MultiController");this.l.a.forEach(c=>Vp(this,c.player,!1))}getCurrentItem(){return this.a}xb(){return this.a?this.a.player:null}$d(){return Array.from(this.f.values())}ld(a){this.h.info("Add items",a);this.j=this.j.concat(a.map(b=>Object.assign({},b,{state:"idle",
450
+ disposers:[],preloadPromise:Promise.resolve(),bd:Promise.resolve()})))}removeItems(a){this.h.info("Remove items",a);a?this.j=this.j.filter(b=>!a.includes(b.id)):this.j=[]}Ac(){return 0<this.f.size}play(a){const b=this;return _.x(function*(){if(b.g)b.h.warn(`Cannot play item while busy (ID: ${a})`);else{var c=b.getItem(a);if(c){b.h.info(`Play item (ID: ${a})`);b.g=!0;var d=b.a;d&&d.player.pause();var e=b.f.has(a);e&&b.f.delete(a);try{b.h.info(`Item loading (ID: ${a})`),e?yield Zp(b,c):yield aq(b,c),
451
+ c.jc&&c.jc(),b.trigger(new _.E(ce,{detail:c})),bq(b,c),b.h.info(`Item playing (ID: ${a})`)}catch(f){throw b.h.error(`Item failed (ID: ${a})`),f;}finally{b.g=!1,d&&dq(b,d),fq(b),hq(b,c.next)}}else b.h.warn(`Item not found (ID: ${a})`)}})}load(a){const b=this;return _.x(function*(){if(b.g)b.h.warn(`Cannot load item while busy (ID: ${a})`);else{var c=b.getItem(a);if(c){b.h.info(`Load item (ID: ${a})`);b.g=!0;var d=b.a;d&&d.player.pause();var e=b.f.has(a);e&&b.f.delete(a);try{b.h.info(`Item loading (ID: ${a})`),
452
+ e?b.h.error("Loading preloaded items is not supported"):yield $p(b,c),b.trigger(new _.E(ce,{detail:c})),bq(b,c),b.h.info(`Item loaded (ID: ${a})`)}catch(f){throw b.h.error(`Item failed (ID: ${a})`),f;}finally{b.g=!1,d&&dq(b,d),fq(b),hq(b,c.next)}}else b.h.warn(`Item not found (ID: ${a})`)}})}getItem(a){return this.j.find(b=>b.id===a)||null}release(){const a=this;return _.x(function*(){yield Promise.all([fq(a),a.a?dq(a,a.a):Promise.resolve()]);a.a=null;a.g=!1;a.removeItems();Xp(a,!0)})}destroy(){const a=
453
+ this;return _.x(function*(){a.h.info("Destroy");yield a.release();yield iq(a)})}};Ft.prototype.destroy=Ft.prototype.destroy;Ft.prototype.release=Ft.prototype.release;Ft.prototype.getItem=Ft.prototype.getItem;Ft.prototype.load=Ft.prototype.load;Ft.prototype.play=Ft.prototype.play;Ft.prototype.hasNext=Ft.prototype.Ac;Ft.prototype.removeItems=Ft.prototype.removeItems;Ft.prototype.addItems=Ft.prototype.ld;Ft.prototype.getPreloading=Ft.prototype.$d;Ft.prototype.getCurrentPlayer=Ft.prototype.xb;
454
+ Ft.prototype.getCurrentItem=Ft.prototype.getCurrentItem;var cq="preload",Yp=_.re;var Kt=class extends _.Xs{constructor(a){super();this.l=new Gt;this.f=_.Mg({prerollMarginSec:.5,resolutionOffsetSec:35,yospace:{enabled:!1}},a);this.h=new _.R(md);this.o=null;this.a=new Ft({mg:this.f.config,anchorEl:a.anchorEl,preloadMedia:!0});Xp(this.a,!0);this.a.on(ce,b=>{const c=b.detail;c.primary&&(this.o=c.player.getDuration());this.trigger(new _.E(Ht,b));lq(this);c.primary&&qq(this,c.player)});this.j=[];this.a.on(lf,b=>{this.trigger(new _.E(It,{detail:{player:b.detail.player}}))});this.g=[]}load(a){const b=
455
+ this;return _.x(function*(){yield tq(b,a,!1);b.trigger(new _.E(Jt));b.a.getCurrentItem().primary&&b.trigger(new _.E(Pq))})}Oc(){const a=this.o;return a?this.g.map(b=>({cueId:b.cueId,startTime:b.startTime,endTime:b.endTime,primaryDuration:a})):[]}Hg(){return this.l.a}Sg(a){const b=this;return _.x(function*(){yield tq(b,a,!0)})}unload(){const a=this;return _.x(function*(){yield a.a.release();a.g=[];a.l.release()})}destroy(){const a=this;return _.x(function*(){yield a.a.destroy();a.g=[];a.l.release()})}wh(){const a=
456
+ this;return _.x(function*(){yield Wp(a.a);a.trigger(new _.E(Jt));a.a.getCurrentItem().primary&&a.trigger(new _.E(Pq))})}getPosition(){const a=this.a.xb();return a?a.getPosition():null}xb(){return this.a.xb()}getCurrentItem(){return this.a.getCurrentItem()}};_.z(md,Kt);Kt.prototype.getCurrentItem=Kt.prototype.getCurrentItem;Kt.prototype.getCurrentPlayer=Kt.prototype.xb;Kt.prototype.getPosition=Kt.prototype.getPosition;Kt.prototype.unpause=Kt.prototype.wh;Kt.prototype.destroy=Kt.prototype.destroy;
457
+ Kt.prototype.unload=Kt.prototype.unload;Kt.prototype.loadPaused=Kt.prototype.Sg;Kt.prototype.getYospaceSession=Kt.prototype.Hg;Kt.prototype.getCues=Kt.prototype.Oc;Kt.prototype.load=Kt.prototype.load;
458
+ var Aq="new",Bq="preparing",Fq="ready",Oq="completed",Gq="failed",Cq="interstitial-preload-started",Dq="x-asset-list-request-started",Hq="x-asset-list-request-ended",Kq="interstitial-scheduled",Mq="interstitial-started",Nq="interstitial-ended",Lq="interstitial-item-started",It="primary-player-changed",Ht="item-changed",Jt="playback-started",Pq="primary-started",pq="primary-ended",yq="cues-changed";
459
+ _.z("clpp.interstitial.Event",{RESOLUTION_STARTED:Cq,ASSET_LIST_STARTED:Dq,ASSET_LIST_ENDED:Hq,SCHEDULED:Kq,STARTED:Mq,ENDED:Nq,ITEM_STARTED:Lq,PRIMARY_PLAYER_CHANGED:It,ITEM_CHANGED:Ht,PLAYBACK_STARTED:Jt,PRIMARY_STARTED:Pq,PRIMARY_ENDED:pq,CUES_CHANGED:yq});var Gt=class{constructor(){this.a=null}release(){this.a&&(this.a.shutdown(),this.a=null)}},Qq=_.Sb,Rq="LIVE",Sq="DVR";var U=class{vb(){}wb(){}Cb(){}getId(){}getCreativeId(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getSkipTimeOffset(){}gc(){}Mb(){}getMediaUrl(){}zb(){}yb(){}nb(){}ab(){}getPodIndex(){}Nb(){}Ob(){}Bb(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}};_.z("clpp.ads.IAd",U);U.prototype.getWrapperCreativeIds=U.prototype.getWrapperCreativeIds;U.prototype.getWrapperAdSystems=U.prototype.getWrapperAdSystems;U.prototype.getWrapperAdIds=U.prototype.getWrapperAdIds;
459
460
  U.prototype.getSequenceLength=U.prototype.Bb;U.prototype.getPositionInSequence=U.prototype.Ob;U.prototype.getPodTimeOffset=U.prototype.Nb;U.prototype.getPodIndex=U.prototype.getPodIndex;U.prototype.getPodType=U.prototype.ab;U.prototype.getMediaBitrate=U.prototype.nb;U.prototype.getMediaHeight=U.prototype.yb;U.prototype.getMediaWidth=U.prototype.zb;U.prototype.getMediaUrl=U.prototype.getMediaUrl;U.prototype.getClickThroughUrl=U.prototype.Mb;U.prototype.isBumper=U.prototype.gc;
460
461
  U.prototype.getSkipTimeOffset=U.prototype.getSkipTimeOffset;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.getCreativeId=U.prototype.getCreativeId;U.prototype.getId=U.prototype.getId;U.prototype.getTechnology=U.prototype.Cb;U.prototype.getAdManagerVersion=U.prototype.wb;
461
- U.prototype.getAdManagerName=U.prototype.vb;var Jt=class{name(){}isSupported(){}create(){}};_.z("clpp.ads.IAdsManagerFactory",Jt);Jt.prototype.create=Jt.prototype.create;Jt.prototype.isSupported=Jt.prototype.isSupported;Jt.prototype.name=Jt.prototype.name;var Kt=class{load(){}start(){}resume(){}pause(){}skip(){}getVolume(){}setVolume(){}getPosition(){}dispose(){}};_.z("clpp.ads.IAdsManager",Kt);Kt.prototype.getPosition=Kt.prototype.getPosition;Kt.prototype.setVolume=Kt.prototype.setVolume;Kt.prototype.getVolume=Kt.prototype.getVolume;Kt.prototype.skip=Kt.prototype.skip;Kt.prototype.pause=Kt.prototype.pause;Kt.prototype.resume=Kt.prototype.resume;var Lt=class{load(){return Promise.resolve()}start(a){return a.play()}resume(){}pause(){}skip(){}getVolume(){return 1}setVolume(){}getPosition(){return-1}dispose(){return _.x(function*(){})}};Lt.prototype.dispose=Lt.prototype.dispose;Lt.prototype.getPosition=Lt.prototype.getPosition;Lt.prototype.setVolume=Lt.prototype.setVolume;Lt.prototype.getVolume=Lt.prototype.getVolume;Lt.prototype.skip=Lt.prototype.skip;Lt.prototype.pause=Lt.prototype.pause;Lt.prototype.resume=Lt.prototype.resume;
462
- Lt.prototype.start=Lt.prototype.start;Lt.prototype.load=Lt.prototype.load;var po=class{name(){return"clpp.ads.NopAdsManagerFactory"}isSupported(){return!0}create(){return new Lt}};po.prototype.create=po.prototype.create;po.prototype.isSupported=po.prototype.isSupported;po.prototype.name=po.prototype.name;var Mt=class{getCuePoints(){}Pb(){}pb(){}};_.z("clpp.ads.IAdsTimeline",Mt);Mt.prototype.hasPostroll=Mt.prototype.pb;Mt.prototype.hasPreroll=Mt.prototype.Pb;Mt.prototype.getCuePoints=Mt.prototype.getCuePoints;_.Nt=class{f(){}a(){}g(){}o(){}};var Ot=class{constructor(){this.j=null;this.h=new _.R("clpp.drm.eme.StandardEmeManager")}l(a){this.j=a}g(a){return this.j?this.j.setMediaKeys(a):Promise.reject(jb)}o(){return this.j&&this.j.mediaKeys}a(a,b){this.h.debug("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=>{c.message&&(c=Error(`${c.message} (keySystem: ${a})`));return Promise.reject(c)})}f(){return Db}};
463
- jm(new class{a(){return Db}isSupported(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new Ot}},1E3);var Qt=class{constructor(){this.size=0;this.a=void 0;this.h=new _.R("clpp.drm.eme.MediaKeyStatusMap")}getStatus(){return this.a}forEach(a){this.a&&a(this.a,Pt.value())}get(a){if(this.has(a))return this.a}has(a){const b=Pt.value();return this.a&&di(a,b)?!0:!1}entries(){}keys(){}values(){}},Pt=new _.nt(()=>ji(new Uint8Array([0])));var Rt=class{l(){}g(a){_.fh("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}o(){return null}a(){_.fh("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return"NOP"}};jm(new class{a(){return"NOP"}isSupported(){return!0}create(){return new Rt}},-1);var Tt=class{constructor(){this.j=this.w=null}l(a){this.w=a}g(a){const b=this.j;b&&b!==a&&Rq(b,null);return(this.j=a)?Rq(a,this.w):Promise.resolve()}o(){return this.j}a(a,b){_.fh("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new St(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return"APPLE"}},St=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.vd))for(var c of b){a:{a=c;if(a.persistentState===_.uf){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
464
- persistentState:_.Ke,distinctiveIdentifier:_.Ke,initDataTypes:a.initDataTypes,sessionTypes:[Rf],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),
465
- e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.ig));a=e?b:null}if(a){this.a=a;return}}c=Error(Qb);c.name=sb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new Ut(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.fh("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},Ut=class{constructor(a){this.f=null;this.g=new WebKitMediaKeys(a);this.a=new _.hs;this.j=0;this.h=new _.R(md);this.h.info("Created Media Keys for "+a)}createSession(a){a=
466
- void 0===a?Rf:a;this.h.debug("Creating Apple MediaKeys Session");if(a!==Rf)throw new TypeError("Session type "+a+ba);return new Vt(this.g,`__session_${this.j++}`)}setServerCertificate(){this.h.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},Vt=class extends _.Us{constructor(a,b){super();this.a=null;this.o=a;this.f=this.g=null;this.j=new _.hs;this.sessionId=b;this.expiration=NaN;this.closed=new _.an;this.l=!1;this.keyStatuses=new Qt;this.h=new _.R(md)}generateRequest(a,
467
- b){if(this.l)return Promise.reject(Gb);this.h.debug("generateRequest");this.g=new _.an;try{const c=this.o.createSession(_.ig,_.J(b));this.a=c;this.sessionId=c.sessionId||this.sessionId||"";this.j.on(c,xg,d=>{{const e=this.keyStatuses.getStatus();this.h.debug(`Received Key Message in ${this.sessionId}`);this.g&&(this.g.resolve(),this.g=null);d=new _.E(_.ve,{messageType:void 0===e||e===Lf?he:ge,message:ji(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,vg,d=>{this.h.debug("onWebkitKeyAdded_",
468
- d);this.f&&(Sq(this,"usable"),this.f.resolve(),this.f=null)});this.j.on(c,wg,()=>{var d=this.keyStatuses.getStatus();if(this.a&&this.a&&this.a.error&&this.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&d===Lf)this.h.warn(`Ignoring webkit key error for session ${this.sessionId}`);else if(this.h.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.g)this.g.reject(d),
469
- this.g=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:Sq(this,"output-not-allowed");break;default:Sq(this,_.ce)}});Sq(this,Lf)}catch(c){this.g.reject(c)}return this.g}load(){this.h.debug("load");return Promise.reject(Error("MediaKeySession.load not yet supported"))}update(a){if(this.l)return Promise.reject(Gb);this.h.debug(Zf);this.f=new _.an;try{this.a.update(_.J(a))}catch(b){this.f.reject(b)}return this.f}close(){if(this.l)return this.closed;
470
- this.h.info(`Closing Key Session ${this.sessionId}`);this.l=!0;try{this.a.close(),this.closed.resolve(),_.mh(this.j)}catch(a){this.closed.reject(a)}return this.closed}remove(){this.h.debug("remove");return Promise.reject(Error("MediaKeySession is only applicable for persistent licenses, which are not supported on this platform"))}};jm(new class{a(){return"APPLE"}isSupported(){return!!window.WebKitMediaKeys}create(){return new Tt}},1100);var Xt=class{constructor(){this.w=this.j=null;this.A="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.A="webkit")}l(a){this.j=a}g(a){_.fh("WebkitEmeManager.setMediaKeys");if(!this.j)return Promise.reject(jb);const b=this.w;b&&b!==a&&Vq(b,null);(this.w=a)&&Vq(a,this.j);return Promise.resolve()}o(){return this.w}a(a,b){_.fh("WebkitEmeManager.requestMediaKeySystemAccess");try{if(this.j)var c=this.j;else{var d=document.getElementsByTagName(_.w);c=d.length?d[0]:document.createElement(_.w)}const e=
471
- new Wt(this.A,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return"WEBKIT"}},Wt=class{constructor(a,b,c,d){this.g=a;this.a=this.keySystem=c;a=!1;c===_.Le&&(this.a=ug,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,
472
- this.a)&&(f.push(k),e=!0));h||(e=b.canPlayType(_.ig,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.uf||a||(e=!1);if(e){this.f=g;return}}b=Qb;if(c===_.Le||c===_.zd)b="None of the requested configurations were supported.";c=Error(b);c.name=sb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){return Promise.resolve(new Yt(this.g,this.a))}getConfiguration(){return this.f}},Yt=class{constructor(a,b){this.g=a;this.o=b;this.a=null;this.f=new _.hs;this.j=[];this.l=new Map}createSession(a=
473
- Rf){if(a!==Rf&&a!==_.Pe)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=bb,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new Zt(this.g,this.a,this.o,a);this.j.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},Zt=class extends _.Us{constructor(a,b,c,d){super();this.w=a;this.j=b;this.o=!1;this.a=this.f=null;this.g=c;this.l=d;this.sessionId="";this.expiration=NaN;this.closed=new _.an;this.keyStatuses=
474
- new Qt}ready(){_.fh("WebkitEmeManager.MediaKeySession.ready");Uq(this,"usable");this.a&&this.a.resolve();this.a=null}generateRequest(a,b){_.fh("WebkitEmeManager.MediaKeySession.generateRequest");return Xq(this,b,null)}load(a){_.fh(Wb);return this.l===_.Pe?Xq(this,null,a):Promise.reject(Error(pb))}update(a){_.fh(Wb);const b=new _.an;Yq(this,b,a);return b}close(){_.fh("WebkitEmeManager.MediaKeySession.close");if(this.l!==_.Pe){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),
475
- this.closed;const a=Wq(this,"cancelKeyRequest");try{this.j[a](this.g,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed}remove(){_.fh("WebkitEmeManager.MediaKeySession.remove");return this.l!==_.Pe?Promise.reject(Error(pb)):this.close()}};jm(new class{a(){return"WEBKIT"}isSupported(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new Xt}});var bu=class extends _.Zs{constructor(a,b,c,d,e){super(ab);this.l=a;this.j=b;this.g=c;this.a=d;this.o=e;this.h=new _.R(ld);_.vi(this.l)?this.h.warn(_.Xb):this.Qa(_.zd,{licenseUrl:this.l,videoRobustness:[_.Fb,void 0],audioRobustness:[_.Eb,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.dd.bind(this)}});_.vi(this.j)?this.h.warn(_.vb):this.Qa(_.xd,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.dd.bind(this)}});
476
- _.vi(this.g)?this.h.warn(_.Ua):_.vi(this.a)?this.h.warn(_.Ta):this.Qa(_.vd,{licenseUrl:this.g,certificateUrl:this.a,modifiers:{licenseRequest:this.xf.bind(this),licenseResponse:this.yf.bind(this),certificateRequest:this.dd.bind(this),extractContentId:this.cf.bind(this)}})}dd(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}cf(a,b){a=Gl(b);switch(this.o){case $t:return a;case au:return(new _.Hl(a)).a;default:throw Error("Unknown content ID strategy");}}xf(a,b){b.headers[ua]=
477
- Fc;this.dd(a,b);a={spc:_.zi(b.body)};b.body=_.ri(_.hj(a,!0))}yf(a,b){a=_.li(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=_.Bi(a).buffer}};_.z(ld,bu);bu.prototype.onFairPlayLicenseResponse=bu.prototype.yf;bu.prototype.onFairPlayLicenseRequest=bu.prototype.xf;bu.prototype.extractFairPlayContentId=bu.prototype.cf;bu.prototype.onLicenseRequest=bu.prototype.dd;bu.prototype.constructor=bu.prototype.constructor;bu.NAME=ab;
478
- var au="hostname",$t="full-skd";bu.FairPlayContentIdStrategy={HOSTNAME:au,FULL_SKD:$t};_.z("clpp.drm.HeaderDrmComponent",class extends _.Nt{g(a){a=a.getConfiguration();if(a.drm&&a.drm&&a.drm.env===ab){a=a.drm.customData;if(!a)throw new _.H(_.F,7,7100,_.Ad);a=new bu(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||$t);_.ll(a)}}a(){delete _.kl.HeaderDrm}id(){return"headerdrm"}});_.Go(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=_.J(c);a=new Uint8Array(this,a,b-a);d.set(a);return c})});_.Go(function(){_.fh("mathRound.install")});_.Go(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;Xd in document||(Object.defineProperty(document,Xd,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
479
- {get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Zq);document.addEventListener("webkitfullscreenerror",Zq);document.addEventListener("mozfullscreenchange",Zq);document.addEventListener("mozfullscreenerror",Zq);document.addEventListener("MSFullscreenChange",Zq);document.addEventListener("MSFullscreenError",Zq)}});_.Go(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.fh("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=ar,document.exitPictureInPicture=br,document.addEventListener("webkitpresentationmodechanged",$q,!0))}});_.Go(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=cr)}});_.Go(function(){if(window.VTTCue)_.eh("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.eh(Rb),window.VTTCue=dr;else if(6===a)_.eh("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=er;else{try{var b=!!dr(1,2,"")}catch(c){b=!1}b&&(_.eh(Rb),window.VTTCue=dr)}}else _.gh("VTTCue not available.")});var fr;_.Go(function(){_.fh("InputEvent.install");_.Tj("Trident/")&&HTMLInputElement.prototype.addEventListener!==gr&&(_.eh("Patching input event support on IE."),fr=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=gr)});_.Go(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.Go(function(){_.fh("VideoPlayPromise.install");if(window.HTMLMediaElement){const a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){const b=a.apply(this);b&&b.catch(()=>{});return b}}});var jr=class{constructor(){this.a=hr()}};var cu=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.g=b;this.f=0}};_.du=class{constructor(a,b,c){this.g=a;this.j=b;this.f=c||this.g.getMedia();this.a=null}start(){this.a=new ResizeObserver(a=>{a=a[0];this.j(a.contentRect.width,a.contentRect.height,this.g.isFullscreen())});this.f&&this.a.observe(this.f)}stop(){this.a&&(this.a.disconnect(),this.a=null)}};var eu;_.fu=class{constructor(){this.a=new Blob([eu],{type:_.ig})}canPlay(a){var b=document.createElement(_.w);b.setAttribute("playsinline","playsinline");a&&(b.muted=!0,b.setAttribute("muted","muted"));b.src=URL.createObjectURL(this.a);const c=new _.an;b=b.play();const d=(new _.Qj(()=>{d.stop();c.resolve(a)})).fa(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===sb?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
480
- eu=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,
462
+ U.prototype.getAdManagerName=U.prototype.vb;var Lt=class{name(){}isSupported(){}create(){}};_.z("clpp.ads.IAdsManagerFactory",Lt);Lt.prototype.create=Lt.prototype.create;Lt.prototype.isSupported=Lt.prototype.isSupported;Lt.prototype.name=Lt.prototype.name;var Mt=class{load(){}start(){}resume(){}pause(){}skip(){}getVolume(){}setVolume(){}getPosition(){}dispose(){}};_.z("clpp.ads.IAdsManager",Mt);Mt.prototype.getPosition=Mt.prototype.getPosition;Mt.prototype.setVolume=Mt.prototype.setVolume;Mt.prototype.getVolume=Mt.prototype.getVolume;Mt.prototype.skip=Mt.prototype.skip;Mt.prototype.pause=Mt.prototype.pause;Mt.prototype.resume=Mt.prototype.resume;var Nt=class{load(){return Promise.resolve()}start(a){return a.play()}resume(){}pause(){}skip(){}getVolume(){return 1}setVolume(){}getPosition(){return-1}dispose(){return _.x(function*(){})}};Nt.prototype.dispose=Nt.prototype.dispose;Nt.prototype.getPosition=Nt.prototype.getPosition;Nt.prototype.setVolume=Nt.prototype.setVolume;Nt.prototype.getVolume=Nt.prototype.getVolume;Nt.prototype.skip=Nt.prototype.skip;Nt.prototype.pause=Nt.prototype.pause;Nt.prototype.resume=Nt.prototype.resume;
463
+ Nt.prototype.start=Nt.prototype.start;Nt.prototype.load=Nt.prototype.load;var po=class{name(){return"clpp.ads.NopAdsManagerFactory"}isSupported(){return!0}create(){return new Nt}};po.prototype.create=po.prototype.create;po.prototype.isSupported=po.prototype.isSupported;po.prototype.name=po.prototype.name;var Ot=class{getCuePoints(){}Pb(){}pb(){}};_.z("clpp.ads.IAdsTimeline",Ot);Ot.prototype.hasPostroll=Ot.prototype.pb;Ot.prototype.hasPreroll=Ot.prototype.Pb;Ot.prototype.getCuePoints=Ot.prototype.getCuePoints;_.Pt=class{f(){}a(){}g(){}o(){}};var Qt=class{constructor(){this.j=null;this.h=new _.R("clpp.drm.eme.StandardEmeManager")}l(a){this.j=a}g(a){return this.j?this.j.setMediaKeys(a):Promise.reject(jb)}o(){return this.j&&this.j.mediaKeys}a(a,b){this.h.debug("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=>{c.message&&(c=Error(`${c.message} (keySystem: ${a})`));return Promise.reject(c)})}f(){return Db}};
464
+ jm(new class{a(){return Db}isSupported(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new Qt}},1E3);var St=class{constructor(){this.size=0;this.a=void 0;this.h=new _.R("clpp.drm.eme.MediaKeyStatusMap")}getStatus(){return this.a}forEach(a){this.a&&a(this.a,Rt.value())}get(a){if(this.has(a))return this.a}has(a){const b=Rt.value();return this.a&&di(a,b)?!0:!1}entries(){}keys(){}values(){}},Rt=new _.qt(()=>ji(new Uint8Array([0])));var Tt=class{l(){}g(a){_.fh("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}o(){return null}a(){_.fh("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return"NOP"}};jm(new class{a(){return"NOP"}isSupported(){return!0}create(){return new Tt}},-1);var Vt=class{constructor(){this.j=this.w=null}l(a){this.w=a}g(a){const b=this.j;b&&b!==a&&Uq(b,null);return(this.j=a)?Uq(a,this.w):Promise.resolve()}o(){return this.j}a(a,b){_.fh("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new Ut(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return"APPLE"}},Ut=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.ud))for(var c of b){a:{a=c;if(a.persistentState===_.tf){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
465
+ persistentState:_.Je,distinctiveIdentifier:_.Je,initDataTypes:a.initDataTypes,sessionTypes:[Qf],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),
466
+ e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.ig));a=e?b:null}if(a){this.a=a;return}}c=Error(Pb);c.name=sb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new Wt(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.fh("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},Wt=class{constructor(a){this.f=null;this.g=new WebKitMediaKeys(a);this.a=new _.ks;this.j=0;this.h=new _.R(ld);this.h.info("Created Media Keys for "+a)}createSession(a){a=
467
+ void 0===a?Qf:a;this.h.debug("Creating Apple MediaKeys Session");if(a!==Qf)throw new TypeError("Session type "+a+ba);return new Xt(this.g,`__session_${this.j++}`)}setServerCertificate(){this.h.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},Xt=class extends _.Xs{constructor(a,b){super();this.a=null;this.o=a;this.f=this.g=null;this.j=new _.ks;this.sessionId=b;this.expiration=NaN;this.closed=new _.an;this.l=!1;this.keyStatuses=new St;this.h=new _.R(ld)}generateRequest(a,
468
+ b){if(this.l)return Promise.reject(Gb);this.h.debug("generateRequest");this.g=new _.an;try{const c=this.o.createSession(_.ig,_.J(b));this.a=c;this.sessionId=c.sessionId||this.sessionId||"";this.j.on(c,xg,d=>{{const e=this.keyStatuses.getStatus();this.h.debug(`Received Key Message in ${this.sessionId}`);this.g&&(this.g.resolve(),this.g=null);d=new _.E(_.ue,{messageType:void 0===e||e===Kf?ge:fe,message:ji(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,vg,d=>{this.h.debug("onWebkitKeyAdded_",
469
+ d);this.f&&(Vq(this,"usable"),this.f.resolve(),this.f=null)});this.j.on(c,wg,()=>{var d=this.keyStatuses.getStatus();if(this.a&&this.a&&this.a.error&&this.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&d===Kf)this.h.warn(`Ignoring webkit key error for session ${this.sessionId}`);else if(this.h.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.g)this.g.reject(d),
470
+ this.g=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:Vq(this,"output-not-allowed");break;default:Vq(this,_.be)}});Vq(this,Kf)}catch(c){this.g.reject(c)}return this.g}load(){this.h.debug("load");return Promise.reject(Error("MediaKeySession.load not yet supported"))}update(a){if(this.l)return Promise.reject(Gb);this.h.debug(Zf);this.f=new _.an;try{this.a.update(_.J(a))}catch(b){this.f.reject(b)}return this.f}close(){if(this.l)return this.closed;
471
+ this.h.info(`Closing Key Session ${this.sessionId}`);this.l=!0;try{this.a.close(),this.closed.resolve(),_.mh(this.j)}catch(a){this.closed.reject(a)}return this.closed}remove(){this.h.debug("remove");return Promise.reject(Error("MediaKeySession is only applicable for persistent licenses, which are not supported on this platform"))}};jm(new class{a(){return"APPLE"}isSupported(){return!!window.WebKitMediaKeys}create(){return new Vt}},1100);var Zt=class{constructor(){this.w=this.j=null;this.A="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.A="webkit")}l(a){this.j=a}g(a){_.fh("WebkitEmeManager.setMediaKeys");if(!this.j)return Promise.reject(jb);const b=this.w;b&&b!==a&&Yq(b,null);(this.w=a)&&Yq(a,this.j);return Promise.resolve()}o(){return this.w}a(a,b){_.fh("WebkitEmeManager.requestMediaKeySystemAccess");try{if(this.j)var c=this.j;else{var d=document.getElementsByTagName(_.w);c=d.length?d[0]:document.createElement(_.w)}const e=
472
+ new Yt(this.A,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return"WEBKIT"}},Yt=class{constructor(a,b,c,d){this.g=a;this.a=this.keySystem=c;a=!1;c===_.Ke&&(this.a=ug,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,
473
+ this.a)&&(f.push(k),e=!0));h||(e=b.canPlayType(_.ig,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.tf||a||(e=!1);if(e){this.f=g;return}}b=Pb;if(c===_.Ke||c===_.yd)b="None of the requested configurations were supported.";c=Error(b);c.name=sb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){return Promise.resolve(new $t(this.g,this.a))}getConfiguration(){return this.f}},$t=class{constructor(a,b){this.g=a;this.o=b;this.a=null;this.f=new _.ks;this.j=[];this.l=new Map}createSession(a=
474
+ Qf){if(a!==Qf&&a!==_.Oe)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=bb,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new au(this.g,this.a,this.o,a);this.j.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},au=class extends _.Xs{constructor(a,b,c,d){super();this.w=a;this.j=b;this.o=!1;this.a=this.f=null;this.g=c;this.l=d;this.sessionId="";this.expiration=NaN;this.closed=new _.an;this.keyStatuses=
475
+ new St}ready(){_.fh("WebkitEmeManager.MediaKeySession.ready");Xq(this,"usable");this.a&&this.a.resolve();this.a=null}generateRequest(a,b){_.fh("WebkitEmeManager.MediaKeySession.generateRequest");return $q(this,b,null)}load(a){_.fh(Vb);return this.l===_.Oe?$q(this,null,a):Promise.reject(Error(pb))}update(a){_.fh(Vb);const b=new _.an;ar(this,b,a);return b}close(){_.fh("WebkitEmeManager.MediaKeySession.close");if(this.l!==_.Oe){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),
476
+ this.closed;const a=Zq(this,"cancelKeyRequest");try{this.j[a](this.g,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed}remove(){_.fh("WebkitEmeManager.MediaKeySession.remove");return this.l!==_.Oe?Promise.reject(Error(pb)):this.close()}};jm(new class{a(){return"WEBKIT"}isSupported(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new Zt}});var du=class extends _.bt{constructor(a,b,c,d,e){super(ab);this.l=a;this.j=b;this.g=c;this.a=d;this.o=e;this.h=new _.R(kd);_.vi(this.l)?this.h.warn(_.Wb):this.Qa(_.yd,{licenseUrl:this.l,videoRobustness:[_.Fb,void 0],audioRobustness:[_.Eb,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.dd.bind(this)}});_.vi(this.j)?this.h.warn(_.vb):this.Qa(_.wd,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.dd.bind(this)}});
477
+ _.vi(this.g)?this.h.warn(_.Ua):_.vi(this.a)?this.h.warn(_.Ta):this.Qa(_.ud,{licenseUrl:this.g,certificateUrl:this.a,modifiers:{licenseRequest:this.xf.bind(this),licenseResponse:this.yf.bind(this),certificateRequest:this.dd.bind(this),extractContentId:this.cf.bind(this)}})}dd(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}cf(a,b){a=Gl(b);switch(this.o){case bu:return a;case cu:return(new _.Hl(a)).a;default:throw Error("Unknown content ID strategy");}}xf(a,b){b.headers[ua]=
478
+ Ec;this.dd(a,b);a={spc:_.zi(b.body)};b.body=_.ri(_.hj(a,!0))}yf(a,b){a=_.li(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=_.Bi(a).buffer}};_.z(kd,du);du.prototype.onFairPlayLicenseResponse=du.prototype.yf;du.prototype.onFairPlayLicenseRequest=du.prototype.xf;du.prototype.extractFairPlayContentId=du.prototype.cf;du.prototype.onLicenseRequest=du.prototype.dd;du.prototype.constructor=du.prototype.constructor;du.NAME=ab;
479
+ var cu="hostname",bu="full-skd";du.FairPlayContentIdStrategy={HOSTNAME:cu,FULL_SKD:bu};_.z("clpp.drm.HeaderDrmComponent",class extends _.Pt{g(a){a=a.getConfiguration();if(a.drm&&a.drm&&a.drm.env===ab){a=a.drm.customData;if(!a)throw new _.H(_.F,7,7100,_.zd);a=new du(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||bu);_.ll(a)}}a(){delete _.kl.HeaderDrm}id(){return"headerdrm"}});_.Go(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=_.J(c);a=new Uint8Array(this,a,b-a);d.set(a);return c})});_.Go(function(){_.fh("mathRound.install")});_.Go(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;Wd in document||(Object.defineProperty(document,Wd,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
480
+ {get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",br);document.addEventListener("webkitfullscreenerror",br);document.addEventListener("mozfullscreenchange",br);document.addEventListener("mozfullscreenerror",br);document.addEventListener("MSFullscreenChange",br);document.addEventListener("MSFullscreenError",br)}});_.Go(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.fh("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=dr,document.exitPictureInPicture=er,document.addEventListener("webkitpresentationmodechanged",cr,!0))}});_.Go(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=fr)}});_.Go(function(){if(window.VTTCue)_.eh("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.eh(Qb),window.VTTCue=gr;else if(6===a)_.eh("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=hr;else{try{var b=!!gr(1,2,"")}catch(c){b=!1}b&&(_.eh(Qb),window.VTTCue=gr)}}else _.gh("VTTCue not available.")});var ir;_.Go(function(){_.fh("InputEvent.install");_.Tj("Trident/")&&HTMLInputElement.prototype.addEventListener!==jr&&(_.eh("Patching input event support on IE."),ir=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=jr)});_.Go(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.Go(function(){_.fh("VideoPlayPromise.install");if(window.HTMLMediaElement){const a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){const b=a.apply(this);b&&b.catch(()=>{});return b}}});var mr=class{constructor(){this.a=kr()}};var eu=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.g=b;this.f=0}};_.fu=class{constructor(a,b,c){this.g=a;this.j=b;this.f=c||this.g.getMedia();this.a=null}start(){this.a=new ResizeObserver(a=>{a=a[0];this.j(a.contentRect.width,a.contentRect.height,this.g.isFullscreen())});this.f&&this.a.observe(this.f)}stop(){this.a&&(this.a.disconnect(),this.a=null)}};var gu;_.hu=class{constructor(){this.a=new Blob([gu],{type:_.ig})}canPlay(a){var b=document.createElement(_.w);b.setAttribute("playsinline","playsinline");a&&(b.muted=!0,b.setAttribute("muted","muted"));b.src=URL.createObjectURL(this.a);const c=new _.an;b=b.play();const d=(new _.Qj(()=>{d.stop();c.resolve(a)})).fa(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===sb?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
481
+ gu=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,
481
482
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
482
483
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
483
484
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
484
485
  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,
485
486
  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,
486
- 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]);_.gu=class{constructor(a,b,c,d){this.id=a;this.f=b;this.a=c;this.g=d}getDuration(){return this.a}getId(){return this.id}ob(){return this.f}Wc(){return this.g}wc(a){return this.getId()===a.getId()&&this.ob()===a.ob()&&this.getDuration()===a.getDuration()&&this.Wc()===a.Wc()}};_.z("clpp.media.TimelineWindow",_.gu);_.gu.prototype.isDynamic=_.gu.prototype.Wc;_.gu.prototype.getStart=_.gu.prototype.ob;_.gu.prototype.getId=_.gu.prototype.getId;_.gu.prototype.getDuration=_.gu.prototype.getDuration;_.hu=new _.R("clpp.media.TimestampParser");_.iu=class{constructor(){this.a=[];this.f=-1;this.g=null}Eg(a){return this.a[a]||null}Fg(){return this.a.length}Gg(){return this.a}gf(){return this.a[this.f]||null}zg(){return this.f}};_.z("clpp.media.Timeline",_.iu);_.iu.prototype.getCurrentWindowIndex=_.iu.prototype.zg;_.iu.prototype.getCurrentWindow=_.iu.prototype.gf;_.iu.prototype.getWindows=_.iu.prototype.Gg;_.iu.prototype.getWindowCount=_.iu.prototype.Fg;_.iu.prototype.getWindow=_.iu.prototype.Eg;_.or={};_.qr={};var Pr=class{constructor(a){this.a=new Uint8Array(a||65536);this.f=0;this.g=new jr}};var ur=window.XMLHttpRequest;var Or=class{constructor(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.j=new cu(a);this.length=a;this.A=b;this.f=this.a=this.g=0;this.l=null;this.o=-1;this.w=new jr}};var Ms=class extends _.io{constructor(a){super(new _.an,()=>Promise.resolve());this.B=a;this.g=null;this.w=this.P;this.f=-1;this.j=this.l=this.o=null;Er(this)}then(a,b){this.P=this.P.then(a,b);return this}catch(a){this.P=this.P.catch(a);return this}abort(){if(this.a)return Promise.resolve();this.a=!0;return this.g.then(a=>{this.o&&clearTimeout(this.o);this.l&&this.l();return a.abort()}).catch(()=>{})}};_.ku=class{constructor(a){this.a=!1;this.g=a;this.j=Ir(this);this.g.qc(this.j);this.f=null}enabled(){return this.a}hf(){return this.a&&this.f&&this.f.has(ju)?1E3*this.f.get(ju):null}release(){this.f=null;this.a=!1;this.g.ed(this.j)}};_.ku.prototype.getEstimatedThroughput=_.ku.prototype.hf;var ju="etp",Gr={Bh:ju},Hr=new _.R("clpp.net.CmsdManager");var Nr=window.fetch,Kr=window.AbortController,Jr=window.Headers;_.Ur={};_.mu=class{constructor(a){a=a.getConfiguration();a=_.Ng(a.textStyle||a.textstyle||{});this.K=typeof a.backgroundColor===_.Nf?a.backgroundColor:null;this.S=typeof a.windowColor===_.Nf?a.windowColor:null;this.N=typeof a.fontColor===_.Nf?a.fontColor:null;this.R=typeof a.fontFamily===_.Nf?a.fontFamily:null;this.I=typeof a.fontSize===_.Nf?a.fontSize:null;this.C=typeof a.fontSizePercent===_.t?a.fontSizePercent:null;this.H=typeof a.edgeColor===_.Nf?a.edgeColor:"rgba(0, 0, 0, 1)";this.w=null;typeof a.edgeType===
487
- _.Nf&&(this.w=a.edgeType)}getBackgroundColor(){return this.K}setBackgroundColor(a){this.K=a;this.g()}getWindowColor(){return this.S}setWindowColor(a){this.S=a;this.g()}getFontFamily(){return this.R}setFontFamily(a){this.R=a;this.g()}getFontColor(){return this.N}setFontColor(a){this.N=a;this.g()}getFontSize(){return this.I}setFontSize(a){this.I=a;this.g()}getFontSizePercent(){return null===this.C?lu:this.C}setFontSizePercent(a){this.C=a;this.g()}getEdgeColor(){return this.H}setEdgeColor(a){this.H=
488
- a;this.g()}getEdgeType(){return this.w}setEdgeType(a){this.w=a;this.g()}};_.mu.prototype.setEdgeType=_.mu.prototype.setEdgeType;_.mu.prototype.getEdgeType=_.mu.prototype.getEdgeType;_.mu.prototype.setEdgeColor=_.mu.prototype.setEdgeColor;_.mu.prototype.getEdgeColor=_.mu.prototype.getEdgeColor;_.mu.prototype.setFontSizePercent=_.mu.prototype.setFontSizePercent;_.mu.prototype.getFontSizePercent=_.mu.prototype.getFontSizePercent;_.mu.prototype.setFontSize=_.mu.prototype.setFontSize;
489
- _.mu.prototype.getFontSize=_.mu.prototype.getFontSize;_.mu.prototype.setFontColor=_.mu.prototype.setFontColor;_.mu.prototype.getFontColor=_.mu.prototype.getFontColor;_.mu.prototype.setFontFamily=_.mu.prototype.setFontFamily;_.mu.prototype.getFontFamily=_.mu.prototype.getFontFamily;_.mu.prototype.setWindowColor=_.mu.prototype.setWindowColor;_.mu.prototype.getWindowColor=_.mu.prototype.getWindowColor;_.mu.prototype.setBackgroundColor=_.mu.prototype.setBackgroundColor;
490
- _.mu.prototype.getBackgroundColor=_.mu.prototype.getBackgroundColor;var lu=1/15;var Yr="raised",Zr="depressed",as="dropshadow",$r="uniform";_.z("clpp.text.EdgeType",{NONE:_.Ce,RAISED:Yr,DEPRESSED:Zr,DROP_SHADOW:as,UNIFORM:$r});_.Vr(Ac,class{constructor(a){this.f=a;this.a=null;this.h=new _.R("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.Wr(_.Bc);c?(b=new c(this.f),b.parseInit(a)):this.h.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=_.Wr(_.Cc);c?(b=new c(this.f),b.parseInit(a)):this.h.warn("The clpp.vtt.Mp4VttParser class is not available. Please register the vtt component first.")}catch(c){b=null}if(b)this.a=
491
- b;else throw new _.H(_.F,2,2011);}}parseMedia(a,b){if(!this.a)throw new _.H(_.F,2,2011);return this.a.parseMedia(a,b)}});var nu;
492
- _.ou=class extends _.mu{constructor(a){super(a);this.o=a.getSurface().getMedia();this.f=`clpp-video-${nu++}`;this.j=document.createElement(_.Pf);this.l=this.A=!1;_.so(this.o,this.f);document.head.appendChild(this.j);this.g()}append(){}remove(){return!0}isTextVisible(){return this.A}setTextVisibility(a){this.A=a}g(){if(!this.l){var a={"background-color":this.getBackgroundColor(),color:this.getFontColor(),"font-family":this.getFontFamily(),"font-size":this.getFontSize(),"text-shadow":_.bs(this)},b=
493
- 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()}};nu=0;_.An("native",new class{isSupported(){return!0}create(a){return new _.ou(a)}});_.pu=class{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;
487
+ 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]);_.iu=class{constructor(a,b,c,d){this.id=a;this.f=b;this.a=c;this.g=d}getDuration(){return this.a}getId(){return this.id}ob(){return this.f}Wc(){return this.g}wc(a){return this.getId()===a.getId()&&this.ob()===a.ob()&&this.getDuration()===a.getDuration()&&this.Wc()===a.Wc()}};_.z("clpp.media.TimelineWindow",_.iu);_.iu.prototype.isDynamic=_.iu.prototype.Wc;_.iu.prototype.getStart=_.iu.prototype.ob;_.iu.prototype.getId=_.iu.prototype.getId;_.iu.prototype.getDuration=_.iu.prototype.getDuration;_.ju=new _.R("clpp.media.TimestampParser");_.ku=class{constructor(){this.a=[];this.f=-1;this.g=null}Eg(a){return this.a[a]||null}Fg(){return this.a.length}Gg(){return this.a}gf(){return this.a[this.f]||null}zg(){return this.f}};_.z("clpp.media.Timeline",_.ku);_.ku.prototype.getCurrentWindowIndex=_.ku.prototype.zg;_.ku.prototype.getCurrentWindow=_.ku.prototype.gf;_.ku.prototype.getWindows=_.ku.prototype.Gg;_.ku.prototype.getWindowCount=_.ku.prototype.Fg;_.ku.prototype.getWindow=_.ku.prototype.Eg;_.rr={};_.tr={};var Ur=class{constructor(a){this.a=new Uint8Array(a||65536);this.f=0;this.g=new mr}};var xr=window.XMLHttpRequest;var Tr=class{constructor(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.j=new eu(a);this.length=a;this.A=b;this.f=this.a=this.g=0;this.l=null;this.o=-1;this.w=new mr}};var Ps=class extends _.io{constructor(a){super(new _.an,()=>Promise.resolve());this.B=a;this.g=null;this.w=this.P;this.f=-1;this.j=this.l=this.o=null;Hr(this)}then(a,b){this.P=this.P.then(a,b);return this}catch(a){this.P=this.P.catch(a);return this}abort(){if(this.a)return Promise.resolve();this.a=!0;return this.g.then(a=>{this.o&&clearTimeout(this.o);this.l&&this.l();return a.abort()}).catch(()=>{})}};_.mu=class{constructor(a){this.a=!1;this.g=a;this.j=Lr(this);this.g.qc(this.j);this.f=null}enabled(){return this.a}hf(){return this.a&&this.f&&this.f.has(lu)?1E3*this.f.get(lu):null}release(){this.f=null;this.a=!1;this.g.ed(this.j)}};_.mu.prototype.getEstimatedThroughput=_.mu.prototype.hf;var lu="etp",Jr={Bh:lu},Kr=new _.R("clpp.net.CmsdManager");var Qr=window.fetch,Nr=window.AbortController,Mr=window.Headers;_.Xr={};_.ou=class{constructor(a){a=a.getConfiguration();a=_.Ng(a.textStyle||a.textstyle||{});this.K=typeof a.backgroundColor===_.Mf?a.backgroundColor:null;this.S=typeof a.windowColor===_.Mf?a.windowColor:null;this.N=typeof a.fontColor===_.Mf?a.fontColor:null;this.R=typeof a.fontFamily===_.Mf?a.fontFamily:null;this.I=typeof a.fontSize===_.Mf?a.fontSize:null;this.C=typeof a.fontSizePercent===_.t?a.fontSizePercent:null;this.H=typeof a.edgeColor===_.Mf?a.edgeColor:"rgba(0, 0, 0, 1)";this.w=null;typeof a.edgeType===
488
+ _.Mf&&(this.w=a.edgeType)}getBackgroundColor(){return this.K}setBackgroundColor(a){this.K=a;this.g()}getWindowColor(){return this.S}setWindowColor(a){this.S=a;this.g()}getFontFamily(){return this.R}setFontFamily(a){this.R=a;this.g()}getFontColor(){return this.N}setFontColor(a){this.N=a;this.g()}getFontSize(){return this.I}setFontSize(a){this.I=a;this.g()}getFontSizePercent(){return null===this.C?nu:this.C}setFontSizePercent(a){this.C=a;this.g()}getEdgeColor(){return this.H}setEdgeColor(a){this.H=
489
+ a;this.g()}getEdgeType(){return this.w}setEdgeType(a){this.w=a;this.g()}};_.ou.prototype.setEdgeType=_.ou.prototype.setEdgeType;_.ou.prototype.getEdgeType=_.ou.prototype.getEdgeType;_.ou.prototype.setEdgeColor=_.ou.prototype.setEdgeColor;_.ou.prototype.getEdgeColor=_.ou.prototype.getEdgeColor;_.ou.prototype.setFontSizePercent=_.ou.prototype.setFontSizePercent;_.ou.prototype.getFontSizePercent=_.ou.prototype.getFontSizePercent;_.ou.prototype.setFontSize=_.ou.prototype.setFontSize;
490
+ _.ou.prototype.getFontSize=_.ou.prototype.getFontSize;_.ou.prototype.setFontColor=_.ou.prototype.setFontColor;_.ou.prototype.getFontColor=_.ou.prototype.getFontColor;_.ou.prototype.setFontFamily=_.ou.prototype.setFontFamily;_.ou.prototype.getFontFamily=_.ou.prototype.getFontFamily;_.ou.prototype.setWindowColor=_.ou.prototype.setWindowColor;_.ou.prototype.getWindowColor=_.ou.prototype.getWindowColor;_.ou.prototype.setBackgroundColor=_.ou.prototype.setBackgroundColor;
491
+ _.ou.prototype.getBackgroundColor=_.ou.prototype.getBackgroundColor;var nu=1/15;var as="raised",bs="depressed",ds="dropshadow",cs="uniform";_.z("clpp.text.EdgeType",{NONE:_.Be,RAISED:as,DEPRESSED:bs,DROP_SHADOW:ds,UNIFORM:cs});_.Yr(zc,class{constructor(a){this.f=a;this.a=null;this.h=new _.R("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.Zr(_.Ac);c?(b=new c(this.f),b.parseInit(a)):this.h.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=_.Zr(_.Bc);c?(b=new c(this.f),b.parseInit(a)):this.h.warn("The clpp.vtt.Mp4VttParser class is not available. Please register the vtt component first.")}catch(c){b=null}if(b)this.a=
492
+ b;else throw new _.H(_.F,2,2011);}}parseMedia(a,b){if(!this.a)throw new _.H(_.F,2,2011);return this.a.parseMedia(a,b)}});var pu;
493
+ _.qu=class extends _.ou{constructor(a){super(a);this.o=a.getSurface().getMedia();this.f=`clpp-video-${pu++}`;this.j=document.createElement(_.Of);this.l=this.A=!1;_.so(this.o,this.f);document.head.appendChild(this.j);this.g()}append(){}remove(){return!0}isTextVisible(){return this.A}setTextVisibility(a){this.A=a}g(){if(!this.l){var a={"background-color":this.getBackgroundColor(),color:this.getFontColor(),"font-family":this.getFontFamily(),"font-size":this.getFontSize(),"text-shadow":_.es(this)},b=
494
+ 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()}};pu=0;_.An("native",new class{isSupported(){return!0}create(a){return new _.qu(a)}});_.ru=class{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;