@castlabs/prestoplay 6.23.1 → 6.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/CHANGELOG.md +14 -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 +113 -113
  6. package/cjs/cl.conviva.js +32 -32
  7. package/cjs/cl.core.js +608 -591
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +87 -86
  10. package/cjs/cl.externs.js +94 -30
  11. package/cjs/cl.freewheel.js +25 -24
  12. package/cjs/cl.hls.js +73 -71
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +30 -30
  15. package/cjs/cl.ima.js +23 -23
  16. package/cjs/cl.mse.js +344 -339
  17. package/cjs/cl.muxdata.js +15 -15
  18. package/cjs/cl.onboard.js +3 -3
  19. package/cjs/cl.persistent.js +14 -13
  20. package/cjs/cl.playlist.js +6 -6
  21. package/cjs/cl.sessions.js +16 -16
  22. package/cjs/cl.simid.js +15 -15
  23. package/cjs/cl.smooth.js +72 -72
  24. package/cjs/cl.thumbnails.js +26 -26
  25. package/cjs/cl.tizen.js +71 -71
  26. package/cjs/cl.ttml.js +29 -29
  27. package/cjs/cl.verimatrix.js +5 -5
  28. package/cjs/cl.vimond.js +12 -12
  29. package/cjs/cl.vr.js +19 -19
  30. package/cjs/cl.vtt.js +14 -14
  31. package/cjs/cl.yospace.js +4 -4
  32. package/cjs/cl.youbora.js +37 -37
  33. package/cl.adobe.js +3 -3
  34. package/cl.airplay.js +3 -3
  35. package/cl.broadpeak.js +5 -5
  36. package/cl.cast.js +88 -88
  37. package/cl.conviva.js +27 -27
  38. package/cl.core.js +492 -478
  39. package/cl.crypto.js +9 -9
  40. package/cl.dash.js +81 -80
  41. package/cl.externs.js +94 -30
  42. package/cl.freewheel.js +19 -19
  43. package/cl.hls.js +75 -74
  44. package/cl.hlssmpte.js +5 -5
  45. package/cl.htmlcue.js +26 -26
  46. package/cl.ima.js +17 -17
  47. package/cl.mse.js +307 -305
  48. package/cl.muxdata.js +13 -13
  49. package/cl.onboard.js +4 -4
  50. package/cl.persistent.js +10 -10
  51. package/cl.playlist.js +5 -5
  52. package/cl.sessions.js +10 -10
  53. package/cl.simid.js +13 -13
  54. package/cl.smooth.js +59 -59
  55. package/cl.thumbnails.js +19 -19
  56. package/cl.tizen.js +57 -57
  57. package/cl.ttml.js +22 -22
  58. package/cl.verimatrix.js +4 -4
  59. package/cl.vimond.js +8 -8
  60. package/cl.vr.js +14 -14
  61. package/cl.vtt.js +12 -12
  62. package/cl.yospace.js +3 -3
  63. package/cl.youbora.js +28 -28
  64. package/package.json +1 -1
  65. package/typings.d.ts +44 -10
package/cl.core.js CHANGED
@@ -1,339 +1,358 @@
1
- let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,ka,na,sa,ta,va,wa,xa,ya,Oa,Pa,Ua,Va,Wa,Xa,Za,ab,bb,fb,gb,ib,jb,kb,lb,mb,ob,pb,ub,xb,Eb,Fb,Ib,Mb,Pb,Qb,Tb,Ub,Wb,Xb,jc,kc,lc,Gc,Lc,Qc,Xc,Yc,fd,gd,hd,jd,kd,ld,nd,od,pd,qd,rd,sd,zd,Bd,Gd,Md,Nd,Od,Pd,Rd,Sd,Td,Xd,Yd,$d,ee,le,ne,oe,ye,Re,Ye,$e,af,bf,cf,df,ef,ff,gf,hf,jf,nf,of,qf,rf,sf,tf,vf,zf,Bf,Qf,Tf,Zf,eg,hg,ng,zg,Dg,Eg,Fg,Gg,Hg,Jg,Kg,Lg,Rg,Sg,Vg,Wg,ah,Yg,ih,jh,lh,oh,qh,yh,Bh,zh,Dh,Eh,Ih,Ch,Jh,Hh,Kh,Lh,Fh,Gh,Qh,Yh,Zh,Rh,Xh,Wh,Vh,bi,di,ci,fi,gi,hi,ii,li,mi,oi,qi,ui,wi,yi,si,Bi,Fi,
2
- Hi,Ji,Ii,Ki,Li,Mi,Pi,Qi,Ti,sj,tj,yj,zj,Aj,Cj,Dj,Ej,Fj,Hj,Ij,Jj,Kj,Lj,Mj,Pj,Sj,Wj,Xj,bk,dk,Yj,ak,ck,ek,fk,gk,ik,jk,qk,yk,zk,Dk,Ik,Hk,Uk,Nk,Mk,fl,gl,il,jl,kl,ll,ml,nl,pl,ol,ql,rl,ul,vl,wl,hl,yl,Al,Cl,Fl,Hl,Ml,Nl,Ol,Pl,Ql,Rl,Sl,Tl,Ul,Vl,am,jm,lm,rm,ym,Am,Hm,Rm,Dm,Mm,Xm,Ym,Zm,an,bn,cn,fn,dn,en,gn,jn,kn,nn,vn,wn,Dn,Gn,Hn,Jn,Ln,Mn,On,En,Kn,Pn,Qn,Rn,Sn,ao,Un,bo,Tn,Vn,Wn,co,io,ko,mo,lo,oo,go,wo,to,vo,uo,jo,xo,yo,zo,Ao,Bo,Co,Do,Eo,Ko,Lo,Mo,So,To,Vo,Po,Oo,bp,cp,gp,fp,ip,kp,lp,mp,hp,op,pp,qp,up,zp,Ap,Bp,Cp,
3
- Dp,Ep,Gp,Hp,Ip,Jp,Kp,Lp,Wp,Mp,Np,Op,Pp,Qp,Rp,Sp,Tp,Up,Vp,dq,eq,fq,Zp,gq,bq,aq,Yp,cq,hq,iq,jq,mq,uq,vq,wq,tq,Cq,xq,yq,zq,Aq,Bq,kq,lq,nq,oq,pq,Fq,Iq,rq,sq,Lq,Pq,Qq,Oq,Rq,Nq,Mq,Tq,Vq,Xq,Zq,$q,ar,br,cr,dr,er,fr,gr,hr,ir,mr,qr,nr,sr,wr,yr,Ar,Cr,Dr,Er,Fr,Hr,Qr,Ir,Jr,Kr,Lr,Sr,Or,Tr,Wr,Xr,Yr,Ur,Vr,Zr,$r,cs,gs,hs,ks,ms,ns,ls,is,bs,fs,ds,es,ts,us,vs,ws,xs,ys,zs,As,Cs,Ds,Es,Gs,Is,Ns,Os,Ps,Rs,Ss,Ts,Vs,Ws,Us,Xs,$s,Zs,Ys,dt,ct,it,Tg,Ug;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";
4
- _.da="#text";_.ea="6.23.1";_.fa="AdaptationSet";_.ha="Already destroyed. No-op";_.ia="Already released. No-op";_.ja="Autoplay is not allowed due to browser policy.";ka="Autoplay should not be used for preloaded streams. ";_.la="BANDWIDTH";_.ma="BASIC";na="CHECKSUM";_.oa="CODECS";_.pa="Cannot retrieve buffer information due to platform limitations";_.qa="CastlabsPlayer";_.ra="Configuration is valid";sa="Content-Length";ta="Content-Type";_.ua="Could not find configured DRM environment.";va="DRM licenses loaded";
5
- wa="DRMtoday";xa="DRMtodayOnboard";ya="Destroying player";_.za="EXT-X-BYTERANGE";_.Aa="EXT-X-DATERANGE";_.Ba="EXT-X-DISCONTINUITY";_.Ca="EXT-X-DISCONTINUITY-SEQUENCE";_.Da="EXT-X-ENDLIST";_.Ea="EXT-X-KEY";_.Fa="EXT-X-MAP";_.Ga="EXT-X-MEDIA-SEQUENCE";_.Ha="EXT-X-PART-INF";_.Ia="EXT-X-PLAYLIST-TYPE";_.Ja="EXT-X-PRELOAD-HINT";_.Ka="EXT-X-PROGRAM-DATE-TIME";_.La="EXT-X-SERVER-CONTROL";_.Na="EXT-X-TARGETDURATION";Oa="Error while decoding string!";Pa="Error while fetching certificate!";_.Qa="FairPlay Certificate URL is not defined";
6
- _.Ra="FairPlay License URL is not defined";_.Sa="GROUP-ID";Ua="HW_SECURE_ALL";Va="HW_SECURE_CRYPTO";Wa="HW_SECURE_DECODE";Xa="HeaderDrm";Za="InvalidStateError";_.$a="LANGUAGE";ab="License verification failed: ";bb="Load interrupted while a player release is pending";_.cb="Loading player with configuration";_.db="MaxHeight";_.eb="MaxWidth";fb="Missing media element";gb="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";ib="No event provided!";jb="No items in the playlist";
7
- kb="No sources provided!";lb="No track data attached to the event, unable to add track!";mb="Not a persistent session.";_.nb="Not supported";ob="NotAllowedError";pb="NotSupportedError";_.qb="PLAYLIST";_.rb="POST";_.tb="PlayReady License URL is not defined";ub="Player not ready yet.";_.vb="Player sources";_.wb="Please make sure ";xb="Preloading is not supported by this player.";_.yb="QualityLevel";_.zb="RESOLUTION";_.Ab="Representation";_.Bb="SW_SECURE_CRYPTO";_.Cb="SW_SECURE_DECODE";Eb="Session is closed";
8
- Fb="Skipping Session creation. License for init data was already requested in ";_.Gb="SmoothStreamingMedia";_.Hb="TYPE";Ib="The index is not in the allowed range.";_.Jb="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";Ub="WebkitEmeManager.MediaKeySession.load";_.Vb="Widevine License URL is not defined";Wb="Will create EME Manager: ";
9
- Xb="X-AD-CREATIVE-SIGNALING";_.Yb="X-ASSET-LIST";_.Zb="X-ASSET-URI";_.$b="X-PLAYOUT-LIMIT";_.ac="X-RESUME-OFFSET";_.cc="ad-break-started";_.ec="ad-break-stopped";_.fc="ad-buffering";_.gc="ad-clicked";_.hc="ad-completed";_.ic="ad-first-quartile";jc="ad-hls-asset-list-request";kc="ad-hls-asset-list-response";lc="ad-hls-resoled";_.mc="ad-impression";_.nc="ad-loaded";_.oc="ad-midpoint";_.pc="ad-paused";_.qc="ad-progress";_.rc="ad-resumed";_.tc="ad-skipped";_.uc="ad-started";_.xc="ad-stopped";_.yc="ad-third-quartile";
10
- _.zc="addtrack";_.Ac="ads-timeline-changed";_.Bc="airplay-casting-ended";_.Cc="airplay-casting-started";_.Dc="airplay-status-changed";_.Ec="application/cea-608";_.Fc="application/dash+xml";Gc="application/mp4";_.Hc='application/mp4; codecs\x3d"stpp"';_.Ic='application/mp4; codecs\x3d"wvtt"';_.Jc="application/ttml+xml";_.Kc="application/vnd.ms-sstr+xml";Lc="application/x-www-form-urlencoded";_.p="audio";_.Mc="audio/aac";_.Nc="audio/ac3";_.Oc="audio/eac3";_.Pc="audio/mp4";Qc='audio/mp4;codecs\x3d"mp4a.40.2"';
11
- _.Rc="audiobufferchanged";_.Sc="autoplaynotallowed";_.Tc="bitratechanged";_.Uc="boolean";_.Vc="bufferingended";_.Wc="bufferingstarted";Xc="canplay";Yc="canplaythrough";_.Zc="castingstarted";_.$c="caststatuschanged";_.ad="cdn-switch-success";_.dd="cenc";_.ed="center";fd="certificate-request";gd="change";hd="chrome";_.id="clpp-fill";jd="clpp-hidden";kd="clpp-mc-playlist";ld="clpp-visible";_.md="clpp.cast.CastSender";nd="clpp.drm.HeaderDrm";od="clpp.drm.eme.AppleEmeManager";pd="clpp.drm.eme.EmeFactory";
12
- qd="clpp.native.Player";rd="clpp.plist.McPlaylist";sd="clpp.utils.Platform";_.td="codecs";_.ud="column-reverse";_.vd="com.adobe.primetime";_.wd="com.apple.fps";_.yd="com.apple.hls.interstitial";zd="com.apple.quicktime.HLS";_.Ad="com.microsoft.playready";Bd="com.microsoft.playready.recommendation";_.Cd="com.widevine.alpha";_.Dd="config.drm.customData is not defined";_.Ed="content-steering-change";_.Fd="content-steering-location-ban-update";Gd="controls";_.Hd="cuechange";_.Id="decoder";_.Jd="destroy()";
13
- _.Kd="disabled";_.Ld="div";Md="drm.mediaKeys.end";Nd="drm.mediaKeys.start";Od="drm.onPlay.end";Pd="drm.onPlay.start";_.Qd="drmexpirationupdate";Rd="drmlicenserequested";Sd="drmrenewalstarted";Td="drmsessioncreated";_.Vd="drmsessionpersisted";_.Wd="drmsessionupdate";Xd="drmtoday";Yd="durationchange";_.Zd="ec-3";$d="encrypted";_.ae="end";_.be="ended";_.r="error";_.ce="estimatedThroughputKbps";_.de="forced";ee="fullscreenElement";_.fe="function";_.ge="height";_.he="hidden";_.ie="html";_.je="image";
14
- _.ke="internal-error";le="keystatuseschange";_.me="left";ne="license-renewal";oe="license-request";_.pe="line-left";_.qe="line-right";_.re="live-turned-static";_.se="load";_.we="loadeddata";_.xe="loadedmetadata";ye="loadstart";_.ze="main";_.Ae="mdat";_.Be="mdia";_.Ce="message";_.De="metadata";_.Ee="mimeType";_.Fe="minf";_.Ge="moov";_.He="mpd-type-changed";_.Ie="mpeg-dash-callback-event";_.Je="none";_.t="number";_.Ke="object";_.Le="onBitrateChanged()";_.Me="onContentLoaded";_.Ne="onPlayerError()";
15
- _.Oe="onPlayerWillDestroy";_.Pe="onPlayerWillRelease";_.Qe="onStateChanged()";Re="online-status-changed";_.Se="optional";_.Te="org.w3.clearkey";_.Ue="output-restricted";_.Ve="pause";_.We="persistent";_.Xe="persistent-license";Ye="picture-in-picture";_.Ze="play";$e="player.afterLoad.end";af="player.afterLoad.start";bf="player.appendLoad.end";cf="player.appendLoad.start";df="player.beforeLoad.end";ef="player.beforeLoad.start";ff="player.load.end";gf="player.load.start";hf="player.setupPlaylist.end";
16
- jf="player.setupPlaylist.start";_.kf="playing";_.lf="playlist-item-changed";_.mf="playlist-modified";nf="playlist.next.end";of="playlist.next.start";qf="preload-aborted";rf="preload-failed";sf="preloaded";tf="preloading";_.uf="prevent";vf="primary-content";_.wf="progress";_.xf="px";_.yf="ratechange";zf="released";_.Af="releasing";Bf="removetrack";_.Cf="required";_.Df="resize";_.Ef="right";_.Ff="sc-playlist-ended";_.Gf="sc-playlist-item-changed";_.Hf="sc-playlist-live-turned-static";_.If="sc-playlist-timeline-changed";
17
- _.Jf="seeked";_.Kf="seeking";_.Lf="showing";_.Mf="simid-creative-started";_.Nf="simid-creative-stopped";_.Of="sinf";_.Pf="smooth";Qf="stalled";_.Rf="start";_.Sf="statechanged";Tf="status-pending";_.Uf="stbl";_.Vf="string";_.Wf="stsd";_.Xf="style";_.Yf="subtitles-htmlcue";Zf="temporary";_.$f="text/vtt";_.ag="text/xml";_.bg="timeupdate";_.cg="trak";_.dg="ttml-xml";eg="unauthenticated";_.fg="und";_.gg="unknown";hg="update";_.ig="urn:scte:scte35";_.jg="urn:scte:scte35:2014";_.kg="user-seeked";_.lg="user-seeking";
18
- _.mg="value";ng="version";_.pg="vertical-lr";_.qg="vertical-rl";_.w="video";_.ug="video/mp2t";_.vg="video/mp4";_.wg="videobufferchanged";_.xg="videotrackchanged";_.yg="vimond-response";zg="visibilitychange";_.Ag="vtt-xml";_.Bg="waiting";_.Cg="waitingforkey";Dg="webkit-org.w3.clearkey";Eg="webkitkeyadded";Fg="webkitkeyerror";Gg="webkitkeymessage";Hg="webkitneedkey";_.Ig="width";Jg="x-dt-csl-tracking-token";Kg="x-dt-follow-up-token";Lg="x-dt-resp-code";_.Mg="yospace-session-ended";_.Ng="yospace-session-started";
19
- _.Qg=function(a){return function(){return _.Pg[a].apply(this,arguments)}};Rg=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};Sg=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:Rg(a)}};Vg=function(a,b){if(b){var c=Tg;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&&Ug(c,a,{configurable:!0,writable:!0,value:b})}};
20
- Wg=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 Wg(a())};_.z=function(a,b){a=a.split(".");var c=Xg;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};
21
- _.$g=function(a){return _.B(a)||Yg(a)?a:_.Zg(a)};_.Zg=function(...a){let b={};for(let c=0;c<a.length;c++)null!=a[c]&&(b=ah(b,{merging:a[c]},1));return b.merging||null};_.bh=function(a){for(const b in a)if(void 0!==a[b])return!0;return!1};
22
- ah=function(a,b,c){const d=c+1;if(_.B(a)||!_.ch(a))a={};for(const e in b)c=b[e],Yg(c)||_.B(c)||_.dh(c)||c instanceof Element?a[e]=c:_.ch(c)&&c.buffer&&c.buffer instanceof ArrayBuffer&&_.dh(c.subarray)?a[e]=c.subarray(0):c instanceof Array?a[e]=ah([],c,d):!_.B(c)&&_.eh(c)&&20>d&&(a[e]=ah(a[e],c,d));return a};Yg=function(a){a=typeof a;return a===_.Vf||a===_.t||a===_.Uc};_.B=function(a){return null===a||"undefined"===typeof a};_.ch=function(a){return typeof a===_.Ke};
23
- _.dh=function(a){return typeof a===_.fe};_.fh=function(a){return typeof a===_.Vf};_.gh=function(a){return typeof a===_.t};_.eh=function(a){if(_.B(a)||!_.ch(a))return!1;a=Object.getPrototypeOf(a);return a===Object.prototype||null===a};
24
- _.hh=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||!_.ch(a)||!_.ch(b))return!1;const e=c||Object.keys(a),f={};for(let g=0;g<e.length;g++){const h=e[g];if(_.B(d)||0>d.indexOf(h))if(f[h]=!0,a[h]!==b[h])return!1}if(_.B(c))for(a=Object.keys(b),b=0;b<a.length;b++)if(c=a[b],(_.B(d)||0>d.indexOf(c))&&!f[c])return!1;return!0};
25
- ih=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:b=>b!==b)(a)};jh=function(a){const b=new Map;for(const c of Object.keys(a))b.set(c,a[c]);return b};_.kh=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};lh=function(a,b){b=b.toLowerCase();for(const [c,d]of Object.entries(a))if(c.toLowerCase()===b)return d;return null};oh=function(a){return a&&0<=mh[a]?mh[a]:nh};
26
- qh=function(a){if(!a)return _.C("clpp.log",Mb+a+ca),-1;const b=ph[a.toUpperCase()];return void 0===b?(_.C("clpp.log",Mb+a+ca),-1):b};_.sh=function(a){rh.info.apply(rh,arguments)};_.th=function(a){rh.debug.apply(rh,arguments)};_.C=function(a){rh.warn.apply(rh,arguments)};_.uh=function(a){rh.error.apply(rh,arguments)};_.xh=function(a){if(a){var b=a.a();b in _.vh?_.wh.warn("Player-Factory '"+b+"' already registered"):(_.vh[b]=a,_.wh.info("Registered Player-Factory: '"+b+"'"))}};
27
- yh=function(a){return Object.values(_.vh).find(a)||null};_.Ah=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)zh(b[c]);a.a.clear()};Bh=function(a,b,c){var d=[$d,"msneedkey",Hg,"needkey"];const e=f=>{for(const g of d)a.off(b,g,e);c(f)};for(const f of d)a.on(b,f,e)};zh=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};Dh=function(a){return Ch(a).filter(b=>b.type===zd&&!b.Me)};Eh=function(a){a.forEach(b=>{b.Me=!0})};
28
- Ih=function(a,b){a=a.map(c=>({startTime:c.startTime,endTime:c.endTime,key:c.value.key,value:c.value.data,Uf:!1}));a=Fh(a);b&&(a=Gh(a));return new Set(Hh(a))};Ch=function(a){const b=[];for(const c of a)b.push(c);return b};Jh=function(a,b){const c=a.endTime-a.startTime,d=b.endTime-b.startTime,e=a.Cf||a.startTime,f=b.Cf||b.startTime;return(Infinity===c&&Infinity===d||.01>Math.abs(c-d))&&.5>Math.abs(e-f)&&a.value.key===b.value.key&&a.value.data===b.value.data};
29
- Hh=function(a){const b=[];for(const c of a)(a=b.find(d=>d.startTime===c.startTime&&d.endTime===c.endTime))?Kh(c,a):(a=Lh(c),b.push(a));return b};Kh=function(a,b){if(a.key.startsWith("X-"))b.customAttributes||(b.customAttributes={}),b.customAttributes[a.key]=a.value,"X-CUSTOM-ID"===a.key&&(b.id=a.value);else if("SCTE35-OUT"===a.key||"SCTE35-IN"===a.key)b.schemeIdUri=_.jg,b.type=_.Mh};
30
- Lh=function(a){var b=a.startTime;const c=a.endTime;b={schemeIdUri:"",value:"",startTime:b,endTime:c,id:`T${b.toFixed(2)}-${c.toFixed(2)}`,type:_.Ph,eventElement:null};Kh(a,b);return b};Fh=function(a){const b=new Set(a),c=new Set(a.filter(d=>"SCTE35-OUT"===d.key).map(Qh));a.filter(d=>"SCTE35-IN"===d.key).forEach(d=>{c.has(Qh(d))||(d.Uf=!0)});return Array.from(b.values())};Gh=function(a){a.forEach(b=>{b.Uf&&(b.endTime=b.startTime,b.startTime=0)});return a};Qh=function(a){return`${a.startTime}-${a.endTime}`};
31
- Yh=function(a,b){a.g.debug("onMetadataTrackAdded_()");b.mode=_.he;var c=!b.cues||0===b.cues.length;if(a.m.isLive()||!c){var d=b.cues;c=Dh(d);Eh(c);a.a=Ih(c,a.l);0<a.a.size&&(Rh(a,a.a),a.m.trigger(new _.E(_.Sh)));a.j.on(b,_.Hd,()=>{{const l=a.m.getPosition();for(const m of a.a){var e,f=a,g=m,h=l;if(Infinity===g.endTime){if(e=!f.f.has(g)){e=g.startTime;var k=e+.5;e=e<=h&&h<=k}e&&(f.f.add(g),f.m.trigger(new _.E(_.Th,{detail:g})))}else h=g.startTime<=h&&h<=g.endTime,!h&&f.f.has(g)?(f.f.delete(g),f.m.trigger(new _.E(_.Uh,
32
- {detail:g}))):h&&!f.f.has(g)&&(f.f.add(g),f.m.trigger(new _.E(_.Th,{detail:g})))}}});a.m.isLive()&&(a.h=setInterval(()=>{if(b.cues){var e=a.m.getSeekRange().start;var f=[];for(var g of b.cues)g.endTime<e&&f.push(g);Vh(a,b,f);0<f.length&&a.g.debug(`Evicted ${f.length} old cues.`);for(var h of a.a)h.endTime<e&&a.a.delete(h);e=0<f.length}else e=!1;Wh(a,b);f=Dh(d);var k=Ih(f,a.l);g=new Set;h=!1;for(l of k)(k=Xh(a,l))?(l.customAttributes&&(k.customAttributes=_.Zg(k.customAttributes||{},l.customAttributes)||
33
- void 0),h=!0):(a.a.add(l),g.add(l));var l={Dh:g,Hg:0<g.size||h};const {Dh:m,Hg:n}=l;Eh(f);(e||n)&&a.m.trigger(new _.E(_.Sh));Rh(a,m)},6E3))}};Zh=function(a,b){a.j.on(b,_.zc,c=>{c=c.track;c.kind===_.De&&Yh(a,c)})};Rh=function(a,b){for(const c of b)a.m.trigger(new _.E(_.$h,{detail:c}))};Xh=function(a,b){return Array.from(a.a.values()).find(c=>b.startTime===c.startTime&&b.endTime===c.endTime)||null};
34
- Wh=function(a,b){if(b.cues){var c=Ch(b.cues).filter(f=>f.type===zd),d=c.filter(f=>f.Me);c=c.filter(f=>!f.Me);var e=[];for(const f of c)for(const g of d)Jh(f,g)&&(e.push(f),g.Cf=f.startTime);Vh(a,b,e);0<e.length&&a.g.debug(`Removed ${e.length} duplicated cues.`)}};Vh=function(a,b,c){for(const d of c)try{b.removeCue(d)}catch(e){a.g.debug("Failed to remove cue",d,e)}};_.ai=function(a){return Array.isArray(a)?a:[a]};bi=function(a,b){return a===b?!0:a.length===b.length&&a.every((c,d)=>c===b[d])};
35
- di=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 ci(a,b)&&ci(b,a)};ci=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};_.ei=function(a,b={}){if(b.Af){const c=[];for(const d of a)c.some(e=>b.Af(d,e))||c.push(d);return c}return Array.from((new Set(a)).values())};fi=function(a,b){const c=new Set(a),d=new Set(b);return{Qh:a.filter(e=>!d.has(e)),Li:a.filter(e=>d.has(e)),Eg:b.filter(e=>!c.has(e))}};
36
- gi=function(a,b){b=b.track;b.kind!==_.De&&(b.mode===_.Lf&&(b.mode=_.he),a.a.on(b,_.Hd,c=>{c=c.target||c.srcElement;c.mode=_.he;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.l.append(c,[]))}))};hi=function(a,b,c,d){a=`${a===_.F?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.fh(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};
37
- ii=function(a,b){const c=b||bi;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)}};_.ji=function(a){return null!=a};li=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}throw new _.ki("No non-null, non-undefined value found");};mi=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}};
38
- _.ni=function(a){var b;a instanceof _.ni?(oi(this,a.ub),this.uc=a.uc,_.pi(this,a.kb),qi(this,a.Nc),this.Ia=a.Ia,_.ri(this,si(a.a)),this.mc=a.mc):a&&(b=String(a).match(ti))?(oi(this,b[1]||"",!0),this.uc=ui(b[2]||""),_.pi(this,b[3]||"",!0),qi(this,b[4]),this.Ia=ui(b[5]||"",!0),_.ri(this,b[6]||"",!0),this.mc=ui(b[7]||"")):this.a=new _.vi(null)};oi=function(a,b,c){a.ub=c?ui(b,!0):b;a.ub&&(a.ub=a.ub.replace(/:$/,""))};_.pi=function(a,b,c){a.kb=c?ui(b,!0):b};
39
- qi=function(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Nc=b}else a.Nc=null};_.ri=function(a,b,c){b instanceof _.vi?a.a=b:(c||(b=wi(b,xi)),a.a=new _.vi(b))};ui=function(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""};wi=function(a,b,c){return typeof a===_.Vf?(a=encodeURI(a).replace(b,yi),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null};yi=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)};_.vi=function(a){this.f=a||null};
40
- _.zi=function(a){if(!a.a&&(a.a={},a.h=0,a.f))for(var b=a.f.split("\x26"),c=0;c<b.length;c++){var d=b[c].indexOf("\x3d"),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}};si=function(a){var b=new _.vi;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.h=a.h}return b};
41
- Bi=function(a,b){const c=Ai[a];for(const d of c)for(const e of b)if(d.test(e.trim()))return e.trim();return a===_.G?"":null};_.J=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};_.Di=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Ci.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.Ei=function(a,b){a=_.Di(a);b=_.Di(b);return a.split("-")[0]===b.split("-")[0]};
42
- Fi=function(a){return a.reduce((b,c)=>b+c,0)};_.Gi=function(a,b){for(const c of a)if(!b(c))return!1;return!0};Hi=function*(a){for(let b=0;b<a;b++)yield b};Ji=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!==b.byteLength)return!1;if(Ii(a)===Ii(b)&&(a.byteOffset||0)===(b.byteOffset||0))return!0;const c=_.K(a);b=_.K(b);for(const d of Hi(a.byteLength))if(c[d]!==b[d])return!1;return!0};Ii=function(a){return a instanceof ArrayBuffer?a:a.buffer};_.K=function(a,b=0,c=Infinity){return Ki(a,b,c,Uint8Array)};
43
- Ki=function(a,b,c,d){const e=d.BYTES_PER_ELEMENT||1,f=Ii(a),g=(a.byteOffset||0)+a.byteLength;a=Math.max(0,Math.min((a.byteOffset||0)+b*e,g));c=Math.min(a+Math.max(c*e,0),g);a/=e;return new d(f,a,c/e-a)};Li=function(a,b=0,c=Infinity){return Ki(a,b,c,Uint16Array)};Mi=function(a,b=0,c=Infinity){return Ki(a,b,c,Uint32Array)};_.Ni=function(a,b=0,c=Infinity){return Ki(a,b,c,Int32Array)};_.Oi=function(a,b=0,c=Infinity){return Ki(a,b,c,DataView)};
44
- Pi=function(a){return a instanceof ArrayBuffer?a:0===a.byteOffset&&a.byteLength===a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};Qi=function(a){let b="";for(let c=0;c<a.length;c+=16E3)b+=String.fromCharCode.apply(null,a.subarray(c,c+16E3));return b};
45
- _.Ri=function(a){if(!a)return"";a=_.K(a);239===a[0]&&187===a[1]&&191===a[2]&&(a=a.subarray(3));if("TextDecoder"in window){a=(new TextDecoder).decode(a);if(a.includes("\ufffd"))throw Error(Oa);return a}a=escape(Qi(a));try{return decodeURIComponent(a)}catch(b){throw Error(Oa);}};
46
- Ti=function(a,b,c){if(!a)return"";if(!c&&0!==a.byteLength%2)throw Si.error("Data has an incorrect length, must be even."),Error("Data does not seem to be UTF-16 encoded!");c=_.K(a);if(b&&255===c[0]&&254===c[1]||254===c[0]&&255===c[1])a=c.subarray(2);if(a instanceof ArrayBuffer)var d=a;else c=new Uint8Array(a.byteLength),c.set(_.K(a)),d=c.buffer;a=Math.floor(a.byteLength/2);c=new Uint16Array(a);d=new DataView(d);for(let e=0;e<a;e++)c[e]=d.getUint16(2*e,b);return Qi(c)};
47
- _.Ui=function(a,b){if(_.fh(a))return a;let c="";b=!!b;const d=_.K(a);239===d[0]&&187===d[1]&&191===d[2]?c=_.Ri(d):254===d[0]&&255===d[1]?c=Ti(d.subarray(2),!1):255===d[0]&&254===d[1]&&(c=Ti(d.subarray(2),!0));const e=function(f,g){return f.byteLength<=g||32<=f[g]&&126>=f[g]}.bind(null,d);Si.debug("Unable to find byte-order-mark, making an educated guess.");0===d[0]&&0===d[2]?c=Ti(a,!1):0===d[1]&&0===d[3]?c=Ti(a,!0):e(0)&&e(1)&&e(2)&&e(3)&&(c=_.Ri(a));if(c)return b&&(c=escape(c)),c;throw Error("Unable to detect text encoding");
48
- };_.Vi=function(a){if("TextEncoder"in window)return(new TextEncoder).encode(a);a=encodeURIComponent(a);a=unescape(a);const b=new Uint8Array(a.length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};_.Wi=function(a,b){const c=new Uint8Array(2*a.length),d=new DataView(c.buffer);for(let e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c.buffer};
49
- _.Xi=function(a,b){var c=b||1;b=a.length;const d=new ArrayBuffer(b*c);let e;4===c?e=Mi(d):2===c?e=Li(d):e=_.K(d);for(c=0;c<b;c++)e[c]=a.charCodeAt(c);return d};_.Yi=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.Zi=function(a,b){if(String.prototype.endsWith)return a.endsWith(b);const c=a.length-b.length;a=a.lastIndexOf(b,c);return-1!==a&&a===c};_.$i=function(a){return!!(a&&0<a.length)};_.aj=function(a){return!a||0===a.length};
50
- _.bj=function(a){if(void 0===a||null===a||""===a)return"";try{let b=Number(a);if(ih(b))return"";a="bps";1E3<=Math.abs(b)&&(a="Kbps",b/=1E3);1E3<=Math.abs(b)&&(a="Mbps",b/=1E3);return`${b.toFixed(2).replace(/[.,]00$/,"")}${a}`}catch(b){return""}};_.dj=function(a){a=a.replace(/<[^>]+>/gi,"");cj.innerHTML=a;a=cj.textContent;return a=a.replace(/<[^>]+>/gi,"")};_.fj=function(a,b=!0){a=_.ej(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")};_.ej=function(a){a=Qi(_.K(a));return btoa(a)};
51
- _.gj=function(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));const b=new Uint8Array(a.length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};_.hj=function(a){const b=new Uint8Array(a.length/2);for(let c=0;c<a.length;c+=2)b[c/2]=window.parseInt(a.substr(c,2),16);return b};_.ij=function(a){let b="";for(let c=0;c<a.length;++c){let d=a[c].toString(16);1===d.length&&(d="0"+d);b+=d}return b};
52
- _.jj=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.length!==b.length)return!1;for(let c=0;c<a.length;++c)if(a[c]!==b[c])return!1;return!0};_.kj=function(a){var b=0;for(var c=0;c<arguments.length;++c)b+=arguments[c].length;b=new Uint8Array(+b);c=0;for(let d=0;d<arguments.length;++d)b.set(arguments[d],c),c+=arguments[d].length;return b};
53
- _.lj=function(a,b){b.lastIndex=a.a;b=b.exec(a.f);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.a===a.f.length||null===b||b.position!==a.a)return null;a.a+=b.length;return b.results};
54
- _.pj=function(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new _.H(_.F,4,4016,{invalidTag:b});b=c[1];var d=c[2];c=[];let e;if(d){d=new _.mj(d);var f;(f=_.lj(d,/^([^,=]+)(?:,|$)/g))&&f[1]&&(e=f[1].trim());const g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;for(;f=_.lj(d,g);)c.push(new _.nj(f[1],f[2]||f[3]||""))}return new _.oj(a,b,c,e)};_.rj=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0,fatalStatusCodes:[...qj]}};
55
- sj=function(a,b){a.timeout=b.timeout;a.baseDelay=b.baseDelay;a.backoffFactor=b.backoffFactor;a.fuzzFactor=b.fuzzFactor;a.maxAttempts=b.maxAttempts;a.fatalStatusCodes=b.fatalStatusCodes||[...qj]};tj=function(a){const b={};a.forEach((c,d)=>{b[d.trim()]=c});return b};
56
- _.xj=function(a,b){_.fh(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});const c={uris:a.uris||[],type:a.type||_.wj,uriIndex:0,method:a.method||"GET",body:a.body||null,headers:Object.assign({},a.headers),allowCrossSiteCredentials:a.allowCrossSiteCredentials||!1,onProgress:a.onProgress||null,onFragment:a.onFragment||null,maxAttempts:a.maxAttempts||1,currentAttempt:0,baseDelay:a.baseDelay||1E3,backoffFactor:a.backoffFactor||2,fuzzFactor:a.fuzzFactor||.5,timeout:a.timeout||0,requestModifiers:a.requestModifiers||
57
- [],responseModifiers:a.responseModifiers||[],startTime:a.startTime||null,endTime:a.endTime||null,contentType:a.contentType||null,licenseRequestType:a.licenseRequestType||null,sessionId:null,bytesRemaining:-1,bytesLoaded:-1,bytesTotal:-1,timescale:a.timescale||null,rateLimitBps:a.rateLimitBps||null,disableFragmentSupport:a.disableFragmentSupport||!1,disableMergedFragments:a.disableMergedFragments||!1,fatalStatusCodes:[...qj],requestStartTimestamp:null};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&sj(c,b);return c};
58
- _.Bj=function(a,b,c,d,e,f,g,h){a={uri:e||d,data:b,headers:a,status:c,timeMs:g,responseStartMs:h,request:f};if(yj(c))return zj(a);throw Aj(a);};yj=function(a){return 200<=a&&299>=a&&202!==a};zj=function(a){return{uri:a.uri,data:a.data||new ArrayBuffer(0),headers:a.headers,status:a.status,fromCache:!!a.headers["x-shaka-from-cache"],timeMs:a.timeMs,responseStartMs:a.responseStartMs,request:a.request}};
59
- Aj=function(a){a=zj(a);try{var b=_.Ui(a.data,!0)}catch(d){b=null}_.th("HTTP error text:",b);const c=a.request;return new _.H(0<=(c?c.fatalStatusCodes||[]:[]).indexOf(a.status)?_.F:1,1,1001,{url:a.uri,status:a.status,responseText:b,headers:a.headers,request:a.request,response:a})};Cj=function(a,b){b=parseInt(b,10);Number.isNaN(b)&&(b=-1);a.bytesTotal=b;a.bytesLoaded=0;a.bytesRemaining=b};Dj=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b);a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};
60
- Ej=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()};Fj=function(a,b){a.U.then(()=>b(!0),()=>b(!1));return a};_.Gj=function(a,b){a.a.push(Fj(b,()=>{{var c=a.a;const d=c.indexOf(b);-1<d&&c.splice(d,1)}}))};Hj=function(a,b){return _.x(function*(){const c=yield a.fetch(b);return _.Ri(c.data).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")})};
61
- Ij=function(a,b){return _.x(function*(){const c=yield Hj(a,b);try{const d=JSON.parse(c);if(null==d||typeof d!==_.Ke)throw Error("Not an object");return d}catch(d){throw new _.ki("Failed to parse JSON response","json-failed");}})};Jj=function(a,b){for(const c of a.headers){const [d,e]=c;b.headers[d]||(b.headers[d]=e)}};
62
- Kj=function(a,b){const c=new _.ni(b.uris[b.uriIndex]);let d=c.ub;d||(d=location.protocol,d=d.slice(0,-1),oi(c,d),b.uris[b.uriIndex]=c.toString());const e=a.a[d];if(!e)throw new _.H(_.F,1,1E3,{url:c.toString()});return f=>e(f)};Lj=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.x(function*(){if(!navigator.onLine)return!1;if(b){const e=_.xj(b,c);e.method=d;c||(e.timeout=5E3);e.headers["cache-control"]="no-cache";try{yield a.fetch(e).U}catch(f){if(1002===f.code||1003===f.code)return!1}}return!0})};
63
- Mj=function(a){return`@@scheme:${a.scheme||""}`+`@@value:${a.value}`+`@@id:${a.id||""}@@type:${a.type||""}`+`@@protocol:${a.protocol||""}`};_.Nj=function(a){return a&&a!==_.fg?a:null};
64
- Pj=function(a){if(!a)throw new _.H(_.F,3,3101,`Invalid track type: ${a}`);if(!_.fh(a))throw new _.H(_.F,3,3101,`Invalid track type: ${a}. Track type must be a string!`);switch(a.toLowerCase()){case _.L:return _.L;case _.M:return _.M;case _.N:return _.N;case Oj:return Oj}throw new _.H(_.F,3,3101,`Unknown track type: ${a}.`);};
65
- Sj=function(a,b){a=Pj(a);const c=_.Nj(b.kind);let d=b.id;d||(d=String(_.Qj++));a=new _.Rj(d,c===_.De?Oj:a);a.kind=c;a.label=_.Nj(b.label);a.language=_.Nj(b.language);a.originalLanguage=b.originalLanguage||a.language;return a};_.Tj=function(a){return`${a.scheme}//`+`${a.a}${a.port?":"+a.port:""}${a.path}${a.h}${a.f}`};
66
- _.Uj=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)},""):""};_.Vj=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};
67
- Wj=function(a,b){return a.startsWith("http:://")||a.startsWith("https:://")?a:(new URL(a,b)).toString()};Xj=function(a,b){return _.x(function*(){const c=_.xj(b);return yield Hj(a.f,c)})};bk=function(a,b,c){return _.x(function*(){const {mimeType:d,renditions:e}=yield Yj(a,b,c),f=new _.Rj("dummy",_.N),g=e.map((h,k)=>{k=new _.Zj(`R${k}`,f);k.bandwidth=h.bandwidth;k.Pc=h.Pc;k.codec=h.codec;k.width=h.width;k.height=h.height;return k});ak(g);return{renditions:g,mimeType:d||void 0}})};
68
- dk=function(a){a=a.split("\n").filter(c=>c.trim().startsWith("#EXT-X-MEDIA:")).map(c=>ck(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};Yj=function(a,b,c){return _.x(function*(){const d=ek(b),e=fk(b,c);return{mimeType:yield gk(a,e,d[0]?d[0].codec:null),renditions:d}})};
69
- ak=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.");};ck=function(a){const b=_.pj(0,a);a=d=>(d=b.getAttribute(d))?d.value:void 0;var c=a(_.Hb);c=null!=c?{AUDIO:_.M,VIDEO:_.N,SUBTITLES:_.L}[c]:void 0;return{type:c,groupId:a(_.Sa),name:a("NAME"),language:a(_.$a),vi:a("AUTOSELECT"),default:a("DEFAULT"),Di:a("FORCED"),zf:a("CHARACTERISTICS"),uri:a(_.Jb)}};
70
- ek=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.pj(0,b);if(c.getAttribute(_.Rb))throw Error("Playlist contains alternative video streams.");var d=_.J(c,_.zb);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.J(c,_.la);e=e?Number(e):null;var f=_.J(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.J(c,_.oa);c=_.hk(_.w,c?c.split(","):[]);return b={bandwidth:e,Pc:f,codec:c,width:b,height:d,mimeType:null}})};
71
- fk=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?Wj(a,b):null};gk=function(a,b,c){return _.x(function*(){if(!b||!c)return null;var d=yield Xj(a,b);d=[ik(d,b),jk(d,b)].filter(Boolean);return _.kk(d,_.w,c)})};ik=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?Wj(a,b):null};jk=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.J(_.pj(0,a),_.Jb))?Wj(a,b):null:null};
72
- _.mk=function(a,b,c){for(const d of _.lk)if(d.probe(b,c))return d.create(a);return null};_.nk=function(a){a=_.lk.indexOf(a);0<=a&&_.lk.splice(a,1)};qk=function(a,b){var c=ok;pk.set(`${a.toLowerCase().split(";")[0]}-${c}`,{priority:c,plugin:b})};_.uk=function(a,b){var c=[rk,sk,tk,ok];for(const d of c)if(c=pk.get(`${a.toLowerCase().split(";")[0]}-${d}`)){const e=c.plugin(),f=e.isSupported(a,b);e.destroy();if(f)return c.plugin}return null};
73
- _.vk=function(a,b){b&&(a+=';codecs\x3d"'+b+'"');return a.replace(/\s/g,"")};_.wk=function(a){return a.split(";")[0]};_.xk=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(","):""};yk=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};
74
- zk=function(a){return 0>=a?Promise.resolve():new Promise(b=>{setTimeout(()=>{b()},1E3*a)})};Dk=function(){if(Ak)return Ak;Bk||(Bk=new _.Ck(()=>{Ak=null}));(Ak=document.querySelector(_.w)||document.querySelector(_.p))||(Ak=document.createElement(_.w));Bk.ga(1);return Ak};_.Ek=function(){return!!navigator.userAgent.match(/Edge?\//)};_.Fk=function(a){return(navigator.userAgent||"").includes(a)};_.Gk=function(a){return _.Fk("Tizen"+(a?" "+String(a):""))};
75
- Ik=function(a){const b={major:-1,name:_.gg};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=Hk(a,c[0]));2<=c.length&&(b.minor=Hk(a,c[1]));3<=c.length&&(b.patch=Hk(a,c[2]));4<=c.length&&(b.build=Hk(a,c[3]));return b};_.Jk=function(){return _.Fk("Web0S")};_.Lk=function(){return _.Jk()&&79===_.Kk().major};
76
- _.Kk=function(){const a=Mk();const b=["ie","edge","opera","firefox","safari",hd];var c=Nk();const d=Ok[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return Ik(c[1]);return Ik("")};_.Pk=function(){return _.Fk("CrKey")};_.Qk=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.Gk()};_.Rk=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.Qk()&&1<navigator.maxTouchPoints};_.Sk=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};
77
- Hk=function(a,b){try{return parseInt(b,10)}catch(c){Tk.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};Uk=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};
78
- Nk=function(){const a=Mk();if(!a)return Vk;var b=a.match(/^.+?(?=\))/);if(!b)return Vk;b=b[0];if(Uk(b,["iphone","ipad"]))return Wk;if(Uk(b,["android"]))return Xk;if(Uk(b,["macintosh"]))return Yk;if(Uk(b,["windows nt"]))return Zk;if(Uk(b,["tizen"]))return $k;if(Uk(b,["web0s"]))return al;if(Uk(b,["linux"]))return bl;Tk.warn("Unable to identify OS from user agent: "+a);return Vk};Mk=function(){let a=window.navigator.userAgent;return a=a.toLowerCase()};
79
- _.el=function(){var a=Nk();var b=Nk();var c=Ok[b];if(c){c=Mk().match(c.os_version)[1];c=Ik(c);if(b===Zk)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=Ik("");a:{c=Mk();const e=["ie","edge","opera","firefox","safari",hd];var d=Nk();d=Ok[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=dl}return{os:a,osVersion:b,browser:c,browserVersion:_.Kk()}};
80
- fl=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.hh(a,{kind:_.Nj(b.kind),language:_.Nj(b.language),label:_.Nj(b.label)},["kind","language","label"])};gl=function(a){return a.enabled||a.selected||a.mode===_.Lf||a.mode===_.he};il=function(a,b,c){return hl(a)&&b===_.N&&!!c.enableHlsVideoTrackInfo};
81
- jl=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})))})};kl=function(a,b,c){return hl(a)&&(b===_.M||b===_.L)&&!!c.enableMetadata};
82
- ll=function(a,b,c){return _.x(function*(){var d=a.m.getLoadedSource();d&&a.j&&(d=yield a.j.a(d.url,c),d.Kc&&(d=d.Kc.get(`${b.type}:${b.label}`))&&d.zf&&(b.accessibility=d.zf.split(",").map(e=>e.trim()).map(e=>({value:e,type:b.type,protocol:"HLS"}))))})};ml=function(a,b){return a.h.filter(c=>c.type===b)};nl=function(a){(a=a.m.getTextDisplayer())&&a.remove(0,Infinity)};pl=function(a,b){if(a=ol(a,b))a=Array.from(a),b===_.L&&(a=a.filter(c=>c.kind!==_.De));return a};
83
- ol=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 _.M:return a.audioTracks;case _.N:return a.videoTracks;case _.L:return a.textTracks;default:return null}};ql=function(a,b){return(a=a.a.get(b)||null)&&a.renditions[0]};rl=function(a,b){return(a=a.l.get(b))&&a.renditions[0]};
84
- ul=function(a,b,c){const d=pl(a,b);if(c){if(void 0===a.h.find(f=>f.id===c.id))throw Error(`Unknown track with ID ${c.id} and type ${b}`);if(c.type!==b)throw Error(`Types mismatch for track ${c.type} and arg ${b}`);a.g.debug("Activate track type "+b+" with ID: "+c.id);if(d){a.l.set(b,c);let f;var e=!0;let g=!1;switch(b){case _.L:f="mode";e=_.Lf;g=_.Kd;break;case _.M:f="enabled";break;case _.N:f="selected"}if(f)for(const h of d)h[f]=fl(c,h,c.type)?e:g}}else if(a.g.debug("Disable track type "+b),a.a.get(b)&&
85
- d&&b===_.L){for(e of d)e.mode=_.Kd;a.a.set(b,null)}b===_.M?a.m.trigger(new _.E(_.sl)):b===_.L&&a.m.trigger(new _.E(_.tl))};vl=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=_.aj(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.I.push(e)}}};
86
- wl=function(a,b){return _.x(function*(){var c=a.m.getConfiguration(),d=_.mk(c,b.mimeType,_.$f);if(d){c=_.xj(b.url);var e=yield a.m.getNetworkEngine().fetch(c).U;e&&e.data&&(c="External_"+`${a.G++}`,a.o[c]=b,d=d.a(_.K(e.data)),d={url:URL.createObjectURL(new Blob([d])),kind:b.kind,language:b.language,label:b.label,mimeType:_.$f},vl(a,d,c))}else a.g.warn("Track MIME type is not supported",b)})};hl=function(a){a=a.m.getLoadedSource();return!(!a||a.type!==_.xl&&!a.url.endsWith(".m3u8"))&&_.Qk()};
87
- yl=function(a,b,c){c=_.ai(c).filter(e=>e);a.g.info("Find preferred tracks for",b,c);const d=ml(a,b);c.some(e=>{const f=_.Di(e);return(e=d.find(g=>{g=_.Di(g.language||"");return _.Ei(f,g)}))?(a.g.info("Will select track with id",e.id),ul(a,b,e),!0):!1})};Al=function(a){return a.name===ob&&zl.some(b=>a.message.startsWith(b))};
88
- _.El=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.Rk()&&(a=360);const b=_.rj();b.maxAttempts=3;a={source:"",license:Bl,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,ads:{hls:{enable:!0,resolutionOffsetSec:35}},manifest:{attemptParameters:_.rj(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0,timeline:{version:1,type:void 0}},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,
89
- bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,restrictions:Cl(a),useCmsd:!0},contentSteering:{enabled:!0,attemptParameters:_.rj()},drm:null,enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:_.ze,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,
90
- xmlParser:_.Dl,streaming:{attemptParameters:b,bufferingGoal:10,rebufferingGoal:2,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,relativeTextTimestamp:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,disableAudioTracks:!1,disableVideoTracks:!1,smallGapLimit:.5,jumpLargeGaps:!0,durationBackoff:1,maxSegmentToMediaOffset:1,forceNativeTS:!1,preferNativeHlsOnSafari:!0,safeSeekOffset:5,stallEnabled:!0,stallThreshold:3,stallSkip:.5,bufferLimitUpdateInterval:.5,overridePasp:!1,enableLiveEdgeChasing:!1,
91
- chasingRate:1.15,startChasingAt:5,stopChasingAt:2,chaseJumpDistance:10,patchEdgeWhenMixedContent:!1,ignoreDrift:!1,disableFragmentSupport:!1,disableMergedFragments:!1,ignoreManagedMediaSourceStreamingHints:!1},mediaSource:{codecSwitchingStrategy:_.uf},restrictions:Cl(),tizen:{sideStreamText:_.Gk(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1},mse:{sendPlaybackSessionIdHeader:!1},trickPlay:{speedUpMode:_.Id,preferTrickPlayTracks:!0},playlist:{timeline:"basic",content:_.Sb,cropTimeline:!1},
92
- yospace:{enabled:!1}};if(_.Gk()||_.Jk())a.ads.hls.enable=!1;if(_.Fk("Edge/")||_.Gk())a.streaming.gapDetectionThreshold=.5;_.Jk()&&(a.streaming.stallEnabled=!1);_.Lk()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.Gk()&&(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};
93
- return a};Cl=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}};
94
- _.Gl=function(...a){if(!a)return _.El();var b=[_.El()];let c=!1;for(let d of a)null!==d&&void 0!==d&&(_.fh(d)&&(d={source:d}),d.lowLatencyMode&&!c&&(b.push({streaming:{rebufferingGoal:.1,bufferLimitUpdateInterval:.01,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}}));
95
- a=_.Zg.apply(null,b);_.fh(a.volume)&&(""===""+a.volume?a.volume=null:a.volume=Number(a.volume));if(!_.B(a.volume)&&(!_.gh(a.volume)||ih(a.volume)))throw new _.H(_.F,7,7100,"config.volume is not a number");if(!_.B(a.preferredTextLanguage)&&!_.fh(a.preferredTextLanguage)&&!Array.isArray(a.preferredTextLanguage))throw new _.H(_.F,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.B(a.preferredAudioLanguage)&&!_.fh(a.preferredAudioLanguage)&&!Array.isArray(a.preferredAudioLanguage))throw new _.H(_.F,
96
- 7,7100,"config.preferredAudioLanguage is not a string or an array");if(!_.B(a.preferredAudioCodec)&&!_.fh(a.preferredAudioCodec)&&!Array.isArray(a.preferredAudioCodec))throw new _.H(_.F,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.B(a.preferredVideoCodec)&&!_.fh(a.preferredVideoCodec)&&!Array.isArray(a.preferredVideoCodec))throw new _.H(_.F,7,7100,"config.preferredVideoCodec is not a string or an array");if(!_.B(a.drm)){if(a.drm.env&&!_.fh(a.drm.env))throw new _.H(_.F,7,
97
- 7100,"config.drm.env is not a string");if(a.drm.offlineId&&!_.fh(a.drm.offlineId))throw new _.H(_.F,7,7100,"config.drm.offlineId is not a string");}if(b=a.streaming){b.bufferingGoal=Number(b.bufferingGoal);b.rebufferingGoal=Number(b.rebufferingGoal);b.bufferBehind=Number(b.bufferBehind);b.smallGapLimit=Number(b.smallGapLimit);b.durationBackoff=Number(b.durationBackoff);if(!_.gh(b.bufferingGoal)||ih(b.bufferingGoal))throw new _.H(_.F,7,7100,"config.streaming.bufferingGoal is not a number");if(!_.gh(b.rebufferingGoal)||
98
- ih(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(!_.gh(b.bufferBehind)||ih(b.bufferBehind))throw new _.H(_.F,7,7100,"config.streaming.bufferBehind is not a number");if(!_.gh(b.smallGapLimit)||ih(b.smallGapLimit))throw new _.H(_.F,7,7100,"config.streaming.smallGapLimit is not a number");if(!_.gh(b.durationBackoff)||ih(b.durationBackoff))throw new _.H(_.F,
99
- 7,7100,"config.streaming.durationBackoff is not a number");b=a.manifest;if(_.B(b.availabilityWindowOverride))b.availabilityWindowOverride=NaN;else if(typeof b.availabilityWindowOverride!==_.t)throw new _.H(_.F,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");Fl(a.restrictions);Fl(a.abr.restrictions);a.abr.initialRestrictions&&Fl(a.abr.initialRestrictions)}return a};
100
- Fl=function(a){_.B(a.maxPixels)&&(a.maxPixels=Infinity);_.B(a.maxBandwidth)&&(a.maxBandwidth=Infinity);_.B(a.maxHeight)&&(a.maxHeight=Infinity);_.B(a.maxWidth)&&(a.maxWidth=Infinity);_.B(a.minPixels)&&(a.minPixels=0);_.B(a.minBandwidth)&&(a.minBandwidth=0);_.B(a.minHeight)&&(a.minHeight=0);_.B(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);
101
- 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");};Hl=function(a){return typeof a===_.Ke&&!Array.isArray(a)&&"source"in a};_.Jl=function(a){return _.Il.get(a)||null};
102
- _.Ll=function(a){_.Il.get(a.id())?Kl.warn("Component already in use."):_.Il.set(a.id(),a)};Ml=function(a){return Array.from(_.Il.values()).find(b=>b instanceof a)||null};Nl=function(a){for(const b of _.Il.values())a(b)};Ol=function(a){Nl(b=>{b.o(a)})};Pl=function(a){Nl(b=>{b.h(a)})};Ql=function(){Nl(()=>{})};Rl=function(){Nl(()=>{})};Sl=function(a){if(null!==Ml(a))return null;a=new a;a.f();_.Ll(a);Kl.info("Installed component:",a.id());return a};
103
- Tl=function(a){if(a=Ml(a))a.a(),_.Il.delete(a.id()),Kl.info("Uninstalled component:",a.id())};Ul=function(a,b){3===b.type&&(a.f&&(a.g.debug("Attaching tracking token"),b.headers[Jg]=a.f),a.a&&(b.headers[Kg]=a.a))};
104
- Vl=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[Jg],a.a=b.headers[Kg],b=b.headers["x-dt-csl-renewal-info"],a.f&&a.g.debug("Loaded tracking token "+a.f),a.a&&a.g.debug("Loaded followup token "+a.a),b)?(a=JSON.parse(_.Ri(_.gj(b))),{delay:a.renewalPeriod,oi:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};_.Xl=function(a){_.Wl[a.I]=a};
105
- _.Zl=function(a){const b={attemptParameters:_.rj(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,ignoreUnrecognizedInitData:!0,La:{},widevineVersion:_.Cd};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!==
106
- a.ignoreUnrecognizedInitData&&(b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),typeof a.widevineVersion===_.Vf&&0<a.widevineVersion.length&&(b.widevineVersion=a.widevineVersion),a.env)){const c=_.Wl[a.env]||null;if(!c)throw _.th(_.ua,_.wb+a.env+_.aa),new _.H(_.F,6,6015,`DRM environment '${a.env}' is missing.`);b.La=_.Yl(c,a.customData)||{};_.Yi(a.env.toLowerCase(),Xd)&&(b.enforceSingleSession=!0)}return b};
107
- am=function(a){a=$l[a];if(!a)return null;const b=_.el();return b.os===Xk&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};
108
- _.Yl=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[_.Cd];if(g){var h=g.licenseUrl;d=mi(d,g.videoRobustness);e=mi(e,g.audioRobustness);var k=g.modifiers,l=li(b?b.widevineDistinctiveIdentifierRequired:void 0,g.distinctiveIdentifierRequired,!1),m=li(b?b.widevinePersistentStateRequired:void 0,g.persistentStateRequired,!1);g=void 0===f?g.serverCertificate:null===f?null:typeof f===_.Vf?am(f):f;c[_.Cd]=
109
- {licenseUrl:h,videoRobustness:d,audioRobustness:e,modifiers:k,distinctiveIdentifierRequired:l,persistentStateRequired:m,serverCertificate:g}}(g=a.f[_.wd])&&(c[_.wd]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});h=b?b.playReadyVideoRobustness:void 0;b=b?b.playReadyAudioRobustness:void 0;(g=a.f[_.Ad])&&(c[_.Ad]={licenseUrl:g.licenseUrl,videoRobustness:h||g.videoRobustness,audioRobustness:b||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,
110
- modifiers:g.modifiers});return c};_.bm=function(){throw new _.H(_.F,3,3E3);};_.cm=function(a,b,c){const d=c||0;c=b.byteLength-d;const e=_.K(a.f.buffer);b=_.K(b.buffer,d,c);try{e.set(b,a.a),a.a+=c}catch(f){_.bm()}};_.O=function(a,b){try{a.f.setUint32(a.a,b,a.h),a.a+=4}catch(c){_.bm()}};_.dm=function(a){return a.a<a.f.byteLength};_.em=function(){throw new _.H(_.F,3,3E3,"Buffer read out of bounds.");};_.fm=function(a){try{const b=a.f.getUint8(a.a);a.a+=1;return b}catch(b){_.em()}};
111
- _.gm=function(a){try{const b=a.f.getUint16(a.a,a.h);a.a+=2;return b}catch(b){_.em()}};_.P=function(a){try{const b=a.f.getUint32(a.a,a.h);a.a+=4;return b}catch(b){_.em()}};_.hm=function(a){try{const b=a.f.getInt32(a.a,a.h);a.a+=4;return b}catch(b){_.em()}};_.im=function(a){let b=0,c=0;try{!0===a.h?(b=a.f.getUint32(a.a,!0),c=a.f.getUint32(a.a+4,!0)):(c=a.f.getUint32(a.a,!1),b=a.f.getUint32(a.a+4,!1))}catch(d){_.em()}if(2097151<c)throw new _.H(_.F,3,3001);a.a+=8;return c*Math.pow(2,32)+b};
112
- jm=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.fm(a);return c};_.km=function(a,b){a.a+b>a.f.byteLength&&_.em();var c=a.a+a.f.byteOffset;c=a.f.buffer.slice(c,c+b);a.a+=b;return _.K(c)};lm=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.mm=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.nm=function(a){for(;_.dm(a.reader)&&!a.parser.a;)a.parser.Xd(a.start+a.headerSize,a.reader,a.partialOkay)};
113
- _.om=function(a){for(let b=_.P(a.reader);0<b&&!a.parser.a;--b)a.parser.Xd(a.start+a.headerSize,a.reader,a.partialOkay)};_.pm=function(a){return b=>{const c=b.reader.Pa()-b.reader.getPosition();a(_.km(b.reader,c))}};_.qm=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};rm=function(a){let b="";try{b=_.Ui(a)}catch(c){}return b};_.tm=function(a){a=rm(a);let b="";a.length&&(b=(new _.sm(a)).a);return b};
114
- ym=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.Ri(a)),d=_.gj(c.sinf[0]);(new _.um).N(_.Of,_.nm).N("schi",_.nm).N("tenc",e=>{e.reader.skip(6);_.fm(e.reader)&&(e.reader.skip(1),b=_.ij(_.km(e.reader,16)));e.parser.stop()}).parse(d)}catch(c){}return b};
115
- Am=function(a,b,c){if(!c||!c.byteLength)throw new _.H(_.F,6,6102);let d;typeof b===_.Vf?d=_.Wi(b,!0):d=b;a=_.Wi(rm(a),!0);b=new _.zm(12+a.byteLength+d.byteLength+c.byteLength,!0);_.O(b,a.byteLength);_.cm(b,_.K(a));_.O(b,d.byteLength);_.cm(b,_.K(d));_.O(b,c.byteLength);_.cm(b,_.K(c));return _.K(b.buffer)};_.Bm=function(a){var b=_.K(a.body);b=_.fj(b);a.headers[ta]=Lc;a.body=_.Vi("spc\x3d"+b).buffer};
116
- _.Cm=function(a){let b;try{b=_.Ri(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=Pi(_.gj(b))};Hm=function(a,b){b=Dm(b);if(a===_.Cd)return b+Em;if(a===_.Ad)return b+Fm;if(a===_.wd)return b+Gm;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
117
- _.Km=function(a,b,c,d){d=void 0===d?!0:d;c=a.drm;c&&c.env.startsWith(wa)?c.customData&&(_.Jm(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)):Im.warn(gb)};
118
- _.Lm=function(a,b){try{const c=_.K(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));Im.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){Im.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
119
- _.Nm=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.Km(a,b,c,!1);b.headers[ta]=Lc;c={spc:_.ej(b.body)};if((a=a.drm)&&a.env.startsWith(xa)&&d){a={};var e=_.Vj((new _.sm(Mm(d))).f);d=e.keyId;if(e=e.assetId)Im.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(Im.info("Applying keyId from HLS manifest."),a.keyId=d);d=a;d.keyId&&(Im.info("Adding keyID to FPS payload:",d.keyId),c.keyId=d.keyId);d.assetId&&(Im.info("Adding assetID to FPS payload:",d.assetId),c.assetId=d.assetId)}b.body=
120
- _.Xi(_.Uj(c,!0))};_.Om=function(a,b){Im.debug("Clearing response data");200===b.status&&(a=_.Ri(b.data).trim(),"\x3cckc\x3e"===a.substr(0,5)&&"\x3c/ckc\x3e"===a.substr(-6)&&(a=a.slice(5,-6)),b.data=_.gj(a).buffer)};
121
- _.Pm=function(a,b,c){b=rm(b);c=c&&c.customData?c.customData:{};b=new _.sm(Mm(b));const d=_.Vj(b.f);if(a&&a.drm&&a.drm.customData){var e=a.drm.customData;a=e.assetId;e=e.variantId;a&&_.$i(`${a}`)&&(d.assetId=a,Im.debug("Using assetId from the configuration instead of the value from the HLS manifest."));e&&_.$i(`${e}`)&&(d.variantId=e,Im.info("Using variantId from the configuration instead of the value from the HLS manifest."))}d.keyId?(a=["keyId"],Im.debug("KeyId found in FPS SKD. Removing other parameters")):
122
- a=["assetId","variantId"];b.f=_.Uj(d,!1,a);"/"!==b.path||b.j.includes(`${b.a}/`)||(b.path="");b=_.Tj(b);return c.fpsContentId=b};_.Qm=function(a,b){a=a.drm;if(!a||!a.env.startsWith(wa))Im.warn(gb);else if(a.customData&&a.customData.merchant&&!a.env.startsWith(xa)){const c=new _.ni(b.uris[0]);let d=c.Ia;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.Ia=d;b.uris[0]=c.toString()}};Rm=function(a,b,c){_.Km(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.ni(b.uris[0]);c.a.add(_.We,a);b.uris[0]=c.toString()};
123
- Dm=function(a){if(a===Sm)return"https://lic.drmtoday.com";if(a===Tm)return"https://lic.staging.drmtoday.com";if(a===Um)return"https://lic-demo.staging.drmtoday.com";if(a===Vm)return"https://lic.test.drmtoday.com";throw Error("Unknown DRMtoday environment '"+a+"'. Can not infer DRMtoday base URL!");};Mm=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};
124
- _.Jm=function(a,b){if((b=b.drm)&&b.customData){var c={userId:b.customData.userId,sessionId:b.customData.sessionId,merchant:b.customData.merchant};_.bh(c)&&(a.headers["dt-custom-data"]=btoa(JSON.stringify(c)));(b=b.customData.authToken)&&(a.headers["x-dt-auth-token"]=b)}};Xm=function(a){const b={},c=a?a[Lg]:void 0;a=Wm[a?a[Lg]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};
125
- Ym=function(a){a=a["x-dt-li"];if(!a)return null;try{const b=JSON.parse(atob(a));a={};b.ti&&(a.requestId=b.ti);b.rpd&&(a.delay=Number(b.rpd)/1E3);return a}catch(b){return Im.warn("Unable to parse DRMtoday License Info header (x-dt-li)",b),null}};Zm=function(a,b){a.size=void 0===b?0:1;a.g.debug("Setting key status to",b);a.a=b};an=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=$m.value().get(b),c.one(a,b,d))};
126
- bn=function(a,b){a.f=b;_.Ah(a.a);if(!b)return Promise.resolve();a.a.on(b,$d,c=>{_.th("AppleEmeManager.cancelNativeMediaEncryptedEvent_",c);"MediaEncryptedEvent"in window&&c instanceof MediaEncryptedEvent&&(a.g.info("Cancel native MediaEncryptedEvent when using Apple-prefixed EME"),c.stopImmediatePropagation())});a.a.on(b,Hg,c=>{{a.g.debug("Handle webkitNeedKey event");c=_.K(c.initData);if(_.Oi(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=Ti(c.subarray(4),
127
- !0);c=_.Vi(c);const d=new Event($d);d.initDataType="skd";d.initData=Pi(c);a.f.dispatchEvent(d)}});an(b,HTMLMediaElement.HAVE_METADATA,a.a,()=>b.webkitSetMediaKeys(a.h));return Promise.resolve()};cn=function(a,b){Zm(a.keyStatuses,b);b=new _.E(le);a.dispatchEvent(b)};
128
- fn=function(a,b){a.a=b;_.Ah(a.f);b&&(a.f.on(b,a.h+"needkey",c=>{{const d=new Event($d);d.initDataType=_.dd;d.initData=Pi(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.h+"keymessage",c=>{{const e=dn(a,c.sessionId);if(e){var d=void 0===e.keyStatuses.getStatus();c=new _.E(_.Ce,{messageType:d?oe:ne,message:c.message});d=e;_.th("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.uh("Session not found",c.sessionId)}}),a.f.on(b,a.h+"keyadded",c=>{(c=dn(a,
129
- c.sessionId))&&c.ready()}),a.f.on(b,a.h+"keyerror",c=>{var d=dn(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?en(d,_.Ue):1===e?en(d,"expired"):en(d,_.ke))}}}))};
130
- dn=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};en=function(a,b){Zm(a.keyStatuses,b);b=new _.E(le);a.dispatchEvent(b)};gn=function(a,b){return a.w?a.w+b.charAt(0).toUpperCase()+b.slice(1):b};
131
- jn=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===_.Xe)if(c)d=_.K(_.Vi("LOAD_SESSION|"+c));else{const f=_.Vi("PERSISTENT|"),g=new Uint8Array(f.byteLength+b.byteLength);g.set(f,0);g.set(_.K(b),f.byteLength);d=g}else d=_.K(b)}catch(f){return Promise.reject(f)}a.f=new _.hn;const e=gn(a,"generateKeyRequest");try{a.j[e](a.h,d)}catch(f){if(f.name!==Za)return a.f=null,Promise.reject(f);(new _.Ck(()=>{try{a.j[e](a.h,d)}catch(g){a.f.reject(g),
132
- a.f=null}})).ga(.01)}return a.f};kn=function(a,b,c){if(a.a)a.a.then(()=>kn(a,b,c)).catch(()=>kn(a,b,c));else{a.a=b;if(a.h===Dg){var d=_.Ri(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=_.gj(e.keys[0].k);e=_.gj(e.keys[0].kid)}else d=_.K(c),e=null;var f=gn(a,"addKey");try{a.j[f](a.h,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
133
- nn=function(a,b){var c=ln;if(a){var d=c.find(e=>e.a()===a);if(d)return mn.info(Wb+d.a()),d.create();mn.info("Cannot create selected EME manager, falling back to the default.")}if(b&&(d=c.find(e=>e.a()===b)))return mn.info(Wb+d.a()),d.create();c=c[0];if(!c)throw Error("Missing EME managers.");mn.info(Wb+c.a());return c.create()};_.qn=function(a){var b=_.hj(a);b=parseInt(b.byteLength,10).toString(16);b=_.hj("12"+b+a);return new on(pn,a,b)};
134
- _.sn=function(a){const b=new _.rn(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.P(b);var c=_.P(b);c=_.mm(c);var d=_.P(b);const e=d>>>24;d&=16777215;var f=_.km(b,16);f=_.ij(f);if(0<e){var g=_.P(b);b.skip(16*g)}g=_.P(b);const h=()=>{let u=_.fm(b),v=(u&127)>>>0,y=7;for(;128<=u&&28>=y;)u=_.fm(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(!_.dm(b))throw Error("not enough data to skip!");while(_.fm(b)&128);break;case 1:b.skip(8);break;case 2:b.skip(h());
135
- 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(;_.dm(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=jm(b,q);2===n?l.push(q):4===n&&(m=q)}else k(q)}_.th("Parsed WV PSSH Box","size",a,"name",c,ng,e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.ej(m):"","keyIds",l.map(u=>_.ij(u)));return 0<l.length?_.qn(_.ij(l[0])):null};
136
- _.tn=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=_.K(a);a.set(b,0);return a};
137
- _.zn=function(a){var b=_.un;a:{var c=new _.rn(new DataView(a.buffer),!0);_.P(c);for(_.gm(c);_.dm(c);)if(1===_.gm(c)){var d=_.gm(c);c=_.km(c,d);break a}c=null}c||(c=a);a=Ti(c,!0);d=b.j(a,"WRMHEADER");a=d.getAttribute(ng)||"";d=b.h(d,"DATA");var e=b.h(d,"LA_URL");b=e?b.f(e):"";var f=_.un;if(e=f.h(d,"KID"))if(e=f.f(e)){var g=f.h(d,na);f=g?f.f(g):null;e={value:e,le:f}}else e=null;else e=null;d=e?[e]:(e=vn(d))?[e]:(d=wn(d))?d:null;const {value:h="",le:k}=d&&d[0]||{};d=_.gj(h);d=_.tn(d);d=_.ij(d);return new _.xn(_.yn,
138
- d,b,c,a,k)};vn=function(a){var b=_.un;a=b.h(a,"PROTECTINFO");if(!a)return null;var c=b.h(a,"KID");if(!c)return null;b=c.getAttribute("VALUE");if(!b)return null;a=c.getAttribute(na);c=c.getAttribute("ALGID");return{value:b,le:a,Fg:c}};
139
- wn=function(a){var b=_.un;a=b.h(a,"PROTECTINFO");if(!a)return null;a=b.h(a,"KIDS");if(!a)return null;a=b.a(a,"KID");if(!a.length)return null;b=[];for(const c of a)if(a=c.getAttribute("VALUE")){const d=c.getAttribute(na),e=c.getAttribute("ALGID");b.push({value:a,le:d,Fg:e})}return b.length?b:null};_.Bn=function(a){An&&performance.mark(a)};_.Cn=function(a,b,c){An&&performance.measure(a,b,c)};
140
- Dn=function(a){return _.x(function*(){const b=new Promise(c=>{(new _.Ck(c)).ga(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.C("Timeout waiting for session close")})};_.Fn=function(a){return En(a)?_.Ad:a};Gn=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};
141
- Hn=function(a,b){b=b[_.Fn(a.keySystem)];a.keyIds||(a.keyIds=[]);b&&(a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=b.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=b.persistentStateRequired),a.videoRobustness||(a.videoRobustness=b.videoRobustness||""),a.audioRobustness||(a.audioRobustness=b.audioRobustness||""),a.serverCertificate||(a.serverCertificate=b.serverCertificate||null))};
142
- _.In=function(a,b){b=_.vk(a.mimeType,b||a.codecs);if(_.uk(b,a.type)){a=a.type;var c=_.uk(b,a);c&&(c=c(),b=c.convertCodecs(a,b),c.destroy())}return b};Jn=function(a){for(const b of a.audioCapabilities||[])delete b.robustness;for(const b of a.videoCapabilities||[])delete b.robustness};Ln=function(a){return(a.audioCapabilities||[]).some(Kn)||(a.videoCapabilities||[]).some(Kn)};
143
- Mn=function(a,b){a=_.tm(b);_.th("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+a);return a};
144
- On=function(a){var {playerConfig:b,initData:c,initDataType:d,drmInfo:e,drmSystemConfig:f,sessionContext:g,emeApi:h}=a;if("skd"===d&&h===Nn){a=e.serverCertificate;let k=f&&f.modifiers&&f.modifiers.extractContentId;_.dh(k)||(k=Mn);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=Am(c,l,a)}return c};En=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
145
- Kn=function(a){return null!=a.robustness&&""!==a.robustness};Pn=function(a,b,c,d,e){for(const f of a){b.includes(f.licenseServerUri)||b.push(f.licenseServerUri);f.serverCertificate&&(c.some(g=>_.jj(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])}};
146
- Qn=function(a){var b=a.o;const c=a.X;c.clear();b.forEach((d,e)=>c.set(e,d));b=Array.from(c.values());b.length&&b.every(d=>"expired"===d)&&a.w(new _.H(_.F,6,6014));a.D.Ge(_.kh(c));a.A||a.g.info(va);a.A=!0;a.F=!1};Rn=function(a){a.h.forEach((b,c)=>{const d=b.Be;let e=c.expiration;isNaN(e)&&(e=Infinity);e!==d&&(a.D.Fe(c.sessionId,e),b.Be=e)})};
147
- Sn=function(a){return _.x(function*(){a.B.release();a.B=null;a.M.release();a.M=null;a.A=!1;a.F=!1;a.H.reject();a.Z.stop();a.Z=null;a.V.stop();a.V=null;const b=Array.from(a.h.keys());for(const c of a.h.values())c.Cc&&c.Cc.stop();a.h.clear();yield Promise.all(b.map(c=>Promise.resolve().then(()=>_.x(function*(){a.g.debug("Closing session",c.sessionId);try{yield Dn(c)}catch(d){a.g.warn("Error while closing session",d)}}))));if(a.C){try{yield a.l.h(null)}catch(c){a.g.warn("Error while resetting media keys",
148
- c)}a.C=null}a.l=null;a.a=null;a.J.clear();a.I=null;a.L=[];a.f=null;a.w=null;a.D=null;a.R=0;a.O=null})};_.Yn=function(a,b){const c=Tn(a,b),d=Un(b);for(const e of d)Vn(a,e,a.f.La);b=Wn(a,b);if(!b.size)return a.S=!0,Promise.resolve();_.Bn(Nd);a=_.Xn(a,b);return(c?a:a.catch(()=>{})).then(()=>{_.Bn(Md);_.Cn("DRM queryMediaKeys_()",Nd,Md)})};
149
- _.$n=function(a,b,c){c=void 0===c?[]:c;a.K=Zn;a.L=c;a.G=0<c.length;a.g.debug("Using Persisted Licenses: "+a.G);a.f&&a.f.enableSessionCacheForSkd&&a.g.info("Enabled session cache for SKD license requests");return _.Yn(a,b)};
150
- _.Xn=function(a,b){if(1===b.size&&b.has(""))return Promise.reject(new _.H(_.F,6,6E3));null===a.l&&(a.l=nn(a.f.emeApi,a.Ga));for(var c of b.values())0===c.audioCapabilities.length&&delete c.audioCapabilities,0===c.videoCapabilities.length&&delete c.videoCapabilities;let d=c=new _.hn;const e=(h,k,l)=>{k.drmInfos.some(m=>!!m.licenseServerUri)===h&&(d=d.catch(()=>{if(a.j)return null;if(l===_.Ad){if(_.Ek()&&!a.f.La[l].useLegacySystem)return k.label=Bd,a.l.a(Bd,[k]).catch(()=>{a.g.warn("Unable to create com.microsoft.playready.recommendation. Falling back to com.microsoft.playready.");
151
- k.label=_.Ad;Jn(k);return a.l.a(l,[k])});Jn(k)}if(l===_.Cd&&a.f.widevineVersion!==_.Cd){const m=a.f.widevineVersion;if(!m.startsWith(_.Cd))return a.g.error(`Invalid "widevineVersion" value "${m}".`),Promise.reject();const n=Object.assign({},k,{label:m,distinctiveIdentifier:_.Se,persistentState:_.Se});return a.l.a(m,[n]).catch(()=>a.l.a(l,[k]))}return a.l.a(l,[k]).catch(m=>{a:{if(l===_.Cd&&Ln(k)){const n=_.el();if(Ln(k)&&n.os===Xk&&n.browser===hd){a.g.warn("requestMediaKeySystemAccess() failed",m);
152
- a.g.warn("Will try to recover by removing the robustness attribute of videoCapabilities and audioCapabilities.");Jn(k);m=a.l.a(l,[k]);break a}}throw m;}return m})}))};let f=a.f.preferredDrmSystem;if(!f){var g=_.el();if(g.os===Zk&&10<=g.osVersion.major&&"edge"===g.browser)f=_.Ad;else if("safari"===g.browser)f=_.wd;else if(g.browser===hd||"firefox"===g.browser)f=_.Cd}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(()=>{throw new _.H(_.F,6,6001,
153
- "Failed to get MediaKeySystemAccess.");});d=d.then(h=>{if(a.j)return null;a.J.clear();var k=h.getConfiguration();a.g.info("Got MediaKeySystemAccess with configuration",k);var l=k.audioCapabilities||[];k=k.videoCapabilities||[];for(var m of l)a.J.add(m.contentType.toLowerCase());for(var n of k)a.J.add(n.contentType.toLowerCase());{l=h.keySystem;m=b.get(_.Fn(h.keySystem));n=[];k=[];const q=[],u=[];Pn(m.drmInfos,n,k,q,u);1<k.length&&_.C("Multiple unique server certificates found! Only the first will be used.");
154
- 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===_.Cf,persistentStateRequired:m.persistentState===_.Cf,audioRobustness:m.audioCapabilities?m.audioCapabilities[0].robustness:"",videoRobustness:m.videoCapabilities?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);
155
- return h.createMediaKeys()}).then(h=>{a.j||(a.g.info("Created MediaKeys for key system",a.a.keySystem),a.I=h,a.S=!0)}).catch(h=>{if(!a.j){a.a=null;a.J.clear();if(h instanceof _.H)throw h;throw new _.H(_.F,6,6002,{browserError:h.message});}});c.reject();return d};
156
- ao=function(a){a=jh(a.f.La[_.Te]||{});if(0===a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.hj(f);e=_.hj(e);e={kty:"oct",kid:_.fj(f,!1),k:_.fj(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.Vi(d),initDataType:"keyids"}];return{keySystem:_.Te,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
157
- keyIds:[],periodId:null}};Un=function(a){const b=[];for(const c of a)for(const d of c.drmInfos)b.push(d);return b};bo=function(a,b){for(const c of b)""===c.licenseServerUri||a.f.La[c.keySystem]||(a.f.La[c.keySystem]={licenseUrl:""})};
158
- Tn=function(a,b){const c=b.some(g=>0<g.drmInfos.length);if(!c){var d=jh(a.f.La);Gn(b,d)}d=a.f.La[_.wd];const e=b.some(g=>g.drmInfos.some(h=>h.keySystem===_.wd));if(!1!==a.f.si&&_.Qk()&&!e&&d)for(var f of b)f.drmInfos.push({keySystem:_.wd,licenseServerUri:d.licenseUrl,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[],periodId:null});if(f=ao(a))for(const g of b)g.drmInfos=[f];b=Un(b);bo(a,b);for(const g of b)Hn(g,
159
- a.f.La);return c};Vn=function(a,b,c){const d=_.Fn(b.keySystem);c=c[d];d===_.Te&&b.licenseServerUri?a.g.debug("Using Clear Key data URI for",d):c&&c.licenseUrl?(b.licenseServerUri=c.licenseUrl,a.g.debug("Using license server URI from user-configured clpp.drm.DrmEnvironment (licenseUrl) for",d)):a.g.debug("Using license server URI from the manifest for ",d)};
160
- Wn=function(a,b){var c=new Set(Un(b));const d=a.G?_.Cf:_.Se,e=a.G?[_.Xe]:[Zf];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.dd],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Se,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.In(b):"";let h=null;b&&"ac-3"===b.codecs.toLowerCase()&&_.Gk()&&(h=_.In(b,_.Zd));const k=c?_.In(c):"";let l=null;c&&"ac-3"===c.codecs.toLowerCase()&&_.Gk()&&(l=_.In(c,_.Zd));
161
- 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=_.Cf);m.persistentStateRequired&&(n.persistentState=_.Cf);b&&_.ai(m.audioRobustness).forEach(q=>{const u={robustness:q||"",contentType:g};n.audioCapabilities.find(v=>v.robustness===u.robustness&&v.contentType===u.contentType)||n.audioCapabilities.push(u);h&&n.audioCapabilities.push({robustness:q||
162
- "",contentType:h})});c&&_.ai(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};co=function(a){return _.x(function*(){if(!a.l.o())if(a.O)yield a.O;else try{a.O=a.l.h(a.I),yield a.O}catch(b){a.j||a.w(new _.H(_.F,6,6003,b.message,b))}})};
163
- _.ho=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.G||a.K!==Zn)){var e=a.keySystem();if(!e.startsWith(_.wd)&&b===_.dd){const f=new eo(c);if(1<f.a.length&&(e={"org.w3.clearkey":"1077efecc0b24d02ace33c1e52e2fb4b","com.widevine.alpha":"edef8ba979d64acea3c827dcd51d21ed","com.microsoft.playready":"9a04f07998404286ab92e65be0885f95","com.adobe.primetime":"f239e769efa348509c16a903c6932efb"}[e]))for(let g=0;g<f.f.length;g++)if(e===f.f[g]){c=c.subarray(f.a[g].start,f.a[g].end+1);break}}(a.C.webkitCurrentPlaybackTargetIsWireless||
164
- _.Gk(2)||a.keySystem().startsWith(_.wd)||!_.fo(a,d,c,!0))&&go(a,d,null,b,c)}};io=function(a,b){return _.x(function*(){a.g.info(`Handle encrypted event for type ${b.initDataType}`);yield co(a);b.initData&&_.ho(a,b.initDataType,_.K(b.initData))})};ko=function(a){return _.x(function*(){_.Bn(Pd);const b=a.W.map(c=>jo(a,c));a.aa=!0;a.W=[];yield Promise.all(b);_.Bn(Od);_.Cn("drm.onPlay",Pd,Od)})};
165
- mo=function(a){const b=a.keySystem(),c=a.f.La[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.D.getConfiguration();return lo(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.xj([d],a.f.attemptParameters);f.type=3;f.licenseRequestType=fd;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.g.debug("Fetching certificate");return a.D.rb.fetch(f).U}).then(f=>{a.a.serverCertificate=_.K(f.data)}).catch(f=>{var g=
166
- f.data.headers;g=Object.assign({message:Pa,url:f.data.url,status:f.data.status,response:f.data.response},g?{headers:g}:{},Xm(g));throw new _.H(_.F,6,6100,g,f);})};
167
- _.no=function(a){return _.x(function*(){if(a.I&&a.a&&a.a.serverCertificate&&a.a.serverCertificate.length)try{const b=yield a.I.setServerCertificate(a.a.serverCertificate);void 0===b||b||a.g.debug("Server certificates are not supported by the key system. The server certificate has been ignored.")}catch(b){throw new _.H(_.F,6,6004,{browserError:b.message});}})};
168
- _.qo=function(a){const b=a.a?a.a.initData||[]:[];for(const c of b){let d=!_.Gk(2);if(a.f.enforceSingleSession&&!a.keySystem().startsWith(_.wd)){const e=a.h.values();for(const f of e)_.jj(c.initData,f.initData)?(a.g.info("Skipping Session creation. Existing init data in single session mode!"),d=!1):f.periodId===c.periodId&&(a.g.info("Skipping Session creation. Merging init data for period in single session mode "+`for Key ID ${c.keyId}.`),oo(c.initData,f)||(f.Dd.push(c.initData),c.keyId&&!f.jb.includes(c.keyId)&&
169
- f.jb.push(c.keyId),a.o.get(c.keyId)||a.o.set(c.keyId,Tf)),d=!1)}!d||a.G&&a.K===Zn||(_.fo(a,c.keyId,c.initData)&&(d=!1),d&&(a.g.info("Request new media key session on create"),go(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.L)_.po(a,c);b.length||a.L.length||(a.A||a.g.info(va),a.A=!0,a.F=!1,a.H.resolve());return a.H};
170
- _.so=function(a,b){if(!a.I)return Bh(a.B,b,()=>{a.w(new _.H(_.F,6,6010))}),Promise.resolve();a.C=b;a.l.l(b);a.B.one(a.C,_.Ze,()=>ko(a));a.B.on(a.C,_.Cg,e=>{const f=a.F;a.F=!a.A;!f&&a.F&&(a.g.info("Waiting for DRM license key delivery"),a.D.onEvent(e))});var c=a.a.initData.find(e=>0<e.initData.length);let d=Promise.resolve();if(c||a.l.f()!==ro||a.L.length)d=co(a);c=Promise.resolve();_.Jk()&&38===_.Kk().major||(a.a&&a.a.keySystem!==_.Te&&!a.a.serverCertificate&&(c=mo(a)),c=c.then(()=>_.no(a)));return Promise.all([d,
171
- c]).then(()=>{a.j||(_.qo(a),a.B.on(a.C,$d,e=>io(a,e)))}).catch(e=>{if(!a.j){if(6004===e.code&&a.a&&a.a.keySystem===_.Cd&&1>a.R&&a.a.serverCertificate&&a.a.serverCertificate.length)return a.g.warn("Detected invalid widevine server certificate!. Retrying"),a.w(new _.H(1,6,6004)),a.a.serverCertificate=null,a.R++,_.so(a,b);1<=a.R&&a.g.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
172
- lo=function(a,b){return _.x(function*(){const c=a.D.Hc();if(c){var d=b&&b.drm&&b.drm.customData;d&&(yield c(d))}})};
173
- _.po=function(a,b){let c;try{a.g.debug("Attempting to load an offline session",b),c=a.I.createSession(_.Xe)}catch(e){const f=new _.H(_.F,6,6005,{browserError:e.message});a.w(f);return Promise.reject(f)}a.B.on(c,_.Ce,a.Aa.bind(a));a.B.on(c,le,a.za.bind(a));const d={initData:null,loaded:!1,Be:Infinity,ec:null,eb:new _.hn,periodId:null,Dd:[],keyId:null,jb:[],initDataType:null,jc:null,sessionContext:{ldlDelay:0,customData:{}}};d.eb.catch(()=>{});a.h.set(c,d);return c.load(b).then(e=>{if(a.j)return null;
174
- a.g.debug("Loaded offline session",b,e);if(!e)return a.h.delete(c),a.w(new _.H(_.F,6,6013)),null;d.loaded=!0;to(a)&&(a.A||a.g.info(va),a.A=!0,a.F=!1,a.H.resolve());return c},e=>{a.j||(a.h.delete(c),a.w(new _.H(_.F,6,6005,{browserError:e.message})))})};oo=function(a,b){if(!a)return!1;for(let c=0;c<b.Dd.length;c++)if(_.jj(a,b.Dd[c]))return!0;return!1};
175
- _.fo=function(a,b,c,d){d=void 0===d?!1:d;for(const e of a.h.keys()){const f=a.h.get(e);if(_.jj(c,f.initData))return b?f.jb.includes(b)?d&&a.g.info("Skipping Session creation. "+`License for init data with Key ID ${b} was already `+`requested in Session: '${e.sessionId}'. `):(f.jb.push(b),a.o.get(b)||a.o.set(b,Tf),d&&a.g.info(Fb+`Session: '${e.sessionId}'`+`Adding Key ID ${b} to session meta-data.`)):d&&a.g.info(Fb+`Session: '${e.sessionId}'`),!0;if(oo(c,f))return d&&a.g.info("Skipping Session creation. License for init data was already requested [extra]"),
1
+ let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,ka,na,sa,ta,va,wa,xa,ya,Pa,Qa,Va,Wa,Xa,Ya,Za,ab,bb,fb,hb,ib,jb,kb,lb,mb,ob,pb,tb,wb,Cb,Db,Gb,Ib,Pb,Qb,Rb,Ub,Vb,Xb,Yb,fc,nc,oc,pc,Kc,Pc,Uc,bd,dd,ld,md,nd,pd,qd,rd,sd,ud,vd,wd,xd,yd,zd,Gd,Id,Nd,Td,Ud,Vd,Wd,Zd,$d,ae,de,ee,ge,le,se,ue,ve,Fe,Ye,ef,gf,hf,jf,kf,lf,mf,nf,of,pf,qf,vf,wf,xf,yf,zf,Af,Cf,Gf,If,Xf,$f,fg,rg,ug,Dg,Lg,Pg,Qg,Rg,Sg,Tg,Vg,Wg,Xg,ch,dh,gh,hh,mh,jh,uh,vh,xh,Ah,Ch,Kh,Lh,Mh,Ph,Qh,Oh,Nh,Vh,Rh,Xh,Yh,bi,Wh,ci,ai,di,ei,Zh,$h,hi,mi,ni,ii,li,ki,ji,pi,ri,qi,ti,ui,vi,wi,zi,
2
+ Ai,Ci,Di,Hi,Ji,Li,Fi,Ni,Ri,Ti,Vi,Ui,Wi,Xi,Yi,aj,bj,ej,Gj,Hj,Kj,Lj,Mj,Oj,Pj,Qj,Rj,Tj,Uj,Vj,Wj,Xj,Yj,bk,ek,ik,jk,nk,pk,kk,mk,ok,qk,rk,sk,uk,vk,Ck,Nk,Sk,Rk,el,Xk,Wk,pl,ql,sl,tl,ul,vl,wl,xl,zl,yl,Al,Bl,Cl,Dl,El,rl,Gl,Il,Kl,Nl,Pl,Ul,Vl,Wl,Xl,Yl,Zl,$l,am,bm,cm,im,rm,tm,zm,Dm,Fm,Pm,Zm,Im,Um,en,fn,gn,jn,kn,ln,on,mn,nn,pn,rn,sn,vn,Dn,En,Mn,Pn,Qn,Sn,Un,Vn,Xn,Nn,Tn,Yn,Zn,$n,ao,ko,co,lo,bo,eo,fo,mo,ro,to,vo,uo,xo,po,Fo,Co,Eo,Do,so,Go,Ho,Io,Jo,Ko,Lo,Mo,No,To,Uo,Vo,ap,bp,dp,Yo,Xo,kp,lp,pp,rp,sp,tp,op,vp,wp,xp,
3
+ Bp,Gp,Hp,Ip,Jp,Kp,Lp,Np,Op,Pp,Qp,dq,Zp,fq,gq,hq,iq,Rp,Sp,Vp,Wp,Xp,Yp,$p,aq,bq,cq,qq,rq,eq,sq,oq,nq,tq,lq,pq,jq,wq,xq,yq,zq,Aq,Dq,Eq,Lq,Mq,Nq,Kq,Uq,Oq,Pq,Qq,Rq,Sq,Tq,Bq,Cq,Fq,Gq,Hq,Wq,Zq,Iq,Jq,$q,cr,gr,hr,fr,ir,er,dr,kr,mr,or,qr,rr,sr,tr,ur,vr,wr,xr,yr,zr,Ar,Er,Ir,Fr,Kr,Or,Qr,Sr,Ur,Vr,Wr,Xr,Zr,hs,$r,as,bs,cs,js,fs,ks,ns,os,ps,ls,ms,qs,rs,us,ys,zs,Cs,Es,Fs,Ds,As,ts,xs,vs,ws,Is,Js,Ks,Ls,Ps,Qs,Rs,Ss,Us,Vs,Ws,Ys,$s,et,ft,gt,it,jt,kt,mt,nt,lt,ot,rt,qt,pt,vt,ut,At,eh,fh;_.aa=" is registered.";ba=" is unsupported on this platform.";
4
+ ca=" to a log level. Falling back to default!";_.da="#text";_.ea="6.24.0";_.fa="AdaptationSet";_.ha="Already destroyed. No-op";_.ia="Already released. No-op";_.ja="Autoplay is not allowed due to browser policy.";ka="Autoplay should not be used for preloaded streams. ";_.la="BANDWIDTH";_.ma="BASIC";na="CHECKSUM";_.oa="CODECS";_.pa="Cannot retrieve buffer information due to platform limitations";_.qa="CastlabsPlayer";_.ra="Configuration is valid";sa="Content-Length";ta="Content-Type";_.ua="Could not find configured DRM environment.";
5
+ va="DRM licenses loaded";wa="DRMtoday";xa="DRMtodayOnboard";ya="Destroying player";_.za="EXT-X-BYTERANGE";_.Aa="EXT-X-DATERANGE";_.Ba="EXT-X-DISCONTINUITY";_.Ca="EXT-X-DISCONTINUITY-SEQUENCE";_.Da="EXT-X-ENDLIST";_.Fa="EXT-X-KEY";_.Ga="EXT-X-MAP";_.Ha="EXT-X-MEDIA-SEQUENCE";_.Ia="EXT-X-PART-INF";_.Ja="EXT-X-PLAYLIST-TYPE";_.Ka="EXT-X-PRELOAD-HINT";_.La="EXT-X-PROGRAM-DATE-TIME";_.Ma="EXT-X-SERVER-CONTROL";_.Oa="EXT-X-TARGETDURATION";Pa="Error while decoding string!";Qa="Error while fetching certificate!";
6
+ _.Ra="FairPlay Certificate URL is not defined";_.Ta="FairPlay License URL is not defined";_.Ua="GROUP-ID";Va="HW_SECURE_ALL";Wa="HW_SECURE_CRYPTO";Xa="HW_SECURE_DECODE";Ya="HeaderDrm";Za="InvalidStateError";_.$a="LANGUAGE";ab="License verification failed: ";bb="Load interrupted while a player release is pending";_.cb="Loading player with configuration";_.db="MaxHeight";_.eb="MaxWidth";fb="Missing media element";_.gb="NAME";hb="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";
7
+ ib="No event provided!";jb="No items in the playlist";kb="No sources provided!";lb="No track data attached to the event, unable to add track!";mb="Not a persistent session.";_.nb="Not supported";ob="NotAllowedError";pb="NotSupportedError";_.qb="PLAYLIST";_.rb="POST";_.sb="PlayReady License URL is not defined";tb="Player not ready yet.";_.ub="Player sources";_.vb="Please make sure ";wb="Preloading is not supported by this player.";_.xb="QualityLevel";_.yb="RESOLUTION";_.zb="Representation";_.Ab="SW_SECURE_CRYPTO";
8
+ _.Bb="SW_SECURE_DECODE";Cb="Session is closed";Db="Skipping Session creation. License for init data was already requested in ";_.Eb="SmoothStreamingMedia";_.Fb="TYPE";Gb="The index is not in the allowed range.";_.Hb="URI";Ib="Unable to translate ";_.Jb="Unhandled/ignored event";_.Ob="Unregistering listeners";Pb="Unsupported keySystem";Qb="Updating playout limit for interstitial";Rb="Using VTTCue polyfill from 3 argument TextTrackCue.";_.Sb="VIDEO";_.Tb="VOD";Ub="Wait for preloading to finish";
9
+ Vb="WebkitEmeManager.MediaKeySession.load";_.Wb="Widevine License URL is not defined";Xb="Will create EME Manager: ";Yb="X-AD-CREATIVE-SIGNALING";_.Zb="X-ASSET-LIST";_.$b="X-ASSET-URI";_.ac="X-PLAYOUT-LIMIT";_.bc="X-RESTRICT";_.cc="X-RESUME-OFFSET";fc="X-TIMELINE-OCCUPIES";_.hc="ad-break-started";_.ic="ad-break-stopped";_.jc="ad-buffering";_.kc="ad-clicked";_.lc="ad-completed";_.mc="ad-first-quartile";nc="ad-hls-asset-list-request";oc="ad-hls-asset-list-response";pc="ad-hls-resoled";_.qc="ad-impression";
10
+ _.rc="ad-loaded";_.sc="ad-midpoint";_.tc="ad-paused";_.uc="ad-progress";_.vc="ad-resumed";_.xc="ad-skipped";_.yc="ad-started";_.Bc="ad-stopped";_.Cc="ad-third-quartile";_.Dc="addtrack";_.Ec="ads-timeline-changed";_.Fc="airplay-casting-ended";_.Gc="airplay-casting-started";_.Hc="airplay-status-changed";_.Ic="application/cea-608";_.Jc="application/dash+xml";Kc="application/mp4";_.Lc='application/mp4; codecs\x3d"stpp"';_.Mc='application/mp4; codecs\x3d"wvtt"';_.Nc="application/ttml+xml";_.Oc="application/vnd.ms-sstr+xml";
11
+ Pc="application/x-www-form-urlencoded";_.p="audio";_.Qc="audio/aac";_.Rc="audio/ac3";_.Sc="audio/eac3";_.Tc="audio/mp4";Uc='audio/mp4;codecs\x3d"mp4a.40.2"';_.Vc="audiobufferchanged";_.Wc="audiotrackchanged";_.Xc="autoplaynotallowed";_.Yc="bitratechanged";_.Zc="boolean";_.$c="bufferingended";_.ad="bufferingstarted";bd="canplay";dd="canplaythrough";_.ed="castingstarted";_.hd="caststatuschanged";_.id="cdn-switch-success";_.jd="cenc";_.kd="center";ld="certificate-request";md="change";nd="chrome";
12
+ _.od="clpp-fill";pd="clpp-hidden";qd="clpp-mc-playlist";rd="clpp-visible";sd="clpp.PlayerFleet";_.td="clpp.cast.CastSender";ud="clpp.drm.HeaderDrm";vd="clpp.drm.eme.AppleEmeManager";wd="clpp.drm.eme.EmeFactory";xd="clpp.native.Player";yd="clpp.plist.McPlaylist";zd="clpp.utils.Platform";_.Ad="codecs";_.Bd="column-reverse";_.Cd="com.adobe.primetime";_.Dd="com.apple.fps";_.Fd="com.apple.hls.interstitial";Gd="com.apple.quicktime.HLS";_.Hd="com.microsoft.playready";Id="com.microsoft.playready.recommendation";
13
+ _.Jd="com.widevine.alpha";_.Kd="config.drm.customData is not defined";_.Ld="content-steering-change";_.Md="content-steering-location-ban-update";Nd="controls";_.Od="cuechange";_.Pd="decoder";_.Qd="destroy()";_.Rd="disabled";_.Sd="div";Td="drm.mediaKeys.end";Ud="drm.mediaKeys.start";Vd="drm.onPlay.end";Wd="drm.onPlay.start";_.Yd="drmexpirationupdate";Zd="drmlicenserequested";$d="drmrenewalstarted";ae="drmsessioncreated";_.be="drmsessionpersisted";_.ce="drmsessionupdate";de="drmtoday";ee="durationchange";
14
+ _.fe="ec-3";ge="encrypted";_.he="end";_.ie="ended";_.r="error";_.je="estimatedThroughputKbps";_.ke="forced";le="fullscreenElement";_.me="function";_.ne="height";_.oe="hidden";_.pe="html";_.qe="image";_.re="internal-error";se="keystatuseschange";_.te="left";ue="license-renewal";ve="license-request";_.we="line-left";_.Ae="line-right";_.Be="live-turned-static";_.Ce="load";_.De="loadeddata";_.Ee="loadedmetadata";Fe="loadstart";_.Ge="main";_.He="mdat";_.Ie="mdia";_.Je="message";_.Ke="metadata";_.Le="mimeType";
15
+ _.Me="minf";_.Ne="moov";_.Oe="mpd-type-changed";_.Pe="mpeg-dash-callback-event";_.Qe="none";_.t="number";_.Re="object";_.Se="onBitrateChanged()";_.Te="onContentLoaded";_.Ue="onPlayerError()";_.Ve="onPlayerWillDestroy";_.We="onPlayerWillRelease";_.Xe="onStateChanged()";Ye="online-status-changed";_.Ze="optional";_.$e="org.w3.clearkey";_.af="output-restricted";_.bf="pause";_.cf="persistent";_.df="persistent-license";ef="picture-in-picture";_.ff="play";gf="player.afterLoad.end";hf="player.afterLoad.start";
16
+ jf="player.appendLoad.end";kf="player.appendLoad.start";lf="player.beforeLoad.end";mf="player.beforeLoad.start";nf="player.load.end";of="player.load.start";pf="player.setupPlaylist.end";qf="player.setupPlaylist.start";_.rf="playing";_.sf="playlist-item-changed";_.uf="playlist-modified";vf="playlist.next.end";wf="playlist.next.start";xf="preload-aborted";yf="preload-failed";zf="preloaded";Af="preloading";_.Bf="prevent";Cf="primary-content";_.Df="progress";_.Ef="px";_.Ff="ratechange";Gf="released";
17
+ _.Hf="releasing";If="removetrack";_.Jf="required";_.Kf="resize";_.Lf="right";_.Mf="sc-playlist-ended";_.Nf="sc-playlist-item-changed";_.Of="sc-playlist-live-turned-static";_.Pf="sc-playlist-timeline-changed";_.Qf="seeked";_.Rf="seeking";_.Sf="showing";_.Tf="simid-creative-started";_.Uf="simid-creative-stopped";_.Vf="sinf";_.Wf="smooth";Xf="stalled";_.Yf="start";_.Zf="statechanged";$f="status-pending";_.ag="stbl";_.bg="string";_.cg="stsd";_.dg="style";_.eg="subtitles-htmlcue";fg="temporary";_.gg="text/vtt";
18
+ _.hg="text/xml";_.ig="texttrackchanged";_.jg="timeline-cue-added";_.kg="timeline-cue-enter";_.lg="timeline-cue-exit";_.mg="timeline-cues-changed";_.ng="timeupdate";_.og="tracksadded";_.pg="trak";_.qg="ttml-xml";rg="unauthenticated";_.sg="und";_.tg="unknown";ug="update";_.vg="urn:scte:scte35";_.zg="urn:scte:scte35:2014";_.Ag="user-seeked";_.Bg="user-seeking";_.Cg="value";Dg="version";_.Eg="vertical-lr";_.Fg="vertical-rl";_.w="video";_.Gg="video/mp2t";_.Hg="video/mp4";_.Ig="videobufferchanged";
19
+ _.Jg="videotrackchanged";_.Kg="vimond-response";Lg="visibilitychange";_.Mg="vtt-xml";_.Ng="waiting";_.Og="waitingforkey";Pg="webkit-org.w3.clearkey";Qg="webkitkeyadded";Rg="webkitkeyerror";Sg="webkitkeymessage";Tg="webkitneedkey";_.Ug="width";Vg="x-dt-csl-tracking-token";Wg="x-dt-follow-up-token";Xg="x-dt-resp-code";_.Yg="yospace-session-ended";_.Zg="yospace-session-started";_.bh=function(a){return function(){return _.ah[a].apply(this,arguments)}};
20
+ ch=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};dh=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:ch(a)}};gh=function(a,b){if(b){var c=eh;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&&fh(c,a,{configurable:!0,writable:!0,value:b})}};
21
+ hh=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 hh(a())};_.z=function(a,b){a=a.split(".");var c=ih;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};
22
+ _.lh=function(a){return _.B(a)||jh(a)?a:_.kh(a)};_.kh=function(...a){let b={};for(let c=0;c<a.length;c++)null!=a[c]&&(b=mh(b,{merging:a[c]},1));return b.merging||null};_.nh=function(a){for(const b in a)if(void 0!==a[b])return!0;return!1};
23
+ mh=function(a,b,c){const d=c+1;if(_.B(a)||!_.oh(a))a={};for(const e in b)c=b[e],jh(c)||_.B(c)||_.ph(c)||c instanceof Element?a[e]=c:_.oh(c)&&c.buffer&&c.buffer instanceof ArrayBuffer&&_.ph(c.subarray)?a[e]=c.subarray(0):c instanceof Array?a[e]=mh([],c,d):!_.B(c)&&_.qh(c)&&20>d&&(a[e]=mh(a[e],c,d));return a};jh=function(a){a=typeof a;return a===_.bg||a===_.t||a===_.Zc};_.B=function(a){return null===a||"undefined"===typeof a};_.oh=function(a){return typeof a===_.Re};
24
+ _.ph=function(a){return typeof a===_.me};_.rh=function(a){return typeof a===_.bg};_.sh=function(a){return typeof a===_.t};_.qh=function(a){if(_.B(a)||!_.oh(a))return!1;a=Object.getPrototypeOf(a);return a===Object.prototype||null===a};
25
+ _.th=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||!_.oh(a)||!_.oh(b))return!1;const e=c||Object.keys(a),f={};for(let g=0;g<e.length;g++){const h=e[g];if(_.B(d)||0>d.indexOf(h))if(f[h]=!0,a[h]!==b[h])return!1}if(_.B(c))for(a=Object.keys(b),b=0;b<a.length;b++)if(c=a[b],(_.B(d)||0>d.indexOf(c))&&!f[c])return!1;return!0};
26
+ uh=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:b=>b!==b)(a)};vh=function(a){const b=new Map;for(const c of Object.keys(a))b.set(c,a[c]);return b};_.wh=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};xh=function(a,b){b=b.toLowerCase();for(const [c,d]of Object.entries(a))if(c.toLowerCase()===b)return d;return null};Ah=function(a){return a&&0<=yh[a]?yh[a]:zh};
27
+ Ch=function(a){if(!a)return _.C("clpp.log",Ib+a+ca),-1;const b=Bh[a.toUpperCase()];return void 0===b?(_.C("clpp.log",Ib+a+ca),-1):b};_.Eh=function(a){Dh.info.apply(Dh,arguments)};_.Fh=function(a){Dh.debug.apply(Dh,arguments)};_.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+"'"))}};
28
+ Kh=function(a){return Object.values(_.Hh).find(a)||null};Lh=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};Mh=function(a){return 0>=a?Promise.resolve():new Promise(b=>{setTimeout(()=>{b()},1E3*a)})};Ph=function(a,b){return _.x(function*(){yield Nh(a,()=>Promise.all(Oh(a).map(b)))})};Qh=function(a,b){_.x(function*(){yield Nh(a,()=>Promise.all(a.f.filter(c=>null!=c.getLoadedSource()).map(b)))})};
29
+ Oh=function(a){return[a.wc,...a.f].filter(b=>null!=b)};Nh=function(a,b){return _.x(function*(){a.a&&(yield a.a);a.a=b().then(()=>{a.a=null})})};_.Sh=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)Rh(b[c]);a.a.clear()};Vh=function(a,b,c){var d=[ge,"msneedkey",Tg,"needkey"];const e=f=>{for(const g of d)a.off(b,g,e);c(f)};for(const f of d)a.on(b,f,e)};Rh=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};
30
+ Xh=function(a){return Wh(a).filter(b=>b.type===Gd&&!b.Re)};Yh=function(a){a.forEach(b=>{b.Re=!0})};bi=function(a,b){a=a.map(c=>({startTime:c.startTime,endTime:c.endTime,key:c.value.key,value:c.value.data,ag:!1}));a=Zh(a);b&&(a=$h(a));return new Set(ai(a))};Wh=function(a){const b=[];for(const c of a)b.push(c);return b};
31
+ ci=function(a,b){const c=a.endTime-a.startTime,d=b.endTime-b.startTime,e=a.Jf||a.startTime,f=b.Jf||b.startTime;return(Infinity===c&&Infinity===d||.01>Math.abs(c-d))&&.5>Math.abs(e-f)&&a.value.key===b.value.key&&a.value.data===b.value.data};ai=function(a){const b=[];for(const c of a)(a=b.find(d=>d.startTime===c.startTime&&d.endTime===c.endTime))?di(c,a):(a=ei(c),b.push(a));return b};
32
+ di=function(a,b){if(a.key.startsWith("X-"))b.customAttributes||(b.customAttributes={}),b.customAttributes[a.key]=a.value,"X-CUSTOM-ID"===a.key&&(b.id=a.value);else if("SCTE35-OUT"===a.key||"SCTE35-IN"===a.key)b.schemeIdUri=_.zg,b.type=_.fi};ei=function(a){var b=a.startTime;const c=a.endTime;b={schemeIdUri:"",value:"",startTime:b,endTime:c,id:`T${b.toFixed(2)}-${c.toFixed(2)}`,type:_.gi,eventElement:null};di(a,b);return b};
33
+ Zh=function(a){const b=new Set(a),c=new Set(a.filter(d=>"SCTE35-OUT"===d.key).map(hi));a.filter(d=>"SCTE35-IN"===d.key).forEach(d=>{c.has(hi(d))||(d.ag=!0)});return Array.from(b.values())};$h=function(a){a.forEach(b=>{b.ag&&(b.endTime=b.startTime,b.startTime=0)});return a};hi=function(a){return`${a.startTime}-${a.endTime}`};
34
+ mi=function(a,b){a.g.debug("onMetadataTrackAdded_()");b.mode=_.oe;var c=!b.cues||0===b.cues.length;if(a.m.isLive()||!c){var d=b.cues;c=Xh(d);Yh(c);a.a=bi(c,a.l);0<a.a.size&&(ii(a,a.a),a.m.trigger(new _.D(_.mg)));a.j.on(b,_.Od,()=>{{const l=a.m.getPosition();for(const m of a.a){var e,f=a,g=m,h=l;if(Infinity===g.endTime){if(e=!f.f.has(g)){e=g.startTime;var k=e+.5;e=e<=h&&h<=k}e&&(f.f.add(g),f.m.trigger(new _.D(_.kg,{detail:g})))}else h=g.startTime<=h&&h<=g.endTime,!h&&f.f.has(g)?(f.f.delete(g),f.m.trigger(new _.D(_.lg,
35
+ {detail:g}))):h&&!f.f.has(g)&&(f.f.add(g),f.m.trigger(new _.D(_.kg,{detail:g})))}}});a.m.isLive()&&(a.h=setInterval(()=>{if(b.cues){var e=a.m.getSeekRange().start;var f=[];for(var g of b.cues)g.endTime<e&&f.push(g);ji(a,b,f);0<f.length&&a.g.debug(`Evicted ${f.length} old cues.`);for(var h of a.a)h.endTime<e&&a.a.delete(h);e=0<f.length}else e=!1;ki(a,b);f=Xh(d);var k=bi(f,a.l);g=new Set;h=!1;for(l of k)(k=li(a,l))?(l.customAttributes&&(k.customAttributes=_.kh(k.customAttributes||{},l.customAttributes)||
36
+ void 0),h=!0):(a.a.add(l),g.add(l));var l={Qh:g,Rg:0<g.size||h};const {Qh:m,Rg:n}=l;Yh(f);(e||n)&&a.m.trigger(new _.D(_.mg));ii(a,m)},6E3))}};ni=function(a,b){a.j.on(b,_.Dc,c=>{c=c.track;c.kind===_.Ke&&mi(a,c)})};ii=function(a,b){for(const c of b)a.m.trigger(new _.D(_.jg,{detail:c}))};li=function(a,b){return Array.from(a.a.values()).find(c=>b.startTime===c.startTime&&b.endTime===c.endTime)||null};
37
+ ki=function(a,b){if(b.cues){var c=Wh(b.cues).filter(f=>f.type===Gd),d=c.filter(f=>f.Re);c=c.filter(f=>!f.Re);var e=[];for(const f of c)for(const g of d)ci(f,g)&&(e.push(f),g.Jf=f.startTime);ji(a,b,e);0<e.length&&a.g.debug(`Removed ${e.length} duplicated cues.`)}};ji=function(a,b,c){for(const d of c)try{b.removeCue(d)}catch(e){a.g.debug("Failed to remove cue",d,e)}};_.oi=function(a){return Array.isArray(a)?a:[a]};pi=function(a,b){return a===b?!0:a.length===b.length&&a.every((c,d)=>c===b[d])};
38
+ ri=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 qi(a,b)&&qi(b,a)};qi=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};_.si=function(a,b={}){if(b.Hf){const c=[];for(const d of a)c.some(e=>b.Hf(d,e))||c.push(d);return c}return Array.from((new Set(a)).values())};ti=function(a,b){const c=new Set(a),d=new Set(b);return{ci:a.filter(e=>!d.has(e)),Zi:a.filter(e=>d.has(e)),Og:b.filter(e=>!c.has(e))}};
39
+ ui=function(a,b){b=b.track;b.kind!==_.Ke&&(b.mode===_.Sf&&(b.mode=_.oe),a.a.on(b,_.Od,c=>{c=c.target||c.srcElement;c.mode=_.oe;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.l.append(c,[]))}))};vi=function(a,b,c,d){a=`${a===_.F?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.rh(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};
40
+ wi=function(a,b){const c=b||pi;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)}};_.xi=function(a){return null!=a};zi=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}throw new _.yi("No non-null, non-undefined value found");};Ai=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}};
41
+ _.Bi=function(a){var b;a instanceof _.Bi?(Ci(this,a.Ab),this.Bc=a.Bc,this.$a=a.$a,Di(this,a.Tc),this.Ka=a.Ka,_.Ei(this,Fi(a.a)),this.rc=a.rc):a&&(b=String(a).match(Gi))?(Ci(this,b[1]||"",!0),this.Bc=Hi(b[2]||""),this.$a=Hi(b[3]||"",!0),Di(this,b[4]),this.Ka=Hi(b[5]||"",!0),_.Ei(this,b[6]||"",!0),this.rc=Hi(b[7]||"")):this.a=new _.Ii(null)};Ci=function(a,b,c){a.Ab=c?Hi(b,!0):b;a.Ab&&(a.Ab=a.Ab.replace(/:$/,""))};
42
+ Di=function(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Tc=b}else a.Tc=null};_.Ei=function(a,b,c){b instanceof _.Ii?a.a=b:(c||(b=Ji(b,Ki)),a.a=new _.Ii(b))};Hi=function(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""};Ji=function(a,b,c){return typeof a===_.bg?(a=encodeURI(a).replace(b,Li),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null};Li=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)};_.Ii=function(a){this.f=a||null};
43
+ Fi=function(a){var b=new _.Ii;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.h=a.h}return b};Ni=function(a,b){const c=Mi[a];for(const d of c)for(const e of b)if(d.test(e.trim()))return e.trim();return a===_.H?"":null};_.J=function(a,b,c,d){d=void 0===d?{}:d;a=a.getAttribute(b);if(!a&&d.required)throw new _.I(_.F,4,4023,`Required attribute missing: ${b}`);return a?a.value:c||null};
44
+ _.Pi=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Oi.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.Qi=function(a,b){a=_.Pi(a);b=_.Pi(b);return a.split("-")[0]===b.split("-")[0]};Ri=function(a){return a.reduce((b,c)=>b+c,0)};_.Si=function(a,b){for(const c of a)if(!b(c))return!1;return!0};Ti=function*(a){for(let b=0;b<a;b++)yield b};
45
+ Vi=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!==b.byteLength)return!1;if(Ui(a)===Ui(b)&&(a.byteOffset||0)===(b.byteOffset||0))return!0;const c=_.K(a);b=_.K(b);for(const d of Ti(a.byteLength))if(c[d]!==b[d])return!1;return!0};Ui=function(a){return a instanceof ArrayBuffer?a:a.buffer};_.K=function(a,b=0,c=Infinity){return Wi(a,b,c,Uint8Array)};
46
+ Wi=function(a,b,c,d){const e=d.BYTES_PER_ELEMENT||1,f=Ui(a),g=(a.byteOffset||0)+a.byteLength;a=Math.max(0,Math.min((a.byteOffset||0)+b*e,g));c=Math.min(a+Math.max(c*e,0),g);a/=e;return new d(f,a,c/e-a)};Xi=function(a,b=0,c=Infinity){return Wi(a,b,c,Uint16Array)};Yi=function(a,b=0,c=Infinity){return Wi(a,b,c,Uint32Array)};_.Zi=function(a,b=0,c=Infinity){return Wi(a,b,c,Int32Array)};_.$i=function(a,b=0,c=Infinity){return Wi(a,b,c,DataView)};
47
+ aj=function(a){return a instanceof ArrayBuffer?a:0===a.byteOffset&&a.byteLength===a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};bj=function(a){let b="";for(let c=0;c<a.length;c+=16E3)b+=String.fromCharCode.apply(null,a.subarray(c,c+16E3));return b};
48
+ _.cj=function(a){if(!a)return"";a=_.K(a);239===a[0]&&187===a[1]&&191===a[2]&&(a=a.subarray(3));if("TextDecoder"in window){a=(new TextDecoder).decode(a);if(a.includes("\ufffd"))throw Error(Pa);return a}a=escape(bj(a));try{return decodeURIComponent(a)}catch(b){throw Error(Pa);}};
49
+ ej=function(a,b,c){if(!a)return"";if(!c&&0!==a.byteLength%2)throw dj.error("Data has an incorrect length, must be even."),Error("Data does not seem to be UTF-16 encoded!");c=_.K(a);if(b&&255===c[0]&&254===c[1]||254===c[0]&&255===c[1])a=c.subarray(2);if(a instanceof ArrayBuffer)var d=a;else c=new Uint8Array(a.byteLength),c.set(_.K(a)),d=c.buffer;a=Math.floor(a.byteLength/2);c=new Uint16Array(a);d=new DataView(d);for(let e=0;e<a;e++)c[e]=d.getUint16(2*e,b);return bj(c)};
50
+ _.fj=function(a,b){if(_.rh(a))return a;let c="";b=!!b;const d=_.K(a);239===d[0]&&187===d[1]&&191===d[2]?c=_.cj(d):254===d[0]&&255===d[1]?c=ej(d.subarray(2),!1):255===d[0]&&254===d[1]&&(c=ej(d.subarray(2),!0));const e=function(f,g){return f.byteLength<=g||32<=f[g]&&126>=f[g]}.bind(null,d);dj.debug("Unable to find byte-order-mark, making an educated guess.");0===d[0]&&0===d[2]?c=ej(a,!1):0===d[1]&&0===d[3]?c=ej(a,!0):e(0)&&e(1)&&e(2)&&e(3)&&(c=_.cj(a));if(c)return b&&(c=escape(c)),c;throw Error("Unable to detect text encoding");
51
+ };_.gj=function(a){if("TextEncoder"in window)return(new TextEncoder).encode(a);a=encodeURIComponent(a);a=unescape(a);const b=new Uint8Array(a.length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};_.hj=function(a,b){const c=new Uint8Array(2*a.length),d=new DataView(c.buffer);for(let e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c.buffer};
52
+ _.ij=function(a,b){var c=b||1;b=a.length;const d=new ArrayBuffer(b*c);let e;4===c?e=Yi(d):2===c?e=Xi(d):e=_.K(d);for(c=0;c<b;c++)e[c]=a.charCodeAt(c);return d};_.jj=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.kj=function(a,b){if(String.prototype.endsWith)return a.endsWith(b);const c=a.length-b.length;a=a.lastIndexOf(b,c);return-1!==a&&a===c};_.lj=function(a){return!!(a&&0<a.length)};_.mj=function(a){return!a||0===a.length};
53
+ _.nj=function(a){if(void 0===a||null===a||""===a)return"";try{let b=Number(a);if(uh(b))return"";a="bps";1E3<=Math.abs(b)&&(a="Kbps",b/=1E3);1E3<=Math.abs(b)&&(a="Mbps",b/=1E3);return`${b.toFixed(2).replace(/[.,]00$/,"")}${a}`}catch(b){return""}};_.pj=function(a){a=a.replace(/<[^>]+>/gi,"");oj.innerHTML=a;a=oj.textContent;return a=a.replace(/<[^>]+>/gi,"")};_.rj=function(a,b=!0){a=_.qj(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")};_.qj=function(a){a=bj(_.K(a));return btoa(a)};
54
+ _.sj=function(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));const b=new Uint8Array(a.length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};_.tj=function(a){const b=new Uint8Array(a.length/2);for(let c=0;c<a.length;c+=2)b[c/2]=window.parseInt(a.substr(c,2),16);return b};_.uj=function(a){let b="";for(let c=0;c<a.length;++c){let d=a[c].toString(16);1===d.length&&(d="0"+d);b+=d}return b};
55
+ _.vj=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.length!==b.length)return!1;for(let c=0;c<a.length;++c)if(a[c]!==b[c])return!1;return!0};_.wj=function(a){var b=0;for(var c=0;c<arguments.length;++c)b+=arguments[c].length;b=new Uint8Array(+b);c=0;for(let d=0;d<arguments.length;++d)b.set(arguments[d],c),c+=arguments[d].length;return b};
56
+ _.xj=function(a,b){b.lastIndex=a.a;b=b.exec(a.f);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.a===a.f.length||null===b||b.position!==a.a)return null;a.a+=b.length;return b.results};
57
+ _.Dj=function(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new _.I(_.F,4,4016,{invalidTag:b});b=c[1];var d=c[2];c=[];let e;if(d){d=new _.yj(d);var f;(f=_.xj(d,/^([^,=]+)(?:,|$)/g))&&f[1]&&(e=f[1].trim());const g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;for(;f=_.xj(d,g);)c.push(new _.zj(f[1],f[2]||f[3]||""))}return new _.Cj(a,b,c,e)};_.Fj=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0,fatalStatusCodes:[...Ej]}};
58
+ Gj=function(a,b){a.timeout=b.timeout;a.baseDelay=b.baseDelay;a.backoffFactor=b.backoffFactor;a.fuzzFactor=b.fuzzFactor;a.maxAttempts=b.maxAttempts;a.fatalStatusCodes=b.fatalStatusCodes||[...Ej]};Hj=function(a){const b={};a.forEach((c,d)=>{b[d.trim()]=c});return b};
59
+ _.Jj=function(a,b){_.rh(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});const c={uris:a.uris||[],type:a.type||_.Ij,uriIndex:0,method:a.method||"GET",body:a.body||null,headers:Object.assign({},a.headers),allowCrossSiteCredentials:a.allowCrossSiteCredentials||!1,onProgress:a.onProgress||null,onFragment:a.onFragment||null,maxAttempts:a.maxAttempts||1,currentAttempt:0,baseDelay:a.baseDelay||1E3,backoffFactor:a.backoffFactor||2,fuzzFactor:a.fuzzFactor||.5,timeout:a.timeout||0,requestModifiers:a.requestModifiers||
60
+ [],responseModifiers:a.responseModifiers||[],startTime:a.startTime||null,endTime:a.endTime||null,contentType:a.contentType||null,licenseRequestType:a.licenseRequestType||null,sessionId:null,bytesRemaining:-1,bytesLoaded:-1,bytesTotal:-1,timescale:a.timescale||null,rateLimitBps:a.rateLimitBps||null,disableFragmentSupport:a.disableFragmentSupport||!1,disableMergedFragments:a.disableMergedFragments||!1,fatalStatusCodes:[...Ej],requestStartTimestamp:null};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&Gj(c,b);return c};
61
+ _.Nj=function(a,b,c,d,e,f,g,h){a={uri:e||d,data:b,headers:a,status:c,timeMs:g,responseStartMs:h,request:f};if(Kj(c))return Lj(a);throw Mj(a);};Kj=function(a){return 200<=a&&299>=a&&202!==a};Lj=function(a){return{uri:a.uri,data:a.data||new ArrayBuffer(0),headers:a.headers,status:a.status,fromCache:!!a.headers["x-shaka-from-cache"],timeMs:a.timeMs,responseStartMs:a.responseStartMs,request:a.request}};
62
+ Mj=function(a){a=Lj(a);try{var b=_.fj(a.data,!0)}catch(d){b=null}_.Fh("HTTP error text:",b);const c=a.request;return new _.I(0<=(c?c.fatalStatusCodes||[]:[]).indexOf(a.status)?_.F:1,1,1001,{url:a.uri,status:a.status,responseText:b,headers:a.headers,request:a.request,response:a})};Oj=function(a,b){b=parseInt(b,10);Number.isNaN(b)&&(b=-1);a.bytesTotal=b;a.bytesLoaded=0;a.bytesRemaining=b};Pj=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b);a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};
63
+ Qj=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()};Rj=function(a,b){a.U.then(()=>b(!0),()=>b(!1));return a};_.Sj=function(a,b){a.a.push(Rj(b,()=>{{var c=a.a;const d=c.indexOf(b);-1<d&&c.splice(d,1)}}))};Tj=function(a,b){return _.x(function*(){const c=yield a.fetch(b);return _.cj(c.data).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")})};
64
+ Uj=function(a,b){return _.x(function*(){const c=yield Tj(a,b);try{const d=JSON.parse(c);if(null==d||typeof d!==_.Re)throw Error("Not an object");return d}catch(d){throw new _.yi("Failed to parse JSON response","json-failed");}})};Vj=function(a,b){for(const c of a.headers){const [d,e]=c;b.headers[d]||(b.headers[d]=e)}};
65
+ Wj=function(a,b){const c=new _.Bi(b.uris[b.uriIndex]);let d=c.Ab;d||(d=location.protocol,d=d.slice(0,-1),Ci(c,d),b.uris[b.uriIndex]=c.toString());const e=a.a[d];if(!e)throw new _.I(_.F,1,1E3,{url:c.toString()});return f=>e(f)};Xj=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.x(function*(){if(!navigator.onLine)return!1;if(b){const e=_.Jj(b,c);e.method=d;c||(e.timeout=5E3);e.headers["cache-control"]="no-cache";try{yield a.fetch(e).U}catch(f){if(1002===f.code||1003===f.code)return!1}}return!0})};
66
+ Yj=function(a){return`@@scheme:${a.scheme||""}`+`@@value:${a.value}`+`@@id:${a.id||""}@@type:${a.type||""}`+`@@protocol:${a.protocol||""}`};_.Zj=function(a){return a&&a!==_.sg?a:null};
67
+ bk=function(a){if(!a)throw new _.I(_.F,3,3101,`Invalid track type: ${a}`);if(!_.rh(a))throw new _.I(_.F,3,3101,`Invalid track type: ${a}. Track type must be a string!`);switch(a.toLowerCase()){case _.L:return _.L;case _.M:return _.M;case _.N:return _.N;case ak:return ak}throw new _.I(_.F,3,3101,`Unknown track type: ${a}.`);};
68
+ ek=function(a,b){a=bk(a);const c=_.Zj(b.kind);let d=b.id;d||(d=String(_.ck++));a=new _.dk(d,c===_.Ke?ak:a);a.kind=c;a.label=_.Zj(b.label);a.language=_.Zj(b.language);a.originalLanguage=b.originalLanguage||a.language;return a};_.fk=function(a){return`${a.scheme}//`+`${a.a}${a.port?":"+a.port:""}${a.path}${a.h}${a.f}`};
69
+ _.gk=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)},""):""};_.hk=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};
70
+ ik=function(a,b){return a.startsWith("http:://")||a.startsWith("https:://")?a:(new URL(a,b)).toString()};jk=function(a,b){return _.x(function*(){const c=_.Jj(b);return yield Tj(a.f,c)})};nk=function(a,b,c){return _.x(function*(){const {mimeType:d,renditions:e}=yield kk(a,b,c),f=new _.dk("dummy",_.N),g=e.map((h,k)=>{k=new _.lk(`R${k}`,f);k.bandwidth=h.bandwidth;k.Vc=h.Vc;k.codec=h.codec;k.width=h.width;k.height=h.height;return k});mk(g);return{renditions:g,mimeType:d||void 0}})};
71
+ pk=function(a){a=a.split("\n").filter(c=>c.trim().startsWith("#EXT-X-MEDIA:")).map(c=>ok(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};kk=function(a,b,c){return _.x(function*(){const d=qk(b),e=rk(b,c);return{mimeType:yield sk(a,e,d[0]?d[0].codec:null),renditions:d}})};
72
+ mk=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.");};ok=function(a){const b=_.Dj(0,a);a=d=>(d=b.getAttribute(d))?d.value:void 0;var c=a(_.Fb);c=null!=c?{AUDIO:_.M,VIDEO:_.N,SUBTITLES:_.L}[c]:void 0;return{type:c,groupId:a(_.Ua),name:a(_.gb),language:a(_.$a),Ji:a("AUTOSELECT"),default:a("DEFAULT"),Ri:a("FORCED"),Gf:a("CHARACTERISTICS"),uri:a(_.Hb)}};
73
+ qk=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.Dj(0,b);if(c.getAttribute(_.Sb))throw Error("Playlist contains alternative video streams.");var d=_.J(c,_.yb);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.J(c,_.la);e=e?Number(e):null;var f=_.J(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.J(c,_.oa);c=_.tk(_.w,c?c.split(","):[]);return b={bandwidth:e,Vc:f,codec:c,width:b,height:d,mimeType:null}})};
74
+ rk=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?ik(a,b):null};sk=function(a,b,c){return _.x(function*(){if(!b||!c)return null;var d=yield jk(a,b);d=[uk(d,b),vk(d,b)].filter(Boolean);return _.wk(d,_.w,c)})};uk=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?ik(a,b):null};vk=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.J(_.Dj(0,a),_.Hb))?ik(a,b):null:null};
75
+ _.yk=function(a,b,c){for(const d of _.xk)if(d.probe(b,c))return d.create(a);return null};_.zk=function(a){a=_.xk.indexOf(a);0<=a&&_.xk.splice(a,1)};Ck=function(a,b){var c=Ak;Bk.set(`${a.toLowerCase().split(";")[0]}-${c}`,{priority:c,plugin:b})};_.Gk=function(a,b){var c=[Dk,Ek,Fk,Ak];for(const d of c)if(c=Bk.get(`${a.toLowerCase().split(";")[0]}-${d}`)){const e=c.plugin(),f=e.isSupported(a,b);e.destroy();if(f)return c.plugin}return null};
76
+ _.Hk=function(a,b){b&&(a+=';codecs\x3d"'+b+'"');return a.replace(/\s/g,"")};_.Ik=function(a){return a.split(";")[0]};_.Jk=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(","):""};Nk=function(){if(Kk)return Kk;Lk||(Lk=new _.Mk(()=>{Kk=null}));(Kk=document.querySelector(_.w)||document.querySelector(_.p))||(Kk=document.createElement(_.w));Lk.ia(1);return Kk};_.Ok=function(){return!!navigator.userAgent.match(/Edge?\//)};
77
+ _.Pk=function(a){return(navigator.userAgent||"").includes(a)};_.Qk=function(a){return _.Pk("Tizen"+(a?" "+String(a):""))};Sk=function(a){const b={major:-1,name:_.tg};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=Rk(a,c[0]));2<=c.length&&(b.minor=Rk(a,c[1]));3<=c.length&&(b.patch=Rk(a,c[2]));4<=c.length&&(b.build=Rk(a,c[3]));return b};_.Tk=function(){return _.Pk("Web0S")};_.Vk=function(){return _.Tk()&&79===_.Uk().major};
78
+ _.Uk=function(){const a=Wk();const b=["ie","edge","opera","firefox","safari",nd];var c=Xk();const d=Yk[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return Sk(c[1]);return Sk("")};_.Zk=function(){return _.Pk("CrKey")};_.$k=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.Qk()};_.al=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.$k()&&1<navigator.maxTouchPoints};_.bl=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};
79
+ Rk=function(a,b){try{return parseInt(b,10)}catch(c){dl.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};el=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};
80
+ Xk=function(){const a=Wk();if(!a)return fl;var b=a.match(/^.+?(?=\))/);if(!b)return fl;b=b[0];if(el(b,["iphone","ipad"]))return gl;if(el(b,["android"]))return hl;if(el(b,["macintosh"]))return il;if(el(b,["windows nt"]))return jl;if(el(b,["tizen"]))return kl;if(el(b,["web0s"]))return ll;if(el(b,["linux"]))return ml;dl.warn("Unable to identify OS from user agent: "+a);return fl};Wk=function(){let a=window.navigator.userAgent;return a=a.toLowerCase()};
81
+ _.ol=function(){var a=Xk();var b=Xk();var c=Yk[b];if(c){c=Wk().match(c.os_version)[1];c=Sk(c);if(b===jl)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=Sk("");a:{c=Wk();const e=["ie","edge","opera","firefox","safari",nd];var d=Xk();d=Yk[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=nl}return{os:a,osVersion:b,browser:c,browserVersion:_.Uk()}};
82
+ pl=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.th(a,{kind:_.Zj(b.kind),language:_.Zj(b.language),label:_.Zj(b.label)},["kind","language","label"])};ql=function(a){return a.enabled||a.selected||a.mode===_.Sf||a.mode===_.oe};sl=function(a,b,c){return rl(a)&&b===_.N&&!!c.enableHlsVideoTrackInfo};
83
+ tl=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})))})};ul=function(a,b,c){return rl(a)&&(b===_.M||b===_.L)&&!!c.enableMetadata};
84
+ vl=function(a,b,c){return _.x(function*(){var d=a.m.getLoadedSource();d&&a.j&&(d=yield a.j.a(d.url,c),d.yc&&(d=d.yc.get(`${b.type}:${b.label}`))&&d.Gf&&(b.accessibility=d.Gf.split(",").map(e=>e.trim()).map(e=>({value:e,type:b.type,protocol:"HLS"}))))})};wl=function(a,b){return a.h.filter(c=>c.type===b)};xl=function(a){(a=a.m.getTextDisplayer())&&a.remove(0,Infinity)};zl=function(a,b){if(a=yl(a,b))a=Array.from(a),b===_.L&&(a=a.filter(c=>c.kind!==_.Ke));return a};
85
+ yl=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 _.M:return a.audioTracks;case _.N:return a.videoTracks;case _.L:return a.textTracks;default:return null}};Al=function(a,b){return(a=a.a.get(b)||null)&&a.renditions[0]};Bl=function(a,b){return(a=a.l.get(b))&&a.renditions[0]};
86
+ Cl=function(a,b,c){const d=zl(a,b);if(c){if(void 0===a.h.find(f=>f.id===c.id))throw Error(`Unknown track with ID ${c.id} and type ${b}`);if(c.type!==b)throw Error(`Types mismatch for track ${c.type} and arg ${b}`);a.g.debug("Activate track type "+b+" with ID: "+c.id);if(d){a.l.set(b,c);let f;var e=!0;let g=!1;switch(b){case _.L:f="mode";e=_.Sf;g=_.Rd;break;case _.M:f="enabled";break;case _.N:f="selected"}if(f)for(const h of d)h[f]=pl(c,h,c.type)?e:g}}else if(a.g.debug("Disable track type "+b),a.a.get(b)&&
87
+ d&&b===_.L){for(e of d)e.mode=_.Rd;a.a.set(b,null)}b===_.M?a.m.trigger(new _.D(_.Wc)):b===_.L&&a.m.trigger(new _.D(_.ig))};Dl=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=_.mj(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.I.push(e)}}};
88
+ El=function(a,b){return _.x(function*(){var c=a.m.getConfiguration(),d=_.yk(c,b.mimeType,_.gg);if(d){c=_.Jj(b.url);var e=yield a.m.getNetworkEngine().fetch(c).U;e&&e.data&&(c="External_"+`${a.G++}`,a.o[c]=b,d=d.a(_.K(e.data)),d={url:URL.createObjectURL(new Blob([d])),kind:b.kind,language:b.language,label:b.label,mimeType:_.gg},Dl(a,d,c))}else a.g.warn("Track MIME type is not supported",b)})};rl=function(a){a=a.m.getLoadedSource();return!(!a||a.type!==_.Fl&&!a.url.endsWith(".m3u8"))&&_.$k()};
89
+ Gl=function(a,b,c){c=_.oi(c).filter(e=>e);a.g.info("Find preferred tracks for",b,c);const d=wl(a,b);c.some(e=>{const f=_.Pi(e);return(e=d.find(g=>{g=_.Pi(g.language||"");return _.Qi(f,g)}))?(a.g.info("Will select track with id",e.id),Cl(a,b,e),!0):!1})};Il=function(a){return a.name===ob&&Hl.some(b=>a.message.startsWith(b))};
90
+ _.Ml=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.al()&&(a=360);const b=_.Fj();b.maxAttempts=3;a={source:"",license:Jl,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,ads:{hls:{enable:!0,resolutionOffsetSec:35}},manifest:{attemptParameters:_.Fj(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0,timeline:{version:1,type:void 0}},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,
91
+ bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,restrictions:Kl(a),useCmsd:!0},contentSteering:{enabled:!0,attemptParameters:_.Fj()},drm:null,enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:_.Ge,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,
92
+ xmlParser:_.Ll,streaming:{attemptParameters:b,bufferingGoal:10,rebufferingGoal:2,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,relativeTextTimestamp:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,disableAudioTracks:!1,disableVideoTracks:!1,smallGapLimit:.5,jumpLargeGaps:!0,durationBackoff:1,maxSegmentToMediaOffset:1,forceNativeTS:!1,preferNativeHlsOnSafari:!0,safeSeekOffset:5,stallEnabled:!0,stallThreshold:3,stallSkip:.5,bufferLimitUpdateInterval:.5,overridePasp:!1,enableLiveEdgeChasing:!1,
93
+ chasingRate:1.15,startChasingAt:5,stopChasingAt:2,chaseJumpDistance:10,patchEdgeWhenMixedContent:!1,ignoreDrift:!1,disableFragmentSupport:!1,disableMergedFragments:!1,ignoreManagedMediaSourceStreamingHints:!1},mediaSource:{codecSwitchingStrategy:_.Bf},restrictions:Kl(),tizen:{sideStreamText:_.Qk(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1},mse:{sendPlaybackSessionIdHeader:!1},trickPlay:{speedUpMode:_.Pd,preferTrickPlayTracks:!0},playlist:{timeline:"basic",content:_.Tb,cropTimeline:!1},
94
+ yospace:{enabled:!1}};if(_.Qk()||_.Tk())a.ads.hls.enable=!1;if(_.Pk("Edge/")||_.Qk())a.streaming.gapDetectionThreshold=.5;_.Tk()&&(a.streaming.stallEnabled=!1);_.Vk()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=.02);_.Qk()&&(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};
95
+ return a};Kl=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}};
96
+ _.Ol=function(...a){if(!a)return _.Ml();var b=[_.Ml()];let c=!1;for(let d of a)null!==d&&void 0!==d&&(_.rh(d)&&(d={source:d}),d.lowLatencyMode&&!c&&(b.push({streaming:{rebufferingGoal:.1,bufferLimitUpdateInterval:.01,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}}));
97
+ a=_.kh.apply(null,b);_.rh(a.volume)&&(""===""+a.volume?a.volume=null:a.volume=Number(a.volume));if(!_.B(a.volume)&&(!_.sh(a.volume)||uh(a.volume)))throw new _.I(_.F,7,7100,"config.volume is not a number");if(!_.B(a.preferredTextLanguage)&&!_.rh(a.preferredTextLanguage)&&!Array.isArray(a.preferredTextLanguage))throw new _.I(_.F,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.B(a.preferredAudioLanguage)&&!_.rh(a.preferredAudioLanguage)&&!Array.isArray(a.preferredAudioLanguage))throw new _.I(_.F,
98
+ 7,7100,"config.preferredAudioLanguage is not a string or an array");if(!_.B(a.preferredAudioCodec)&&!_.rh(a.preferredAudioCodec)&&!Array.isArray(a.preferredAudioCodec))throw new _.I(_.F,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.B(a.preferredVideoCodec)&&!_.rh(a.preferredVideoCodec)&&!Array.isArray(a.preferredVideoCodec))throw new _.I(_.F,7,7100,"config.preferredVideoCodec is not a string or an array");if(!_.B(a.drm)){if(a.drm.env&&!_.rh(a.drm.env))throw new _.I(_.F,7,
99
+ 7100,"config.drm.env is not a string");if(a.drm.offlineId&&!_.rh(a.drm.offlineId))throw new _.I(_.F,7,7100,"config.drm.offlineId is not a string");}if(b=a.streaming){b.bufferingGoal=Number(b.bufferingGoal);b.rebufferingGoal=Number(b.rebufferingGoal);b.bufferBehind=Number(b.bufferBehind);b.smallGapLimit=Number(b.smallGapLimit);b.durationBackoff=Number(b.durationBackoff);if(!_.sh(b.bufferingGoal)||uh(b.bufferingGoal))throw new _.I(_.F,7,7100,"config.streaming.bufferingGoal is not a number");if(!_.sh(b.rebufferingGoal)||
100
+ uh(b.rebufferingGoal))throw new _.I(_.F,7,7100,"config.streaming.rebufferingGoal is not a number");if(b.rebufferingGoal>b.bufferingGoal)throw new _.I(_.F,7,7100,"config.streaming.rebufferingGoal must be \x3e\x3d bufferingGoal");if(!_.sh(b.bufferBehind)||uh(b.bufferBehind))throw new _.I(_.F,7,7100,"config.streaming.bufferBehind is not a number");if(!_.sh(b.smallGapLimit)||uh(b.smallGapLimit))throw new _.I(_.F,7,7100,"config.streaming.smallGapLimit is not a number");if(!_.sh(b.durationBackoff)||uh(b.durationBackoff))throw new _.I(_.F,
101
+ 7,7100,"config.streaming.durationBackoff is not a number");b=a.manifest;if(_.B(b.availabilityWindowOverride))b.availabilityWindowOverride=NaN;else if(typeof b.availabilityWindowOverride!==_.t)throw new _.I(_.F,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");Nl(a.restrictions);Nl(a.abr.restrictions);a.abr.initialRestrictions&&Nl(a.abr.initialRestrictions)}return a};
102
+ Nl=function(a){_.B(a.maxPixels)&&(a.maxPixels=Infinity);_.B(a.maxBandwidth)&&(a.maxBandwidth=Infinity);_.B(a.maxHeight)&&(a.maxHeight=Infinity);_.B(a.maxWidth)&&(a.maxWidth=Infinity);_.B(a.minPixels)&&(a.minPixels=0);_.B(a.minBandwidth)&&(a.minBandwidth=0);_.B(a.minHeight)&&(a.minHeight=0);_.B(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);
103
+ a.minPixels=Number(a.minPixels);a.maxPixels=Number(a.maxPixels);if(Number.isNaN(a.minWidth)||Number.isNaN(a.maxWidth)||Number.isNaN(a.minHeight)||Number.isNaN(a.maxHeight)||Number.isNaN(a.minBandwidth)||Number.isNaN(a.maxBandwidth)||Number.isNaN(a.minPixels)||Number.isNaN(a.maxPixels))throw new _.I(_.F,7,7100,"Restrictions contain NaN");};Pl=function(a){return typeof a===_.Re&&!Array.isArray(a)&&"source"in a};_.Rl=function(a){return _.Ql.get(a)||null};
104
+ _.Tl=function(a){_.Ql.get(a.id())?Sl.warn("Component already in use."):_.Ql.set(a.id(),a)};Ul=function(a){return Array.from(_.Ql.values()).find(b=>b instanceof a)||null};Vl=function(a){for(const b of _.Ql.values())a(b)};Wl=function(a){Vl(b=>{b.o(a)})};Xl=function(a){Vl(b=>{b.h(a)})};Yl=function(){Vl(()=>{})};Zl=function(){Vl(()=>{})};$l=function(a){if(null!==Ul(a))return null;a=new a;a.f();_.Tl(a);Sl.info("Installed component:",a.id());return a};
105
+ am=function(a){if(a=Ul(a))a.a(),_.Ql.delete(a.id()),Sl.info("Uninstalled component:",a.id())};bm=function(a,b){3===b.type&&(a.f&&(a.g.debug("Attaching tracking token"),b.headers[Vg]=a.f),a.a&&(b.headers[Wg]=a.a))};
106
+ cm=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[Vg],a.a=b.headers[Wg],b=b.headers["x-dt-csl-renewal-info"],a.f&&a.g.debug("Loaded tracking token "+a.f),a.a&&a.g.debug("Loaded followup token "+a.a),b)?(a=JSON.parse(_.cj(_.sj(b))),{delay:a.renewalPeriod,Fi:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};_.em=function(a){_.dm[a.I]=a};
107
+ _.gm=function(a){const b={attemptParameters:_.Fj(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,ignoreUnrecognizedInitData:!0,Na:{},widevineVersion:_.Jd};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!==
108
+ a.ignoreUnrecognizedInitData&&(b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),typeof a.widevineVersion===_.bg&&0<a.widevineVersion.length&&(b.widevineVersion=a.widevineVersion),a.env)){const c=_.dm[a.env]||null;if(!c)throw _.Fh(_.ua,_.vb+a.env+_.aa),new _.I(_.F,6,6015,`DRM environment '${a.env}' is missing.`);b.Na=_.fm(c,a.customData)||{};_.jj(a.env.toLowerCase(),de)&&(b.enforceSingleSession=!0)}return b};
109
+ im=function(a){a=hm[a];if(!a)return null;const b=_.ol();return b.os===hl&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};
110
+ _.fm=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[_.Jd];if(g){var h=g.licenseUrl;d=Ai(d,g.videoRobustness);e=Ai(e,g.audioRobustness);var k=g.modifiers,l=zi(b?b.widevineDistinctiveIdentifierRequired:void 0,g.distinctiveIdentifierRequired,!1),m=zi(b?b.widevinePersistentStateRequired:void 0,g.persistentStateRequired,!1);g=void 0===f?g.serverCertificate:null===f?null:typeof f===_.bg?im(f):f;c[_.Jd]=
111
+ {licenseUrl:h,videoRobustness:d,audioRobustness:e,modifiers:k,distinctiveIdentifierRequired:l,persistentStateRequired:m,serverCertificate:g}}(g=a.f[_.Dd])&&(c[_.Dd]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});h=b?b.playReadyVideoRobustness:void 0;b=b?b.playReadyAudioRobustness:void 0;(g=a.f[_.Hd])&&(c[_.Hd]={licenseUrl:g.licenseUrl,videoRobustness:h||g.videoRobustness,audioRobustness:b||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,
112
+ modifiers:g.modifiers});return c};_.jm=function(){throw new _.I(_.F,3,3E3);};_.km=function(a,b,c){const d=c||0;c=b.byteLength-d;const e=_.K(a.f.buffer);b=_.K(b.buffer,d,c);try{e.set(b,a.a),a.a+=c}catch(f){_.jm()}};_.O=function(a,b){try{a.f.setUint32(a.a,b,a.h),a.a+=4}catch(c){_.jm()}};_.lm=function(a){return a.a<a.f.byteLength};_.mm=function(){throw new _.I(_.F,3,3E3,"Buffer read out of bounds.");};_.nm=function(a){try{const b=a.f.getUint8(a.a);a.a+=1;return b}catch(b){_.mm()}};
113
+ _.om=function(a){try{const b=a.f.getUint16(a.a,a.h);a.a+=2;return b}catch(b){_.mm()}};_.P=function(a){try{const b=a.f.getUint32(a.a,a.h);a.a+=4;return b}catch(b){_.mm()}};_.pm=function(a){try{const b=a.f.getInt32(a.a,a.h);a.a+=4;return b}catch(b){_.mm()}};_.qm=function(a){let b=0,c=0;try{!0===a.h?(b=a.f.getUint32(a.a,!0),c=a.f.getUint32(a.a+4,!0)):(c=a.f.getUint32(a.a,!1),b=a.f.getUint32(a.a+4,!1))}catch(d){_.mm()}if(2097151<c)throw new _.I(_.F,3,3001);a.a+=8;return c*Math.pow(2,32)+b};
114
+ rm=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.nm(a);return c};_.sm=function(a,b){a.a+b>a.f.byteLength&&_.mm();var c=a.a+a.f.byteOffset;c=a.f.buffer.slice(c,c+b);a.a+=b;return _.K(c)};tm=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.um=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.vm=function(a){for(;_.lm(a.reader)&&!a.parser.a;)a.parser.de(a.start+a.headerSize,a.reader,a.partialOkay)};
115
+ _.wm=function(a){for(let b=_.P(a.reader);0<b&&!a.parser.a;--b)a.parser.de(a.start+a.headerSize,a.reader,a.partialOkay)};_.xm=function(a){return b=>{const c=b.reader.Sa()-b.reader.getPosition();a(_.sm(b.reader,c))}};_.ym=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};zm=function(a){let b="";try{b=_.fj(a)}catch(c){}return b};_.Bm=function(a){a=zm(a);let b="";a.length&&(b=(new _.Am(a)).a);return b};
116
+ Dm=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.cj(a)),d=_.sj(c.sinf[0]);(new _.Cm).N(_.Vf,_.vm).N("schi",_.vm).N("tenc",e=>{e.reader.skip(6);_.nm(e.reader)&&(e.reader.skip(1),b=_.uj(_.sm(e.reader,16)));e.parser.stop()}).parse(d)}catch(c){}return b};
117
+ Fm=function(a,b,c){if(!c||!c.byteLength)throw new _.I(_.F,6,6102);let d;typeof b===_.bg?d=_.hj(b,!0):d=b;a=_.hj(zm(a),!0);b=new _.Em(12+a.byteLength+d.byteLength+c.byteLength,!0);_.O(b,a.byteLength);_.km(b,_.K(a));_.O(b,d.byteLength);_.km(b,_.K(d));_.O(b,c.byteLength);_.km(b,_.K(c));return _.K(b.buffer)};_.Gm=function(a){var b=_.K(a.body);b=_.rj(b);a.headers[ta]=Pc;a.body=_.gj("spc\x3d"+b).buffer};
118
+ _.Hm=function(a){let b;try{b=_.cj(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=aj(_.sj(b))};Pm=function(a,b){b=Im(b);if(a===_.Jd)return b+Mm;if(a===_.Hd)return b+Nm;if(a===_.Dd)return b+Om;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
119
+ _.Sm=function(a,b,c,d){d=void 0===d?!0:d;c=a.drm;c&&c.env.startsWith(wa)?c.customData&&(_.Rm(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)):Qm.warn(hb)};
120
+ _.Tm=function(a,b){try{const c=_.K(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));Qm.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){Qm.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
121
+ _.Vm=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.Sm(a,b,c,!1);b.headers[ta]=Pc;c={spc:_.qj(b.body)};if((a=a.drm)&&a.env.startsWith(xa)&&d){a={};var e=_.hk((new _.Am(Um(d))).f);d=e.keyId;if(e=e.assetId)Qm.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(Qm.info("Applying keyId from HLS manifest."),a.keyId=d);d=a;d.keyId&&(Qm.info("Adding keyID to FPS payload:",d.keyId),c.keyId=d.keyId);d.assetId&&(Qm.info("Adding assetID to FPS payload:",d.assetId),c.assetId=d.assetId)}b.body=
122
+ _.ij(_.gk(c,!0))};_.Wm=function(a,b){Qm.debug("Clearing response data");200===b.status&&(a=_.cj(b.data).trim(),"\x3cckc\x3e"===a.substr(0,5)&&"\x3c/ckc\x3e"===a.substr(-6)&&(a=a.slice(5,-6)),b.data=_.sj(a).buffer)};
123
+ _.Xm=function(a,b,c){b=zm(b);c=c&&c.customData?c.customData:{};b=new _.Am(Um(b));const d=_.hk(b.f);if(a&&a.drm&&a.drm.customData){var e=a.drm.customData;a=e.assetId;e=e.variantId;a&&_.lj(`${a}`)&&(d.assetId=a,Qm.debug("Using assetId from the configuration instead of the value from the HLS manifest."));e&&_.lj(`${e}`)&&(d.variantId=e,Qm.info("Using variantId from the configuration instead of the value from the HLS manifest."))}d.keyId?(a=["keyId"],Qm.debug("KeyId found in FPS SKD. Removing other parameters")):
124
+ a=["assetId","variantId"];b.f=_.gk(d,!1,a);"/"!==b.path||b.j.includes(`${b.a}/`)||(b.path="");b=_.fk(b);return c.fpsContentId=b};_.Ym=function(a,b){a=a.drm;if(!a||!a.env.startsWith(wa))Qm.warn(hb);else if(a.customData&&a.customData.merchant&&!a.env.startsWith(xa)){const c=new _.Bi(b.uris[0]);let d=c.Ka;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.Ka=d;b.uris[0]=c.toString()}};Zm=function(a,b,c){_.Sm(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.Bi(b.uris[0]);c.a.add(_.cf,a);b.uris[0]=c.toString()};
125
+ Im=function(a){if(a===$m)return"https://lic.drmtoday.com";if(a===an)return"https://lic.staging.drmtoday.com";if(a===bn)return"https://lic-demo.staging.drmtoday.com";if(a===cn)return"https://lic.test.drmtoday.com";throw Error("Unknown DRMtoday environment '"+a+"'. Can not infer DRMtoday base URL!");};Um=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};
126
+ _.Rm=function(a,b){if((b=b.drm)&&b.customData){var c={userId:b.customData.userId,sessionId:b.customData.sessionId,merchant:b.customData.merchant};_.nh(c)&&(a.headers["dt-custom-data"]=btoa(JSON.stringify(c)));(b=b.customData.authToken)&&(a.headers["x-dt-auth-token"]=b)}};en=function(a){const b={},c=a?a[Xg]:void 0;a=dn[a?a[Xg]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};
127
+ fn=function(a){a=a["x-dt-li"];if(!a)return null;try{const b=JSON.parse(atob(a));a={};b.ti&&(a.requestId=b.ti);b.rpd&&(a.delay=Number(b.rpd)/1E3);return a}catch(b){return Qm.warn("Unable to parse DRMtoday License Info header (x-dt-li)",b),null}};gn=function(a,b){a.size=void 0===b?0:1;a.g.debug("Setting key status to",b);a.a=b};jn=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=hn.value().get(b),c.one(a,b,d))};
128
+ kn=function(a,b){a.f=b;_.Sh(a.a);if(!b)return Promise.resolve();a.a.on(b,ge,c=>{_.Fh("AppleEmeManager.cancelNativeMediaEncryptedEvent_",c);"MediaEncryptedEvent"in window&&c instanceof MediaEncryptedEvent&&(a.g.info("Cancel native MediaEncryptedEvent when using Apple-prefixed EME"),c.stopImmediatePropagation())});a.a.on(b,Tg,c=>{{a.g.debug("Handle webkitNeedKey event");c=_.K(c.initData);if(_.$i(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=ej(c.subarray(4),
129
+ !0);c=_.gj(c);const d=new Event(ge);d.initDataType="skd";d.initData=aj(c);a.f.dispatchEvent(d)}});jn(b,HTMLMediaElement.HAVE_METADATA,a.a,()=>b.webkitSetMediaKeys(a.h));return Promise.resolve()};ln=function(a,b){gn(a.keyStatuses,b);b=new _.D(se);a.dispatchEvent(b)};
130
+ on=function(a,b){a.a=b;_.Sh(a.f);b&&(a.f.on(b,a.h+"needkey",c=>{{const d=new Event(ge);d.initDataType=_.jd;d.initData=aj(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.h+"keymessage",c=>{{const e=mn(a,c.sessionId);if(e){var d=void 0===e.keyStatuses.getStatus();c=new _.D(_.Je,{messageType:d?ve:ue,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.h+"keyadded",c=>{(c=mn(a,
131
+ c.sessionId))&&c.ready()}),a.f.on(b,a.h+"keyerror",c=>{var d=mn(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?nn(d,_.af):1===e?nn(d,"expired"):nn(d,_.re))}}}))};
132
+ mn=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};nn=function(a,b){gn(a.keyStatuses,b);b=new _.D(se);a.dispatchEvent(b)};pn=function(a,b){return a.w?a.w+b.charAt(0).toUpperCase()+b.slice(1):b};
133
+ rn=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===_.df)if(c)d=_.K(_.gj("LOAD_SESSION|"+c));else{const f=_.gj("PERSISTENT|"),g=new Uint8Array(f.byteLength+b.byteLength);g.set(f,0);g.set(_.K(b),f.byteLength);d=g}else d=_.K(b)}catch(f){return Promise.reject(f)}a.f=new _.qn;const e=pn(a,"generateKeyRequest");try{a.j[e](a.h,d)}catch(f){if(f.name!==Za)return a.f=null,Promise.reject(f);(new _.Mk(()=>{try{a.j[e](a.h,d)}catch(g){a.f.reject(g),
134
+ a.f=null}})).ia(.01)}return a.f};sn=function(a,b,c){if(a.a)a.a.then(()=>sn(a,b,c)).catch(()=>sn(a,b,c));else{a.a=b;if(a.h===Pg){var d=_.cj(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=_.sj(e.keys[0].k);e=_.sj(e.keys[0].kid)}else d=_.K(c),e=null;var f=pn(a,"addKey");try{a.j[f](a.h,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
135
+ vn=function(a,b){var c=tn;if(a){var d=c.find(e=>e.a()===a);if(d)return un.info(Xb+d.a()),d.create();un.info("Cannot create selected EME manager, falling back to the default.")}if(b&&(d=c.find(e=>e.a()===b)))return un.info(Xb+d.a()),d.create();c=c[0];if(!c)throw Error("Missing EME managers.");un.info(Xb+c.a());return c.create()};_.yn=function(a){var b=_.tj(a);b=parseInt(b.byteLength,10).toString(16);b=_.tj("12"+b+a);return new wn(xn,a,b)};
136
+ _.An=function(a){const b=new _.zn(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.P(b);var c=_.P(b);c=_.um(c);var d=_.P(b);const e=d>>>24;d&=16777215;var f=_.sm(b,16);f=_.uj(f);if(0<e){var g=_.P(b);b.skip(16*g)}g=_.P(b);const h=()=>{let u=_.nm(b),v=(u&127)>>>0,y=7;for(;128<=u&&28>=y;)u=_.nm(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(!_.lm(b))throw Error("not enough data to skip!");while(_.nm(b)&128);break;case 1:b.skip(8);break;case 2:b.skip(h());
137
+ 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(;_.lm(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=rm(b,q);2===n?l.push(q):4===n&&(m=q)}else k(q)}_.Fh("Parsed WV PSSH Box","size",a,"name",c,Dg,e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.qj(m):"","keyIds",l.map(u=>_.uj(u)));return 0<l.length?_.yn(_.uj(l[0])):null};
138
+ _.Bn=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=_.K(a);a.set(b,0);return a};
139
+ _.Hn=function(a){var b=_.Cn;a:{var c=new _.zn(new DataView(a.buffer),!0);_.P(c);for(_.om(c);_.lm(c);)if(1===_.om(c)){var d=_.om(c);c=_.sm(c,d);break a}c=null}c||(c=a);a=ej(c,!0);d=b.j(a,"WRMHEADER");a=d.getAttribute(Dg)||"";d=b.h(d,"DATA");var e=b.h(d,"LA_URL");b=e?b.f(e):"";var f=_.Cn;if(e=f.h(d,"KID"))if(e=f.f(e)){var g=f.h(d,na);f=g?f.f(g):null;e={value:e,se:f}}else e=null;else e=null;d=e?[e]:(e=Dn(d))?[e]:(d=En(d))?d:null;const {value:h="",se:k}=d&&d[0]||{};d=_.sj(h);d=_.Bn(d);d=_.uj(d);return new _.Fn(_.Gn,
140
+ d,b,c,a,k)};Dn=function(a){var b=_.Cn;a=b.h(a,"PROTECTINFO");if(!a)return null;var c=b.h(a,"KID");if(!c)return null;b=c.getAttribute("VALUE");if(!b)return null;a=c.getAttribute(na);c=c.getAttribute("ALGID");return{value:b,se:a,Pg:c}};
141
+ En=function(a){var b=_.Cn;a=b.h(a,"PROTECTINFO");if(!a)return null;a=b.h(a,"KIDS");if(!a)return null;a=b.a(a,"KID");if(!a.length)return null;b=[];for(const c of a)if(a=c.getAttribute("VALUE")){const d=c.getAttribute(na),e=c.getAttribute("ALGID");b.push({value:a,se:d,Pg:e})}return b.length?b:null};_.Jn=function(a){In&&performance.mark(a)};_.Ln=function(a,b,c){In&&(b=performance.measure(a,b,c),null!=b&&Kn.info(`Step: "${a}" took ${b.duration.toFixed(0)} ms.`))};
142
+ Mn=function(a){return _.x(function*(){const b=new Promise(c=>{(new _.Mk(c)).ia(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.C("Timeout waiting for session close")})};_.On=function(a){return Nn(a)?_.Hd:a};Pn=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};
143
+ Qn=function(a,b){b=b[_.On(a.keySystem)];a.keyIds||(a.keyIds=[]);b&&(a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=b.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=b.persistentStateRequired),a.videoRobustness||(a.videoRobustness=b.videoRobustness||""),a.audioRobustness||(a.audioRobustness=b.audioRobustness||""),a.serverCertificate||(a.serverCertificate=b.serverCertificate||null))};
144
+ _.Rn=function(a,b){b=_.Hk(a.mimeType,b||a.codecs);if(_.Gk(b,a.type)){a=a.type;var c=_.Gk(b,a);c&&(c=c(),b=c.convertCodecs(a,b),c.destroy())}return b};Sn=function(a){for(const b of a.audioCapabilities||[])delete b.robustness;for(const b of a.videoCapabilities||[])delete b.robustness};Un=function(a){return(a.audioCapabilities||[]).some(Tn)||(a.videoCapabilities||[]).some(Tn)};
145
+ Vn=function(a,b){a=_.Bm(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};
146
+ Xn=function(a){var {playerConfig:b,initData:c,initDataType:d,drmInfo:e,drmSystemConfig:f,sessionContext:g,emeApi:h}=a;if("skd"===d&&h===Wn){a=e.serverCertificate;let k=f&&f.modifiers&&f.modifiers.extractContentId;_.ph(k)||(k=Vn);let l="";try{l=k(b,c,g)}catch(m){throw new _.I(_.F,6,6103);}if(!l.length)throw new _.I(_.F,6,6101,"Content ID is an empty string");c=Fm(c,l,a)}return c};Nn=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
147
+ Tn=function(a){return null!=a.robustness&&""!==a.robustness};Yn=function(a,b,c,d,e){for(const f of a){b.includes(f.licenseServerUri)||b.push(f.licenseServerUri);f.serverCertificate&&(c.some(g=>_.vj(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])}};
148
+ Zn=function(a){var b=a.o;const c=a.Y;c.clear();b.forEach((d,e)=>c.set(e,d));b=Array.from(c.values());b.length&&b.every(d=>"expired"===d)&&a.w(new _.I(_.F,6,6014));a.D.Ne(_.wh(c));a.A||a.g.info(va);a.A=!0;a.F=!1};$n=function(a){a.h.forEach((b,c)=>{const d=b.Ie;let e=c.expiration;isNaN(e)&&(e=Infinity);e!==d&&(a.D.Me(c.sessionId,e),b.Ie=e)})};
149
+ ao=function(a){return _.x(function*(){a.B.release();a.B=null;a.M.release();a.M=null;a.A=!1;a.F=!1;a.H.reject();a.$.stop();a.$=null;a.V.stop();a.V=null;const b=Array.from(a.h.keys());for(const c of a.h.values())c.Jc&&c.Jc.stop();a.h.clear();yield Promise.all(b.map(c=>Promise.resolve().then(()=>_.x(function*(){a.g.debug("Closing session",c.sessionId);try{yield Mn(c)}catch(d){a.g.warn("Error while closing session",d)}}))));if(a.C){try{yield a.l.h(null)}catch(c){a.g.warn("Error while resetting media keys",
150
+ c)}a.C=null}a.l=null;a.a=null;a.J.clear();a.I=null;a.L=[];a.f=null;a.w=null;a.D=null;a.R=0;a.O=null})};_.ho=function(a,b){const c=bo(a,b),d=co(b);for(const e of d)eo(a,e,a.f.Na);b=fo(a,b);if(!b.size)return a.S=!0,Promise.resolve();_.Jn(Ud);a=_.go(a,b);return(c?a:a.catch(()=>{})).then(()=>{_.Jn(Td);_.Ln("DRM queryMediaKeys_()",Ud,Td)})};
151
+ _.jo=function(a,b,c){c=void 0===c?[]:c;a.K=io;a.L=c;a.G=0<c.length;a.g.debug("Using Persisted Licenses: "+a.G);a.f&&a.f.enableSessionCacheForSkd&&a.g.info("Enabled session cache for SKD license requests");return _.ho(a,b)};
152
+ _.go=function(a,b){if(1===b.size&&b.has(""))return Promise.reject(new _.I(_.F,6,6E3));null===a.l&&(a.l=vn(a.f.emeApi,a.Ha));for(var c of b.values())0===c.audioCapabilities.length&&delete c.audioCapabilities,0===c.videoCapabilities.length&&delete c.videoCapabilities;let d=c=new _.qn;const e=(h,k,l)=>{k.drmInfos.some(m=>!!m.licenseServerUri)===h&&(d=d.catch(()=>{if(a.j)return null;if(l===_.Hd){if(_.Ok()&&!a.f.Na[l].useLegacySystem)return k.label=Id,a.l.a(Id,[k]).catch(()=>{a.g.warn("Unable to create com.microsoft.playready.recommendation. Falling back to com.microsoft.playready.");
153
+ k.label=_.Hd;Sn(k);return a.l.a(l,[k])});Sn(k)}if(l===_.Jd&&a.f.widevineVersion!==_.Jd){const m=a.f.widevineVersion;if(!m.startsWith(_.Jd))return a.g.error(`Invalid "widevineVersion" value "${m}".`),Promise.reject();const n=Object.assign({},k,{label:m,distinctiveIdentifier:_.Ze,persistentState:_.Ze});return a.l.a(m,[n]).catch(()=>a.l.a(l,[k]))}return a.l.a(l,[k]).catch(m=>{a:{if(l===_.Jd&&Un(k)){const n=_.ol();if(Un(k)&&n.os===hl&&n.browser===nd){a.g.warn("requestMediaKeySystemAccess() failed",m);
154
+ a.g.warn("Will try to recover by removing the robustness attribute of videoCapabilities and audioCapabilities.");Sn(k);m=a.l.a(l,[k]);break a}}throw m;}return m})}))};let f=a.f.preferredDrmSystem;if(!f){var g=_.ol();if(g.os===jl&&10<=g.osVersion.major&&"edge"===g.browser)f=_.Hd;else if("safari"===g.browser)f=_.Dd;else if(g.browser===nd||"firefox"===g.browser)f=_.Jd}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(()=>{throw new _.I(_.F,6,6001,
155
+ "Failed to get MediaKeySystemAccess.");});d=d.then(h=>{if(a.j)return null;a.J.clear();var k=h.getConfiguration();a.g.info("Got MediaKeySystemAccess with configuration",k);var l=k.audioCapabilities||[];k=k.videoCapabilities||[];for(var m of l)a.J.add(m.contentType.toLowerCase());for(var n of k)a.J.add(n.contentType.toLowerCase());{l=h.keySystem;m=b.get(_.On(h.keySystem));n=[];k=[];const q=[],u=[];Yn(m.drmInfos,n,k,q,u);1<k.length&&_.C("Multiple unique server certificates found! Only the first will be used.");
156
+ 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===_.Jf,persistentStateRequired:m.persistentState===_.Jf,audioRobustness:m.audioCapabilities?m.audioCapabilities[0].robustness:"",videoRobustness:m.videoCapabilities?m.videoCapabilities[0].robustness:"",serverCertificate:k[0],initData:q,keyIds:u,periodId:null}}a.a=l;if(!a.a.licenseServerUri)throw new _.I(_.F,6,6012,a.a.keySystem);
157
+ return h.createMediaKeys()}).then(h=>{a.j||(a.g.info("Created MediaKeys for key system",a.a.keySystem),a.I=h,a.S=!0)}).catch(h=>{if(!a.j){a.a=null;a.J.clear();if(h instanceof _.I)throw h;throw new _.I(_.F,6,6002,{browserError:h.message});}});c.reject();return d};
158
+ ko=function(a){a=vh(a.f.Na[_.$e]||{});if(0===a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.tj(f);e=_.tj(e);e={kty:"oct",kid:_.rj(f,!1),k:_.rj(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.gj(d),initDataType:"keyids"}];return{keySystem:_.$e,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
159
+ keyIds:[],periodId:null}};co=function(a){const b=[];for(const c of a)for(const d of c.drmInfos)b.push(d);return b};lo=function(a,b){for(const c of b)""===c.licenseServerUri||a.f.Na[c.keySystem]||(a.f.Na[c.keySystem]={licenseUrl:""})};
160
+ bo=function(a,b){const c=b.some(g=>0<g.drmInfos.length);if(!c){var d=vh(a.f.Na);Pn(b,d)}d=a.f.Na[_.Dd];const e=b.some(g=>g.drmInfos.some(h=>h.keySystem===_.Dd));if(!1!==a.f.Ii&&_.$k()&&!e&&d)for(var f of b)f.drmInfos.push({keySystem:_.Dd,licenseServerUri:d.licenseUrl,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[],periodId:null});if(f=ko(a))for(const g of b)g.drmInfos=[f];b=co(b);lo(a,b);for(const g of b)Qn(g,
161
+ a.f.Na);return c};eo=function(a,b,c){const d=_.On(b.keySystem);c=c[d];d===_.$e&&b.licenseServerUri?a.g.debug("Using Clear Key data URI for",d):c&&c.licenseUrl?(b.licenseServerUri=c.licenseUrl,a.g.debug("Using license server URI from user-configured clpp.drm.DrmEnvironment (licenseUrl) for",d)):a.g.debug("Using license server URI from the manifest for ",d)};
162
+ fo=function(a,b){var c=new Set(co(b));const d=a.G?_.Jf:_.Ze,e=a.G?[_.df]:[fg];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.jd],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Ze,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.Rn(b):"";let h=null;b&&"ac-3"===b.codecs.toLowerCase()&&_.Qk()&&(h=_.Rn(b,_.fe));const k=c?_.Rn(c):"";let l=null;c&&"ac-3"===c.codecs.toLowerCase()&&_.Qk()&&(l=_.Rn(c,_.fe));
163
+ 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=_.Jf);m.persistentStateRequired&&(n.persistentState=_.Jf);b&&_.oi(m.audioRobustness).forEach(q=>{const u={robustness:q||"",contentType:g};n.audioCapabilities.find(v=>v.robustness===u.robustness&&v.contentType===u.contentType)||n.audioCapabilities.push(u);h&&n.audioCapabilities.push({robustness:q||
164
+ "",contentType:h})});c&&_.oi(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};mo=function(a){return _.x(function*(){if(!a.l.o())if(a.O)yield a.O;else try{a.O=a.l.h(a.I),yield a.O}catch(b){a.j||a.w(new _.I(_.F,6,6003,b.message,b))}})};
165
+ _.qo=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.G||a.K!==io)){var e=a.keySystem();if(!e.startsWith(_.Dd)&&b===_.jd){const f=new no(c);if(1<f.a.length&&(e={"org.w3.clearkey":"1077efecc0b24d02ace33c1e52e2fb4b","com.widevine.alpha":"edef8ba979d64acea3c827dcd51d21ed","com.microsoft.playready":"9a04f07998404286ab92e65be0885f95","com.adobe.primetime":"f239e769efa348509c16a903c6932efb"}[e]))for(let g=0;g<f.f.length;g++)if(e===f.f[g]){c=c.subarray(f.a[g].start,f.a[g].end+1);break}}(a.C.webkitCurrentPlaybackTargetIsWireless||
166
+ _.Qk(2)||a.keySystem().startsWith(_.Dd)||!_.oo(a,d,c,!0))&&po(a,d,null,b,c)}};ro=function(a,b){return _.x(function*(){a.g.info(`Handle encrypted event for type ${b.initDataType}`);yield mo(a);b.initData&&_.qo(a,b.initDataType,_.K(b.initData))})};to=function(a){return _.x(function*(){_.Jn(Wd);const b=a.W.map(c=>so(a,c));a.ba=!0;a.W=[];yield Promise.all(b);_.Jn(Vd);_.Ln("drm.onPlay",Wd,Vd)})};
167
+ vo=function(a){const b=a.keySystem(),c=a.f.Na[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.D.getConfiguration();return uo(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.Jj([d],a.f.attemptParameters);f.type=3;f.licenseRequestType=ld;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.g.debug("Fetching certificate");return a.D.yb.fetch(f).U}).then(f=>{a.a.serverCertificate=_.K(f.data)}).catch(f=>{var g=
168
+ f.data.headers;g=Object.assign({message:Qa,url:f.data.url,status:f.data.status,response:f.data.response},g?{headers:g}:{},en(g));throw new _.I(_.F,6,6100,g,f);})};
169
+ _.wo=function(a){return _.x(function*(){if(a.I&&a.a&&a.a.serverCertificate&&a.a.serverCertificate.length)try{const b=yield a.I.setServerCertificate(a.a.serverCertificate);void 0===b||b||a.g.debug("Server certificates are not supported by the key system. The server certificate has been ignored.")}catch(b){throw new _.I(_.F,6,6004,{browserError:b.message});}})};
170
+ _.zo=function(a){const b=a.a?a.a.initData||[]:[];for(const c of b){let d=!_.Qk(2);if(a.f.enforceSingleSession&&!a.keySystem().startsWith(_.Dd)){const e=a.h.values();for(const f of e)_.vj(c.initData,f.initData)?(a.g.info("Skipping Session creation. Existing init data in single session mode!"),d=!1):f.periodId===c.periodId&&(a.g.info("Skipping Session creation. Merging init data for period in single session mode "+`for Key ID ${c.keyId}.`),xo(c.initData,f)||(f.Ld.push(c.initData),c.keyId&&!f.qb.includes(c.keyId)&&
171
+ f.qb.push(c.keyId),a.o.get(c.keyId)||a.o.set(c.keyId,$f)),d=!1)}!d||a.G&&a.K===io||(_.oo(a,c.keyId,c.initData)&&(d=!1),d&&(a.g.info("Request new media key session on create"),po(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.L)_.yo(a,c);b.length||a.L.length||(a.A||a.g.info(va),a.A=!0,a.F=!1,a.H.resolve());return a.H};
172
+ _.Bo=function(a,b){if(!a.I)return Vh(a.B,b,()=>{a.w(new _.I(_.F,6,6010))}),Promise.resolve();a.C=b;a.l.l(b);a.B.one(a.C,_.ff,()=>to(a));a.B.on(a.C,_.Og,e=>{const f=a.F;a.F=!a.A;!f&&a.F&&(a.g.info("Waiting for DRM license key delivery"),a.D.onEvent(e))});var c=a.a.initData.find(e=>0<e.initData.length);let d=Promise.resolve();if(c||a.l.f()!==Ao||a.L.length)d=mo(a);c=Promise.resolve();_.Tk()&&38===_.Uk().major||(a.a&&a.a.keySystem!==_.$e&&!a.a.serverCertificate&&(c=vo(a)),c=c.then(()=>_.wo(a)));return Promise.all([d,
173
+ c]).then(()=>{a.j||(_.zo(a),a.B.on(a.C,ge,e=>ro(a,e)))}).catch(e=>{if(!a.j){if(6004===e.code&&a.a&&a.a.keySystem===_.Jd&&1>a.R&&a.a.serverCertificate&&a.a.serverCertificate.length)return a.g.warn("Detected invalid widevine server certificate!. Retrying"),a.w(new _.I(1,6,6004)),a.a.serverCertificate=null,a.R++,_.Bo(a,b);1<=a.R&&a.g.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
174
+ uo=function(a,b){return _.x(function*(){const c=a.D.Oc();if(c){var d=b&&b.drm&&b.drm.customData;d&&(yield c(d))}})};
175
+ _.yo=function(a,b){let c;try{a.g.debug("Attempting to load an offline session",b),c=a.I.createSession(_.df)}catch(e){const f=new _.I(_.F,6,6005,{browserError:e.message});a.w(f);return Promise.reject(f)}a.B.on(c,_.Je,a.Aa.bind(a));a.B.on(c,se,a.va.bind(a));const d={initData:null,loaded:!1,Ie:Infinity,jc:null,kb:new _.qn,periodId:null,Ld:[],keyId:null,qb:[],initDataType:null,oc:null,sessionContext:{ldlDelay:0,customData:{}}};d.kb.catch(()=>{});a.h.set(c,d);return c.load(b).then(e=>{if(a.j)return null;
176
+ a.g.debug("Loaded offline session",b,e);if(!e)return a.h.delete(c),a.w(new _.I(_.F,6,6013)),null;d.loaded=!0;Co(a)&&(a.A||a.g.info(va),a.A=!0,a.F=!1,a.H.resolve());return c},e=>{a.j||(a.h.delete(c),a.w(new _.I(_.F,6,6005,{browserError:e.message})))})};xo=function(a,b){if(!a)return!1;for(let c=0;c<b.Ld.length;c++)if(_.vj(a,b.Ld[c]))return!0;return!1};
177
+ _.oo=function(a,b,c,d){d=void 0===d?!1:d;for(const e of a.h.keys()){const f=a.h.get(e);if(_.vj(c,f.initData))return b?f.qb.includes(b)?d&&a.g.info("Skipping Session creation. "+`License for init data with Key ID ${b} was already `+`requested in Session: '${e.sessionId}'. `):(f.qb.push(b),a.o.get(b)||a.o.set(b,$f),d&&a.g.info(Db+`Session: '${e.sessionId}'`+`Adding Key ID ${b} to session meta-data.`)):d&&a.g.info(Db+`Session: '${e.sessionId}'`),!0;if(xo(c,f))return d&&a.g.info("Skipping Session creation. License for init data was already requested [extra]"),
176
178
  !0}return!1};
177
- go=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=uo(a,d,e,f)}catch(u){if(a.g.warn("Ignoring unrecognized init data. This may be caused by unsupported or malformed init data. Set `drm.ignoreUnrecognizedInitData \x3d false` if you want to override this behavior and use the init data after all.",{error:u,initDataType:d,initData:e}),a.f.ignoreUnrecognizedInitData)return}if(!g&&vo(a,h,d,e)){var k=!0;if("skd"===d&&!a.f.enableSessionCacheForSkd)for(var l of a.h.keys()){var m=a.h.get(l);
178
- if(h&&m.keyId===h){a.g.warn(`Close and re-open session for ${h}`);try{yield l.close()}catch(u){a.g.warn("Unable to close session",u)}k=!1}}if(k){a.g.warn(`Skip creating a new session for ${h}`);return}}try{var n=a.G?_.Xe:Zf;var q=a.I.createSession(n);a.D.onEvent(new _.E(Td,{keySystem:a.keySystem()}));a.g.info(`Created new ${n} session for Key ID: '${h}'. `+`Init data type: ${d}.`)}catch(u){a.w(new _.H(_.F,6,6005,{browserError:u.message}));return}a.B.on(q,_.Ce,a.Aa.bind(a));a.B.on(q,le,a.za.bind(a));
179
- k={jc:f,Dd:[],initData:e,initDataType:d,keyId:h,jb:h?[h]:[],loaded:!1,Be:Infinity,periodId:c,ec:null,eb:new _.hn,sessionContext:{ldlDelay:0,customData:{}}};k.eb.catch(()=>{});f&&(l=a.h.get(f),k.sessionContext=l.sessionContext);a.h.set(q,k);h&&!a.o.get(h)&&a.o.set(h,Tf);if(e)for(l=0;l<a.a.initData.length;l++)m=a.a.initData[l],m.keyId&&!k.jb.includes(m.keyId)&&_.jj(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),k.jb.push(m.keyId),a.o.get(m.keyId)||a.o.set(m.keyId,Tf));l=a.D.getConfiguration();m=a.keySystem();
180
- m=a.f.La[m];n=(n=m.modifiers)&&n.transformInitData;_.dh(n)||(n=On);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.eb&&k.eb.reject(u);a.w(h);return}a.g.info(`Generate License Request for key ID: '${h}'`);q.generateRequest(d,e.buffer).catch(u=>{if(!a.j){var v=null;u.errorCode&&u.errorCode.systemCode&&(v=u.errorCode.systemCode,0>v&&(v+=Math.pow(2,32)),v="0x"+v.toString(16));
181
- a.w(new _.H(_.F,6,6006,{browserError:u.message,error:u,extended:v},u))}})}else a.g.warn("Empty init data")})};wo=function(a){let b=Infinity;a=a.h.keys();for(const c of a)isNaN(c.expiration)||(b=Math.min(b,c.expiration));return b};to=function(a){a=a.h.values();return _.Gi(a,b=>b.loaded)};vo=function(a,b,c,d){if(!b&&c!==_.Of)return!1;d=b||ym(d);for(const e of a.h.values())if(b&&e.keyId===b||b&&e.jb.includes(b)||c===_.Of&&(e.keyId||ym(e.initData))===d)return!0;return!1};
182
- uo=function(a,b,c,d){d=void 0===d?null:d;if("skd"===b){a:{var e=d;e=void 0===e?null:e;var f=a.keySystem(),g=a.f.La[f];f=a.D.getConfiguration();g=g&&g.modifiers&&g.modifiers.extractContentId;_.dh(g)||(g=Mn);try{var h={ldlDelay:0,customData:{}};e&&(h=a.h.get(e).sessionContext);var k=g(f,c,h);a.g.debug(`Extracted Content ID '${k}' from SKD`);var l=k;break a}catch(m){a.g.warn("Unable to extract Content ID from SKD",m)}l=""}return l}if(b===_.Of)return ym(c)||"";if(b===_.dd){l=a.keySystem();try{if(l.match(/^com\.widevine\.alpha/)){const m=
183
- _.sn(c);if(m)return m.a}else if(En(l)){{f=new _.rn(new DataView(c.buffer,c.byteOffset,c.byteLength),!1);g=_.P(f);const m=_.P(f);h=_.mm(m);const n=_.P(f);c=n>>>24;k=n&16777215;const q=_.km(f,16),u=_.ij(q);if(0<c){const D=_.P(f);f.skip(16*D)}const v=_.P(f),y=_.km(f,v),A=_.zn(y);_.th("Parsed PR PSSH Box","size",g,"name",h,ng,c,"flags",k,"size",v,"systemId",u,"keyId",A.a);e=A}if(e)return e.a}}catch(m){throw a.g.warn("Unable to extract Key ID from PSSH data.",{error:m,keySystem:l}),m;}}return""};
184
- jo=function(a,b){return _.x(function*(){const c=b.target,d=a.h.get(c);if(d){var e=a.a.licenseServerUri;if(xo(a,b))yield yo(a,e,b,c,d);else{var f=a.fa;if(0<f&&(a.g.info(`Delaying license request by ${f} s.`),yield zk(f),a.j))return;var g=a.keySystem(),h=a.f.La[g];"individualization-request"===b.messageType&&h&&h.individualizationServer&&(e=h.individualizationServer);var k=_.xj([e],a.f.attemptParameters);k.type=3;k.body=b.message;k.method=_.rb;k.licenseRequestType=b.messageType===oe&&d.jc?ne:b.messageType;
185
- k.sessionId=c.sessionId;if(k.licenseRequestType===ne)a.D.onEvent(new _.E(Sd));En(a.a.keySystem)&&zo(a,k);Ul(a.M,k);h=String(Math.floor(b.timeStamp));if(f=yield Ao(a,k,d,h,e,c.sessionId,b.messageType,f))if(e=Vl(a.M,f),yield Bo(a,c,f.data,d,h))h=wo(a),a.D.onEvent(new _.E(_.Wd,{keySystem:g,expirationTime:h,expectedRenewalTime:e?Date.now()+1E3*e.delay:Number.NaN})),d.ec&&d.ec.resolve(),d.jc&&(h=d.jc,a.g.info(`Closing expired session '${h.sessionId}'`),Dn(h).catch(()=>{a.g.warn("Unable to close expired session in time")}),
186
- (h=a.h.get(d.jc))&&h.Cc&&h.Cc.stop(),a.h.delete(d.jc),d.jc=null),(new _.Ck(()=>{a.j||(d.loaded=!0,d.eb&&d.eb.resolve(),to(a)&&(a.A||a.g.info(va),a.A=!0,a.F=!1,a.H.resolve()))})).ga(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||e&&(_.Yi(g,_.wd)||_.Yi(g,_.Ad)))&&(h=new _.Ck(()=>{!a.j&&a.M&&(a.g.info("Updating CSL Sessions"),En(g)?go(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):g.startsWith(_.wd)&&c.update(_.Vi("renew")))}),d.Cc=h,h.ga(e?e.delay:d.sessionContext.ldlDelay))}}else a.g.error(`Session metadata not found for ${c.sessionId}.`)})};
187
- xo=function(a,b){return!!a.keySystem().match(/^com\.widevine\.alpha/)&&b.message&&2===b.message.byteLength};yo=function(a,b,c,d,e){return _.x(function*(){var f=_.xj([b],a.f.attemptParameters);f.type=3;f.body=c.message;f.method=_.rb;f.licenseRequestType=fd;f.sessionId=d.sessionId;(f=yield Co(a,f,e,b,d.sessionId,c.messageType))&&(yield Bo(a,d,f.data,e,String(Math.floor(c.timeStamp))))})};
188
- zo=function(a,b){var c=Ti(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){a.g.debug("Unwrapping PlayReady request.");a=(new DOMParser).parseFromString(c,"application/xml");c=a.getElementsByTagName("HttpHeader");for(let d=0;d<c.length;++d)b.headers[c[d].querySelector("name").textContent]=c[d].querySelector(_.mg).textContent;b.body=_.gj(a.querySelector("Challenge").textContent).buffer}else a.g.debug("PlayReady request is already unwrapped."),b.headers[ta]="text/xml; charset\x3dutf-8"};
189
- Ao=function(a,b,c,d,e,f,g,h){return _.x(function*(){a.g.info("License request for "+`SID:'${f}'/KID:'${c.keyId}' `+`from msg '${g}'.`);yield Do(a,b,c.sessionContext);a.g.debug("Sending DRM license request to",e,b);a.D.onEvent(new _.E(Rd,{delay:h}));var k=Date.now();_.Bn(`drm.license.req.${d}.start`);var l=null;try{l=yield a.D.rb.fetch(b).U}catch(q){if(a.j)return null;l=q.data.headers;l=Object.assign({message:"Error while fetching DRM license!",url:q.data.url,status:q.data.status,response:q.data.response},
190
- l?{headers:l}:{},Xm(l));l=new _.H(_.F,6,6007,l,q);Eo(a,l,c);return null}_.Bn(`drm.license.req.${d}.end`);_.Cn(`drm.license.req.${d}`,`drm.license.req.${d}.start`,`drm.license.req.${d}.end`);k=Date.now()-k;const m=Ym(l.headers);m&&(a.fa=m.delay||0);let n="";m&&m.requestId&&(n=` RID:${m.requestId}`);a.g.info("License response for "+`SID:'${f}'/`+`KID:'${c.keyId}' `+`${l.data.byteLength} bytes `+`in ${k}ms${n}`);return a.j?null:l})};
191
- Bo=function(a,b,c,d,e){return _.x(function*(){_.Bn(`drm.sess.update.${e}.start`);try{yield b.update(c)}catch(f){if(a.j)return!1;if(f===Eb)return a.g.info("Ignore update for closed sessions"),!1;const g=new _.H(_.F,6,6008,{browserError:f.message});Eo(a,g,d);return!1}_.Bn(`drm.sess.update.${e}.end`);_.Cn(`drm.sess.update.${e}`,`drm.sess.update.${e}.start`,`drm.sess.update.${e}.end`);return a.j?!1:!0})};
192
- Co=function(a,b,c,d,e,f){return _.x(function*(){a.g.info("WV Server certificate request for "+`SID:'${e} from msg '${f}'.`);yield Do(a,b,c.sessionContext);a.g.debug("Sending Widevine certificate request to",d,b);var g=Date.now(),h=null;try{h=yield a.D.rb.fetch(b).U}catch(m){if(a.j)return null;h=m.data.headers;h=Object.assign({message:Pa,url:m.data.url,status:m.data.status,response:m.data.response},h?{headers:h}:{},Xm(h));h=new _.H(_.F,6,6100,h,m);Eo(a,h,c);return null}g=Date.now()-g;const k=Ym(h.headers);
179
+ po=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=Do(a,d,e,f)}catch(u){if(a.g.warn("Ignoring unrecognized init data. This may be caused by unsupported or malformed init data. Set `drm.ignoreUnrecognizedInitData \x3d false` if you want to override this behavior and use the init data after all.",{error:u,initDataType:d,initData:e}),a.f.ignoreUnrecognizedInitData)return}if(!g&&Eo(a,h,d,e)){var k=!0;if("skd"===d&&!a.f.enableSessionCacheForSkd)for(var l of a.h.keys()){var m=a.h.get(l);
180
+ if(h&&m.keyId===h){a.g.warn(`Close and re-open session for ${h}`);try{yield l.close()}catch(u){a.g.warn("Unable to close session",u)}k=!1}}if(k){a.g.warn(`Skip creating a new session for ${h}`);return}}try{var n=a.G?_.df:fg;var q=a.I.createSession(n);a.D.onEvent(new _.D(ae,{keySystem:a.keySystem()}));a.g.info(`Created new ${n} session for Key ID: '${h}'. `+`Init data type: ${d}.`)}catch(u){a.w(new _.I(_.F,6,6005,{browserError:u.message}));return}a.B.on(q,_.Je,a.Aa.bind(a));a.B.on(q,se,a.va.bind(a));
181
+ k={oc:f,Ld:[],initData:e,initDataType:d,keyId:h,qb:h?[h]:[],loaded:!1,Ie:Infinity,periodId:c,jc:null,kb:new _.qn,sessionContext:{ldlDelay:0,customData:{}}};k.kb.catch(()=>{});f&&(l=a.h.get(f),k.sessionContext=l.sessionContext);a.h.set(q,k);h&&!a.o.get(h)&&a.o.set(h,$f);if(e)for(l=0;l<a.a.initData.length;l++)m=a.a.initData[l],m.keyId&&!k.qb.includes(m.keyId)&&_.vj(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),k.qb.push(m.keyId),a.o.get(m.keyId)||a.o.set(m.keyId,$f));l=a.D.getConfiguration();m=a.keySystem();
182
+ m=a.f.Na[m];n=(n=m.modifiers)&&n.transformInitData;_.ph(n)||(n=Xn);try{e=n({playerConfig:l,initData:e,initDataType:d,drmInfo:a.a,drmSystemConfig:m,sessionContext:k.sessionContext,emeApi:a.l.f()})}catch(u){h=u;u instanceof _.I||(h=new _.I(_.F,6,6016,u));k.kb&&k.kb.reject(u);a.w(h);return}a.g.info(`Generate License Request for key ID: '${h}'`);q.generateRequest(d,e.buffer).catch(u=>{if(!a.j){var v=null;u.errorCode&&u.errorCode.systemCode&&(v=u.errorCode.systemCode,0>v&&(v+=Math.pow(2,32)),v="0x"+v.toString(16));
183
+ a.w(new _.I(_.F,6,6006,{browserError:u.message,error:u,extended:v},u))}})}else a.g.warn("Empty init data")})};Fo=function(a){let b=Infinity;a=a.h.keys();for(const c of a)isNaN(c.expiration)||(b=Math.min(b,c.expiration));return b};Co=function(a){a=a.h.values();return _.Si(a,b=>b.loaded)};Eo=function(a,b,c,d){if(!b&&c!==_.Vf)return!1;d=b||Dm(d);for(const e of a.h.values())if(b&&e.keyId===b||b&&e.qb.includes(b)||c===_.Vf&&(e.keyId||Dm(e.initData))===d)return!0;return!1};
184
+ Do=function(a,b,c,d){d=void 0===d?null:d;if("skd"===b){a:{var e=d;e=void 0===e?null:e;var f=a.keySystem(),g=a.f.Na[f];f=a.D.getConfiguration();g=g&&g.modifiers&&g.modifiers.extractContentId;_.ph(g)||(g=Vn);try{var h={ldlDelay:0,customData:{}};e&&(h=a.h.get(e).sessionContext);var k=g(f,c,h);a.g.debug(`Extracted Content ID '${k}' from SKD`);var l=k;break a}catch(m){a.g.warn("Unable to extract Content ID from SKD",m)}l=""}return l}if(b===_.Vf)return Dm(c)||"";if(b===_.jd){l=a.keySystem();try{if(l.match(/^com\.widevine\.alpha/)){const m=
185
+ _.An(c);if(m)return m.a}else if(Nn(l)){{f=new _.zn(new DataView(c.buffer,c.byteOffset,c.byteLength),!1);g=_.P(f);const m=_.P(f);h=_.um(m);const n=_.P(f);c=n>>>24;k=n&16777215;const q=_.sm(f,16),u=_.uj(q);if(0<c){const E=_.P(f);f.skip(16*E)}const v=_.P(f),y=_.sm(f,v),A=_.Hn(y);_.Fh("Parsed PR PSSH Box","size",g,"name",h,Dg,c,"flags",k,"size",v,"systemId",u,"keyId",A.a);e=A}if(e)return e.a}}catch(m){throw a.g.warn("Unable to extract Key ID from PSSH data.",{error:m,keySystem:l}),m;}}return""};
186
+ so=function(a,b){return _.x(function*(){const c=b.target,d=a.h.get(c);if(d){var e=a.a.licenseServerUri;if(Go(a,b))yield Ho(a,e,b,c,d);else{var f=a.ha;if(0<f&&(a.g.info(`Delaying license request by ${f} s.`),yield Mh(f),a.j))return;var g=a.keySystem(),h=a.f.Na[g];"individualization-request"===b.messageType&&h&&h.individualizationServer&&(e=h.individualizationServer);var k=_.Jj([e],a.f.attemptParameters);k.type=3;k.body=b.message;k.method=_.rb;k.licenseRequestType=b.messageType===ve&&d.oc?ue:b.messageType;
187
+ k.sessionId=c.sessionId;if(k.licenseRequestType===ue)a.D.onEvent(new _.D($d));Nn(a.a.keySystem)&&Io(a,k);bm(a.M,k);h=String(Math.floor(b.timeStamp));if(f=yield Jo(a,k,d,h,e,c.sessionId,b.messageType,f))if(e=cm(a.M,f),yield Ko(a,c,f.data,d,h))h=Fo(a),a.D.onEvent(new _.D(_.ce,{keySystem:g,expirationTime:h,expectedRenewalTime:e?Date.now()+1E3*e.delay:Number.NaN})),d.jc&&d.jc.resolve(),d.oc&&(h=d.oc,a.g.info(`Closing expired session '${h.sessionId}'`),Mn(h).catch(()=>{a.g.warn("Unable to close expired session in time")}),
188
+ (h=a.h.get(d.oc))&&h.Jc&&h.Jc.stop(),a.h.delete(d.oc),d.oc=null),(new _.Mk(()=>{a.j||(d.loaded=!0,d.kb&&d.kb.resolve(),Co(a)&&(a.A||a.g.info(va),a.A=!0,a.F=!1,a.H.resolve()))})).ia(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||e&&(_.jj(g,_.Dd)||_.jj(g,_.Hd)))&&(h=new _.Mk(()=>{!a.j&&a.M&&(a.g.info("Updating CSL Sessions"),Nn(g)?po(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):g.startsWith(_.Dd)&&c.update(_.gj("renew")))}),d.Jc=h,h.ia(e?e.delay:d.sessionContext.ldlDelay))}}else a.g.error(`Session metadata not found for ${c.sessionId}.`)})};
189
+ Go=function(a,b){return!!a.keySystem().match(/^com\.widevine\.alpha/)&&b.message&&2===b.message.byteLength};Ho=function(a,b,c,d,e){return _.x(function*(){var f=_.Jj([b],a.f.attemptParameters);f.type=3;f.body=c.message;f.method=_.rb;f.licenseRequestType=ld;f.sessionId=d.sessionId;(f=yield Lo(a,f,e,b,d.sessionId,c.messageType))&&(yield Ko(a,d,f.data,e,String(Math.floor(c.timeStamp))))})};
190
+ Io=function(a,b){var c=ej(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){a.g.debug("Unwrapping PlayReady request.");a=(new DOMParser).parseFromString(c,"application/xml");c=a.getElementsByTagName("HttpHeader");for(let d=0;d<c.length;++d)b.headers[c[d].querySelector("name").textContent]=c[d].querySelector(_.Cg).textContent;b.body=_.sj(a.querySelector("Challenge").textContent).buffer}else a.g.debug("PlayReady request is already unwrapped."),b.headers[ta]="text/xml; charset\x3dutf-8"};
191
+ Jo=function(a,b,c,d,e,f,g,h){return _.x(function*(){a.g.info("License request for "+`SID:'${f}'/KID:'${c.keyId}' `+`from msg '${g}'.`);yield Mo(a,b,c.sessionContext);a.g.debug("Sending DRM license request to",e,b);a.D.onEvent(new _.D(Zd,{delay:h}));var k=Date.now();_.Jn(`drm.license.req.${d}.start`);var l=null;try{l=yield a.D.yb.fetch(b).U}catch(q){if(a.j)return null;l=q.data.headers;l=Object.assign({message:"Error while fetching DRM license!",url:q.data.url,status:q.data.status,response:q.data.response},
192
+ l?{headers:l}:{},en(l));l=new _.I(_.F,6,6007,l,q);No(a,l,c);return null}_.Jn(`drm.license.req.${d}.end`);_.Ln(`drm.license.req.${d}`,`drm.license.req.${d}.start`,`drm.license.req.${d}.end`);k=Date.now()-k;const m=fn(l.headers);m&&(a.ha=m.delay||0);let n="";m&&m.requestId&&(n=` RID:${m.requestId}`);a.g.info("License response for "+`SID:'${f}'/`+`KID:'${c.keyId}' `+`${l.data.byteLength} bytes `+`in ${k}ms${n}`);return a.j?null:l})};
193
+ Ko=function(a,b,c,d,e){return _.x(function*(){_.Jn(`drm.sess.update.${e}.start`);try{yield b.update(c)}catch(f){if(a.j)return!1;if(f===Cb)return a.g.info("Ignore update for closed sessions"),!1;const g=new _.I(_.F,6,6008,{browserError:f.message});No(a,g,d);return!1}_.Jn(`drm.sess.update.${e}.end`);_.Ln(`drm.sess.update.${e}`,`drm.sess.update.${e}.start`,`drm.sess.update.${e}.end`);return a.j?!1:!0})};
194
+ Lo=function(a,b,c,d,e,f){return _.x(function*(){a.g.info("WV Server certificate request for "+`SID:'${e} from msg '${f}'.`);yield Mo(a,b,c.sessionContext);a.g.debug("Sending Widevine certificate request to",d,b);var g=Date.now(),h=null;try{h=yield a.D.yb.fetch(b).U}catch(m){if(a.j)return null;h=m.data.headers;h=Object.assign({message:Qa,url:m.data.url,status:m.data.status,response:m.data.response},h?{headers:h}:{},en(h));h=new _.I(_.F,6,6100,h,m);No(a,h,c);return null}g=Date.now()-g;const k=fn(h.headers);
193
195
  let l="";k&&k.requestId&&(l=` RID:${k.requestId}`);a.g.info("WV Server certificate response for "+`SID:'${e}' `+`${h.data.byteLength} bytes `+`in ${g}ms${l}`);return a.j?null:h})};
194
- Do=function(a,b,c){return _.x(function*(){const d=a.D.getConfiguration();yield lo(a,d);const e=a.keySystem();var f=a.f.La[e];const g=(f=f&&f.modifiers)&&f.licenseRequest,h=f&&f.licenseResponse;g?b.requestModifiers.push(k=>g(d,k,c)):e.startsWith(_.wd)&&b.requestModifiers.push(k=>_.Bm(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.wd)&&b.responseModifiers.push(k=>_.Cm(k))})};Eo=function(a,b,c){a.j||(a.w(b),c.ec&&c.ec.reject(b),c.eb&&c.eb.reject(b))};
195
- _.Ho=function(a,b){a&&b&&(_.Fo.set(a,b),_.Go.info(`Registered TextDisplayerFactory: '${a}'`))};_.Io=function(a,b){b=b.find(c=>(c=_.Fo.get(c))?c.a(a):!1);if(null==b)return _.Go.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;_.Go.info(`Chosen the text displayer: ${b}`);return _.Fo.get(b)};
196
- _.Jo=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})}}};Ko=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};Lo=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};
197
- Mo=function(a){return a.a.map(b=>_.$g(b))};_.No=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:[]}};
198
- So=function(a){a.g.debug("Start watching for video events for "+a.m.namespace());const b=a.m,c=d=>Oo(a,d.type);a.a.on(b,_.be,()=>{a.h||(a.j=!1,Po(a,_.Qo))});a.a.on(b,Xc,c);a.a.on(b,_.kf,()=>{a.F=!0;a.j=!1;Oo(a,_.kf)});a.a.on(b,_.Ve,()=>{a.F=!1;a.j=!1;Oo(a,_.Ve)});a.a.on(b,_.bg,c);a.a.on(b,_.yf,c);a.a.on(b,_.Jf,d=>{a.h=!1;a.j=!1;Oo(a,d.type)});a.a.on(b,_.Kf,d=>{a.h=!0;Oo(a,d.type)});a.a.on(b,Qf,c);a.a.on(b,_.Bg,()=>{a.j=!0;Oo(a,_.Bg)});a.a.on(b,_.r,d=>{(d=d&&d.detail)&&d.severity&&d.severity===_.F&&
199
- Po(a,_.Ro)});a.a.on(b,_.xe,c);a.a.on(b,Yc,()=>{a.C=!0;Oo(a,Yc)});a.a.on(b,_.lg,d=>{a.h=!0;Oo(a,d.type)});a.a.on(b,_.kg,d=>{a.h=!1;a.j=!1;Oo(a,d.type)})};To=function(a,b){return Object.keys(b)[a]};Vo=function(a,b){const c={type:_.Sf};b===_.Wc||b===_.Vc?(c.reason=a.w,b===_.Wc?c.timeSinceLastStateChangeMS=a.H:c.bufferedTimeMS=a.B):(a.f===_.Uo&&(c.reason=a.w),a.A===_.Uo&&(c.reason=a.w,c.bufferedTimeMS=a.B),c.currentState=a.f,c.previousState=a.A,c.timeSinceLastStateChangeMS=a.H);return c};
200
- Po=function(a,b){if(a.f===b)return!1;var c=Date.now();const d=a.f===_.Uo;a.A=a.f;a.f=b;a.A===_.Qo&&(a.I=c,a.o=0);a.o||(a.o=a.I||c);a.H=c-a.o;a.o=c;b===_.Uo?(a.K=a.o,a.w=a.h?1:2,a.g.info("Buffering started. Reason: "+To(a.w-1,_.Wo)),b=Vo(a,_.Wc),a.Ua(_.Wc,b)):d&&(a.B=a.o-a.K,a.g.info("Buffering finished. Reason: "+To(a.w-1,_.Wo)+". Buffering time: "+a.B+" ms"),b=Vo(a,_.Vc),a.Ua(_.Vc,b));b=To(a.A,_.Xo);c=To(a.f,_.Xo);a.g.info(`Player state change: ${b} -> ${c}`);a.Ua(_.Sf,Vo(a,""));return!0};
201
- Oo=function(a,b){if(a.f===_.Ro)a.g.warn("Player is in error state, aborting any further state checks");else{var c=a.m.isPaused(),d=a.m?a.m.isEnded():!1;if(d)a.h||(a.j=!1,Po(a,_.Qo));else if(b!==_.bg){var e=a.m.getPosition();e=null!==e&&void 0!==e&&0<=e?a.m.getBufferInfo().Ca(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===_.Yo,g=typeof a.l===_.t&&2>=a.l&&a.j;e=a.h||
202
- f||e||g;!a.L||a.m.isLive()||a.f!==_.Uo||e||(f=b===_.Jf&&4===a.l,(g=a.A===_.Zo)&&!a.C?e=!0:g||a.C||f||(e=!0));f=!1;e?f=Po(a,_.Uo):c?f=Po(a,_.$o):a.F&&(f=Po(a,_.ap));f&&(a.C=!1);a.g.debug("Video state check for event "+b+":: seeking: "+a.h+", waiting: "+a.j+", playing: "+a.F+", paused: "+c+", readyState: "+a.l+", rate: "+a.J+", buffer: "+a.G+", ended: "+d+". Changed state: "+f+", Current state: "+To(a.f,_.Xo))}}};
203
- bp=function(a){a=(new _.ni(a)).Ia;if(!a)return null;a=a.toUpperCase();return _.Zi(a,".MPD")?_.Fc:_.Zi(a,".M3U8")?_.xl:_.Zi(a,".MP4")?_.vg:_.Zi(a,".MP3")?"audio/mp3":_.Zi(a,"MANIFEST")||_.Zi(a,".ISM")?_.Kc:null};_.dp=function(a){let b;Hl(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.Vf||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=cp(b[c]);d&&a.push(d)}return a};
204
- cp=function(a){let b=null;_.fh(a)&&(a={url:a});typeof a===_.Ke&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.B(a.drmProtected)||typeof a.drmProtected!==_.Uc||(b.drmProtected=a.drmProtected),_.B(a.isLive)||typeof a.isLive!==_.Uc||(b.isLive=a.isLive),_.B(a.name)||typeof a.name!==_.Vf||(b.name=a.name),_.B(a.Wb)||typeof a.Wb!==_.Vf||(b.Wb=a.Wb),_.B(a.audioMimeType)||typeof a.audioMimeType!==_.Vf||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=bp(a.url),b.type?ep.debug("Detect media type "+
205
- b.type+" for "+a.url):ep.warn("Unable to detect media type for "+a.url));return b};gp=function(a){return a.w?fp():new Promise(b=>{if(a.a){const c=a.a;a.h.off(c,_.r);a.h.off(c,_.Df);a.a=null}b()})};fp=function(){return Promise.reject(new _.H(_.F,7,7E3))};
206
- ip=function(a,b){return a.w?fp():new Promise(c=>{a.a||(a.h.on(b,_.r,()=>{{const d=hp(a);if(d)a.onError(d)}}),a.h.on(b,_.Df,()=>{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(_.Tc,{detail:{width:d,height:e}}))}),a.a=b);c()})};kp=function(a){const b=_.Qk()?Nn:void 0;return new _.jp(a,b)};
207
- lp=function(a){return _.x(function*(){if(a.w)return fp();var b=a.ea[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),Promise.resolve();b=_.Zl(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.o=kp({rb:c,onError:d=>a.onError(d),Ge:()=>{},Fe:(d,e)=>{a.trigger(new _.E(_.Qd,{expirationTime:e}))},onEvent:d=>{d instanceof _.E?a.dispatchEvent(d):a.log.debug(_.Nb,
208
- d.type)},getConfiguration:()=>a.getConfiguration(),Hc:()=>a.Hc()});a.o.f=b;yield _.$n(a.o,[{id:0,language:_.fg,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,Ea:0,mimeType:_.vg,codecs:"",encrypted:!0,keyId:null,language:_.fg,originalLanguage:_.fg,label:null,type:_.w,primary:!1,frameRate:void 0,Hi:void 0,
209
- trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,spatialAudio:!1,pi:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}]);yield _.so(a.o,a.a);return Promise.resolve()})};mp=function(a,b){an(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{a.getState()!==_.Ro&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
210
- hp=function(a){if(null===a.ea||!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,Ci:c,message:a.a.error.message})};
211
- op=function(a){if(a.w)return new _.np(fp(),()=>{});const b=a.ea[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.H;c&&mp(a,c);if(d.preload!==_.Je)a.h.one(d,_.xe,()=>{const g=Date.now()/1E3-e;a.f.A=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.Gk()||_.Jk())&&d.load();const f=new _.hn;a.h.one(d,Qf,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.B||(a.B=(new _.Ck(()=>{f.reject(new _.H(_.F,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
212
- uri:b.url},d.error))})).ga(g))});an(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.h,()=>f.resolve());d.error?f.reject(hp(a)):d.preload===_.Je&&(a.log.warn('With \x3cvideo preload\x3d"none"\x3e, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way. Please do not use preload\x3d"none" with PRESTOplay for Web Apps.'),f.resolve());a.h.one(d,_.r,()=>{f.reject(hp(a))});return new _.np(f,
213
- ()=>{const g=new _.H(_.F,7,7001);f.reject(g);return Promise.resolve()})};pp=function(a,b){an(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{if(a.isLive()&&a.getState()!==_.Ro){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)}))}})};
214
- qp=function(a,b){let c=!1;a.h.on(b,_.Kf,()=>{c=b.paused});a.h.on(b,_.Jf,()=>{.2>b.duration-b.currentTime&&b.paused&&!c&&(a.log.warn("Player was auto-paused during seek to the end, auto-resuming."),b.play())})};_.tp=function(a){0<=rp.indexOf(a)?sp.warn(`Factory '${a.name()}' is already registered`):(rp.push(a),sp.info(`Factory '${a.name()}' has been registered.`))};up=function(a,b){const c=rp.find(d=>d.a(a,b))||null;c&&sp.info(`Chosen ads manager: ${c.name()}`);return c};
215
- _.vp=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};_.wp=function(a,b){a.classList.add(b)};_.xp=function(a,b){if(a&&typeof b===_.Ke)for(const c in b)a.style[c]=b[c]};_.yp=function(a){return document.createElement(a)};
216
- zp=function(a,b){const c=new MutationObserver(()=>{const d=Array.from(a.h.values());ci(Array.from(b.classList),Array.from(d))||b.classList.add(...d)});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};Ap=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.h.add(b))};
217
- Bp=function(a,b,c){(_.Jk()&&53===_.Kk().major||_.Jk()&&68===_.Kk().major||_.Lk())&&!b.hasAttribute(Gd)&&(b.style.opacity="0",b.setAttribute(Gd,""),a.j.one(b,Yd,()=>{b.removeAttribute(Gd);b.style.opacity="1";c&&(c.style.opacity="1")}))};Cp=function(a){if(a.Yb&&0===a.Yb.getDuration()){var b=a.player.getDuration();a.Yb.h=b}a.Wd&&a.Wd()};Dp=function(a,b){return _.x(function*(){yield a.release();yield a.load(b)})};
218
- Ep=function(a){if(a.sideAdContainer)a=a.sideAdContainer;else if(a=a.ig.getSurface().getContainer(),!a)throw Error("Primary player does not have a container");return a};
219
- Gp=function(a,b,c){return Array.from({length:2}).map((d,e)=>{var f=document.createElement(_.w);b.appendChild(f);d=a.ua.$a.create();f=new Fp(f);d.init(f,c);d.setSourceIndex(0);const g=f.getContainer();if(!g)throw Error("Failed to create player surface container element");g.classList.add("secondary");f.getMedia().classList.add(`v-${e}`);a.A.push(g);return d})};Hp=function(a){return[a.f,...a.l.a.map(b=>b.player)]};
220
- Ip=function(a,b,c){const d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.g.debug(`Show video element .${b}`),d.classList.add(ld),d.classList.remove("clpp-hide")):(a.g.debug(`Hide video element .${b}`),d.classList.remove(ld),d.classList.add("clpp-hide")),a.C&&a.C(d,c))};Jp=function(a){return _.x(function*(){const b=a.a;b&&("loaded"!==b.state&&(yield b.Jc),yield b.player.play(),b.state=_.kf,Cp(b))})};
221
- Kp=function(a,b){a.g.info("Add items",b);a.h=a.h.concat(b.map(c=>Object.assign({},c,{state:"idle",disposers:[],preloadPromise:Promise.resolve(),Jc:Promise.resolve()})))};Lp=function(a,b){0!==a.h.length&&(b?(a.g.info("Remove items",b),a.h=a.h.filter(c=>!b.includes(c.id))):(a.g.info("Remove all items"),a.h=[]))};
222
- Wp=function(a,b,c){return _.x(function*(){if(a.w)a.g.warn(`Cannot ${c} item while busy (ID: ${b})`);else{var d=Mp(a,b);if(d){a.g.info(`${c} item (ID: ${b})`);a.w=!0;var e=a.a;e&&(e.player.isPaused()||(a.o?e.primary?e.player.setMuted(!0):e.player.pause():e.player.pause()),e.player.setMuted(!0));var f=a.j.has(b);f&&a.j.delete(b);try{c===_.Ze?(e&&d.primary?yield Np(a,d):f?yield Op(a,d):yield Pp(a,d),Cp(d)):f?a.g.error("Loading preloaded items is not supported"):yield Qp(a,d);Rp(a,d);d.player.setMuted(!1);
223
- d.Yb&&Sp(a,d,d.Yb);if(d.sb)d.player.one(_.be,d.sb);d.cg&&d.cg(d.player.getDuration())}catch(g){throw a.g.error(`Item failed to ${c} (ID: ${b})`),g;}finally{a.w=!1,e&&Tp(a,e),Up(a),Vp(a,d.next)}}else a.g.warn(`Item not found (ID: ${b})`)}})};Mp=function(a,b){return a.h.find(c=>c.id===b)||null};
224
- Np=function(a,b){return _.x(function*(){if(b.player){if(b.state===tf){a.g.info("Wait for seek to finish");try{yield b.preloadPromise}catch(c){}}a.a=b;b.role=Xp;Ip(a,b.player,!0);b.state="loading";a.o?b.player.setMuted(!1):yield b.player.play();b.state=_.kf}})};Op=function(a,b){return _.x(function*(){const c=b.player;if(c){if(b.state===tf){a.g.info(Tb);try{yield b.preloadPromise}catch(d){}}a.a=b;b.role=Xp;Ip(a,c,!0);b.state===sf?yield c.play():b.state===rf&&(yield Dp(c,b.config));b.state=_.kf}})};
225
- Pp=function(a,b){return _.x(function*(){yield Qp(a,b);yield b.player.play();b.state=_.kf})};Qp=function(a,b){return _.x(function*(){const c=yield Yp(a,!!b.primary);a.a=b;b.role=Xp;a.a.player=c;a.a.videoEl=c.getSurface().getMedia();Ip(a,c,!0);b.state="loading";b.Jc=Dp(c,b.config);yield b.Jc;b.state="loaded"})};
226
- Rp=function(a,b){const c=b.transition;if(c&&!c.Uh){if(c.sb){const d=c.sb,e=()=>{a.g.info(`Transition onEnded to (ID: ${d})`);a.play(d)};b.player.one(_.be,e);b.disposers.push(()=>{b.player.off(_.be,e)})}c.He&&Zp(a,b,()=>{const d=a.a.Yb;d&&(a.f.trigger(new _.E(_.xc,{ad:d})),a.f.trigger(new _.E(_.hc,{ad:d})),d.a===d.f&&a.f.trigger(new _.E(_.ec,{id:b.Kd})))});c.Uh=!0}};
227
- Sp=function(a,b,c){const d=b.player,e=()=>{const l=d.getPosition(),m=c.getDuration();c.j=l;a.f.trigger(new _.E(_.qc,{ad:c}));!c.l&&l>=m/4&&(c.l=!0,a.f.trigger(new _.E(_.ic,{ad:c})));!c.o&&l>=m/2&&(c.o=!0,a.f.trigger(new _.E(_.oc,{ad:c})));!c.w&&l>=3*m/4&&(c.w=!0,a.f.trigger(new _.E(_.yc,{ad:c})))},f=()=>{d.isEnded()||a.f.trigger(new _.E(_.pc,{ad:c}))},g=()=>{a.f.trigger(new _.E(_.rc,{ad:c}))},h=()=>{a.f.trigger(new _.E(_.fc,{ad:c}))},k=()=>{a.f.trigger(new _.E(_.xc,{ad:c}));a.f.trigger(new _.E(_.hc,
228
- {ad:c}));c.a===c.f&&a.f.trigger(new _.E(_.ec,{id:b.Kd}))};d.on(_.bg,e);d.on(_.Ve,f);d.on(_.kf,g);d.on(_.Wc,h);d.one(_.be,k);b.disposers.push(()=>{d.off(_.bg,e);d.off(_.Ve,f);d.off(_.kf,g);d.off(_.Wc,h);d.off(_.be,k)});1===c.a&&a.f.trigger(new _.E(_.cc,{id:b.Kd}));c.videoEl=d.getSurface().getMedia();a.f.trigger(new _.E(_.mc,{ad:c}));a.f.trigger(new _.E(_.uc,{ad:c}))};
229
- Tp=function(a,b){return _.x(function*(){const c=b.player;b.primary?(a.g.info("Pause primary playback"),a.o||Ip(a,c,!1)):(a.g.info(`Stop previous playback (ID: ${b.id})`),b.disposers.forEach(d=>d()),b.disposers=[],b.player=null,b.videoEl=null,b.role=$p,yield aq(a,c),Ip(a,c,!1))})};Up=function(a){return Promise.all(Array.from(a.j.keys()).map(b=>bq(a,b)))};
230
- Vp=function(a,b){_.x(function*(){if(0!==b.length){a.g.info(`Preload items (IDs: ${b})`);var c=a.h.filter(d=>b.includes(d.id))||[];yield Promise.all(c.map(d=>cq(a,d)))}})};dq=function(a){return a.h.find(b=>!!b.primary)||null};eq=function(a,b){const c=dq(a);c?c.ha=b:a.g.error("Failed to get primary item. Cannot configure resume position.")};fq=function(a){a.A.forEach(b=>a.B.removeChild(b));a.A=[];Ip(a,a.f,!0)};
231
- Zp=function(a,b,c){const d=b.transition.He;let e=null;d.ha&&eq(a,d.ha);const f=()=>{const k=b.player.getPosition();.5>=d.position-k&&(h(),g())},g=()=>{var k=b.player.getPosition();k>=d.position?(c(),a.g.info(`Transition onPosition to (ID: ${d.itemId}), `+`playback position: ${k.toFixed(3)} s, `+`transition point: ${d.position.toFixed(3)} s. `),a.play(d.itemId),k=!0):k=!1;k?e=null:e=requestAnimationFrame(g)},h=()=>{b.player.off(_.bg,f)};b.player.on(_.bg,f);b.disposers.push(()=>{null!=e&&(cancelAnimationFrame(e),
232
- e=null)});b.disposers.push(h)};gq=function(a){a.a&&(a.a.disposers.forEach(b=>b()),a.a.disposers=[],a.a.Yb&&Sp(a,a.a,a.a.Yb),Rp(a,a.a),Up(a),Vp(a,a.a.next))};bq=function(a,b){return _.x(function*(){const c=a.j.get(b);c&&(a.g.info(`Stop preloading item (ID: ${b})`),c.player&&(yield aq(a,c.player)),a.j.delete(b))})};aq=function(a,b){return _.x(function*(){b!==a.f&&(yield a.l.release(b))})};
233
- Yp=function(a,b){return _.x(function*(){if(b)return a.f;const c=yield a.l.get();if(!c)throw Error("No player available");return c})};
234
- cq=function(a,b){return _.x(function*(){if(b.primary){b.state=tf;a.j.set(b.id,b);if(b.ha&&!a.o){var c=b.player;a.g.info("Preparing to resume at",b.ha);c.setMuted(!0);yield c.seek(b.ha)}b.state=sf}else{c=b.id;var d=yield Yp(a,!1);b.player=d;b.videoEl=d.getSurface().getMedia();b.role=$p;b.state=tf;try{a.j.set(c,b),b.config.autoplay&&(a.g.warn(ka+`Force disabling autoplay (ID: ${c})`),b.config.autoplay=!1),b.preloadPromise=Dp(d,b.config),yield b.preloadPromise,b.state=sf}catch(e){7001===e.code?(a.g.info(`Preload aborted (ID: ${c})`),
235
- b.state=qf):(a.g.warn(`Preload failed (ID: ${c})`,e),b.state=rf)}}})};hq=function(a){const b={URI:a.Ba[0].URI,DURATION:a.Ba[0].DURATION};a.mg&&(b[Xb]=a.mg);return{ASSETS:[b]}};iq=function(a){return a&&a.ASSETS&&Array.isArray(a.ASSETS)?a.ASSETS.every(b=>typeof b.URI===_.Vf&&typeof b.DURATION===_.t):!1};jq=function(a,b){return a.a.find(c=>1===c.Ke&&b>c.startTime&&b<c.endTime)||null};mq=function(a,b){return _.x(function*(){if(!(yield kq(a,b)))throw Error("Failed to bind");yield lq(a,b,1,!1)})};
236
- uq=function(a,b){const c=()=>_.x(function*(){var e=b.getPosition(),f=nq(a,e);f&&(a.g.info(`Interstitial ${f.ja} coming up `+`at ${f.startTime} s`),(yield kq(a,f))&&oq(a,f,b));if((f=pq(a))&&f.state===qq&&b.getDuration()-e<a.ua.resolutionOffsetSec&&(yield kq(a,f)))if(f.Ba&&0!==f.Ba.length){if(e=a.qa.getCurrentItem()){var g=rq(a,f,2),h=g[0].id;e.next=[h];e.transition={sb:h};sq(a,f,g);a.g.info(`Postroll interstitial ${f.ja} scheduled`)}}else a.g.warn("Postroll interstitial has no assets, ignoring.")});
237
- b.addEventListener(_.bg,c);a.h.push(()=>{b.removeEventListener(_.bg,c)});const d=()=>{tq(a,!1,!0,!0)};b.addEventListener(_.Sh,d);a.h.push(()=>{b.removeEventListener(_.Sh,d)})};vq=function(a){a.h.forEach(b=>b());a.h=[]};wq=function(a){return(a=a.qa.getCurrentItem())&&!a.primary?a.player:null};
238
- tq=function(a,b,c,d){const e=xq(a);a.g.info("Interstitial cues found",e);var f=e;if(d){f=fi(a.a.map(m=>m.ja),e.map(m=>m.id));yq(a,f.Qh);const l=new Set(f.Eg);f=e.filter(m=>l.has(m.id))}if(!zq(a,f))return!1;const g=[],h=[],k=[];f.forEach(l=>{const m=l.customAttributes.CUE||[];m.includes(_.rb)?h.push(l):!d&&m.includes("PRE")?g.push(l):!c&&l.startTime<a.ua.Kh?g.push(l):k.push(l)});1<g.length?a.g.warn("Multiple preroll interstitials not supported. Will display only the 1st one."):g[0]&&Aq(a,g[0],b);k.forEach(l=>
239
- Bq(a,l,1));1<h.length?a.g.warn("Multiple postroll interstitials not supported. Will display only the 1st one."):h[0]&&Bq(a,h[0],2);a.g.info("Interstitials changed",a.a);return 0<g.length};
240
- Cq=function(a){_.x(function*(){var b=a.qa;Kp(b,[{id:vf,primary:!0,config:b.f.getConfiguration(),next:[]}]);var c=dq(b);if(!c)throw Error("Failed to find primary item");b.a=c;c.role=Xp;c.player=b.f;c.videoEl=c.player.getSurface().getMedia();Ip(b,c.player,!0);b=a.f;c=b.getConfiguration();a.j=tq(a,!c.autoplay,b.isLive(),!1);if(a.j){if(b=a.qa,c=b.l,c=c.a[0]?c.a[0].player:null)b.o||Ip(b,b.f,!1),Ip(b,c,!0)}else c.autoplay&&(yield Jp(a.qa))})};
241
- xq=function(a){return a.f.getTimelineCues().filter(b=>b.schemeIdUri===_.yd&&b.customAttributes)};yq=function(a,b){const c=new Set(b);a.a.forEach(d=>{c.has(d.ja)&&![qq,Dq].includes(d.state)&&a.g.warn("Removing an interstitial in active state",d)});a.a=a.a.filter(d=>!c.has(d.ja))};
242
- zq=function(a,b){const c=b.sort((g,h)=>g.startTime-h.startTime),d=a.ua.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.customAttributes[_.Zb],k=g.customAttributes[_.$b];g.customAttributes[_.Yb]||h?null!=k&&1>k&&a.g.warn(`Interstitial cue ${g.id} is invalid `+
243
- "X-PLAYOUT-LIMIT is less than 1 s.",g):f.push(`Interstitial cue ${g.id} is invalid `+"it contains neither X-ASSET-LIST nor X-ASSET-URI.")});0<f.length?a.g.error("Invalid interstitials, all interstitials will "+`be skipped. ${f.join(" ")}`):0<e.length&&a.g.warn("Unsupported format of interstitials, playback may not "+`behave correctly. ${e.join(" ")}`);return 0===f.length};
244
- Aq=function(a,b,c){_.x(function*(){const d=Bq(a,b,0),e=yield kq(a,d),f=d.Ba?d.Ba.length:0;e&&0<f?(lq(a,d,0,c),a.g.info(`Preroll interstitial ${d.ja} scheduled`)):(e?a.g.warn("Preroll interstitial has no assets, skipping"):a.g.error("Preroll interstitial failed, skipping"),c||(yield Jp(a.qa)))})};
245
- Bq=function(a,b,c){{const q=b.customAttributes[_.ac];var d=b.id,e=b.startTime,f=b.endTime,g=qq,h=b.customAttributes[_.Yb],k=b.customAttributes[_.Zb],l=null==q?null:b.startTime+q,m=b.customAttributes[_.$b];if(b=b.customAttributes[Xb])try{var n=JSON.parse(atob(b))}catch(u){n=null}else n=null;c={ja:d,startTime:e,endTime:f,state:g,mf:h,nf:k,Ba:null,ha:l,Sh:q,gg:m,Ke:c,mg:n}}a.a.push(c);return c};
246
- kq=function(a,b){return _.x(function*(){b.state=Eq;if(b.mf)try{a.g.info(`Load X-ASSET-LIST for ${b.ja}`);a.Ua(new _.E(jc));const c=yield Fq(a,b.mf);b.Ba=c.ASSETS;b.Ba&&0!==b.Ba.length||a.g.info(`Interstitial ${b.ja} has no assets, `+"will be smoothly skipped");if(null==b.ha){const d=Fi(b.Ba.map(e=>e.DURATION));b.ha=b.startTime+d}b.state=Gq;a.Ua(new _.E(kc));a.Ua(new _.E(lc,{id:b.ja,detail:c}))}catch(c){a.g.error("Failed to load X-ASSET-LIST",c),b.state=Hq}else b.nf?(b.Ba=[{URI:b.nf,DURATION:b.endTime-
247
- b.startTime}],a.Ua(new _.E(lc,{id:b.ja,detail:hq(b)})),b.state=Gq):b.state=Hq;return b.state===Gq})};lq=function(a,b,c,d){return _.x(function*(){if(a.qa.getCurrentItem()){var e=rq(a,b,c);sq(a,b,e);null!=b.ha&&eq(a.qa,b.ha);d?yield a.qa.load(e[0].id):yield a.qa.play(e[0].id)}})};nq=function(a,b){return a.a.find(c=>{const d=c.startTime-b;return 1===c.Ke&&[qq,Dq].includes(c.state)&&0<d&&d<=a.ua.resolutionOffsetSec})||null};
248
- oq=function(a,b,c){if(b.Ba)if(0===b.Ba.length){const g=()=>{c.isLive()?a.g.info("Skipping empty "+`live interstitial ${b.ja}`):null!=b.ha&&0!==b.Sh?c.seek(b.ha):a.g.info(`Empty VOD interstitial ${b.ja}, `+"continuing to next segment")};c.one(_.Th,g);a.h.push(()=>{c.off(_.Th,g)});a.g.info(`Interstitial ${b.ja} scheduled to `+"be skipped")}else{var d=a.qa.getCurrentItem();if(d){var e=rq(a,b,1),f=e[0].id;null!=b.ha&&eq(a.qa,b.ha);d.next=[f];d.transition={He:{position:b.startTime,itemId:f,ha:b.ha}};sq(a,
249
- b,e);a.g.info(`Interstitial ${b.ja} scheduled for `+`${b.startTime} s`)}}};pq=function(a){return a.a.find(b=>2===b.Ke)||null};Fq=function(a,b){return _.x(function*(){var c=a.qa.Fd();if(!c)throw Error("No player found");c=c.getNetworkEngine();const d=_.xj(Iq(a,b));c=yield Ij(c,d);if(!iq(c))throw new _.ki("Invalid X-ASSET-LIST list response");return c})};Iq=function(a,b){return(a=a.ua.Jh)?(b=new URL(b),b.searchParams.set("_HLS_primary_id",a),b.toString()):b};
250
- rq=function(a,b,c){let d=0,e=b.Ba.map((g,h)=>{const k=`${b.ja}-${h}`;d+=g.DURATION;return{id:k,config:{source:{url:Iq(a,g.URI),type:_.xl}},duration:g.DURATION,Sc:d,Kd:b.ja,next:[],Yb:new Q(c,h+1,b.Ba.length,g.DURATION,b.ja)}});e.forEach((g,h)=>{const k=h===e.length-1;k&&2===c||(k?(g.next=[vf],g.transition={sb:vf}):(h=k?vf:`${g.Kd}-${h+1}`,g.next=[h],g.transition={sb:h}))});e.forEach(g=>{g.Wd=()=>{a.g.info(`Playing interstitial asset ${g.id}`,g)}});if(null!=b.gg){const g=b.gg;a.g.info(`Playout limit for ${b.ja} is `+
251
- `${g} s`);const h=e[e.length-1],k=g-(h.Sc-h.duration);0>=g?e=[]:g<h.Sc?(e=e.filter(l=>l.Sc-l.duration<=g),.1>Math.abs(k-h.duration)?h.transition.sb=vf:h.transition.He={position:k,itemId:vf,ha:null}):g>h.Sc&&a.g.info(`Playout limit (${g}) is`+`larger than total duration: (${h.Sc})`)}const f=e[0].Wd;e[0].Wd=()=>{a.g.info(`Playing interstitial ${c} ${b.ja} with `+`${b.Ba.length} assets and will resume primary `+`content ${b.ha?`at ${b.ha.toFixed(1)} s`:"after interstitial ended"}.`,e);f()};e[0].cg=g=>
252
- {null==b.ha&&(b.ha=b.startTime+g,eq(a.qa,b.ha),a.g.info("Primary content will resume at",b.ha));b.state=Jq};e[e.length-1].sb=()=>{b.state=Dq;Lp(a.qa,e.map(g=>g.id))};return e};sq=function(a,b,c){Kp(a.qa,c);gq(a.qa);b.state=Kq;a.Ua(new _.E(_.nc,{detail:null}))};
253
- Lq=function(){try{const a=URL.createObjectURL(new Blob);URL.revokeObjectURL(a);return a.slice(a.lastIndexOf("/")+1)}catch(a){let b=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,c=>{const d=(b+16*Math.random())%16|0;b=Math.floor(b/16);return("x"===c?d:d&3|8).toString(16)})}};
254
- Pq=function(a){a.a.on(window,"offline",()=>{Mq(a,!1)});a.a.on(window,"online",()=>{a.f||Nq(a)});a.a.on(a.m,Qf,()=>Oq(a));a.a.on(a.m,"suspend",()=>Oq(a));a.a.on(a.m,_.Bg,()=>Oq(a));a.a.on(a.m,_.kf,()=>{a.f||Nq(a)});a.a.on(a.m,_.wf,()=>{a.f||Nq(a)});a.a.on(a.m,_.Sf,()=>{switch(a.m.getState()){case _.Uo:Oq(a);break;default:Oq(a)}})};Qq=function(a){a.h&&(a.h.stop(),a.h=null)};Oq=function(a){a.f&&Nq(a)};
255
- Rq=function(a){return _.x(function*(){var b=a.m.getConfiguration().connectivityCheck;b&&a.m&&(b=yield Lj(a.j,b.url,b.attemptParameters,b.method),Mq(a,b))})};Nq=function(a){a.m.getConfiguration().connectivityCheck&&(Qq(a),a.h=(new _.Ck(()=>Rq(a))).ga(5))};Mq=function(a,b){Qq(a);a.f!==b&&(a.f=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.E(Re,{online:a.f})))};Tq=function(){for(let a=0;a<Sq.length;++a)Sq[a].yc()};
256
- _.Uq=function(a,b){b=b||0;a={priority:b,yc:a};for(let c=0;c<Sq.length;c++)if(Sq[c].priority<b){Sq.splice(c,0,a);return}Sq.push(a)};Vq=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};
257
- Xq=function(a){var b=Wq;const c={kty:"RSA",n:b.n,e:b.e},d=a.h+"."+a.f,e=a.j;return new Promise(function(f,g){let h;try{h=window&&window.crypto&&window.crypto.subtle}catch(l){}if(h){var k={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};h.importKey("jwk",c,k,!1,["verify"]).then(function(l){const m=_.Vi(d),n=_.gj(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(new _.ki("Signature Verification failed",eg))}).catch(g)}else f()})};
258
- Zq=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 Yq(b[0],b[1],b[2]);a.a=b}return a.a};$q=function(a){return _.x(function*(){var b=Zq(a);try{yield Xq(b)}catch(c){if(c&&c.code===eg)throw c;{b=window.location.href;const d=new _.ni(b);b=d.ub||d.kb?d:new _.ni("//"+b)}if(!/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(b.kb))throw c;}})};
259
- ar=function(a){switch((a.ea[0]||{src:"",type:""}).type){case _.Fc:a="dash";break;case _.Kc:a="ss";break;case _.xl:a="hls";break;case _.vg:a="mp4";break;default:a=""}return a};br=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};cr=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
260
- dr=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};er=function(a){a=a.drmInfo;return(new _.ni(a&&a.licenseServerUri||"")).kb};fr=function(a){const b=a.configuration;let c="no";b.drm&&!_.hh(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(Xd)||er(a).endsWith("drmtoday.com"))&&(c=Xd);return c};gr=function(a){a=a.drmInfo;let b="";if(a)switch(a.keySystem){case _.Cd:b="wv";break;case _.Ad:b="pr";break;case _.wd:b="fps"}return b};
261
- hr=function(a){a=a.drmInfo;let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};ir=function(a){a=a.drmInfo;let b="";if(a)switch(a.videoRobustness){case Wa:case Ua:b="L1";break;case Va:b="L2";break;case _.Cb:case _.Bb:b="L3"}return b};
262
- mr=function(a,b){const c="ie"===_.el().browser;var d=b.configuration;const e=[...Array.from(_.Il.keys()),...b.hg];b={"CL-KEY":a.f,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.ea,"CL-USER-ID":br(d),"CL-ASSET-ID":cr(d),"CL-SESSION-ID":dr(d),"CL-PLAYBACK-TYPE":b.isLive?jr:kr,"CL-CONTENT-TYPE":ar(b),"CL-PLUGINS":e.join(" "),"CL-DRM":fr(b),"CL-DRM-CDM":gr(b),"CL-DRM-SEC-LEVEL":ir(b),"CL-DRM-OFFLINE":hr(b),"CL-DRM-IP":er(b)};c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=d);d=_.xj(["https://downloads.castlabs.com/r/register/"]);
263
- d.method="GET";d.headers=b;return(new _.lr).fetch(d).U.then(f=>{200===f.status&&c&&window.localStorage.setItem("cl_et",f.headers.etag);return Promise.resolve()}).catch(f=>{a:{var g=Zq(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.";
264
- break;default:g=Promise.resolve();break a}a.g.error(ab+k);g=Promise.reject(new _.H(_.F,7,g,k))}}return g})};qr=function(a){try{const b=a.split(",").map(c=>{const d={};c=c.split(";");for(let e=0;e<c.length;e++){const {key:f,value:g}=nr(c[e]);Object.keys(or).includes(f)&&(d[or[f]]=g)}return d}).filter(c=>_.bh(c));return 0<b.length?b:null}catch(b){return pr.error("CmsdManager parseCmsdDynamicHeader_ failed:",b),null}};
265
- nr=function(a){var b=a.split("\x3d");const c=b[0];b=b[1];if(!c)throw new _.ki("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 _.ki(`Parsing CMSD, not recognized value type of ${a}`);};
266
- sr=function(a){return b=>{{var c=b.headers;let e=b=null;var d=lh(c,"cmsd-dynamic");c=lh(c,"cmsd-static");d&&(b=qr(d),a.a=b);if(c)try{d={};const f=c.split(",");for(c=0;c<f.length;c++){const {key:g,value:h}=nr(f[c]);Object.keys(rr).includes(g)&&(d[rr[g]]=h)}e=_.bh(d)?d:null}catch(f){pr.error("CmsdManager parseCmsdStaticHeader_ failed:",f),e=null}(b||e)&&a.m.trigger(new _.E("cmsd-event",{Bi:b,Ni:e}))}}};_.ur=function(a){a&&(0<=tr.indexOf(a)||tr.push(a))};
267
- wr=function(a){if(!a.h&&a.A&&a.a&&a.f.ads.hls.enable&&a.getTimelineCues().some(b=>b.schemeIdUri===_.yd)){const b=a.f.mse.sendPlaybackSessionIdHeader?a.G:null;a.h=new vr;a.h.o(a.a,a.A,b)}};yr=function(a,b){a.F=new xr(b);$q(a.F).catch(c=>{setTimeout(()=>{a.g.error(ab+c);a.trigger(new _.E(_.r,{detail:new _.H(_.F,7,7101)}));a.destroy()},1E3)})};Ar=function(a,b){a.W=b;for(const c of a.W)(b=c.id())&&(a.K[b]=c);_.zr(a,"onPlayerCreated")};
268
- _.Br=function(a,b,c){c=void 0===c?null:c;null!=b&&b===a.a?a.a.forwardEventsTo(a):(a.a&&(a.a.stopForwardingEventsTo(a),a.a.destroy(),a.a=null,a.A=null),b&&(b.init(a.j,a.C),b.setNetworkEngine(a.getNetworkEngine()),b.forwardEventsTo(a),a.a=b,a.A=c))};
269
- Cr=function(a,b){_.x(function*(){a.j.getMedia()||a.j.getCastElement();a.F||(a.F=new xr(a.f.license));try{a.g.debug("Verifying license remotely"),yield mr(a.F,b),a.g.debug("License verified remotely")}catch(c){a.g.debug("License rejected by remote",c),setTimeout(Vq,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)}})};_.zr=function(a,b,...c){if(!a.X)return Promise.resolve();const d=a.W.map(e=>e[b].call(e,a,...c)).filter(e=>e instanceof Promise);return Promise.all(d)};
270
- Dr=function(a){return _.x(function*(){if(a.R)return a.g.debug("The player is already released. No-op"),new Promise(b=>b());a.Z.off(document,zg);a.trigger(new _.E(_.Af));a.j&&a.j.release();a.h&&(yield a.h.h(),a.h=null);a.B&&(yield a.B.release(),a.B=null);if(a.a){let b=null;const c=a.a.on(_.Sf,d=>{b=d});return _.zr(a,_.Pe).then(()=>{a.a.stopForwardingEventsTo(a);return Promise.all([a.a.release(),a.I.release()])}).then(()=>{a.g.debug("Releasing player completed");b&&(a.g.debug("Re-post state change event after release"),
271
- a.trigger(b))}).finally(()=>{a.a.off(_.Sf,c);a.trigger(new _.E(zf))})}a.trigger(new _.E(zf));return new Promise(b=>b())})};Er=function(a){a.G&&(a.g.info("Playback session ended, ID:",a.G),a.G=null,a.a&&a.a.setPlaybackSessionId(null))};Fr=function(a,b){const c=yh(d=>d.f(_.qb)&&a.every(e=>2===d.canPlay(e,b)));if(!c)throw new _.H(_.F,7,7003,"No compatible player implementing playlist mode found!");return{$a:c,player:c.create(),sourceIndex:0}};
272
- Hr=function(a,b,c){if(a.M===_.qb)b=Fr(b,c);else if(2!==(a.a?a.a.canPlay(b[0],c):0)||a.S){a.S=!1;if(b){var d=a=null;for(var e=0;e<b.length;e++);e=Object.values(_.vh);for(let f=0;f<b.length;f++)for(let g=0;g<e.length;g++){const h={$a:e[g],confidence:e[g].canPlay(b[f],c)};if(null===a||a.confidence<h.confidence)a=h,d=f}a&&typeof d===_.t&&0<a.confidence?(_.wh.debug("Player Factory '"+a.$a.a()+"' can play",b[d]),b=new Gr(a.$a,d)):(_.wh.debug("No compatible Player Factory found for sources:",b),b=null)}else b=
273
- null;if(!b)throw new _.H(_.F,7,7003,"No player factory compatible with given sources found!");c=b.$a;a=c.create();b={$a:c,player:a,sourceIndex:b.sourceIndex}}else b={$a:a.A,player:a.a,sourceIndex:0};return b};
274
- _.Mr=function(a,b,c){return _.x(function*(){if(a.O)throw new _.H(_.F,7,7E3,"Player is already destroyed.");if(!a.j)throw new _.H(_.F,7,7E3,"No surface associated with this player!");_.Bn(ef);yield a.release();var d=c||_.dp(b);if(!b||0===d.length)throw new _.H(_.F,7,7003,kb);a.da=d;a.f=_.Gl(a.C,b,{source:d});a.R=!1;d=Hr(a,d,a.f);_.Br(a,d.player,d.$a);Ir(a,a.a);a.a&&a.a.setSourceIndex(d.sourceIndex);Jr(a);a.a&&a.a.setCdnErrorCallback(a.L);Kr(a,a.f);Lr(a);if(a.f.pauseWhenInBackground)a.Z.on(document,
275
- zg,()=>{document.hidden?(a.g.debug("Player is hidden: pausing..."),a.pause()):(a.g.debug("Player is visible: resuming..."),a.play())});Pl(a);yield _.zr(a,"onContentWillLoad",a.f.source[d.sourceIndex]);_.Bn(df);_.Cn("player.beforeLoad",ef,df)})};_.Nr=function(a){return _.x(function*(){a.j.getMedia()||a.j.getCastElement();a.trigger(new _.E(ye));yield Promise.all([a.a.load(a.f),a.h?a.h.load():Promise.resolve()])})};
276
- _.Pr=function(a){return _.x(function*(){_.Bn(af);Cr(a,{configuration:a.getConfiguration(),ea:a.Pf(),drmInfo:a.getDrmInfo(),hg:Object.keys(a.K),isLive:a.isLive()});Or(a);Ql();yield _.zr(a,_.Me);a.f.autoplay&&(a.h?a.h.l():1)&&(yield a.play());_.Bn($e);_.Cn("player.afterLoad",af,$e)})};Qr=function(a){return _.x(function*(){if(a.a){var b=a.a;b.rg?(a.trigger(new _.E(ye)),yield b.rg(),yield _.Pr(a)):a.g.warn(xb)}else a.g.warn(ub)})};
277
- Ir=function(a,b){try{var c=crypto.randomUUID()}catch(d){c=Lq()}a.g.info("Playback session started, ID:",c);b.setPlaybackSessionId(c);a.G=c};Jr=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.x(function*(){a.Ec&&a.ne&&(a.ne=!1,yield a.Ec(b))}))};Kr=function(a,b){if(b=up(a,b))a.h=b.create(a)};Lr=function(a){a.B=new Rr(a);a.a.setCmsdManager(a.B)};
278
- Sr=function(a){const b=_.ai(a.f.preferredTextLanguage).filter(f=>f),c=a.f.preferForcedSubtitles,d=a.getTrackManager().ka().filter(f=>c?f.kind===_.de:f.kind!==_.de);if(0===d.length)c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles are available.");else{if(c&&0===b.length){var e=a.getTrackManager().oa();e&&e.language?(e=_.Di(e.language||""),b.push(e)):(e=a.getTrackManager().Ha())&&e.language&&(e=_.Di(e.language||""),b.push(e));0===b.length&&a.g.warn("Forced subtitles are configured to be preferred, but neither the preferred text language is set, nor the audio or video track language is available to determine which forced subtitles language to select.")}b.some(f=>
279
- {const g=_.Di(f);if(f=d.find(h=>{h=_.Di(h.language||"");return _.Ei(h,g)}))return a.getTrackManager().Ta(f),!0;c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles match the preferred languages: ",b);return!1})}};Or=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);Sr(a)})};Tr=function(a){a.J.forEach(b=>b());a.J=[]};
280
- Wr=function(a,b){return _.x(function*(){try{_.Bn(jf);a.M=_.qb;a.X=!1;const c=b.slice(1).map(d=>({config:d,ea:_.dp(d)}));yield _.Mr(a,b[0]);c.forEach(d=>{Ur(a,d.config,d.ea)});a.trigger(new _.E(ye));yield a.a.setupPlaylist(b);yield _.Pr(a);c.forEach(d=>{Vr(a,d.config,d.ea)});_.Bn(hf);_.Cn("player.setupPlaylist",jf,hf)}catch(c){if(a.l)throw a.g.info(bb),new _.H(_.F,7,7E3);throw c;}})};
281
- Xr=function(a,b){const c=d=>{a.H=a.o.findIndex(e=>e.id===d.id)};a.addEventListener(_.Gf,c);a.J.push(()=>{a.removeEventListener(_.Gf,c)});if(b.endTime){const d=b.endTime,e=()=>{a.getPosition()>=d&&(a.removeEventListener(_.bg,e),a.g.info("Playlist end time reached. Stopping playback."),a.trigger(new _.E(_.Ff)),a.pause())};a.addEventListener(_.bg,e);a.J.push(()=>{a.removeEventListener(_.bg,e)})}};
282
- Yr=function(a,b){return _.x(function*(){try{_.Bn(cf);const c=_.dp(b);Ur(a,b,c);yield a.a.appendLoad(b);Vr(a,b,c);_.Bn(bf);_.Cn("player.appendLoad",cf,bf)}catch(c){if(a.l)throw a.g.info(bb),new _.H(_.F,7,7E3,{id:b.id});throw c;}})};
283
- Ur=function(a,b,c){if(0===c.length)throw new _.H(_.F,7,7003,{message:kb,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]});};Vr=function(a,b,c){Cr(a,{configuration:b,ea:c,drmInfo:a.getDrmInfo(),hg:Object.keys(a.K),isLive:c[0].isLive})};
284
- Zr=function(a,b){const c=document.getElementById(a);if(!c)throw Error("Anchor element not found");c.classList.add(kd);return Array.from({length:3}).map(()=>{const d=document.createElement(_.w);d.classList.add("clpp-mc-playlist-video-el");const e=document.createElement(_.Ld);e.classList.add("clpp-mc-playlist-item");e.appendChild(d);c.appendChild(e);return new R(d,b)})};
285
- $r=function(a,b,c){const d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.g.info(`Show video element .${b}`),d.classList.add(ld)):(a.g.info(`Hide video element .${b}`),d.classList.remove(ld)),a.w&&a.w(d,c))};cs=function(a,b){return _.x(function*(){const c=yield a.o.get();a.f=b;b.role=as;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();$r(a,c,!0);yield c.load(b.config);bs(a,b);b.config.autoplay||(yield c.play())})};
286
- gs=function(a){_.x(function*(){if(0===a.a)yield ds(a);else if(a.a===a.h.length-1)yield es(a);else{const b=[a.a-1,a.a+1];a.g.info(`Preload items (indices: ${b})`);yield Promise.all(b.map(c=>fs(a,c)))}})};
287
- hs=function(a,b){return _.x(function*(){if(b.player){if(b.state===tf){a.g.info(Tb);try{yield b.preloadPromise}catch(c){}}a.f=b;b.role=as;$r(a,b.player,!0);b.state===sf?(_.Bn(of),a.ua.preloadMedia?yield b.player.play():yield Qr(b.player),_.Bn(nf),_.Cn("playlist.next",of,nf)):b.state===rf&&(yield b.player.load(b.config));bs(a,b);b.config.autoplay||(yield b.player.play())}})};
288
- ks=function(a,b){return _.x(function*(){a.g.info(`Stop current playback (index: ${b.index})`);b.player.pause();$r(a,b.player,!1);yield is(a,b);b.player=null;b.videoEl=null;b.role=js})};ms=function(a){return Promise.all(Array.from(a.l.keys()).map(b=>ls(a,b)))};ns=function(a){return _.x(function*(){yield a.o.destroy();const b=document.getElementById(a.ua.anchorId);b&&(b.classList.remove(kd),b.innerHTML="")})};
289
- ls=function(a,b){return _.x(function*(){const c=a.l.get(b);c&&(a.g.info(`Stop preloading item (index: ${b})`),c.player&&(yield is(a,c)),a.l.delete(b))})};is=function(a,b){return _.x(function*(){b.disposers.forEach(c=>c());b.disposers=[];b.player&&(yield a.o.release(b.player))})};bs=function(a,b){if(a.ua.autoplayNext){const c=()=>{a.g.info("Automatically transition to next item");a.fg()};b.player.on(_.be,c);const d=b.player;b.disposers.push(()=>{d.off(_.be,c)})}};
290
- fs=function(a,b){return _.x(function*(){const c=yield a.o.get(),d=a.h[b];d.player=c;d.videoEl=c.getSurface().getMedia();d.role=js;d.state=tf;a.trigger(new _.E(hg));try{a.l.set(b,d),a.ua.preloadMedia?(d.config.autoplay&&(a.g.warn(ka+`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=sf,a.trigger(new _.E(hg))}catch(e){7001===e.code?(a.g.info(`Preload aborted (index: ${b})`),d.state=qf):
291
- (a.g.warn(`Preload failed (index: ${b})`,e),a.trigger(new _.E(_.r,{detail:e})),d.state=rf),a.trigger(new _.E(hg))}})};ds=function(a){return _.x(function*(){const b=a.a+1;a.g.info(`Preload following item (index: ${b})`);yield fs(a,b)})};es=function(a){return _.x(function*(){const b=a.a-1;a.g.info(`Preload preceding item (index: ${b})`);yield fs(a,b)})};
292
- _.ss=function(a){if(rs.has(a))return rs.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);rs.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),rs.set(a,b),b):!1};ts=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};
293
- us=function(a){const b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();let c;typeof Event===_.fe?c=new Event(b,a):(c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable));a.target.dispatchEvent(c)};vs=function(a){a=a.target;if(a.webkitPresentationMode===Ye){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)};
294
- ws=function(){return this.webkitSupportsPresentationMode(Ye)?(this.webkitSetPresentationMode(Ye),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};xs=function(){const a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};
295
- ys=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};zs=function(a,b,c){return new window.TextTrackCue(a,b,c)};As=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};Cs=function(a,b,c){if("input"===a)switch(this.type){case "range":a=gd}Bs.call(this,a,b,c)};Ds=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};
296
- Es=function(a){return Ds()-a.a};Gs=function(a){const b=new Fs;b.a=a.a;return b};_.Hs=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};_.Js=function(a,b,c,d){return _.x(function*(){try{return new (yield Is(a,b,c,d))}catch(e){throw e.a(_.F),e;}})};
297
- Is=function(a,b,c,d){return _.x(function*(){if(d){var e=_.Ks[d.toLowerCase()];if(e)return e;_.C("Could not determine manifest type using MIME type ",d)}if(e=_.Ls(a)){const f=_.Ms[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 Ns(a,b,c))){if(e=_.Ks[d])return e;_.C("Could not determine manifest type using MIME type",d)}throw new _.H(_.F,4,4E3,{url:a});})};
298
- _.Ls=function(a){a=(new _.ni(a)).Ia.split("/").pop().split(".");return 1===a.length?"":a.pop().toLowerCase()};Ns=function(a,b,c){return _.x(function*(){var d=_.xj(a);sj(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).U).headers["content-type"])?d.toLowerCase():""})};Os=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};
299
- Ps=function(a,b,c){return b.read().then(({done:d,value:e})=>{null!=e&&(Os(a,e),Dj(c,e.byteLength,Es(a.h)),a.h.a=Ds());return d?(d=a.a.buffer,a.a.byteLength!==a.f&&(d=d.slice(0,a.f)),Promise.resolve(d)):Promise.resolve().then(()=>Ps(a,b,c))})};
300
- Rs=function(a){const b=a.uris[a.uriIndex],c=new Qs,d=new Fs,e=Gs(d);let f=0,g;const h=new _.hn;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=Es(e));m.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!k&&(m=m.getResponseHeader(sa),Cj(a,m),k=!0)};c.onload=function(m){m=m.target;var n=(m.getAllResponseHeaders()||"").trim().split("\r\n");
301
- const q={};for(const u of n)n=u.split(": "),q[n[0].toLowerCase()]=n.slice(1).join(": ");try{const u=Es(e);l||Dj(a,m.response?m.response.length:0,u);const v=_.Bj(q,m.response,m.status,b,m.responseURL,a,u,g);a.rateLimitBps?Ej(a.rateLimitBps,Es(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");
302
- for(var q of n)n=q.split(": "),u[n[0].toLowerCase()]=n.slice(1).join(": ")}q=_.Bj(u,m.response,m.status,b,m.responseURL,a,Es(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=Es(d);d.a=Ds();if(100<n||m.lengthComputable&&m.loaded===m.total)Dj(a,m.loaded-f,n),f=m.loaded,l=!0};for(const m in a.headers)c.setRequestHeader(m.toLowerCase(),a.headers[m]);c.send(a.body);return{U:h,request:a,abort:()=>{c.abort();h.reject(new _.H(1,1,
303
- 7001,{url:b,request:a}));return Promise.resolve()}}};Ss=function(a){let b=null;a.h!==a.f&&(b={start:a.h,end:a.f,length:a.f-a.h,data:new DataView(a.j.a.buffer,a.h,a.f-a.h),count:-1});return b};Ts=function(a,b){{var c=a.j;const d=c.f+b.byteLength;if(d>c.a.byteLength){const e=c.a;c.a=new Uint8Array(Math.max(Math.ceil(c.a.buffer.byteLength*c.h),d));c.a.set(e)}c.a.set(b,c.f);c.f+=b.byteLength}a.a=a.h;a.f=a.j.f;a.l=new DataView(a.j.a.buffer,0,a.j.f)};
304
- Vs=function(a){if(0<=a.o&&a.f<a.o)return null;let b=Us(a);for(;null!==b;){if(b.name===_.Ae){const c={start:a.h,end:b.end,length:b.end-a.h,data:new DataView(a.j.a.buffer,a.h,b.end-a.h),count:1};a.h=b.end;return c}b=Us(a)}return null};
305
- Ws=function(a,b,c,d){return b.read().then(e=>{var {done:f,value:g}=e;d&&g&&(d(g.byteLength,Es(a.w)),a.w.a=Ds());if(f)return e=Ss(a),(e=c(!0,e))?e.then(()=>a.j.a.buffer):Promise.resolve(a.j.a.buffer);let h=Promise.resolve();if(null!=g){Ts(a,g);var k=Vs(a);for(e=[];k;)e.push(k),k=Vs(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=
306
- c(!1,k))&&(h=e)}}return h.then(()=>Ws(a,b,c,d))})};
307
- Us=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=Xs(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=Xs(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};
308
- Xs=function(a){const b=a.l.getUint32(a.a,!1);a.a+=4;return b};
309
- $s=function(a){a.h=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=Ys(e.request.baseDelay,1E3));const f=a.f*(1+(2*Math.random()-1)*Ys(e.request.fuzzFactor,.5));a.f*=Ys(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.l=h;Zs(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)});
310
- let b=0,c=0,d=0;return a.h.then(e=>{const f=e.request;f.currentAttempt+=1;b=f.currentAttempt;c=f.maxAttempts;d=f.uris.length;return e.U}).then(e=>{a.w.resolve(e)}).catch(e=>{if(e instanceof _.H){const f=b<d,g=7001!==e.code,h=b<c;if((1===e.severity||f)&&g&&h)return $s(a);g&&e.a(_.F);a.w.reject(e)}else a.w.reject(e)})};Zs=function(a,b,c){a.o=setTimeout(b,c)};Ys=function(a,b){return null===a||void 0===a?b:a};
311
- dt=function(a){var b=new at;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new bt,d={Rc:!1,pg:!1};b={U:ct(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.Rc||(d.Rc=!0,c.abort());return Promise.resolve()}};if(a=a.timeout){const e=window.setTimeout(()=>{d.pg=!0;c.abort()},a);b.U=b.U.finally(()=>{window.clearTimeout(e)})}return b};
312
- ct=function(a,b,c,d){return _.x(function*(){const e=new Fs,f=Gs(e);try{const g=yield et(a,c),h=tj(g.headers),k={uri:g.url,data:null,headers:h,status:g.status,timeMs:0,responseStartMs:Es(f),request:b};if(!yj(g.status))throw k.data=yield g.arrayBuffer(),k.timeMs=Es(e),Aj(k);const l=g.headers.get(sa);Cj(b,l);const m=l?parseInt(l,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const n=g.body.getReader(),q=new ft(m,!b.disableMergedFragments);k.data=yield Ws(q,n,(u,v)=>{if(d.Rc)return null;
313
- v&&v.data&&(Dj(b,v.data.byteLength,Es(f)),f.a=Ds());return b.onFragment&&v?b.rateLimitBps?Ej(b.rateLimitBps,Es(e),b.bytesLoaded).then(()=>b.onFragment(v)):b.onFragment(v):null},b.onProgress)}else{const n=g.body.getReader(),q=yield Ps(new gt(m),n,b);b.rateLimitBps&&(yield Ej(b.rateLimitBps,Es(e),q.byteLength));k.data=q}if(d.Rc)throw Error("Request was aborted");k.timeMs=Es(e);return zj(k)}catch(g){if(d.Rc)throw new _.H(1,1,7001,{url:a,request:b});if(d.pg)throw new _.H(1,1,1003,{url:a,request:b});if(g&&
314
- 1001===g.code)throw g;_.uh("Error while fetching data:",g);throw new _.H(1,1,1002,{url:a,error:g,request:b,status:-1},g);}})};it=function(a){try{const b=a.uris[a.uriIndex],c=_.ht(b);return{U:Promise.resolve({uri:b,data:c.data,request:a,headers:{"content-type":c.contentType}}),request:a,abort:()=>Promise.resolve()}}catch(b){return{U:Promise.reject(b),request:a,abort:()=>Promise.resolve()}}};
315
- _.ht=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.uh("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 _.uh("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?_.gj(a).buffer:_.Vi(a).buffer,contentType:c}};
316
- _.kt=function(a,b){a=_.vk(_.wk(a),_.xk(a));_.jt[a]=b};_.lt=function(a){a=_.vk(_.wk(a),_.xk(a));return _.jt[a]||null};_.mt=function(a){a=_.vk(_.wk(a),_.xk(a));delete _.jt[a]};_.rt=function(a){if(!a.w)return null;const b=a.H;switch(a.w){case nt:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case ot:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case pt:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case qt:return`2px 2px 3px ${b}, 2px 2px 4px ${b}, `+`2px 2px 5px ${b}`;default:return _.Je}};_.Pg=[];
317
- Tg="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;Ug=typeof Object.defineProperties==_.fe?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
318
- Vg("Promise",function(a){function b(g){this.f=0;this.l=void 0;this.a=[];var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.a=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.f=function(g){if(null==this.a){this.a=[];var h=this;this.h(function(){h.l()})}this.a.push(g)};var e=Tg.setTimeout;c.prototype.h=function(g){e(g,0)};c.prototype.l=function(){for(;this.a&&this.a.length;){var g=this.a;this.a=[];for(var h=0;h<g.length;++h){var k=
319
- g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.a=null};c.prototype.j=function(g){this.h(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.C),reject:g(this.h)}};b.prototype.C=function(g){if(g===this)this.h(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.F(g);else{a:switch(typeof g){case _.Ke:var h=null!=g;break a;case _.fe:h=!0;break a;default:h=!1}h?this.B(g):this.o(g)}};
320
- b.prototype.B=function(g){var h=void 0;try{h=g.then}catch(k){this.h(k);return}typeof h==_.fe?this.G(h,g):this.o(g)};b.prototype.h=function(g){this.w(2,g)};b.prototype.o=function(g){this.w(1,g)};b.prototype.w=function(g,h){if(0!=this.f)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.f);this.f=g;this.l=h;this.A()};b.prototype.A=function(){if(null!=this.a){for(var g=0;g<this.a.length;++g)f.f(this.a[g]);this.a=null}};var f=new c;b.prototype.F=function(g){var h=this.j();
321
- g.yd(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==_.fe?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.yd(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.yd=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: "+
322
- 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=Sg(g),m=l.next();!m.done;m=l.next())d(m.value).yd(h,k)})};b.all=function(g){var h=Sg(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).yd(n(q.length-1),m),k=h.next();while(!k.done)})};return b});var Xg=this||self;
323
- Xg.a=!0;_.z("clpp.utils.obj.cloneItem",_.$g);_.z("clpp.utils.obj.merge",_.Zg);var ph={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.z("clpp.log.Level",ph);var nh=3,mh={},st=[];_.z("clpp.log.getLoggers",function(){return _.$g(mh)});_.z("clpp.log.addInterceptor",function(a){a&&st.push(a)});_.z("clpp.log.removeInterceptor",function(a){a&&(a=st.indexOf(a),0<=a&&st.splice(a,1))});_.z("clpp.log.getTagLevel",oh);_.z("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=mh[a]});_.z("clpp.log.setTagLevel",function(a,b){a&&(_.fh(b)&&(b=qh(b)),mh[a]=b)});
324
- _.z("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.fh(a)&&(a=qh(a));nh=a});_.z("clpp.log.getLogLevel",function(){return nh});
325
- _.S=class{constructor(a){(this.tag=a)&&void 0===mh[a]&&(mh[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=oh(this.tag);if(0<=d){if(d<c)return}else if(nh<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,
326
- arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of st)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)}Rg(a){return a?
327
- this.tag?new _.S(this.tag+"."+a):new _.S(a):this}};_.z("clpp.log.Logger",_.S);_.S.prototype.createChild=_.S.prototype.Rg;_.S.prototype.error=_.S.prototype.error;_.S.prototype.warn=_.S.prototype.warn;_.S.prototype.debug=_.S.prototype.debug;_.S.prototype.info=_.S.prototype.info;_.S.prototype.log=_.S.prototype.log;var rh=new _.S("clpp");_.z("clpp.log.info",_.sh);_.z("clpp.log.debug",_.th);_.z("clpp.log.warn",_.C);_.z("clpp.log.error",_.uh);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var Gr;Gr=class{constructor(a,b){this.$a=a;this.sourceIndex=b}};_.wh=new _.S("clpp.players");_.vh={};_.tt=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={}}};var ut,vt;ut=class{constructor(a,b,c,d){this.f=a;this.yc=b;this.a=c;this.Ph=!!d}Ua(a){try{this.yc.handleEvent?this.yc.handleEvent(a):this.yc.call(this.a,a)}catch(b){_.uh("clpp","Uncaught exception in event handler for event '"+this.f+"'",b,b?b.message:null,b?b.stack:null)}}};
328
- _.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(){}};
329
- vt=class{constructor(a){this.a=new _.tt;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].Ua(a),b[c].Ph&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new ut(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new ut(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].yc===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};var wt;_.xt=class{constructor(){this.a=new _.tt}release(){_.Ah(this)}on(a,b,c,d=!1){a=new wt(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||(zh(f),this.a.remove(b,f))}}};wt=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 yt=class{constructor(a){this.m=a;this.l=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.j=new _.xt;this.f=new Set;this.a=new Set;this.h=null;this.g=new _.S("clpp.native.Metadata")}release(){this.j.release();this.a=new Set;this.f.clear();null!=this.h&&(clearInterval(this.h),this.h=null)}destroy(){const a=this;return _.x(function*(){a.release()})}getTimelineCues(){return Array.from(this.a.values()).sort((a,b)=>a.startTime-b.startTime)}};_.Ft=class{constructor(a,b,c,d){d=void 0===d?_.zt:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.At;this.writingMode=_.Bt;this.lineInterpretation=_.Ct;this.line=null;this.lineAlign=_.Dt;this.direction=Et;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}Fc(a){return this.payload===a.payload&&this.startTime===a.startTime&&this.endTime===a.endTime&&this.payloadType===
330
- a.payloadType}};_.z("clpp.text.Cue",_.Ft);_.Ft.positionAlign={LEFT:_.pe,RIGHT:_.qe,CENTER:_.ed,AUTO:"auto"};_.zt="text";_.Ft.payloadType={TEXT:_.zt,VTT_XML:_.Ag,TTML_XML:_.dg};_.At=_.ed;_.Gt={LEFT:_.me,RIGHT:_.Ef,CENTER:_.At,START:_.me,END:_.Ef};_.Ft.textAlign=_.Gt;var Et="ltr";_.Ft.direction={HORIZONTAL_LEFT_TO_RIGHT:Et,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.Bt="horizontal-tb";_.Ft.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.Bt,VERTICAL_LEFT_TO_RIGHT:_.pg,VERTICAL_RIGHT_TO_LEFT:_.qg};_.Ct=0;
331
- _.Ft.lineInterpretation={LINE_NUMBER:_.Ct,PERCENTAGE:1};_.Dt=_.Rf;_.Ht={CENTER:_.ed,START:_.Dt,END:_.ae};_.Ft.lineAlign=_.Ht;_.Kt=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.It;this.scroll=Jt;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.z("clpp.text.CueRegion",_.Kt);_.It=1;_.Kt.units={PX:0,PERCENTAGE:_.It,LINES:2};var Jt="";
332
- _.Kt.scrollMode={NONE:Jt,UP:"up"};_.Kt.displayAlign={BEFORE:"flex-end",CENTER:_.ed,AFTER:"flex-start"};_.Kt.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.ud,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var Lt=class{constructor(a){this.m=a;this.l=a.getTextDisplayer();this.f=this.h=null;this.a=new _.xt;this.j=!1;this.g=new _.S("clpp.native.CueHandler")}destroy(){this.a.release();this.j=!1;this.l=this.a=this.h=this.f=null;return Promise.resolve()}start(a){this.j?this.g.warn("Already started. Ignoring request..."):(this.j=!0,this.h=a,this.f=this.h.textTracks,this.a.on(this.f,_.zc,b=>gi(this,b)),this.a.on(this.f,gd,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.Lf&&(d.mode=
333
- _.he)}}}))}o(a){const b=new _.Ft(a.startTime,a.endTime,a.text,_.Ag);if(_.fh(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.pg;break;case "rl":b.writingMode=_.qg}_.gh(a.size)&&(b.size=a.size);if(_.fh(a.align))switch(a.align){case _.me:case _.Rf:b.textAlign=_.me;break;case _.ed:b.textAlign=_.At;break;case _.Ef:case _.ae:b.textAlign=_.Ef}_.gh(a.position)&&(b.position=a.position);if(_.fh(a.positionAlign))switch(a.positionAlign){case _.pe:b.positionAlign=_.pe;break;case _.ed:b.positionAlign=
334
- _.ed;break;case _.qe:b.positionAlign=_.qe}_.gh(a.line)&&(b.line=a.line);if(_.fh(a.lineAlign))switch(a.lineAlign){case _.Rf:b.lineAlign=_.Dt;break;case _.ed:b.lineAlign=_.ed;break;case _.ae:b.lineAlign=_.ae}typeof a.snapToLines===_.Uc&&(b.lineInterpretation=a.snapToLines?_.Ct:1);return b}};_.H=class extends Error{constructor(a,b,c,d,e){super(hi(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.data=!d||_.fh(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=hi(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};
335
- _.H.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,PLUGIN:9,ADS:10};
336
- _.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,
196
+ Mo=function(a,b,c){return _.x(function*(){const d=a.D.getConfiguration();yield uo(a,d);const e=a.keySystem();var f=a.f.Na[e];const g=(f=f&&f.modifiers)&&f.licenseRequest,h=f&&f.licenseResponse;g?b.requestModifiers.push(k=>g(d,k,c)):e.startsWith(_.Dd)&&b.requestModifiers.push(k=>_.Gm(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.Dd)&&b.responseModifiers.push(k=>_.Hm(k))})};No=function(a,b,c){a.j||(a.w(b),c.jc&&c.jc.reject(b),c.kb&&c.kb.reject(b))};
197
+ _.Qo=function(a,b){a&&b&&(_.Oo.set(a,b),_.Po.info(`Registered TextDisplayerFactory: '${a}'`))};_.Ro=function(a,b){b=b.find(c=>(c=_.Oo.get(c))?c.a(a):!1);if(null==b)return _.Po.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;_.Po.info(`Chosen the text displayer: ${b}`);return _.Oo.get(b)};
198
+ _.So=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})}}};To=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};Uo=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};
199
+ Vo=function(a){return a.a.map(b=>_.lh(b))};_.Wo=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:[]}};
200
+ ap=function(a){a.g.debug("Start watching for video events for "+a.m.namespace());const b=a.m,c=d=>Xo(a,d.type);a.a.on(b,_.ie,()=>{a.h||(a.j=!1,Yo(a,_.Zo))});a.a.on(b,bd,c);a.a.on(b,_.rf,()=>{a.F=!0;a.j=!1;Xo(a,_.rf)});a.a.on(b,_.bf,()=>{a.F=!1;a.j=!1;Xo(a,_.bf)});a.a.on(b,_.ng,c);a.a.on(b,_.Ff,c);a.a.on(b,_.Qf,d=>{a.h=!1;a.j=!1;Xo(a,d.type)});a.a.on(b,_.Rf,d=>{a.h=!0;Xo(a,d.type)});a.a.on(b,Xf,c);a.a.on(b,_.Ng,()=>{a.j=!0;Xo(a,_.Ng)});a.a.on(b,_.r,d=>{(d=d&&d.detail)&&d.severity&&d.severity===_.F&&
201
+ Yo(a,_.$o)});a.a.on(b,_.Ee,c);a.a.on(b,dd,()=>{a.C=!0;Xo(a,dd)});a.a.on(b,_.Bg,d=>{a.h=!0;Xo(a,d.type)});a.a.on(b,_.Ag,d=>{a.h=!1;a.j=!1;Xo(a,d.type)})};bp=function(a,b){return Object.keys(b)[a]};dp=function(a,b){const c={type:_.Zf};b===_.ad||b===_.$c?(c.reason=a.w,b===_.ad?c.timeSinceLastStateChangeMS=a.H:c.bufferedTimeMS=a.B):(a.f===_.cp&&(c.reason=a.w),a.A===_.cp&&(c.reason=a.w,c.bufferedTimeMS=a.B),c.currentState=a.f,c.previousState=a.A,c.timeSinceLastStateChangeMS=a.H);return c};
202
+ Yo=function(a,b){if(a.f===b)return!1;var c=Date.now();const d=a.f===_.cp;a.A=a.f;a.f=b;a.A===_.Zo&&(a.I=c,a.o=0);a.o||(a.o=a.I||c);a.H=c-a.o;a.o=c;b===_.cp?(a.K=a.o,a.w=a.h?1:2,a.g.info("Buffering started. Reason: "+bp(a.w-1,_.ep)),b=dp(a,_.ad),a.Ya(_.ad,b)):d&&(a.B=a.o-a.K,a.g.info("Buffering finished. Reason: "+bp(a.w-1,_.ep)+". Buffering time: "+a.B+" ms"),b=dp(a,_.$c),a.Ya(_.$c,b));b=bp(a.A,_.fp);c=bp(a.f,_.fp);a.g.info(`Player state change: ${b} -> ${c}`);a.Ya(_.Zf,dp(a,""));return!0};
203
+ Xo=function(a,b){if(a.f===_.$o)a.g.warn("Player is in error state, aborting any further state checks");else{var c=a.m.isPaused(),d=a.m?a.m.isEnded():!1;if(d)a.h||(a.j=!1,Yo(a,_.Zo));else if(b!==_.ng){var e=a.m.getPosition();e=null!==e&&void 0!==e&&0<=e?a.m.getBufferInfo().Ca(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===_.gp,g=typeof a.l===_.t&&2>=a.l&&a.j;e=a.h||
204
+ f||e||g;!a.L||a.m.isLive()||a.f!==_.cp||e||(f=b===_.Qf&&4===a.l,(g=a.A===_.hp)&&!a.C?e=!0:g||a.C||f||(e=!0));f=!1;e?f=Yo(a,_.cp):c?f=Yo(a,_.ip):a.F&&(f=Yo(a,_.jp));f&&(a.C=!1);a.g.debug("Video state check for event "+b+":: seeking: "+a.h+", waiting: "+a.j+", playing: "+a.F+", paused: "+c+", readyState: "+a.l+", rate: "+a.J+", buffer: "+a.G+", ended: "+d+". Changed state: "+f+", Current state: "+bp(a.f,_.fp))}}};
205
+ kp=function(a){a=(new _.Bi(a)).Ka;if(!a)return null;a=a.toUpperCase();return _.kj(a,".MPD")?_.Jc:_.kj(a,".M3U8")?_.Fl:_.kj(a,".MP4")?_.Hg:_.kj(a,".MP3")?"audio/mp3":_.kj(a,"MANIFEST")||_.kj(a,".ISM")?_.Oc:null};_.mp=function(a){let b;Pl(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.bg||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=lp(b[c]);d&&a.push(d)}return a};
206
+ lp=function(a){let b=null;_.rh(a)&&(a={url:a});typeof a===_.Re&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.B(a.drmProtected)||typeof a.drmProtected!==_.Zc||(b.drmProtected=a.drmProtected),_.B(a.isLive)||typeof a.isLive!==_.Zc||(b.isLive=a.isLive),_.B(a.name)||typeof a.name!==_.bg||(b.name=a.name),_.B(a.ac)||typeof a.ac!==_.bg||(b.ac=a.ac),_.B(a.audioMimeType)||typeof a.audioMimeType!==_.bg||(b.audioMimeType=a.audioMimeType));b&&!b.type&&(b.type=kp(a.url),b.type?np.debug("Detect media type "+
207
+ b.type+" for "+a.url):np.warn("Unable to detect media type for "+a.url));return b};pp=function(a,b){if(a.w)throw new _.I(_.F,7,7E3);a.a||(a.h.on(b,_.r,()=>{{const c=op(a);if(c)a.onError(c)}}),a.h.on(b,_.Kf,()=>{const c=b.videoWidth,d=b.videoHeight,e=a.getTrackManager();e&&0<c&&0<d&&(e.w={width:c,height:d});a.trigger(new _.D(_.Yc,{detail:{width:c,height:d}}))}),a.a=b)};rp=function(a){const b=_.$k()?Wn:void 0;return new _.qp(a,b)};
208
+ sp=function(a){return _.x(function*(){if(a.w)return Promise.reject(new _.I(_.F,7,7E3));var b=a.ga[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),Promise.resolve();b=_.gm(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.o=rp({yb:c,onError:d=>a.onError(d),Ne:()=>{},Me:(d,e)=>{a.trigger(new _.D(_.Yd,{expirationTime:e}))},onEvent:d=>{d instanceof _.D?a.dispatchEvent(d):
209
+ a.log.debug(_.Jb,d.type)},getConfiguration:()=>a.getConfiguration(),Oc:()=>a.Oc()});a.o.f=b;yield _.jo(a.o,[{id:0,language:_.sg,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,Fa:0,mimeType:_.Hg,codecs:"",encrypted:!0,keyId:null,language:_.sg,originalLanguage:_.sg,label:null,type:_.w,primary:!1,frameRate:void 0,
210
+ Vi:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,spatialAudio:!1,Gi:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}]);yield _.Bo(a.o,a.a)})};tp=function(a,b){jn(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{a.getState()!==_.$o&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
211
+ op=function(a){if(null===a.ga||!a.a.error)return null;const b=a.a.error.code;if(1===b)return null;let c=a.a.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new _.I(_.F,3,3016,{code:b,Qi:c,message:a.a.error.message})};
212
+ vp=function(a){if(a.w)return new _.up(Promise.reject(new _.I(_.F,7,7E3)),()=>{});const b=a.ga[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.H;c&&tp(a,c);if(d.preload!==_.Qe)a.h.one(d,_.Ee,()=>{const g=Date.now()/1E3-e;a.f.B=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.Qk()||_.Tk())&&d.load();const f=new _.qn;a.h.one(d,Xf,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.B||(a.B=(new _.Mk(()=>{f.reject(new _.I(_.F,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
213
+ uri:b.url},d.error))})).ia(g))});jn(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.h,()=>f.resolve());d.error?f.reject(op(a)):d.preload===_.Qe&&(a.log.warn('With \x3cvideo preload\x3d"none"\x3e, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way. Please do not use preload\x3d"none" with PRESTOplay for Web Apps.'),f.resolve());a.h.one(d,_.r,()=>{f.reject(op(a))});return new _.up(f,
214
+ ()=>{const g=new _.I(_.F,7,7001);f.reject(g);return Promise.resolve()})};wp=function(a,b){jn(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{if(a.isLive()&&a.getState()!==_.$o){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)}))}})};
215
+ xp=function(a,b){let c=!1;a.h.on(b,_.Rf,()=>{c=b.paused});a.h.on(b,_.Qf,()=>{.2>b.duration-b.currentTime&&b.paused&&!c&&(a.log.warn("Player was auto-paused during seek to the end, auto-resuming."),b.play())})};_.Ap=function(a){0<=yp.indexOf(a)?zp.warn(`Factory '${a.name()}' is already registered`):(yp.push(a),zp.info(`Factory '${a.name()}' has been registered.`))};Bp=function(a,b){const c=yp.find(d=>d.a(a,b))||null;c&&zp.info(`Chosen ads manager: ${c.name()}`);return c};
216
+ _.Cp=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};_.Dp=function(a,b){a.classList.add(b)};_.Ep=function(a,b){if(a&&typeof b===_.Re)for(const c in b)a.style[c]=b[c]};_.Fp=function(a){return document.createElement(a)};
217
+ Gp=function(a,b){const c=new MutationObserver(()=>{const d=Array.from(a.h.values());qi(Array.from(b.classList),Array.from(d))||b.classList.add(...d)});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};Hp=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.h.add(b))};
218
+ Ip=function(a,b,c){(_.Tk()&&53===_.Uk().major||_.Tk()&&68===_.Uk().major||_.Vk())&&!b.hasAttribute(Nd)&&(b.style.opacity="0",b.setAttribute(Nd,""),a.j.one(b,ee,()=>{b.removeAttribute(Nd);b.style.opacity="1";c&&(c.style.opacity="1")}))};Jp=function(a){if(a.fb){let b=a.player.getDuration();a.maxDuration&&(b=Math.min(b,a.maxDuration));a.fb.a=b}a.ce&&a.ce()};Kp=function(a,b){return _.x(function*(){yield a.release();yield a.load(b)})};
219
+ Lp=function(a){if(a.sideAdContainer)a=a.sideAdContainer;else if(a=a.pg.getSurface().getContainer(),!a)throw Error("Primary player does not have a container");return a};
220
+ Np=function(a,b,c){return Array.from({length:2}).map((d,e)=>{var f=document.createElement(_.w);b.appendChild(f);d=a.ja.gb.create();f=new Mp(f);d.init(f,c);d.setSourceIndex(0);const g=f.getContainer();if(!g)throw Error("Failed to create player surface container element");g.classList.add("secondary");f.getMedia().classList.add(`v-${e}`);a.A.push(g);return d})};Op=function(a){return[a.a,...a.l.a.map(b=>b.player)]};
221
+ Pp=function(a,b,c){const d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.g.debug(`Show video element .${b}`),d.classList.add(rd),d.classList.remove("clpp-hide")):(a.g.debug(`Hide video element .${b}`),d.classList.remove(rd),d.classList.add("clpp-hide")),a.F&&a.F(d,c))};Qp=function(a){return a.h.find(b=>!!b.primary)||null};
222
+ dq=function(a,b,c){return _.x(function*(){if(a.w)a.g.warn(`Cannot ${c} item while busy (ID: ${b})`);else{var d=Rp(a,b);if(d){a.g.info(`${c} item (ID: ${b})`);a.w=!0;var e=a.f;e&&(e.player.isPaused()||(a.o?e.primary?Sp(a,e.Ja,Tp):e.player.pause():e.player.pause()),e.primary?Sp(a,e.Ja,Tp):Sp(a,e.Ja,Up));var f=a.j.has(b);f&&a.j.delete(b);try{c===_.ff?(e&&d.primary?yield Vp(a,d):f?yield Wp(a,d):yield Xp(a,d),Jp(d)):f?a.g.error("Loading preloaded items is not supported"):yield Yp(a,d);Zp(a,d);d.primary?
223
+ Sp(a,d.Ja,Up):Sp(a,d.Ja,Tp);d.fb&&$p(a,d,d.fb);if(d.Da)d.player.one(_.ie,d.Da);d.kg&&d.kg(d.player.getDuration())}catch(g){throw a.g.error(`Item failed to ${c} (ID: ${b})`),g;}finally{a.w=!1,e&&aq(a,e),bq(a),cq(a,d.next)}}else a.g.warn(`Item not found (ID: ${b})`)}})};
224
+ Zp=function(a,b){const c=b.transition;if(c&&!c.gi){if(c.Da){const d=c.Da,e=()=>{a.g.info(`Transition onEnded to (ID: ${d})`);a.play(d)};b.player.one(_.ie,e);b.disposers.push(()=>{b.player.off(_.ie,e)})}c.ae&&eq(a,b,()=>{const d=a.f.fb;d&&(b.disposers.forEach(e=>e()),b.disposers=[],a.a.trigger(new _.D(_.Bc,{ad:d})),a.a.trigger(new _.D(_.lc,{ad:d})),a.a.trigger(new _.D(_.ic,{id:b.Ja})))});c.gi=!0}};
225
+ fq=function(a,b){return _.x(function*(){a.g.info("Crop ads by playout limit",b);var c=Qp(a),d=a.getCurrentItem();if(c&&d&&d.fb&&null!=c.X){var e=a.h.filter(l=>!l.primary),f=Math.max(...e.map(l=>l.rb));if(b>f)a.g.info("Playout limit is greater than ad pod duration, ignored.");else{var g=d.player.getPosition()+(d.rb-d.duration),h=e.sort((l,m)=>m.rb-l.rb)[0],k=c.X;b<=g?(c.X-=f-g,a.g.warn("Playout limit exceeded, immediately returning "+`to primary at ${c.X.toFixed(1)} instead of `+`${k.toFixed(1)}`),
226
+ yield dq(a,c.id,_.ff),h.Da&&h.Da(),c=d.fb,a.a.trigger(new _.D(_.Bc,{ad:c})),a.a.trigger(new _.D(_.lc,{ad:c})),a.a.trigger(new _.D(_.ic,{id:d.Ja}))):(a.g.warn("Limiting playout of ads to",b),(d=e.find(l=>b<=l.rb&&b>=l.rb-l.duration))?(e=b-(d.rb-d.duration),d.fb.a=e,c.X-=f-b,a.g.info("Last ad is now ",d.fb.wb(),"with cropped duration",e,"and primary will resume at",c.X.toFixed(1),"instead of",k.toFixed(1)),h.Da&&(d.Da=h.Da),d.transition={ae:{position:e,itemId:c.id,X:c.X}},Zp(a,d)):a.g.warn("Cannot find ad hit by limit"))}}})};
227
+ gq=function(a){return _.x(function*(){const b=a.f;b&&("loaded"!==b.state&&(yield b.Qc),yield b.player.play(),b.state=_.rf,Jp(b))})};hq=function(a,b){a.g.info("Add items",b);a.h=a.h.concat(b.map(c=>Object.assign({},c,{state:"idle",disposers:[],preloadPromise:Promise.resolve(),Qc:Promise.resolve()})))};iq=function(a,b){0!==a.h.length&&(b?(a.g.info("Remove items",b),a.h=a.h.filter(c=>!b.includes(c.id))):(a.g.info("Remove all items"),a.h=[]))};Rp=function(a,b){return a.h.find(c=>c.id===b)||null};
228
+ Sp=function(a,b,c){a.a.getConfiguration().muted||a.B?(a.a.setMuted(!0),jq(a,!0)):(a.ja.onAudioDecision&&(c=a.ja.onAudioDecision(b)),c===Up?(a.a.setMuted(!1),jq(a,!0)):c===Tp?(a.a.setMuted(!0),jq(a,!1)):a.g.warn("Audio decision not supported",c))};
229
+ Vp=function(a,b){return _.x(function*(){if(b.player){if(b.state===Af){a.g.info("Wait for seek to finish");try{yield b.preloadPromise}catch(c){}}b.X&&(yield b.player.seek(b.X,!0));a.f=b;b.role=kq;Pp(a,b.player,!0);b.state="loading";a.o?Sp(a,b.Ja,Up):yield b.player.play();b.state=_.rf}})};
230
+ Wp=function(a,b){return _.x(function*(){const c=b.player;if(c){if(b.state===Af){a.g.info(Ub);try{yield b.preloadPromise}catch(d){}}a.f=b;b.role=kq;Pp(a,c,!0);b.state===zf?yield c.play():b.state===yf&&(yield Kp(c,b.config));b.state=_.rf}})};Xp=function(a,b){return _.x(function*(){yield Yp(a,b);yield b.player.play();b.state=_.rf})};
231
+ Yp=function(a,b){return _.x(function*(){const c=yield lq(a,!!b.primary);a.f=b;b.role=kq;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();Pp(a,c,!0);b.state="loading";b.Qc=Kp(c,b.config);yield b.Qc;b.state="loaded"})};
232
+ $p=function(a,b,c){const d=b.player,e=()=>{const l=d.getPosition(),m=c.getDuration();c.j=l;a.a.trigger(new _.D(_.uc,{ad:c}));!c.l&&l>=m/4&&(c.l=!0,a.a.trigger(new _.D(_.mc,{ad:c})));!c.o&&l>=m/2&&(c.o=!0,a.a.trigger(new _.D(_.sc,{ad:c})));!c.w&&l>=3*m/4&&(c.w=!0,a.a.trigger(new _.D(_.Cc,{ad:c})))},f=()=>{d.isEnded()||a.a.trigger(new _.D(_.tc,{ad:c}))},g=()=>{a.a.trigger(new _.D(_.vc,{ad:c}))},h=()=>{a.a.trigger(new _.D(_.jc,{ad:c}))},k=()=>{a.a.trigger(new _.D(_.Bc,{ad:c}));a.a.trigger(new _.D(_.lc,
233
+ {ad:c}));c.h===c.f&&a.a.trigger(new _.D(_.ic,{id:b.Ja}))};d.on(_.ng,e);d.on(_.bf,f);d.on(_.rf,g);d.on(_.ad,h);d.one(_.ie,k);b.disposers.push(()=>{d.off(_.ng,e);d.off(_.bf,f);d.off(_.rf,g);d.off(_.ad,h);d.off(_.ie,k)});1===c.h&&a.a.trigger(new _.D(_.hc,{id:b.Ja}));c.videoEl=d.getSurface().getMedia();a.a.trigger(new _.D(_.qc,{ad:c}));a.a.trigger(new _.D(_.yc,{ad:c}))};
234
+ aq=function(a,b){return _.x(function*(){const c=b.player;b.primary?(a.g.info("Pause primary playback"),a.o||Pp(a,c,!1)):(a.g.info(`Stop previous playback (ID: ${b.id})`),b.disposers.forEach(d=>d()),b.disposers=[],b.player=null,b.videoEl=null,b.role=mq,b.Ve?(a.g.info(`Release player (ID: ${b.id}) `+`after delay ${b.Ve} ms.`),yield new Promise(d=>{setTimeout(()=>_.x(function*(){yield nq(a,c);Pp(a,c,!1);a.a.trigger(new _.D("ad-hls-released"));d()}),b.Ve)})):(yield nq(a,c),Pp(a,c,!1)))})};
235
+ bq=function(a){return Promise.all(Array.from(a.j.keys()).map(b=>oq(a,b)))};cq=function(a,b){_.x(function*(){if(0!==b.length){a.g.info(`Preload items (IDs: ${b})`);var c=a.h.filter(d=>b.includes(d.id))||[];yield Promise.all(c.map(d=>pq(a,d)))}})};qq=function(a,b){const c=Qp(a);c?c.X=b:a.g.error("Failed to get primary item. Cannot configure resume position.")};rq=function(a){a.A.forEach(b=>a.C.removeChild(b));a.A=[];Pp(a,a.a,!0)};
236
+ eq=function(a,b,c){const d=b.transition.ae;let e=null;d.X&&qq(a,d.X);const f=()=>{const k=b.player.getPosition();.5>=d.position-k&&(h(),g())},g=()=>{var k=b.player.getPosition();k>=d.position?(c(),a.g.info(`Transition onPosition to (ID: ${d.itemId}), `+`playback position: ${k.toFixed(3)} s, `+`transition point: ${d.position.toFixed(3)} s. `),a.play(d.itemId),k=!0):k=!1;k?e=null:e=requestAnimationFrame(g)},h=()=>{b.player.off(_.ng,f)};b.player.on(_.ng,f);b.disposers.push(()=>{null!=e&&(cancelAnimationFrame(e),
237
+ e=null)});b.disposers.push(h)};sq=function(a){a.f&&(a.f.disposers.forEach(b=>b()),a.f.disposers=[],a.f.fb&&$p(a,a.f,a.f.fb),Zp(a,a.f),bq(a),cq(a,a.f.next))};oq=function(a,b){return _.x(function*(){const c=a.j.get(b);c&&(a.g.info(`Stop preloading item (ID: ${b})`),c.player&&(yield nq(a,c.player)),a.j.delete(b))})};nq=function(a,b){return _.x(function*(){b!==a.a&&(yield a.l.release(b))})};tq=function(a){return _.x(function*(){a.f&&(yield aq(a,a.f),Pp(a,a.a,!0))})};
238
+ lq=function(a,b){return _.x(function*(){if(b)return a.a;const c=yield a.l.get();if(!c)throw Error("No player available");return c})};
239
+ pq=function(a,b){return _.x(function*(){if(b.primary){b.state=Af;a.j.set(b.id,b);if(b.X&&!a.o){var c=b.player;a.g.info("Preparing to resume at",b.X);Sp(a,b.Ja,Tp);yield c.seek(b.X,!0)}b.state=zf}else{c=b.id;var d=yield lq(a,!1);b.player=d;b.videoEl=d.getSurface().getMedia();b.role=mq;b.state=Af;try{a.j.set(c,b);b.config.autoplay&&(a.g.warn(ka+`Force disabling autoplay (ID: ${c})`),b.config.autoplay=!1);const e=a.a.getBandwidthEstimate();e&&(b.config.abr||(b.config.abr={}),b.config.abr.defaultBandwidthEstimate=
240
+ e);b.preloadPromise=Kp(d,b.config);yield b.preloadPromise;b.state=zf}catch(e){7001===e.code?(a.g.info(`Preload aborted (ID: ${c})`),b.state=xf):(a.g.warn(`Preload failed (ID: ${c})`,e),b.state=yf)}}})};jq=function(a,b){a.h.filter(c=>!c.primary&&c.player).forEach(c=>c.player.setMuted(b))};wq=function(a){return a.nf&&!(a.once&&a.tg)&&[uq,vq].includes(a.state)};xq=function(a){const b={URI:a.Ba[0].URI,DURATION:a.Ba[0].DURATION};a.ug&&(b[Yb]=a.ug);return{ASSETS:[b]}};
241
+ yq=function(a){return a&&a.ASSETS&&Array.isArray(a.ASSETS)?a.ASSETS.every(b=>typeof b.URI===_.bg&&typeof b.DURATION===_.t):!1};zq=function(a,b){const c=a.f.getPosition();b>=c||a.a.filter(d=>1===d.td&&!d.once&&d.gg&&d.startTime>b).forEach(d=>{d.nf=!0})};Aq=function(a,b){return a.a.find(c=>!c.Hh&&1===c.td&&b>c.startTime&&b<c.endTime)||null};Dq=function(a,b,c){return _.x(function*(){if(!(yield Bq(a,b)))throw Error("Failed to bind");yield Cq(a,b,1,!1,c)})};
242
+ Eq=function(a,b){const c=a.f.getPosition();return a.a.filter(d=>1===d.td&&!d.Wg).sort((d,e)=>e.startTime-d.startTime).find(d=>d.startTime>c&&d.startTime<b)||null};
243
+ Lq=function(a,b){const c=()=>_.x(function*(){var e=b.getPosition(),f=Fq(a,e);f&&(a.g.info(`Interstitial ${f.ka} coming up `+`at ${f.startTime} s`),(yield Bq(a,f))&&Gq(a,f,b));if((f=Hq(a))&&f.state===uq&&b.getDuration()-e<a.ja.resolutionOffsetSec&&(yield Bq(a,f)))if(f.Ba&&0!==f.Ba.length){if(e=a.fa.getCurrentItem()){var g=Iq(a,f,2);if(0!==g.length){var h=g[0].id;e.next=[h];e.transition={Da:h};Jq(a,f,g);a.g.info(`Postroll interstitial ${f.ka} scheduled`)}}}else a.g.warn("Postroll interstitial has no assets, ignoring.")});
244
+ b.addEventListener(_.ng,c);a.h.push(()=>{b.removeEventListener(_.ng,c)});const d=()=>{Kq(a,!1,!0,!0)};b.addEventListener(_.mg,d);a.h.push(()=>{b.removeEventListener(_.mg,d)})};Mq=function(a){a.h.forEach(b=>b());a.h=[]};Nq=function(a){return(a=a.fa.getCurrentItem())&&!a.primary?a.player:null};
245
+ Kq=function(a,b,c,d){const e=Oq(a);a.g.info("Interstitial cues found",e);var f=e;if(d){f=ti(a.a.map(m=>m.ka),e.map(m=>m.id));Pq(a,f.ci);const l=new Set(f.Og);f=e.filter(m=>l.has(m.id))}if(!Qq(a,f))return!1;const g=[],h=[],k=[];f.forEach(l=>{const m=l.customAttributes.CUE||[];m.includes(_.rb)?h.push(l):!d&&m.includes("PRE")?g.push(l):!c&&l.startTime<a.ja.Xh?g.push(l):k.push(l)});1<g.length?a.g.warn("Multiple preroll interstitials not supported. Will display only the 1st one."):g[0]&&Rq(a,g[0],b);k.forEach(l=>
246
+ Sq(a,l,1));1<h.length?a.g.warn("Multiple postroll interstitials not supported. Will display only the 1st one."):h[0]&&Sq(a,h[0],2);Tq(a,e);a.g.info("Interstitials changed",a.a);return 0<g.length};
247
+ Uq=function(a){_.x(function*(){var b=a.fa;hq(b,[{id:Cf,primary:!0,config:b.a.getConfiguration(),next:[],rb:0,duration:0,Ja:null}]);var c=Qp(b);if(!c)throw Error("Failed to find primary item");b.f=c;c.role=kq;c.player=b.a;c.videoEl=c.player.getSurface().getMedia();Pp(b,c.player,!0);b=a.f;c=b.getConfiguration();a.j=Kq(a,!c.autoplay,b.isLive(),!1);if(a.j){if(b=a.fa,c=b.l,c=c.a[0]?c.a[0].player:null)b.o||Pp(b,b.a,!1),Pp(b,c,!0)}else c.autoplay&&(yield gq(a.fa))})};
248
+ Oq=function(a){return a.f.getTimelineCues().filter(b=>b.schemeIdUri===_.Fd&&b.customAttributes)};Pq=function(a,b){const c=new Set(b);a.a.forEach(d=>{c.has(d.ka)&&!wq(d)&&a.g.warn("Removing an interstitial in active state",d)});a.a=a.a.filter(d=>!c.has(d.ka))};
249
+ Qq=function(a,b){var c=b.sort((h,k)=>h.startTime-k.startTime);const d=a.ja.resolutionOffsetSec;let e=Infinity;const f=[];for(let h=0;h<c.length-1;h++){const k=c[h],l=c[h+1];l&&(e=Math.min(e,l.startTime-k.endTime));l&&l.startTime<=k.endTime&&f.push(`Interstitials ${k.id} and ${l.id} `+"overlap.")}e<d&&(c=e/2,a.ja.resolutionOffsetSec=c,a.g.info("Interstitials are closer than configured "+`resolutionOffsetSec (${d} s) auto-reconfiguring to `+`${c} s.`));const g=[];b.forEach(h=>{const k=h.customAttributes[_.$b];
250
+ h.customAttributes[_.Zb]||k||g.push(`Interstitial cue ${h.id} is invalid `+"it contains neither X-ASSET-LIST nor X-ASSET-URI.")});0<g.length?a.g.error("Invalid interstitials, all interstitials will "+`be skipped. ${g.join(" ")}`):0<f.length&&a.g.warn("Unsupported format of interstitials, playback may not "+`behave correctly. ${f.join(" ")}`);return 0===g.length};
251
+ Rq=function(a,b,c){_.x(function*(){var d=Sq(a,b,0);const e=yield Bq(a,d),f=d.Ba?d.Ba.length:0;if(e&&0<f)try{{const h=Cq(a,d,0,c);a.g.info(`Preroll interstitial ${d.ka} scheduled`);var g=h}yield g}catch(h){a.g.error("Preroll interstitial failed.",h),(d=Qp(a.fa))&&(yield a.fa.play(d.id))}else e?a.g.warn("Preroll interstitial has no assets, skipping"):(a.g.error("Preroll interstitial failed, skipping"),yield tq(a.fa)),c||(yield gq(a.fa))})};
252
+ Sq=function(a,b,c){{const q=b.customAttributes[_.$b],u=b.customAttributes[_.Zb],v=b.customAttributes[_.cc],y=b.customAttributes[_.ac];var d=b.customAttributes[_.bc]||[];b.customAttributes[fc]||(b.customAttributes[fc]=null==v||0<v?"RANGE":"POINT");var e=b.id,f=b.startTime,g=b.endTime,h=uq,k=null==v?null:Math.max(0,b.startTime+v),l="POINT"===b.customAttributes[fc],m=!d.includes("SKIP");d=!d.includes("JUMP");{const A=b.customAttributes[Yb];if(A)try{var n=JSON.parse(atob(A))}catch(E){n=null}else n=null}b=
253
+ {ka:e,startTime:f,endTime:g,state:h,vf:u,wf:q,Ba:null,X:k,ei:v,ec:y,td:c,Hh:l,Xg:m,Wg:d,ug:n,gg:null!=v&&0>v,once:(b.customAttributes.CUE||[]).includes("ONCE"),tg:!1,nf:!0}}a.a.push(b);return b};
254
+ Tq=function(a,b){_.x(function*(){const c=a.fa.getCurrentItem();if(c)if(c.primary)a.a.forEach(g=>{const h=b.find(k=>k.id===g.ka);if(h){const k=h.customAttributes[_.ac];null==g.ec&&null!=k&&(a.g.info(Qb,h.id,"Playout limit",k),g.ec=k)}});else{var d=b.find(g=>g.id===c.Ja);if(d){var e=d.customAttributes[_.ac];if(null!=e){var f=a.a.find(g=>g.ka===d.id);f&&null==f.ec&&(a.g.info(Qb,d.id,"Playout limit",e),f.ec=e,yield fq(a.fa,e))}}}})};
255
+ Bq=function(a,b){return _.x(function*(){b.state=Vq;if(b.vf)try{a.g.info(`Load X-ASSET-LIST for ${b.ka}`);a.Ya(new _.D(nc));const c=yield Wq(a,b.vf);b.Ba=c.ASSETS;b.Ba&&0!==b.Ba.length||a.g.info(`Interstitial ${b.ka} has no assets, `+"will be smoothly skipped");if(null==b.X){const d=Ri(b.Ba.map(e=>e.DURATION));b.X=b.startTime+(null==b.ec?d:Math.min(b.ec,d))}b.state=Xq;a.Ya(new _.D(oc));a.Ya(new _.D(pc,{id:b.ka,detail:c}))}catch(c){a.g.error("Failed to load X-ASSET-LIST",c),b.state=Yq}else b.wf?(b.Ba=
256
+ [{URI:b.wf,DURATION:b.endTime-b.startTime}],a.Ya(new _.D(pc,{id:b.ka,detail:xq(b)})),b.state=Xq):b.state=Yq;return b.state===Xq})};Cq=function(a,b,c,d,e){return _.x(function*(){if(a.fa.getCurrentItem()){var f=Iq(a,b,c);if(0!==f.length){Jq(a,b,f);if(0!==c||!a.f.isLive()){const g=e||b.X;g&&qq(a.fa,g)}d?yield a.fa.load(f[0].id):yield a.fa.play(f[0].id)}}})};Fq=function(a,b){return a.a.find(c=>{const d=c.startTime-b;return 1===c.td&&wq(c)&&0<d&&d<=a.ja.resolutionOffsetSec})||null};
257
+ Gq=function(a,b,c){if(b.Ba)if(0===b.Ba.length){const g=()=>{c.isLive()?a.g.info("Skipping empty "+`live interstitial ${b.ka}`):null!=b.X&&0!==b.ei?c.seek(b.X):a.g.info(`Empty VOD interstitial ${b.ka}, `+"continuing to next segment")};c.one(_.kg,g);a.h.push(()=>{c.off(_.kg,g)});a.g.info(`Interstitial ${b.ka} scheduled to `+"be skipped")}else{var d=a.fa.getCurrentItem();if(d){var e=Iq(a,b,1);if(0!==e.length){var f=e[0].id;null!=b.X&&qq(a.fa,b.X);d.next=[f];d.transition={ae:{position:b.startTime,itemId:f,
258
+ X:b.X}};Jq(a,b,e);a.g.info(`Interstitial ${b.ka} scheduled for `+`${b.startTime} s`)}}}};Hq=function(a){return a.a.find(b=>2===b.td)||null};Wq=function(a,b){return _.x(function*(){var c=a.fa.Nd();if(!c)throw Error("No player found");c=c.getNetworkEngine();const d=_.Jj(Zq(a,b));c=yield Uj(c,d);if(!yq(c))throw new _.yi("Invalid X-ASSET-LIST list response");return c})};Zq=function(a,b){return(a=a.ja.Wh)?(b=new URL(b),b.searchParams.set("_HLS_primary_id",a),b.toString()):b};
259
+ Iq=function(a,b,c){let d=0,e=b.Ba.map((h,k)=>{const l=`${b.ka}-${k}`;d+=h.DURATION;return{id:l,config:{source:{url:Zq(a,h.URI),type:_.Fl}},duration:h.DURATION,rb:d,Ja:b.ka,next:[],fb:new Q(c,k+1,b.Ba.length,h.DURATION,b.ka,b.Xg)}});e.forEach((h,k)=>{const l=k===e.length-1;l&&2===c||(l?(h.next=[Cf],h.transition={Da:Cf}):(k=l?Cf:`${h.Ja}-${k+1}`,h.next=[k],h.transition={Da:k}))});e.forEach(h=>{h.ce=()=>{a.g.info(`Playing interstitial asset ${h.id}`,h)}});if(null!=b.ec&&(e=$q(a,b,e),0===e.length))return[];
260
+ const f=e[0].ce;e[0].ce=()=>{b.tg=!0;b.gg&&(b.nf=!1);a.g.info(`Playing interstitial ${c} ${b.ka} with `+`${b.Ba.length} assets and will resume primary `+`content ${b.X?`at ${b.X.toFixed(1)} s`:"after interstitial ended"}.`,e);f()};e[0].kg=h=>{null==b.X&&(b.X=b.startTime+h,qq(a.fa,b.X),a.g.info("Primary content will resume at",b.X));b.state=ar};const g=e[e.length-1];g.Da=()=>{b.state=vq;iq(a.fa,e.map(h=>h.id));2===c&&tq(a.fa)};g.Ve=a.ja.adReleaseDelayMs;return e};
261
+ Jq=function(a,b,c){hq(a.fa,c);sq(a.fa);b.state=br;a.Ya(new _.D(_.rc,{detail:null}))};
262
+ $q=function(a,b,c){const d=b.ec;a.g.info(`Playout limit for ${b.ka} is `+`${d} s`);b=c[c.length-1].rb;if(d>=b)return a.g.info(`Playout limit (${d}) is`+`larger or equal to total duration: (${b}).`),c;if(0>=d)return a.g.info("Discarding all ads."),[];const e=c.filter(f=>f.rb-f.duration<=d);e.forEach(f=>{f.fb.f=e.length});a=e[e.length-1];c=d-(a.rb-a.duration);.1>Math.abs(c-a.duration)?a.transition.Da=Cf:a.transition.ae={position:c,itemId:Cf,X:null};a.maxDuration=c;return e};
263
+ cr=function(){try{const a=URL.createObjectURL(new Blob);URL.revokeObjectURL(a);return a.slice(a.lastIndexOf("/")+1)}catch(a){let b=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,c=>{const d=(b+16*Math.random())%16|0;b=Math.floor(b/16);return("x"===c?d:d&3|8).toString(16)})}};
264
+ gr=function(a){a.a.on(window,"offline",()=>{dr(a,!1)});a.a.on(window,"online",()=>{a.f||er(a)});a.a.on(a.m,Xf,()=>fr(a));a.a.on(a.m,"suspend",()=>fr(a));a.a.on(a.m,_.Ng,()=>fr(a));a.a.on(a.m,_.rf,()=>{a.f||er(a)});a.a.on(a.m,_.Df,()=>{a.f||er(a)});a.a.on(a.m,_.Zf,()=>{switch(a.m.getState()){case _.cp:fr(a);break;default:fr(a)}})};hr=function(a){a.h&&(a.h.stop(),a.h=null)};fr=function(a){a.f&&er(a)};
265
+ ir=function(a){return _.x(function*(){var b=a.m.getConfiguration().connectivityCheck;b&&a.m&&(b=yield Xj(a.j,b.url,b.attemptParameters,b.method),dr(a,b))})};er=function(a){a.m.getConfiguration().connectivityCheck&&(hr(a),a.h=(new _.Mk(()=>ir(a))).ia(5))};dr=function(a,b){hr(a);a.f!==b&&(a.f=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.D(Ye,{online:a.f})))};kr=function(){for(let a=0;a<jr.length;++a)jr[a].Fc()};
266
+ _.lr=function(a,b){b=b||0;a={priority:b,Fc:a};for(let c=0;c<jr.length;c++)if(jr[c].priority<b){jr.splice(c,0,a);return}jr.push(a)};mr=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};
267
+ or=function(a){var b=nr;const c={kty:"RSA",n:b.n,e:b.e},d=a.h+"."+a.f,e=a.j;return new Promise(function(f,g){let h;try{h=window&&window.crypto&&window.crypto.subtle}catch(l){}if(h){var k={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};h.importKey("jwk",c,k,!1,["verify"]).then(function(l){const m=_.gj(d),n=_.sj(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(new _.yi("Signature Verification failed",rg))}).catch(g)}else f()})};
268
+ qr=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 pr(b[0],b[1],b[2]);a.a=b}return a.a};rr=function(a){return _.x(function*(){var b=qr(a);try{yield or(b)}catch(c){if(c&&c.code===rg)throw c;{b=window.location.href;const d=new _.Bi(b);b=d.Ab||d.$a?d:new _.Bi("//"+b)}if(!/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(b.$a))throw c;}})};
269
+ sr=function(a){switch((a.ga[0]||{src:"",type:""}).type){case _.Jc:a="dash";break;case _.Oc:a="ss";break;case _.Fl:a="hls";break;case _.Hg:a="mp4";break;default:a=""}return a};tr=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};ur=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
270
+ vr=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};wr=function(a){a=a.drmInfo;return(new _.Bi(a&&a.licenseServerUri||"")).$a};xr=function(a){const b=a.configuration;let c="no";b.drm&&!_.th(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(de)||wr(a).endsWith("drmtoday.com"))&&(c=de);return c};yr=function(a){a=a.drmInfo;let b="";if(a)switch(a.keySystem){case _.Jd:b="wv";break;case _.Hd:b="pr";break;case _.Dd:b="fps"}return b};
271
+ zr=function(a){a=a.drmInfo;let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};Ar=function(a){a=a.drmInfo;let b="";if(a)switch(a.videoRobustness){case Xa:case Va:b="L1";break;case Wa:b="L2";break;case _.Bb:case _.Ab:b="L3"}return b};
272
+ Er=function(a,b){const c="ie"===_.ol().browser;var d=b.configuration;const e=[...Array.from(_.Ql.keys()),...b.og];b={"CL-KEY":a.f,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.ea,"CL-USER-ID":tr(d),"CL-ASSET-ID":ur(d),"CL-SESSION-ID":vr(d),"CL-PLAYBACK-TYPE":b.isLive?Br:Cr,"CL-CONTENT-TYPE":sr(b),"CL-PLUGINS":e.join(" "),"CL-DRM":xr(b),"CL-DRM-CDM":yr(b),"CL-DRM-SEC-LEVEL":Ar(b),"CL-DRM-OFFLINE":zr(b),"CL-DRM-IP":wr(b)};c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=d);d=_.Jj(["https://downloads.castlabs.com/r/register/"]);
273
+ d.method="GET";d.headers=b;return(new _.Dr).fetch(d).U.then(f=>{200===f.status&&c&&window.localStorage.setItem("cl_et",f.headers.etag);return Promise.resolve()}).catch(f=>{a:{var g=qr(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.";
274
+ break;default:g=Promise.resolve();break a}a.g.error(ab+k);g=Promise.reject(new _.I(_.F,7,g,k))}}return g})};Ir=function(a){try{const b=a.split(",").map(c=>{const d={};c=c.split(";");for(let e=0;e<c.length;e++){const {key:f,value:g}=Fr(c[e]);Object.keys(Gr).includes(f)&&(d[Gr[f]]=g)}return d}).filter(c=>_.nh(c));return 0<b.length?b:null}catch(b){return Hr.error("CmsdManager parseCmsdDynamicHeader_ failed:",b),null}};
275
+ Fr=function(a){var b=a.split("\x3d");const c=b[0];b=b[1];if(!c)throw new _.yi("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 _.yi(`Parsing CMSD, not recognized value type of ${a}`);};
276
+ Kr=function(a){return b=>{{var c=b.headers;let e=b=null;var d=xh(c,"cmsd-dynamic");c=xh(c,"cmsd-static");d&&(b=Ir(d),a.a=b);if(c)try{d={};const f=c.split(",");for(c=0;c<f.length;c++){const {key:g,value:h}=Fr(f[c]);Object.keys(Jr).includes(g)&&(d[Jr[g]]=h)}e=_.nh(d)?d:null}catch(f){Hr.error("CmsdManager parseCmsdStaticHeader_ failed:",f),e=null}(b||e)&&a.m.trigger(new _.D("cmsd-event",{Pi:b,aj:e}))}}};_.Mr=function(a){a&&(0<=Lr.indexOf(a)||Lr.push(a))};
277
+ Or=function(a){if(!a.h&&a.A&&a.a&&a.f.ads.hls.enable&&a.getTimelineCues().some(b=>b.schemeIdUri===_.Fd)){const b=a.f.mse.sendPlaybackSessionIdHeader?a.G:null;a.h=new Nr;a.h.o(a.a,a.A,b)}};Qr=function(a,b){a.F=new Pr(b);rr(a.F).catch(c=>{setTimeout(()=>{a.g.error(ab+c);a.trigger(new _.D(_.r,{detail:new _.I(_.F,7,7101)}));a.destroy()},1E3)})};Sr=function(a,b){a.W=b;for(const c of a.W)(b=c.id())&&(a.K[b]=c);_.Rr(a,"onPlayerCreated")};
278
+ _.Tr=function(a,b,c){c=void 0===c?null:c;null!=b&&b===a.a?a.a.forwardEventsTo(a):(a.a&&(a.a.stopForwardingEventsTo(a),a.a.destroy(),a.a=null,a.A=null),b&&(b.init(a.j,a.C),b.setNetworkEngine(a.getNetworkEngine()),b.forwardEventsTo(a),a.a=b,a.A=c))};
279
+ Ur=function(a,b){_.x(function*(){a.j.getMedia()||a.j.getCastElement();a.F||(a.F=new Pr(a.f.license));try{a.g.debug("Verifying license remotely"),yield Er(a.F,b),a.g.debug("License verified remotely")}catch(c){a.g.debug("License rejected by remote",c),setTimeout(mr,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)}})};_.Rr=function(a,b,...c){if(!a.Y)return Promise.resolve();const d=a.W.map(e=>e[b].call(e,a,...c)).filter(e=>e instanceof Promise);return Promise.all(d)};
280
+ Vr=function(a){return _.x(function*(){if(a.R)return a.g.debug("The player is already released. No-op"),new Promise(b=>b());a.$.off(document,Lg);a.trigger(new _.D(_.Hf));a.j&&a.j.release();a.h&&(yield a.h.h(),a.h=null);a.B&&(yield a.B.release(),a.B=null);if(a.a){let b=null;const c=a.a.on(_.Zf,d=>{b=d});return _.Rr(a,_.We).then(()=>{a.a.stopForwardingEventsTo(a);return Promise.all([a.a.release(),a.I.release()])}).then(()=>{a.g.debug("Releasing player completed");b&&(a.g.debug("Re-post state change event after release"),
281
+ a.trigger(b))}).finally(()=>{a.a.off(_.Zf,c);a.trigger(new _.D(Gf))})}a.trigger(new _.D(Gf));return new Promise(b=>b())})};Wr=function(a){a.G&&(a.g.info("Playback session ended, ID:",a.G),a.G=null,a.a&&a.a.setPlaybackSessionId(null))};Xr=function(a,b){const c=Kh(d=>d.f(_.qb)&&a.every(e=>2===d.canPlay(e,b)));if(!c)throw new _.I(_.F,7,7003,"No compatible player implementing playlist mode found!");return{gb:c,player:c.create(),sourceIndex:0}};
282
+ Zr=function(a,b,c){if(a.M===_.qb)b=Xr(b,c);else if(2!==(a.a?a.a.canPlay(b[0],c):0)||a.S){a.S=!1;if(b){var d=a=null;for(var e=0;e<b.length;e++);e=Object.values(_.Hh);for(let f=0;f<b.length;f++)for(let g=0;g<e.length;g++){const h={gb:e[g],confidence:e[g].canPlay(b[f],c)};if(null===a||a.confidence<h.confidence)a=h,d=f}a&&typeof d===_.t&&0<a.confidence?(_.Ih.debug("Player Factory '"+a.gb.a()+"' can play",b[d]),b=new Yr(a.gb,d)):(_.Ih.debug("No compatible Player Factory found for sources:",b),b=null)}else b=
283
+ null;if(!b)throw new _.I(_.F,7,7003,"No player factory compatible with given sources found!");c=b.gb;a=c.create();b={gb:c,player:a,sourceIndex:b.sourceIndex}}else b={gb:a.A,player:a.a,sourceIndex:0};return b};
284
+ _.ds=function(a,b,c){return _.x(function*(){if(a.O)throw new _.I(_.F,7,7E3,"Player is already destroyed.");if(!a.j)throw new _.I(_.F,7,7E3,"No surface associated with this player!");_.Jn(mf);yield a.release();var d=c||_.mp(b);if(!b||0===d.length)throw new _.I(_.F,7,7003,kb);a.da=d;a.f=_.Ol(a.C,b,{source:d});a.R=!1;d=Zr(a,d,a.f);_.Tr(a,d.player,d.gb);$r(a,a.a);a.a&&a.a.setSourceIndex(d.sourceIndex);as(a);a.a&&a.a.setCdnErrorCallback(a.L);bs(a,a.f);cs(a);if(a.f.pauseWhenInBackground)a.$.on(document,
285
+ Lg,()=>{document.hidden?(a.g.debug("Player is hidden: pausing..."),a.pause()):(a.g.debug("Player is visible: resuming..."),a.play())});Xl(a);yield _.Rr(a,"onContentWillLoad",a.f.source[d.sourceIndex]);_.Jn(lf);_.Ln("player.beforeLoad",mf,lf)})};_.es=function(a){return _.x(function*(){a.j.getMedia()||a.j.getCastElement();a.trigger(new _.D(Fe));yield Promise.all([a.a.load(a.f),a.h?a.h.load():Promise.resolve()])})};
286
+ _.gs=function(a){return _.x(function*(){_.Jn(hf);Ur(a,{configuration:a.getConfiguration(),ga:a.Wf(),drmInfo:a.getDrmInfo(),og:Object.keys(a.K),isLive:a.isLive()});fs(a);Yl();yield _.Rr(a,_.Te);a.f.autoplay&&(a.h?a.h.l():1)&&(yield a.play());_.Jn(gf);_.Ln("player.afterLoad",hf,gf)})};hs=function(a){return _.x(function*(){if(a.a){var b=a.a;b.zg?(a.trigger(new _.D(Fe)),yield b.zg(),yield _.gs(a)):a.g.warn(wb)}else a.g.warn(tb)})};
287
+ $r=function(a,b){try{var c=crypto.randomUUID()}catch(d){c=cr()}a.g.info("Playback session started, ID:",c);b.setPlaybackSessionId(c);a.G=c};as=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.x(function*(){a.Lc&&a.ue&&(a.ue=!1,yield a.Lc(b))}))};bs=function(a,b){if(b=Bp(a,b))a.h=b.create(a)};cs=function(a){a.B=new is(a);a.a.setCmsdManager(a.B)};
288
+ js=function(a){const b=_.oi(a.f.preferredTextLanguage).filter(f=>f),c=a.f.preferForcedSubtitles,d=a.getTrackManager().na().filter(f=>c?f.kind===_.ke:f.kind!==_.ke);if(0===d.length)c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles are available.");else{if(c&&0===b.length){var e=a.getTrackManager().ra();e&&e.language?(e=_.Pi(e.language||""),b.push(e)):(e=a.getTrackManager().Ia())&&e.language&&(e=_.Pi(e.language||""),b.push(e));0===b.length&&a.g.warn("Forced subtitles are configured to be preferred, but neither the preferred text language is set, nor the audio or video track language is available to determine which forced subtitles language to select.")}b.some(f=>
289
+ {const g=_.Pi(f);if(f=d.find(h=>{h=_.Pi(h.language||"");return _.Qi(h,g)}))return a.getTrackManager().Xa(f),!0;c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles match the preferred languages: ",b);return!1})}};fs=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);js(a)})};ks=function(a){a.J.forEach(b=>b());a.J=[]};
290
+ ns=function(a,b){return _.x(function*(){try{_.Jn(qf);a.M=_.qb;a.Y=!1;const c=b.slice(1).map(d=>({config:d,ga:_.mp(d)}));yield _.ds(a,b[0]);c.forEach(d=>{ls(a,d.config,d.ga)});a.trigger(new _.D(Fe));yield a.a.setupPlaylist(b);yield _.gs(a);c.forEach(d=>{ms(a,d.config,d.ga)});_.Jn(pf);_.Ln("player.setupPlaylist",qf,pf)}catch(c){if(a.l)throw a.g.info(bb),new _.I(_.F,7,7E3);throw c;}})};
291
+ os=function(a,b){const c=d=>{a.H=a.o.findIndex(e=>e.id===d.id)};a.addEventListener(_.Nf,c);a.J.push(()=>{a.removeEventListener(_.Nf,c)});if(b.endTime){const d=b.endTime,e=()=>{a.getPosition()>=d&&(a.removeEventListener(_.ng,e),a.g.info("Playlist end time reached. Stopping playback."),a.trigger(new _.D(_.Mf)),a.pause())};a.addEventListener(_.ng,e);a.J.push(()=>{a.removeEventListener(_.ng,e)})}};
292
+ ps=function(a,b){return _.x(function*(){try{_.Jn(kf);const c=_.mp(b);ls(a,b,c);yield a.a.appendLoad(b);ms(a,b,c);_.Jn(jf);_.Ln("player.appendLoad",kf,jf)}catch(c){if(a.l)throw a.g.info(bb),new _.I(_.F,7,7E3,{id:b.id});throw c;}})};
293
+ ls=function(a,b,c){if(0===c.length)throw new _.I(_.F,7,7003,{message:kb,id:b.id});if(1<c.length)throw new _.I(_.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 _.I(_.F,7,7003,{message:"Source not supported by the current player!",id:b.id,source:c[0]});};ms=function(a,b,c){Ur(a,{configuration:b,ga:c,drmInfo:a.getDrmInfo(),og:Object.keys(a.K),isLive:c[0].isLive})};
294
+ qs=function(a,b){const c=document.getElementById(a);if(!c)throw Error("Anchor element not found");c.classList.add(qd);return Array.from({length:3}).map(()=>{const d=document.createElement(_.w);d.classList.add("clpp-mc-playlist-video-el");const e=document.createElement(_.Sd);e.classList.add("clpp-mc-playlist-item");e.appendChild(d);c.appendChild(e);return new R(d,b)})};
295
+ rs=function(a,b,c){const d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.g.info(`Show video element .${b}`),d.classList.add(rd)):(a.g.info(`Hide video element .${b}`),d.classList.remove(rd)),a.w&&a.w(d,c))};us=function(a,b){return _.x(function*(){const c=yield a.o.get();a.f=b;b.role=ss;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();rs(a,c,!0);yield c.load(b.config);ts(a,b);b.config.autoplay||(yield c.play())})};
296
+ ys=function(a){_.x(function*(){if(0===a.a)yield vs(a);else if(a.a===a.h.length-1)yield ws(a);else{const b=[a.a-1,a.a+1];a.g.info(`Preload items (indices: ${b})`);yield Promise.all(b.map(c=>xs(a,c)))}})};
297
+ zs=function(a,b){return _.x(function*(){if(b.player){if(b.state===Af){a.g.info(Ub);try{yield b.preloadPromise}catch(c){}}a.f=b;b.role=ss;rs(a,b.player,!0);b.state===zf?(_.Jn(wf),a.ja.preloadMedia?yield b.player.play():yield hs(b.player),_.Jn(vf),_.Ln("playlist.next",wf,vf)):b.state===yf&&(yield b.player.load(b.config));ts(a,b);b.config.autoplay||(yield b.player.play())}})};
298
+ Cs=function(a,b){return _.x(function*(){a.g.info(`Stop current playback (index: ${b.index})`);b.player.pause();rs(a,b.player,!1);yield As(a,b);b.player=null;b.videoEl=null;b.role=Bs})};Es=function(a){return Promise.all(Array.from(a.l.keys()).map(b=>Ds(a,b)))};Fs=function(a){return _.x(function*(){yield a.o.destroy();const b=document.getElementById(a.ja.anchorId);b&&(b.classList.remove(qd),b.innerHTML="")})};
299
+ Ds=function(a,b){return _.x(function*(){const c=a.l.get(b);c&&(a.g.info(`Stop preloading item (index: ${b})`),c.player&&(yield As(a,c)),a.l.delete(b))})};As=function(a,b){return _.x(function*(){b.disposers.forEach(c=>c());b.disposers=[];b.player&&(yield a.o.release(b.player))})};ts=function(a,b){if(a.ja.autoplayNext){const c=()=>{a.g.info("Automatically transition to next item");a.ng()};b.player.on(_.ie,c);const d=b.player;b.disposers.push(()=>{d.off(_.ie,c)})}};
300
+ xs=function(a,b){return _.x(function*(){const c=yield a.o.get(),d=a.h[b];d.player=c;d.videoEl=c.getSurface().getMedia();d.role=Bs;d.state=Af;a.trigger(new _.D(ug));try{a.l.set(b,d),a.ja.preloadMedia?(d.config.autoplay&&(a.g.warn(ka+`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=zf,a.trigger(new _.D(ug))}catch(e){7001===e.code?(a.g.info(`Preload aborted (index: ${b})`),d.state=xf):
301
+ (a.g.warn(`Preload failed (index: ${b})`,e),a.trigger(new _.D(_.r,{detail:e})),d.state=yf),a.trigger(new _.D(ug))}})};vs=function(a){return _.x(function*(){const b=a.a+1;a.g.info(`Preload following item (index: ${b})`);yield xs(a,b)})};ws=function(a){return _.x(function*(){const b=a.a-1;a.g.info(`Preload preceding item (index: ${b})`);yield xs(a,b)})};
302
+ _.Hs=function(a){if(Gs.has(a))return Gs.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);Gs.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),Gs.set(a,b),b):!1};Is=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};
303
+ Js=function(a){const b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();let c;typeof Event===_.me?c=new Event(b,a):(c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable));a.target.dispatchEvent(c)};Ks=function(a){a=a.target;if(a.webkitPresentationMode===ef){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)};
304
+ Ls=function(){return this.webkitSupportsPresentationMode(ef)?(this.webkitSetPresentationMode(ef),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};Ps=function(){const a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};
305
+ Qs=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};Rs=function(a,b,c){return new window.TextTrackCue(a,b,c)};Ss=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};Us=function(a,b,c){if("input"===a)switch(this.type){case "range":a=md}Ts.call(this,a,b,c)};Vs=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};
306
+ Ws=function(a){return Vs()-a.a};Ys=function(a){const b=new Xs;b.a=a.a;return b};_.Zs=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};_.at=function(a,b,c,d){return _.x(function*(){try{return new (yield $s(a,b,c,d))}catch(e){throw e.a(_.F),e;}})};
307
+ $s=function(a,b,c,d){return _.x(function*(){if(d){var e=_.bt[d.toLowerCase()];if(e)return e;_.C("Could not determine manifest type using MIME type ",d)}if(e=_.ct(a)){const f=_.dt[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 et(a,b,c))){if(e=_.bt[d])return e;_.C("Could not determine manifest type using MIME type",d)}throw new _.I(_.F,4,4E3,{url:a});})};
308
+ _.ct=function(a){a=(new _.Bi(a)).Ka.split("/").pop().split(".");return 1===a.length?"":a.pop().toLowerCase()};et=function(a,b,c){return _.x(function*(){var d=_.Jj(a);Gj(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).U).headers["content-type"])?d.toLowerCase():""})};ft=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};
309
+ gt=function(a,b,c){return b.read().then(({done:d,value:e})=>{null!=e&&(ft(a,e),Pj(c,e.byteLength,Ws(a.h)),a.h.a=Vs());return d?(d=a.a.buffer,a.a.byteLength!==a.f&&(d=d.slice(0,a.f)),Promise.resolve(d)):Promise.resolve().then(()=>gt(a,b,c))})};
310
+ it=function(a){const b=a.uris[a.uriIndex],c=new ht,d=new Xs,e=Ys(d);let f=0,g;const h=new _.qn;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=Ws(e));m.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!k&&(m=m.getResponseHeader(sa),Oj(a,m),k=!0)};c.onload=function(m){m=m.target;var n=(m.getAllResponseHeaders()||"").trim().split("\r\n");
311
+ const q={};for(const u of n)n=u.split(": "),q[n[0].toLowerCase()]=n.slice(1).join(": ");try{const u=Ws(e);l||Pj(a,m.response?m.response.length:0,u);const v=_.Nj(q,m.response,m.status,b,m.responseURL,a,u,g);a.rateLimitBps?Qj(a.rateLimitBps,Ws(e),a.bytesLoaded).then(()=>{h.resolve(v)}):h.resolve(v)}catch(u){h.reject(u)}};c.onerror=function(m){m=m.target;if(0>=m.status)h.reject(new _.I(1,1,1002,{url:b,request:a,status:m.status}));else{var n=m.getAllResponseHeaders();const u={};if(n){n=n.trim().split("\r\n");
312
+ for(var q of n)n=q.split(": "),u[n[0].toLowerCase()]=n.slice(1).join(": ")}q=_.Nj(u,m.response,m.status,b,m.responseURL,a,Ws(e),g);h.resolve(q)}};c.ontimeout=function(){h.reject(new _.I(1,1,1003,{url:b,request:a}))};c.onprogress=function(m){const n=Ws(d);d.a=Vs();if(100<n||m.lengthComputable&&m.loaded===m.total)Pj(a,m.loaded-f,n),f=m.loaded,l=!0};for(const m in a.headers)c.setRequestHeader(m.toLowerCase(),a.headers[m]);c.send(a.body);return{U:h,request:a,abort:()=>{c.abort();h.reject(new _.I(1,1,
313
+ 7001,{url:b,request:a}));return Promise.resolve()}}};jt=function(a){let b=null;a.h!==a.f&&(b={start:a.h,end:a.f,length:a.f-a.h,data:new DataView(a.j.a.buffer,a.h,a.f-a.h),count:-1});return b};kt=function(a,b){{var c=a.j;const d=c.f+b.byteLength;if(d>c.a.byteLength){const e=c.a;c.a=new Uint8Array(Math.max(Math.ceil(c.a.buffer.byteLength*c.h),d));c.a.set(e)}c.a.set(b,c.f);c.f+=b.byteLength}a.a=a.h;a.f=a.j.f;a.l=new DataView(a.j.a.buffer,0,a.j.f)};
314
+ mt=function(a){if(0<=a.o&&a.f<a.o)return null;let b=lt(a);for(;null!==b;){if(b.name===_.He){const c={start:a.h,end:b.end,length:b.end-a.h,data:new DataView(a.j.a.buffer,a.h,b.end-a.h),count:1};a.h=b.end;return c}b=lt(a)}return null};
315
+ nt=function(a,b,c,d){return b.read().then(e=>{var {done:f,value:g}=e;d&&g&&(d(g.byteLength,Ws(a.w)),a.w.a=Vs());if(f)return e=jt(a),(e=c(!0,e))?e.then(()=>a.j.a.buffer):Promise.resolve(a.j.a.buffer);let h=Promise.resolve();if(null!=g){kt(a,g);var k=mt(a);for(e=[];k;)e.push(k),k=mt(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=
316
+ c(!1,k))&&(h=e)}}return h.then(()=>nt(a,b,c,d))})};
317
+ lt=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=ot(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=ot(a);d=String.fromCharCode(d>>24&255,d>>16&255,d>>8&255,d&255);switch(c){case 0:c=a.f-b;break;case 1:if(a.a+8>=a.f)return a.a=a.f,null;{let e,f;try{f=a.l.getUint32(a.a,!1),e=a.l.getUint32(a.a+4,!1)}catch(g){throw new _.I(_.F,3,3E3);}if(2097151<f)throw new _.I(_.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};
318
+ ot=function(a){const b=a.l.getUint32(a.a,!1);a.a+=4;return b};
319
+ rt=function(a){a.h=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=pt(e.request.baseDelay,1E3));const f=a.f*(1+(2*Math.random()-1)*pt(e.request.fuzzFactor,.5));a.f*=pt(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.l=h;qt(a,()=>{g(e.plugin(e.request))},f)})).catch(g=>{if(!a.a)throw g;})}if(a.a)throw new _.I(1,1,7001,{url:e.request.uris[e.request.uriIndex],request:e.request});return e.plugin(e.request)});
320
+ let b=0,c=0,d=0;return a.h.then(e=>{const f=e.request;f.currentAttempt+=1;b=f.currentAttempt;c=f.maxAttempts;d=f.uris.length;return e.U}).then(e=>{a.w.resolve(e)}).catch(e=>{if(e instanceof _.I){const f=b<d,g=7001!==e.code,h=b<c;if((1===e.severity||f)&&g&&h)return rt(a);g&&e.a(_.F);a.w.reject(e)}else a.w.reject(e)})};qt=function(a,b,c){a.o=setTimeout(b,c)};pt=function(a,b){return null===a||void 0===a?b:a};
321
+ vt=function(a){var b=new st;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new tt,d={Xc:!1,xg:!1};b={U:ut(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.Xc||(d.Xc=!0,c.abort());return Promise.resolve()}};if(a=a.timeout){const e=window.setTimeout(()=>{d.xg=!0;c.abort()},a);b.U=b.U.finally(()=>{window.clearTimeout(e)})}return b};
322
+ ut=function(a,b,c,d){return _.x(function*(){const e=new Xs,f=Ys(e);try{const g=yield wt(a,c),h=Hj(g.headers),k={uri:g.url,data:null,headers:h,status:g.status,timeMs:0,responseStartMs:Ws(f),request:b};if(!Kj(g.status))throw k.data=yield g.arrayBuffer(),k.timeMs=Ws(e),Mj(k);const l=g.headers.get(sa);Oj(b,l);const m=l?parseInt(l,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const n=g.body.getReader(),q=new xt(m,!b.disableMergedFragments);k.data=yield nt(q,n,(u,v)=>{if(d.Xc)return null;
323
+ v&&v.data&&(Pj(b,v.data.byteLength,Ws(f)),f.a=Vs());return b.onFragment&&v?b.rateLimitBps?Qj(b.rateLimitBps,Ws(e),b.bytesLoaded).then(()=>b.onFragment(v)):b.onFragment(v):null},b.onProgress)}else{const n=g.body.getReader(),q=yield gt(new yt(m),n,b);b.rateLimitBps&&(yield Qj(b.rateLimitBps,Ws(e),q.byteLength));k.data=q}if(d.Xc)throw Error("Request was aborted");k.timeMs=Ws(e);return Lj(k)}catch(g){if(d.Xc)throw new _.I(1,1,7001,{url:a,request:b});if(d.xg)throw new _.I(1,1,1003,{url:a,request:b});if(g&&
324
+ 1001===g.code)throw g;_.Gh("Error while fetching data:",g);throw new _.I(1,1,1002,{url:a,error:g,request:b,status:-1},g);}})};At=function(a){try{const b=a.uris[a.uriIndex],c=_.zt(b);return{U:Promise.resolve({uri:b,data:c.data,request:a,headers:{"content-type":c.contentType}}),request:a,abort:()=>Promise.resolve()}}catch(b){return{U:Promise.reject(b),request:a,abort:()=>Promise.resolve()}}};
325
+ _.zt=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.Gh("Bad data URI, failed to parse scheme"),new _.I(_.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 _.I(_.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?_.sj(a).buffer:_.gj(a).buffer,contentType:c}};
326
+ _.Ct=function(a,b){a=_.Hk(_.Ik(a),_.Jk(a));_.Bt[a]=b};_.Dt=function(a){a=_.Hk(_.Ik(a),_.Jk(a));return _.Bt[a]||null};_.Et=function(a){a=_.Hk(_.Ik(a),_.Jk(a));delete _.Bt[a]};_.Jt=function(a){if(!a.w)return null;const b=a.H;switch(a.w){case Ft:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case Gt:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case Ht:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case It:return`2px 2px 3px ${b}, 2px 2px 4px ${b}, `+`2px 2px 5px ${b}`;default:return _.Qe}};_.ah=[];
327
+ eh="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;fh=typeof Object.defineProperties==_.me?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
328
+ gh("Promise",function(a){function b(g){this.f=0;this.l=void 0;this.a=[];var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.a=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.f=function(g){if(null==this.a){this.a=[];var h=this;this.h(function(){h.l()})}this.a.push(g)};var e=eh.setTimeout;c.prototype.h=function(g){e(g,0)};c.prototype.l=function(){for(;this.a&&this.a.length;){var g=this.a;this.a=[];for(var h=0;h<g.length;++h){var k=
329
+ g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.a=null};c.prototype.j=function(g){this.h(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.C),reject:g(this.h)}};b.prototype.C=function(g){if(g===this)this.h(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.F(g);else{a:switch(typeof g){case _.Re:var h=null!=g;break a;case _.me:h=!0;break a;default:h=!1}h?this.B(g):this.o(g)}};
330
+ b.prototype.B=function(g){var h=void 0;try{h=g.then}catch(k){this.h(k);return}typeof h==_.me?this.G(h,g):this.o(g)};b.prototype.h=function(g){this.w(2,g)};b.prototype.o=function(g){this.w(1,g)};b.prototype.w=function(g,h){if(0!=this.f)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.f);this.f=g;this.l=h;this.A()};b.prototype.A=function(){if(null!=this.a){for(var g=0;g<this.a.length;++g)f.f(this.a[g]);this.a=null}};var f=new c;b.prototype.F=function(g){var h=this.j();
331
+ g.Gd(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==_.me?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.Gd(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Gd=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: "+
332
+ 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=dh(g),m=l.next();!m.done;m=l.next())d(m.value).Gd(h,k)})};b.all=function(g){var h=dh(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).Gd(n(q.length-1),m),k=h.next();while(!k.done)})};return b});var ih=this||self;
333
+ ih.a=!0;_.z("clpp.utils.obj.cloneItem",_.lh);_.z("clpp.utils.obj.merge",_.kh);var Bh={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.z("clpp.log.Level",Bh);var zh=0,yh={},Kt=[];_.z("clpp.log.getLoggers",function(){return _.lh(yh)});_.z("clpp.log.addInterceptor",function(a){a&&Kt.push(a)});_.z("clpp.log.removeInterceptor",function(a){a&&(a=Kt.indexOf(a),0<=a&&Kt.splice(a,1))});_.z("clpp.log.getTagLevel",Ah);_.z("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=yh[a]});_.z("clpp.log.setTagLevel",function(a,b){a&&(_.rh(b)&&(b=Ch(b)),yh[a]=b)});
334
+ _.z("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.rh(a)&&(a=Ch(a));zh=a});_.z("clpp.log.getLogLevel",function(){return zh});
335
+ _.S=class{constructor(a){(this.tag=a)&&void 0===yh[a]&&(yh[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(zh<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,
336
+ arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of Kt)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)}bh(a){return a?
337
+ this.tag?new _.S(this.tag+"."+a):new _.S(a):this}};_.z("clpp.log.Logger",_.S);_.S.prototype.createChild=_.S.prototype.bh;_.S.prototype.error=_.S.prototype.error;_.S.prototype.warn=_.S.prototype.warn;_.S.prototype.debug=_.S.prototype.debug;_.S.prototype.info=_.S.prototype.info;_.S.prototype.log=_.S.prototype.log;var Dh=new _.S("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 Yr;Yr=class{constructor(a,b){this.gb=a;this.sourceIndex=b}};_.Ih=new _.S("clpp.players");_.Hh={};_.z("clpp.events.ERROR",_.r);_.z("clpp.events.LOADEDMETADATA",_.Ee);_.z("clpp.events.BUFFERING_ENDED",_.$c);_.z("clpp.events.BUFFERING_STARTED",_.ad);_.z("clpp.events.STATE_CHANGED",_.Zf);_.z("clpp.events.AUDIO_TRACK_CHANGED",_.Wc);_.z("clpp.events.TEXT_TRACK_CHANGED",_.ig);_.z("clpp.events.VIDEO_TRACK_CHANGED",_.Jg);_.z("clpp.events.BITRATE_CHANGED",_.Yc);_.z("clpp.events.TRACKS_ADDED",_.og);_.z("clpp.events.LOAD_START",Fe);_.z("clpp.events.RELEASING",_.Hf);_.z("clpp.events.RELEASED",Gf);
338
+ _.z("clpp.events.DESTROYING","destroying");_.z("clpp.events.DESTROYED","destroyed");_.z("clpp.events.VIDEO_BUFFER_CHANGED",_.Ig);_.z("clpp.events.AUDIO_BUFFER_CHANGED",_.Vc);_.z("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.z("clpp.events.DRM_SESSION_CREATED",ae);_.z("clpp.events.DRM_SESSION_UPDATE",_.ce);_.z("clpp.events.DRM_SESSION_PERSISTED",_.be);_.z("clpp.events.DRM_RENEWAL_STARTED",$d);_.z("clpp.events.DRM_EXPIRATION_UPDATE",_.Yd);_.z("clpp.events.DRM_LICENSE_REQUESTED",Zd);
339
+ _.z("clpp.events.AUTOPLAY_NOT_ALLOWED",_.Xc);_.z("clpp.events.PLAY",_.ff);_.z("clpp.events.SEEKING",_.Rf);_.z("clpp.events.SEEKED",_.Qf);_.z("clpp.events.USER_SEEKING",_.Bg);_.z("clpp.events.USER_SEEKED",_.Ag);_.ep={SEEKING:1,NO_DATA:2};_.z("clpp.events.BufferingReasons",_.ep);_.z("clpp.events.ADS_TIMELINE_CHANGED",_.Ec);_.z("clpp.events.AD_LOADED",_.rc);_.z("clpp.events.AD_BREAK_STARTED",_.hc);_.z("clpp.events.AD_STARTED",_.yc);_.z("clpp.events.AD_BUFFERING",_.jc);_.z("clpp.events.AD_PROGRESS",_.uc);
340
+ _.z("clpp.events.AD_FIRST_QUARTILE",_.mc);_.z("clpp.events.AD_MIDPOINT",_.sc);_.z("clpp.events.AD_THIRD_QUARTILE",_.Cc);_.z("clpp.events.AD_PAUSED",_.tc);_.z("clpp.events.AD_RESUMED",_.vc);_.z("clpp.events.AD_SKIPPED",_.xc);_.z("clpp.events.AD_CLICKED",_.kc);_.z("clpp.events.AD_IMPRESSION",_.qc);_.z("clpp.events.AD_COMPLETED",_.lc);_.z("clpp.events.AD_STOPPED",_.Bc);_.z("clpp.events.AD_BREAK_STOPPED",_.ic);_.z("clpp.events.AD_HLS_ASSET_LIST_REQUEST",nc);
341
+ _.z("clpp.events.AD_HLS_ASSET_LIST_RESPONSE",oc);_.z("clpp.events.AD_HLS_RESOLVED",pc);_.z("clpp.events.SIMID_CREATIVE_STARTED",_.Tf);_.z("clpp.events.SIMID_CREATIVE_STOPPED",_.Uf);_.z("clpp.events.CASTING_STARTED",_.ed);_.z("clpp.events.CASTING_ENDED","castingended");_.z("clpp.events.CAST_STATUS_CHANGED",_.hd);_.z("clpp.events.AIRPLAY_STATUS_CHANGED",_.Hc);_.z("clpp.events.AIRPLAY_CASTING_STARTED",_.Gc);_.z("clpp.events.AIRPLAY_CASTING_ENDED",_.Fc);_.z("clpp.events.TIMELINE_CUE_ADDED",_.jg);
342
+ _.z("clpp.events.TIMELINE_CUE_ENTER",_.kg);_.z("clpp.events.TIMELINE_CUE_EXIT",_.lg);_.z("clpp.events.TIMELINE_CUES_CHANGED",_.mg);_.z("clpp.events.MPD_TYPE_CHANGED",_.Oe);_.z("clpp.events.LIVE_TURNED_STATIC",_.Be);_.z("clpp.events.VIMOND_RESPONSE",_.Kg);_.z("clpp.events.PLAYLIST_ITEM_CHANGED",_.sf);_.z("clpp.events.PLAYLIST_MODIFIED",_.uf);_.z("clpp.events.SC_PLAYLIST_TIMELINE_CHANGED",_.Pf);_.z("clpp.events.SC_PLAYLIST_ITEM_CHANGED",_.Nf);_.z("clpp.events.SC_PLAYLIST_ENDED",_.Mf);
343
+ _.z("clpp.events.SC_PLAYLIST_LIVE_TURNED_STATIC",_.Of);_.z("clpp.events.CDN_SWITCH_SUCCESS",_.id);_.z("clpp.events.ONLINE_STATUS_CHANGED",Ye);_.z("clpp.events.CMSD_EVENT","cmsd-event");_.z("clpp.events.YOSPACE_SESSION_STARTED",_.Zg);_.z("clpp.events.YOSPACE_SESSION_ENDED",_.Yg);_.z("clpp.events.CONTENT_STEERING_CHANGE",_.Ld);_.z("clpp.events.CONTENT_STEERING_LOCATION_BAN_UPDATE",_.Md);_.Lt=class{constructor(a){this.f=a;this.a=null}ia(a){return Lh(this,a,!1)}Eb(a){return Lh(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.Mk=class{constructor(a){this.f=a;this.a=null}ff(){this.stop();this.f();return this}ia(a){this.stop();this.a=(new _.Lt(()=>{this.f()})).ia(a);return this}Eb(a){this.stop();this.a=(new _.Lt(()=>{this.f()})).Eb(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.z("clpp.utils.Timer",_.Mk);_.Mk.prototype.stop=_.Mk.prototype.stop;_.Mk.prototype.tickEvery=_.Mk.prototype.Eb;_.Mk.prototype.tickAfter=_.Mk.prototype.ia;_.Mk.prototype.tickNow=_.Mk.prototype.ff;var Mt=class{constructor(){this.wc=null;this.f=[];this.h=[];this.Wa=new _.S(sd);this.a=null;this.j=!1}load(a){const b=this;return _.x(function*(){b.wc?yield Ph(b,c=>_.x(function*(){yield c.load(a)})):b.Wa.warn("No main player, cannot load.")})}li(a){this.j=a;this.Wa.info("Looping set to",a)}Ng(a){this.f.push(a)}Mg(a){if(this.wc)this.Wa.warn("Main player already set.");else{this.wc=a;var b=this.o.bind(this),c=this.w.bind(this),d=this.l.bind(this);a.on(_.Zf,b);a.on(_.ng,c);a.on(_.ie,d);this.h.push(()=>
344
+ {a.off(_.Zf,b);a.off(_.ng,c);a.on(_.ie,d)})}}clear(){this.wc=null;this.f=[];this.h.forEach(a=>a());this.h=[]}l(){const a=this;return _.x(function*(){a.j&&(a.Wa.info("Looping playback."),yield Ph(a,b=>_.x(function*(){yield b.seek(0);yield b.play()})))})}o(a){this.a||(a=a.detail.currentState,a===_.jp?(this.Wa.info("Mirroring playing."),Qh(this,b=>_.x(function*(){yield b.play()}))):[_.ip,_.cp,_.$o].includes(a)&&(this.Wa.info("Mirroring paused/buffering/error."),Qh(this,b=>{const c=this;return _.x(function*(){var d=
345
+ Math.round(c.wc.getPosition())-.1;yield b.seek(d);yield Mh(.2);d=b.getState();if(d===_.jp||d===_.cp)yield b.pause()})})))}w(){this.a||Qh(this,a=>{const b=this;return _.x(function*(){a.isPaused()&&(yield a.play());const c=b.wc.getPosition();var d=a.getPosition();d=c-d;const e=Math.abs(d),f=a.getPlaybackRate();if(!(a.getState()!==_.jp||.05>=e)){var g=Math.abs(d);g=Math.min(Math.max(1+(.05>=g?0:g/(1>g?6:3))*Math.sign(d),.2),5);5<=e?(a.setPlaybackRate(1),yield a.seek(c)):f===g?1!==g&&b.Wa.info(`Delta ${d.toFixed(1)} s.`):
346
+ (1===g?b.Wa.info("Secondary caught up."):1>g?b.Wa.info("Secondary slowing down to catch up. "+`Rate: ${g.toFixed(1)}, delta: ${d.toFixed(1)} s`):1<g&&b.Wa.info("Secondary speeding up to catch up. "+`Rate: ${g.toFixed(1)}, delta: ${d.toFixed(1)} s`),a.setPlaybackRate(g))}})})}};_.z(sd,Mt);Mt.prototype.clear=Mt.prototype.clear;Mt.prototype.addMainPlayer=Mt.prototype.Mg;Mt.prototype.addSecondaryPlayer=Mt.prototype.Ng;Mt.prototype.setLoop=Mt.prototype.li;Mt.prototype.load=Mt.prototype.load;_.Nt=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={}}};var Ot,Pt;Ot=class{constructor(a,b,c,d){this.f=a;this.Fc=b;this.a=c;this.bi=!!d}Ya(a){try{this.Fc.handleEvent?this.Fc.handleEvent(a):this.Fc.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)}}};
347
+ _.D=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(){}};
348
+ Pt=class{constructor(a){this.a=new _.Nt;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].Ya(a),b[c].bi&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new Ot(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new Ot(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].Fc===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};var Qt;_.Rt=class{constructor(){this.a=new _.Nt}release(){_.Sh(this)}on(a,b,c,d=!1){a=new Qt(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||(Rh(f),this.a.remove(b,f))}}};Qt=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 St=class{constructor(a){this.m=a;this.l=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.j=new _.Rt;this.f=new Set;this.a=new Set;this.h=null;this.g=new _.S("clpp.native.Metadata")}release(){this.j.release();this.a=new Set;this.f.clear();null!=this.h&&(clearInterval(this.h),this.h=null)}destroy(){const a=this;return _.x(function*(){a.release()})}getTimelineCues(){return Array.from(this.a.values()).sort((a,b)=>a.startTime-b.startTime)}};_.Zt=class{constructor(a,b,c,d){d=void 0===d?_.Tt:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.Ut;this.writingMode=_.Vt;this.lineInterpretation=_.Wt;this.line=null;this.lineAlign=_.Xt;this.direction=Yt;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}Mc(a){return this.payload===a.payload&&this.startTime===a.startTime&&this.endTime===a.endTime&&this.payloadType===
349
+ a.payloadType}};_.z("clpp.text.Cue",_.Zt);_.Zt.positionAlign={LEFT:_.we,RIGHT:_.Ae,CENTER:_.kd,AUTO:"auto"};_.Tt="text";_.Zt.payloadType={TEXT:_.Tt,VTT_XML:_.Mg,TTML_XML:_.qg};_.Ut=_.kd;_.$t={LEFT:_.te,RIGHT:_.Lf,CENTER:_.Ut,START:_.te,END:_.Lf};_.Zt.textAlign=_.$t;var Yt="ltr";_.Zt.direction={HORIZONTAL_LEFT_TO_RIGHT:Yt,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.Vt="horizontal-tb";_.Zt.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.Vt,VERTICAL_LEFT_TO_RIGHT:_.Eg,VERTICAL_RIGHT_TO_LEFT:_.Fg};_.Wt=0;
350
+ _.Zt.lineInterpretation={LINE_NUMBER:_.Wt,PERCENTAGE:1};_.Xt=_.Yf;_.au={CENTER:_.kd,START:_.Xt,END:_.he};_.Zt.lineAlign=_.au;_.du=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.bu;this.scroll=cu;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.z("clpp.text.CueRegion",_.du);_.bu=1;_.du.units={PX:0,PERCENTAGE:_.bu,LINES:2};var cu="";
351
+ _.du.scrollMode={NONE:cu,UP:"up"};_.du.displayAlign={BEFORE:"flex-end",CENTER:_.kd,AFTER:"flex-start"};_.du.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.Bd,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var eu=class{constructor(a){this.m=a;this.l=a.getTextDisplayer();this.f=this.h=null;this.a=new _.Rt;this.j=!1;this.g=new _.S("clpp.native.CueHandler")}destroy(){this.a.release();this.j=!1;this.l=this.a=this.h=this.f=null;return Promise.resolve()}start(a){this.j?this.g.warn("Already started. Ignoring request..."):(this.j=!0,this.h=a,this.f=this.h.textTracks,this.a.on(this.f,_.Dc,b=>ui(this,b)),this.a.on(this.f,md,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.Sf&&(d.mode=
352
+ _.oe)}}}))}o(a){const b=new _.Zt(a.startTime,a.endTime,a.text,_.Mg);if(_.rh(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.Eg;break;case "rl":b.writingMode=_.Fg}_.sh(a.size)&&(b.size=a.size);if(_.rh(a.align))switch(a.align){case _.te:case _.Yf:b.textAlign=_.te;break;case _.kd:b.textAlign=_.Ut;break;case _.Lf:case _.he:b.textAlign=_.Lf}_.sh(a.position)&&(b.position=a.position);if(_.rh(a.positionAlign))switch(a.positionAlign){case _.we:b.positionAlign=_.we;break;case _.kd:b.positionAlign=
353
+ _.kd;break;case _.Ae:b.positionAlign=_.Ae}_.sh(a.line)&&(b.line=a.line);if(_.rh(a.lineAlign))switch(a.lineAlign){case _.Yf:b.lineAlign=_.Xt;break;case _.kd:b.lineAlign=_.kd;break;case _.he:b.lineAlign=_.he}typeof a.snapToLines===_.Zc&&(b.lineInterpretation=a.snapToLines?_.Wt:1);return b}};_.I=class extends Error{constructor(a,b,c,d,e){super(vi(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.data=!d||_.rh(d)?{}:d;this.cause=void 0===e?null:e;this.f=!1;Error.captureStackTrace&&Error.captureStackTrace(this,_.I)}a(a){this.severity!==a&&(this.severity=a,this.message=vi(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",_.I);_.F=2;_.I.Severity={RECOVERABLE:1,FATAL:_.F};
354
+ _.I.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,PLUGIN:9,ADS:10};
355
+ _.I.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,
337
356
  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,
338
357
  MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,MP4_PARSER_ERROR:3019,MEDIA_LOAD_ERROR:3100,INVALID_TRACK_TYPE:3101,UNKNOWN_TRACK:3102,MEDIA_DECRYPTION_ERROR:3103,PLAY_NOT_ALLOWED:3200,PAUSE_FAILED:3201,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,
339
358
  DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,
@@ -342,65 +361,59 @@ HLS_INVALID_VALUE:4044,HLS_DISCONTINUITY_NOT_SUPPORTED:4045,HLS_UNSUPPORTED_FEAT
342
361
  NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,REQUESTED_DRM_ENVIRONMENT_UNAVAILABLE:6015,INIT_DATA_TRANSFORM_ERROR:6016,CERTIFICATE_REQUEST_FAILED:6100,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,
343
362
  INVALID_CONTAINER_ELEMENT:7006,INVALID_ARGUMENT:7007,WRONG_ORDER_OF_OPERATIONS:7008,NOT_SUPPORTED:7009,INVALID_CONFIGURATION:7100,INVALID_LICENSE:7101,NO_ELEMENT:7102,USER_ID_NOT_PROVIDED:7103,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,
344
363
  YOUBORA_SDK_MISSING:9100,YOUBORA_INVALID_CONFIGURATION:9101,YOUBORA_SDK_VERSION_NOT_SUPPORTED:9102,VIMOND_INVALID_CONFIGURATION:9200,VIMOND_SESSION_ERROR:9201,MUXDATA_INVALID_CONFIGURATION:9300,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,
345
- SESSIONS_INVALID_CONFIGURATION:15E3};_.ki=class extends Error{constructor(a,b){super(a);this.code=b}};var ti=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;_.Og=_.ni.prototype;_.Og.ub="";_.Og.uc="";_.Og.kb="";_.Og.Nc=null;_.Og.Ia="";_.Og.mc="";_.Og.toString=function(){var a=[],b=this.ub;b&&a.push(wi(b,Mt,!0),":");if(b=this.kb){a.push("//");var c=this.uc;c&&a.push(wi(c,Mt,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Nc;null!=b&&a.push(":",String(b))}if(b=this.Ia)this.kb&&"/"!=b.charAt(0)&&a.push("/"),a.push(wi(b,"/"==b.charAt(0)?Nt:Ot,!0));(b=this.a.toString())&&a.push("?",b);(b=this.mc)&&a.push("#",wi(b,Pt));return a.join("")};
346
- _.Og.resolve=function(a){var b=new _.ni(this);"data"===b.ub&&(b=new _.ni);var c=!!a.ub;c?oi(b,a.ub):c=!!a.uc;c?b.uc=a.uc:c=!!a.kb;c?_.pi(b,a.kb):c=null!=a.Nc;var d=a.Ia;if(c)qi(b,a.Nc);else if(c=!!a.Ia){if("/"!=d.charAt(0))if(this.kb&&!this.Ia)d="/"+d;else{var e=b.Ia.lastIndexOf("/");-1!=e&&(d=b.Ia.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(""):
347
- ".."==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.Ia=d:c=""!==a.a.toString();c?_.ri(b,si(a.a)):c=!!a.mc;c&&(b.mc=a.mc);return b};var Mt=/[#\/\?@]/g,Ot=/[#\?:]/g,Nt=/[#\?]/g,xi=/[#\?@]/g,Pt=/#/g;_.vi.prototype.a=null;_.vi.prototype.h=null;_.vi.prototype.add=function(a,b){_.zi(this);this.f=null;var c=this.a.hasOwnProperty(a)&&this.a[a];c||(this.a[a]=c=[]);c.push(b);null!==this.h&&this.h++;return this};
348
- _.vi.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 Ai;_.G="text";_.Qt=1/15;Ai={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/]};Ai[_.G]=[/^vtt$/,/^wvtt/,/^stpp/];var Rt;Rt={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av0?1/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.hk=(a,b)=>{const c=Rt[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};_.St={text:{mp4:Gc,m4s:Gc,m4i:Gc,cmft:Gc,vtt:_.$f,ttml:_.Jc},video:{mp4:_.vg,m4s:_.vg,m4i:_.vg,m4v:_.vg,cmfv:_.vg,ts:_.ug},audio:{mp4:_.Pc,m4s:_.Pc,m4i:_.Pc,m4a:_.Pc,cmfa:_.Pc,ts:_.ug,aac:_.Mc,ec3:_.Oc,ac3:_.Nc},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.kk=(a,b,c)=>a.map(d=>{d=_.Tt(d)||"";return d=(d=_.St[b][d])?d:b===_.G?c&&"vtt"!==c?Gc:_.$f:null}).filter(Boolean)[0]||null;
349
- _.Tt=a=>{a=(new _.ni(a)).Ia.split(".");return 1>=a.length?null:a.pop()};_.oj=class{constructor(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}toString(){function a(d){return d.name+"\x3d"+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}let b="#"+this.name;const c=this.attributes?this.attributes.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b}getAttribute(a){const b=this.attributes.filter(c=>c.name===a);return b.length?b[0]:null}hasAttribute(a){return null!=this.getAttribute(a)}};
350
- _.nj=class{constructor(a,b){this.name=a;this.value=b}};var Ci=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",
351
- "cs"],["dan","da"],["deu","de"],[_.Ld,"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",
364
+ SESSIONS_INVALID_CONFIGURATION:15E3};_.yi=class extends Error{constructor(a,b){super(a);this.code=b}};var Gi=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;_.$g=_.Bi.prototype;_.$g.Ab="";_.$g.Bc="";_.$g.$a="";_.$g.Tc=null;_.$g.Ka="";_.$g.rc="";_.$g.toString=function(){var a=[],b=this.Ab;b&&a.push(Ji(b,fu,!0),":");if(b=this.$a){a.push("//");var c=this.Bc;c&&a.push(Ji(c,fu,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Tc;null!=b&&a.push(":",String(b))}if(b=this.Ka)this.$a&&"/"!=b.charAt(0)&&a.push("/"),a.push(Ji(b,"/"==b.charAt(0)?gu:hu,!0));(b=this.a.toString())&&a.push("?",b);(b=this.rc)&&a.push("#",Ji(b,iu));return a.join("")};
365
+ _.$g.resolve=function(a){var b=new _.Bi(this);"data"===b.Ab&&(b=new _.Bi);var c=!!a.Ab;c?Ci(b,a.Ab):c=!!a.Bc;c?b.Bc=a.Bc:c=!!a.$a;c?b.$a=a.$a:c=null!=a.Tc;var d=a.Ka;if(c)Di(b,a.Tc);else if(c=!!a.Ka){if("/"!=d.charAt(0))if(this.$a&&!this.Ka)d="/"+d;else{var e=b.Ka.lastIndexOf("/");-1!=e&&(d=b.Ka.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(""):
366
+ ".."==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.Ka=d:c=""!==a.a.toString();c?_.Ei(b,Fi(a.a)):c=!!a.rc;c&&(b.rc=a.rc);return b};var fu=/[#\/\?@]/g,hu=/[#\?:]/g,gu=/[#\?]/g,Ki=/[#\?@]/g,iu=/#/g;_.Ii.prototype.a=null;_.Ii.prototype.h=null;
367
+ _.Ii.prototype.add=function(a,b){if(!this.a&&(this.a={},this.h=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.h&&this.h++;return this};
368
+ _.Ii.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 Mi;_.H="text";_.ju=1/15;Mi={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/]};Mi[_.H]=[/^vtt$/,/^wvtt/,/^stpp/];var ku;ku={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av0?1/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.tk=(a,b)=>{const c=ku[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===_.H?"":null};_.lu={text:{mp4:Kc,m4s:Kc,m4i:Kc,cmft:Kc,vtt:_.gg,ttml:_.Nc},video:{mp4:_.Hg,m4s:_.Hg,m4i:_.Hg,m4v:_.Hg,cmfv:_.Hg,ts:_.Gg},audio:{mp4:_.Tc,m4s:_.Tc,m4i:_.Tc,m4a:_.Tc,cmfa:_.Tc,ts:_.Gg,aac:_.Qc,ec3:_.Sc,ac3:_.Rc},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.wk=(a,b,c)=>a.map(d=>{d=_.mu(d)||"";return d=(d=_.lu[b][d])?d:b===_.H?c&&"vtt"!==c?Kc:_.gg:null}).filter(Boolean)[0]||null;
369
+ _.mu=a=>{a=(new _.Bi(a)).Ka.split(".");return 1>=a.length?null:a.pop()};_.Cj=class{constructor(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}toString(){function a(d){return d.name+"\x3d"+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}let b="#"+this.name;const c=this.attributes?this.attributes.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b}getAttribute(a){const b=this.attributes.filter(c=>c.name===a);return b.length?b[0]:null}hasAttribute(a){return null!=this.getAttribute(a)}};
370
+ _.zj=class{constructor(a,b){this.name=a;this.value=b}};var Oi=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",
371
+ "cs"],["dan","da"],["deu","de"],[_.Sd,"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",
352
372
  "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",
353
373
  "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",
354
374
  "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",
355
- "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var Ut=class{};_.z("clpp.utils.BufferUtils",Ut);Ut.toArrayBuffer=Pi;Ut.toDataView=_.Oi;Ut.toInt32Array=_.Ni;Ut.toUint32Array=Mi;Ut.toUint16Array=Li;Ut.toUint8Array=_.K;Ut.equal=Ji;var Si=new _.S("clpp.utils.strings");_.z("clpp.utils.strings.fromUtf8",_.Ri);_.z("clpp.utils.strings.fromBytesAutoDetect",_.Ui);_.z("clpp.utils.strings.toUtf8",_.Vi);_.z("clpp.utils.strings.toUtf16",_.Wi);_.z("clpp.utils.strings.toByteArray",_.Xi);_.z("clpp.utils.strings.startsWith",_.Yi);_.z("clpp.utils.strings.endsWith",_.Zi);_.z("clpp.utils.strings.bitrateToString",_.bj);
375
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var nu=class{};_.z("clpp.utils.BufferUtils",nu);nu.toArrayBuffer=aj;nu.toDataView=_.$i;nu.toInt32Array=_.Zi;nu.toUint32Array=Yi;nu.toUint16Array=Xi;nu.toUint8Array=_.K;nu.equal=Vi;var dj=new _.S("clpp.utils.strings");_.z("clpp.utils.strings.fromUtf8",_.cj);_.z("clpp.utils.strings.fromBytesAutoDetect",_.fj);_.z("clpp.utils.strings.toUtf8",_.gj);_.z("clpp.utils.strings.toUtf16",_.hj);_.z("clpp.utils.strings.toByteArray",_.ij);_.z("clpp.utils.strings.startsWith",_.jj);_.z("clpp.utils.strings.endsWith",_.kj);_.z("clpp.utils.strings.bitrateToString",_.nj);
356
376
  _.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)))});
357
- _.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 cj=document.createElement("span");var Vt=class{};_.z("clpp.utils.Uint8ArrayUtils",Vt);Vt.toStandardBase64=_.ej;Vt.concat=_.kj;Vt.equal=_.jj;Vt.toHex=_.ij;Vt.fromHex=_.hj;Vt.fromBase64=_.gj;Vt.toBase64Url=_.fj;_.Wt=new _.S("clpp.hls.Utils");_.mj=class{constructor(a){this.f=a;this.a=0}};_.Xt=new Set([_.Ca,_.Da,"EXT-X-I-FRAMES-ONLY",_.Ga,_.Ha,_.Ia,_.La,_.Na]);_.Yt=new Set(["EXTINF",_.za,_.Ba,_.Ea,_.Fa,_.Ka]);_.Zt=new Set(["EXT-X-PART",_.Ja]);_.$t=new Set([_.Aa]);var qj=[403,401];_.z("clpp.net.DEFAULT_FATAL_STATUS_CODES",qj);_.z("clpp.net.makeRequest",_.xj);_.wj=6;_.z("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.wj,CONTENT_STEERING:7});_.hn=class{constructor(){this.jg=this.ae=this.done=!1;this.error=this.value=null;let a,b;const c=new Promise((d,e)=>{a=function(f){this.done=this.ae=!0;this.value=f;d(f)};b=function(f){this.done=this.jg=!0;this.error=f;e(f)}});c.ae=!1;c.done=!1;c.jg=!1;c.value=null;c.error=null;c.resolve=a;c.reject=b;return c}resolve(){}reject(){}};_.np=class{constructor(a,b){this.U=a;this.A=b;this.a=!1}abort(){this.a=!0;return this.A()}};_.au=class{constructor(){this.a=[]}destroy(){const a=[];for(const b of this.a)b.U.catch(()=>{}),a.push(b.abort());this.a=[];return Promise.all(a)}};_.lr=class{constructor(){this.f=[];this.h=[];this.j=[];this.w=!1;this.o=new _.au;this.a={};this.headers=new Map;this.l=0;this.a.data=it;!window.fetch||!window.AbortController||_.Gk(6)||_.Jk()&&68<_.el().browserVersion.major?(this.a.http=Rs,this.a.https=Rs):(this.a.http=dt,this.a.https=dt)}$h(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.h=[];return this.o.destroy()}fe(a){this.f.push(a)}xc(a){this.h.push(a)}Qe(a){this.f=
358
- this.f.filter(b=>b!==a)}od(a){this.h=this.h.filter(b=>b!==a)}fetch(a){if(this.w)return new bu(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;Jj(this,a);b=[];for(var c of this.h)b.push(c);if(a.responseModifiers)for(var d of a.responseModifiers)b.push(d);a.responseModifiers=b;let e;d=c=new _.hn;try{for(const f of a.requestModifiers)d=
359
- 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=>({request:f,plugin:Kj(this,f)}));e=new bu(d);for(const f of a.responseModifiers)e.then(g=>{const h=()=>{if(e.a)throw new _.H(_.F,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);
360
- 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:{},request:a});return Promise.reject(g)}).catch(g=>{if(g instanceof _.H)throw g;throw new _.H(_.F,1,1007,null,g);});_.Gj(this.o,e);c.resolve(a);return e}catch(f){return new bu(Promise.reject(f))}}};
361
- _.z("clpp.net.NetworkEngine",_.lr);_.lr.prototype.fetch=_.lr.prototype.fetch;_.lr.prototype.removeResponseModifier=_.lr.prototype.od;_.lr.prototype.removeRequestModifier=_.lr.prototype.Qe;_.lr.prototype.addResponseModifier=_.lr.prototype.xc;_.lr.prototype.addRequestModifier=_.lr.prototype.fe;_.lr.prototype.setRateLimit=_.lr.prototype.$h;var Oj;
362
- _.Rj=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=[]}Fc(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&&di(this.roles,
363
- a.roles)&&di(this.accessibility,a.accessibility,Mj)}toString(){return`Track type: ${this.type} id: ${this.id}
364
- renditions size: ${this.renditions.length}`}};_.z("clpp.Track",_.Rj);_.Rj.prototype.toString=_.Rj.prototype.toString;_.Zj=class{constructor(a,b){this.track=b;this.id=a;this.originalId=this.codec=this.Pc=this.bandwidth=this.height=this.width=null}};_.z("clpp.Rendition",_.Zj);_.Qj=1;_.N=_.w;_.M=_.p;_.L="text";Oj=_.De;_.cu={VIDEO:_.N,AUDIO:_.M,TEXT:_.L,METADATA:Oj};_.Rj.Type=_.cu;_.sm=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;
365
- _.Yi(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.h=b.hash}};_.z("clpp.utils.url.queryString",_.Uj);var du=class{constructor(a){this.f=a;this.g=new _.S("clpp.native.hls.HlsMetadataParser");this.a=ii(this.h.bind(this),(b,c)=>b[0]===c[0]&&b[1].enableHlsVideoTrackInfo===c[1].enableHlsVideoTrackInfo&&b[1].enableMetadata===c[1].enableMetadata)}h(a,b){const c=this;return _.x(function*(){let d=null;try{d=yield Xj(c,a)}catch(f){return c.g.warn("Failed to fetch playlist in order metadata from HLS playlist.",f.message),Promise.resolve({})}const e={};try{if(b.enableHlsVideoTrackInfo){const f=yield bk(c,d,
366
- a);e.renditions=f.renditions;e.mimeType=f.mimeType}}catch(f){c.g.warn("Failed to parse video metadata from HLS playlist.",f.message)}try{const f=yield dk(d);e.Kc=f}catch(f){c.g.warn("Failed to parse metadata from HLS playlist.",f.message)}return e})}};_.lk=[];_.T=class{ke(){return!0}$g(a){return this.getVideoTracks().find(b=>_.hh(b,a,a&&Object.keys(a)))}Wg(a){return this.getAudioTracks().find(b=>_.hh(b,a,a&&Object.keys(a)))}Yg(a){return this.ka().find(b=>_.hh(b,a,a&&Object.keys(a)))}Zg(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.hh(b,a,a&&Object.keys(a)))}Vg(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.hh(b,a,a&&Object.keys(a)))}Xg(a){return this.ka().flatMap(b=>b.renditions).find(b=>_.hh(b,a,a&&Object.keys(a)))}};
367
- _.z("clpp.TrackManager",_.T);_.T.prototype.isAbrEnabled=_.T.prototype.ta;_.T.prototype.addTextTrack=_.T.prototype.addTextTrack;_.T.prototype.findTextRendition=_.T.prototype.Xg;_.T.prototype.findAudioRendition=_.T.prototype.Vg;_.T.prototype.findVideoRendition=_.T.prototype.Zg;_.T.prototype.findTextTrack=_.T.prototype.Yg;_.T.prototype.findAudioTrack=_.T.prototype.Wg;_.T.prototype.findVideoTrack=_.T.prototype.$g;_.T.prototype.setTextRendition=_.T.prototype.wb;_.T.prototype.setAudioRendition=_.T.prototype.vb;
368
- _.T.prototype.setVideoRendition=_.T.prototype.gb;_.T.prototype.setTextTrack=_.T.prototype.Ta;_.T.prototype.setAudioTrack=_.T.prototype.xa;_.T.prototype.setVideoTrack=_.T.prototype.xb;_.T.prototype.getTextTrack=_.T.prototype.wa;_.T.prototype.getAudioTrack=_.T.prototype.oa;_.T.prototype.getVideoTrack=_.T.prototype.Ha;_.T.prototype.getLoadingTextRendition=_.T.prototype.Bb;_.T.prototype.getLoadingAudioRendition=_.T.prototype.Ab;_.T.prototype.getLoadingVideoRendition=_.T.prototype.pb;
369
- _.T.prototype.getTextRendition=_.T.prototype.Sa;_.T.prototype.getAudioRendition=_.T.prototype.Wa;_.T.prototype.getVideoRendition=_.T.prototype.la;_.T.prototype.getTextTracks=_.T.prototype.ka;_.T.prototype.getAudioTracks=_.T.prototype.getAudioTracks;_.T.prototype.getVideoTracks=_.T.prototype.getVideoTracks;_.T.prototype.canSelectVideoTracks=_.T.prototype.ke;var pk=new Map,ok=1,tk=2,sk=3,rk=4;_.eu=(new Map).set(_.td,_.td).set("frameRate","framerate").set("bandwidth","bitrate").set(_.Ig,_.Ig).set(_.ge,_.ge).set("channelsCount","channels");_.fu=class{constructor(a){this.f=a;this.a=null}ga(a){return yk(this,a,!1)}yb(a){return yk(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.Ck=class{constructor(a){this.f=a;this.a=null}$e(){this.stop();this.f();return this}ga(a){this.stop();this.a=(new _.fu(()=>{this.f()})).ga(a);return this}yb(a){this.stop();this.a=(new _.fu(()=>{this.f()})).yb(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.z("clpp.utils.Timer",_.Ck);_.Ck.prototype.stop=_.Ck.prototype.stop;_.Ck.prototype.tickEvery=_.Ck.prototype.yb;_.Ck.prototype.tickAfter=_.Ck.prototype.ga;_.Ck.prototype.tickNow=_.Ck.prototype.$e;var gu=class{};_.z(sd,gu);gu.getInfo=_.el;
370
- var Bk=null,Ak=null,Tk=new _.S(sd),Xk="android",Wk="ios",bl="linux",Yk="osx",Zk="windows",$k="tizen",al="webos",Vk=_.gg,dl=_.gg,Ok={windows:{os_version:/windows\s+?nt\s([\d.]+)/i,ie:/windows\s+?nt.+?trident\/[\d.]+.*rv:([\d.]+)/i,edge:/windows\s+?nt.+?edge?\/([\d.]+)/i,chrome:/windows\s+?nt.+?chrome\/([\d.]+)/i,firefox:/windows\s+?nt.+?firefox\/([\d.]+)/i,opera:/windows\s+?nt.+?opr\/([\d.]+)/i},osx:{os_version:/macintosh.+?([\d._]+)/i,safari:/macintosh.+?version\/([\d._]+).+?safari/i,edge:/macintosh.+?edge?\/([\d._]+)/i,
377
+ _.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 oj=document.createElement("span");var ou=class{};_.z("clpp.utils.Uint8ArrayUtils",ou);ou.toStandardBase64=_.qj;ou.concat=_.wj;ou.equal=_.vj;ou.toHex=_.uj;ou.fromHex=_.tj;ou.fromBase64=_.sj;ou.toBase64Url=_.rj;_.pu=new _.S("clpp.hls.Utils");_.yj=class{constructor(a){this.f=a;this.a=0}};_.qu=new Set([_.Ca,_.Da,"EXT-X-I-FRAMES-ONLY",_.Ha,_.Ia,_.Ja,_.Ma,_.Oa]);_.ru=new Set(["EXTINF",_.za,_.Ba,_.Fa,_.Ga,_.La]);_.su=new Set(["EXT-X-PART",_.Ka]);_.tu=new Set([_.Aa]);var Ej=[403,401];_.z("clpp.net.DEFAULT_FATAL_STATUS_CODES",Ej);_.z("clpp.net.makeRequest",_.Jj);_.Ij=6;_.z("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.Ij,CONTENT_STEERING:7});_.qn=class{constructor(){this.qg=this.ge=this.done=!1;this.error=this.value=null;let a,b;const c=new Promise((d,e)=>{a=function(f){this.done=this.ge=!0;this.value=f;d(f)};b=function(f){this.done=this.qg=!0;this.error=f;e(f)}});c.ge=!1;c.done=!1;c.qg=!1;c.value=null;c.error=null;c.resolve=a;c.reject=b;return c}resolve(){}reject(){}};_.up=class{constructor(a,b){this.U=a;this.A=b;this.a=!1}abort(){this.a=!0;return this.A()}};_.uu=class{constructor(){this.a=[]}destroy(){const a=[];for(const b of this.a)b.U.catch(()=>{}),a.push(b.abort());this.a=[];return Promise.all(a)}};_.Dr=class{constructor(){this.f=[];this.h=[];this.j=[];this.w=!1;this.o=new _.uu;this.a={};this.headers=new Map;this.l=0;this.a.data=At;!window.fetch||!window.AbortController||_.Qk(6)||_.Tk()&&68<_.ol().browserVersion.major?(this.a.http=it,this.a.https=it):(this.a.http=vt,this.a.https=vt)}ni(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.h=[];return this.o.destroy()}me(a){this.f.push(a)}Ec(a){this.h.push(a)}We(a){this.f=
378
+ this.f.filter(b=>b!==a)}vd(a){this.h=this.h.filter(b=>b!==a)}fetch(a){if(this.w)return new vu(Promise.reject(new _.I(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;Vj(this,a);b=[];for(var c of this.h)b.push(c);if(a.responseModifiers)for(var d of a.responseModifiers)b.push(d);a.responseModifiers=b;let e;d=c=new _.qn;try{for(const f of a.requestModifiers)d=
379
+ d.then(g=>{if(e.a)throw new _.I(_.F,1,7001,g?{url:g.uris[g.uriIndex],request:g}:null);return f(g)||g}).catch(g=>{if(g instanceof _.I)throw g;throw new _.I(_.F,1,1006,null,g);});d=d.then(f=>({request:f,plugin:Wj(this,f)}));e=new vu(d);for(const f of a.responseModifiers)e.then(g=>{const h=()=>{if(e.a)throw new _.I(_.F,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 _.I&&g.data&&g.data.response){const h=f(g.data.response);
380
+ if(h&&h.then)return h.then(()=>Promise.reject(g))}return Promise.reject(g)}).catch(g=>{if(g instanceof _.I)throw g;throw new _.I(_.F,1,1007,null,g);});for(const f of this.j)e.catch(g=>{g instanceof _.I&&g.data&&g.data.response||f({uri:a.uris[a.uriIndex],data:(new Uint8Array(0)).buffer,status:-1,timeMs:0,headers:{},request:a});return Promise.reject(g)}).catch(g=>{if(g instanceof _.I)throw g;throw new _.I(_.F,1,1007,null,g);});_.Sj(this.o,e);c.resolve(a);return e}catch(f){return new vu(Promise.reject(f))}}};
381
+ _.z("clpp.net.NetworkEngine",_.Dr);_.Dr.prototype.fetch=_.Dr.prototype.fetch;_.Dr.prototype.removeResponseModifier=_.Dr.prototype.vd;_.Dr.prototype.removeRequestModifier=_.Dr.prototype.We;_.Dr.prototype.addResponseModifier=_.Dr.prototype.Ec;_.Dr.prototype.addRequestModifier=_.Dr.prototype.me;_.Dr.prototype.setRateLimit=_.Dr.prototype.ni;var ak;
382
+ _.dk=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=[]}Mc(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&&ri(this.roles,
383
+ a.roles)&&ri(this.accessibility,a.accessibility,Yj)}toString(){return`Track type: ${this.type} id: ${this.id}
384
+ renditions size: ${this.renditions.length}`}};_.z("clpp.Track",_.dk);_.dk.prototype.toString=_.dk.prototype.toString;_.lk=class{constructor(a,b){this.track=b;this.id=a;this.originalId=this.codec=this.Vc=this.bandwidth=this.height=this.width=null;this.a=!1}};_.z("clpp.Rendition",_.lk);_.ck=1;_.N=_.w;_.M=_.p;_.L="text";ak=_.Ke;_.wu={VIDEO:_.N,AUDIO:_.M,TEXT:_.L,METADATA:ak};_.dk.Type=_.wu;_.Am=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;
385
+ _.jj(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.h=b.hash}};_.z("clpp.utils.url.queryString",_.gk);var xu=class{constructor(a){this.f=a;this.g=new _.S("clpp.native.hls.HlsMetadataParser");this.a=wi(this.h.bind(this),(b,c)=>b[0]===c[0]&&b[1].enableHlsVideoTrackInfo===c[1].enableHlsVideoTrackInfo&&b[1].enableMetadata===c[1].enableMetadata)}h(a,b){const c=this;return _.x(function*(){let d=null;try{d=yield jk(c,a)}catch(f){return c.g.warn("Failed to fetch playlist in order metadata from HLS playlist.",f.message),Promise.resolve({})}const e={};try{if(b.enableHlsVideoTrackInfo){const f=yield nk(c,d,
386
+ a);e.renditions=f.renditions;e.mimeType=f.mimeType}}catch(f){c.g.warn("Failed to parse video metadata from HLS playlist.",f.message)}try{const f=yield pk(d);e.yc=f}catch(f){c.g.warn("Failed to parse metadata from HLS playlist.",f.message)}return e})}};_.xk=[];_.T=class{re(){return!0}mh(a){return this.getVideoTracks().find(b=>_.th(b,a,a&&Object.keys(a)))}ih(a){return this.getAudioTracks().find(b=>_.th(b,a,a&&Object.keys(a)))}kh(a){return this.na().find(b=>_.th(b,a,a&&Object.keys(a)))}lh(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.th(b,a,a&&Object.keys(a)))}hh(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.th(b,a,a&&Object.keys(a)))}jh(a){return this.na().flatMap(b=>b.renditions).find(b=>_.th(b,a,a&&Object.keys(a)))}};
387
+ _.z("clpp.TrackManager",_.T);_.T.prototype.isAbrEnabled=_.T.prototype.ua;_.T.prototype.addTextTrack=_.T.prototype.addTextTrack;_.T.prototype.findTextRendition=_.T.prototype.jh;_.T.prototype.findAudioRendition=_.T.prototype.hh;_.T.prototype.findVideoRendition=_.T.prototype.lh;_.T.prototype.findTextTrack=_.T.prototype.kh;_.T.prototype.findAudioTrack=_.T.prototype.ih;_.T.prototype.findVideoTrack=_.T.prototype.mh;_.T.prototype.setTextRendition=_.T.prototype.Cb;_.T.prototype.setAudioRendition=_.T.prototype.Bb;
388
+ _.T.prototype.setVideoRendition=_.T.prototype.nb;_.T.prototype.setTextTrack=_.T.prototype.Xa;_.T.prototype.setAudioTrack=_.T.prototype.ya;_.T.prototype.setVideoTrack=_.T.prototype.Db;_.T.prototype.getTextTrack=_.T.prototype.xa;_.T.prototype.getAudioTrack=_.T.prototype.ra;_.T.prototype.getVideoTrack=_.T.prototype.Ia;_.T.prototype.getLoadingTextRendition=_.T.prototype.Hb;_.T.prototype.getLoadingAudioRendition=_.T.prototype.Gb;_.T.prototype.getLoadingVideoRendition=_.T.prototype.vb;
389
+ _.T.prototype.getTextRendition=_.T.prototype.Va;_.T.prototype.getAudioRendition=_.T.prototype.Ra;_.T.prototype.getVideoRendition=_.T.prototype.oa;_.T.prototype.getTextTracks=_.T.prototype.na;_.T.prototype.getAudioTracks=_.T.prototype.getAudioTracks;_.T.prototype.getVideoTracks=_.T.prototype.getVideoTracks;_.T.prototype.canSelectVideoTracks=_.T.prototype.re;var Bk=new Map,Ak=1,Fk=2,Ek=3,Dk=4;_.yu=(new Map).set(_.Ad,_.Ad).set("frameRate","framerate").set("bandwidth","bitrate").set(_.Ug,_.Ug).set(_.ne,_.ne).set("channelsCount","channels");var zu=class{};_.z(zd,zu);zu.getInfo=_.ol;
390
+ var Lk=null,Kk=null,dl=new _.S(zd),hl="android",gl="ios",ml="linux",il="osx",jl="windows",kl="tizen",ll="webos",fl=_.tg,nl=_.tg,Yk={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,
371
391
  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,
372
392
  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},
373
- 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 U=class extends _.T{constructor(){super();this.g=new _.S("clpp.native.TrackManager");this.m=null;this.f=new _.xt;this.h=[];this.G=0;this.o={};this.I=[];this.a=new Map;this.w=null;this.l=new Map;this.A=!0;this.M=this.B.bind(this,_.L);this.R=this.F.bind(this,_.L);this.O=this.C.bind(this,_.L);this.S=this.B.bind(this,_.N);this.W=this.F.bind(this,_.N);this.V=this.C.bind(this,_.N);this.J=this.B.bind(this,_.M);this.L=this.F.bind(this,_.M);this.K=this.C.bind(this,_.M);this.j=null}ke(){return!_.Qk()}B(a,
374
- b){const c=this;return _.x(function*(){if(b){var d=b.track;if(d){var e=a===_.N,f=a===_.L,g=a===_.M||e,h=b.target,k=c.h.find(n=>fl(n,d,a));if(k)c.g.warn("Track from event already exists",d,k);else{var l=Sj(a,d),m=gl(d);if(f){if(d.kind===_.De)return;let n;void 0!==d.id?n=c.o[d.id]:n=Object.values(c.o).find(q=>fl(l,q,a));l.kind&&"captions"===l.kind&&(l.mimeType=_.Ec);n&&(l.src=n.url,l.mimeType=n.mimeType)}else if(k=c.h.find(n=>n.type===a&&_.hh(n,l,["kind","label","language"]))){k.id=d.id;m&&(c.g.debug(`Setting native ${a} track active`),
375
- c.a.set(a,k));c.g.debug("Track from event seems to already exists, flipped native track to",d);return}try{l.renditions.push(new _.Zj(l.id,l));c.h.push(l);const n=c.m.getConfiguration().safari;il(c,a,n)?yield jl(c,l,n):kl(c,a,n)&&(yield ll(c,l,n));c.g.debug(a+" Track added",l);c.m.trigger(new _.E(_.hu));const q=ml(c,a).length,u=!(!h||!h.length),v=h&&h.length||0;f=()=>{c.g.debug(`Setting native ${a} track active. `+`Native track active: ${m}. `+`Number of tracks: ${q}`,d);c.a.set(a,l)};m?f():1===q&&
376
- g&&(e?f():u&&1!==v||f())}catch(n){c.g.error("Error while converting track data",n)}}}else c.g.warn(lb)}else c.g.warn(ib)})}F(a,b){if(b){var c=b.track;c?a===_.L&&c.kind!==_.De&&(b=this.h.find(d=>fl(d,c,a)))&&(this.h.splice(this.h.indexOf(b),1),(this.a.get(a)||null)===b&&(this.a.set(a,null),nl(this)),this.g.debug(a+" Track removed, id: ",b.id)):this.g.warn(lb)}else this.g.warn(ib)}C(a,b){this.g.debug(a+" Track changed",b);a===_.L&&nl(this);const c=pl(this,a);if(c)for(let d=0;d<c.length;++d)if(gl(c[d])){if(b=
377
- this.h.find(e=>fl(e,c[d],a)))this.a.set(a,b),this.g.debug("Track change detected, id:",b.id),b===this.l.get(a)&&this.l.set(a,null),a===_.M?this.m.trigger(new _.E(_.sl)):a===_.L&&this.m.trigger(new _.E(_.tl));break}}initialize(a){this.m=a;this.j=new du(a.getNetworkEngine())}load(){this.A=!1;var a=ol(this,_.L);a&&(this.f.on(a,_.zc,this.M),this.f.on(a,Bf,this.R),this.f.on(a,gd,this.O));if(a=ol(this,_.M))this.f.on(a,_.zc,this.J),this.f.on(a,Bf,this.L),this.f.on(a,gd,this.K);if(a=ol(this,_.N))this.f.on(a,
378
- _.zc,this.S),this.f.on(a,Bf,this.W),this.f.on(a,gd,this.V);this.f.one(this.m,Yc,this.H.bind(this))}release(){this.A=!0;this.h=[];this.o={};this.a.clear();this.l.clear();this.f.release()}destroy(){this.release();this.m=null}getVideoTracks(){return ml(this,_.N)}getAudioTracks(){return ml(this,_.M)}ka(){return ml(this,_.L)}la(){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]||
379
- null}Wa(){return ql(this,_.M)}Sa(){return ql(this,_.L)}pb(){return rl(this,_.N)}Ab(){return rl(this,_.M)}Bb(){return rl(this,_.L)}Ha(){return this.a.get(_.N)||null}oa(){return this.a.get(_.M)||null}wa(){return this.a.get(_.L)||null}xb(a){ul(this,_.N,a)}xa(a){ul(this,_.M,a)}Ta(a){ul(this,_.L,a)}gb(a){ul(this,_.N,a&&a.track)}vb(a){ul(this,_.M,a&&a.track)}wb(a){ul(this,_.L,a&&a.track)}addTextTrack(a){const b=this;return _.x(function*(){if(a.mimeType.match(/text\/vtt/)){const c="External_"+`${b.G++}`;
380
- b.o[c]=a;vl(b,a,c)}else yield wl(b,a)})}ta(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;return _.x(function*(){const b=a.m.getConfiguration();yl(a,_.M,b.preferredAudioLanguage);if(!pl(a,_.L).some(c=>gl(c))){const c=ol(a,_.L);yield new Promise(d=>{a.f.one(c,gd,d);(new _.Ck(d)).ga(1)})}a.A||yl(a,_.L,b.preferredTextLanguage)})}};U.prototype.isAbrEnabled=U.prototype.ta;U.prototype.addTextTrack=U.prototype.addTextTrack;U.prototype.setTextRendition=U.prototype.wb;
381
- U.prototype.setAudioRendition=U.prototype.vb;U.prototype.setVideoRendition=U.prototype.gb;U.prototype.setTextTrack=U.prototype.Ta;U.prototype.setAudioTrack=U.prototype.xa;U.prototype.setVideoTrack=U.prototype.xb;U.prototype.getTextTrack=U.prototype.wa;U.prototype.getAudioTrack=U.prototype.oa;U.prototype.getVideoTrack=U.prototype.Ha;U.prototype.getLoadingTextRendition=U.prototype.Bb;U.prototype.getLoadingAudioRendition=U.prototype.Ab;U.prototype.getLoadingVideoRendition=U.prototype.pb;
382
- U.prototype.getTextRendition=U.prototype.Sa;U.prototype.getAudioRendition=U.prototype.Wa;U.prototype.getVideoRendition=U.prototype.la;U.prototype.getTextTracks=U.prototype.ka;U.prototype.getAudioTracks=U.prototype.getAudioTracks;U.prototype.getVideoTracks=U.prototype.getVideoTracks;U.prototype.canSelectVideoTracks=U.prototype.ke;_.iu=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(Ib);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(Ib);}Oa(){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)}ia(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
383
- 1)}Gb(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}Ca(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.ia(),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=
384
- "";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",_.iu);_.iu.prototype.bufferedAheadOf=_.iu.prototype.Ca;_.iu.prototype.isBuffered=_.iu.prototype.Gb;_.iu.prototype.bufferEnd=_.iu.prototype.ia;_.iu.prototype.bufferStart=_.iu.prototype.Oa;_.iu.prototype.end=_.iu.prototype.end;_.iu.prototype.start=_.iu.prototype.start;_.ju=class{constructor(){this.Wc=new vt(this);this.Uc=[]}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}on(a,b,c){return this.Wc.on(a,b,c)}one(a,b,c){return this.Wc.one(a,b,c)}off(a,b){return this.Wc.off(a,b)}forwardEventsTo(a){a&&(0<=this.Uc.indexOf(a)||this.Uc.push(a))}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}stopForwardingEventsTo(a){a&&(a=this.Uc.indexOf(a),0<=a&&this.Uc.splice(a,1))}trigger(a){this.Wc.trigger(a);for(const b of this.Uc)b.dispatchEvent(a)}};
385
- _.ju.prototype.off=_.ju.prototype.off;_.ju.prototype.one=_.ju.prototype.one;_.ju.prototype.on=_.ju.prototype.on;_.ju.prototype.removeEventListener=_.ju.prototype.removeEventListener;_.ju.prototype.addEventListener=_.ju.prototype.addEventListener;_.z("clpp.events.ERROR",_.r);_.z("clpp.events.LOADEDMETADATA",_.xe);_.z("clpp.events.BUFFERING_ENDED",_.Vc);_.z("clpp.events.BUFFERING_STARTED",_.Wc);_.z("clpp.events.STATE_CHANGED",_.Sf);_.sl="audiotrackchanged";_.z("clpp.events.AUDIO_TRACK_CHANGED",_.sl);_.tl="texttrackchanged";_.z("clpp.events.TEXT_TRACK_CHANGED",_.tl);_.z("clpp.events.VIDEO_TRACK_CHANGED",_.xg);_.z("clpp.events.BITRATE_CHANGED",_.Tc);_.hu="tracksadded";_.z("clpp.events.TRACKS_ADDED",_.hu);_.z("clpp.events.LOAD_START",ye);
386
- _.z("clpp.events.RELEASING",_.Af);_.z("clpp.events.RELEASED",zf);_.z("clpp.events.DESTROYING","destroying");_.z("clpp.events.DESTROYED","destroyed");_.z("clpp.events.VIDEO_BUFFER_CHANGED",_.wg);_.z("clpp.events.AUDIO_BUFFER_CHANGED",_.Rc);_.z("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.z("clpp.events.DRM_SESSION_CREATED",Td);_.z("clpp.events.DRM_SESSION_UPDATE",_.Wd);_.z("clpp.events.DRM_SESSION_PERSISTED",_.Vd);_.z("clpp.events.DRM_RENEWAL_STARTED",Sd);
387
- _.z("clpp.events.DRM_EXPIRATION_UPDATE",_.Qd);_.z("clpp.events.DRM_LICENSE_REQUESTED",Rd);_.z("clpp.events.AUTOPLAY_NOT_ALLOWED",_.Sc);_.z("clpp.events.PLAY",_.Ze);_.z("clpp.events.SEEKING",_.Kf);_.z("clpp.events.SEEKED",_.Jf);_.z("clpp.events.USER_SEEKING",_.lg);_.z("clpp.events.USER_SEEKED",_.kg);_.Wo={SEEKING:1,NO_DATA:2};_.z("clpp.events.BufferingReasons",_.Wo);_.z("clpp.events.ADS_TIMELINE_CHANGED",_.Ac);_.z("clpp.events.AD_LOADED",_.nc);_.z("clpp.events.AD_BREAK_STARTED",_.cc);
388
- _.z("clpp.events.AD_STARTED",_.uc);_.z("clpp.events.AD_BUFFERING",_.fc);_.z("clpp.events.AD_PROGRESS",_.qc);_.z("clpp.events.AD_FIRST_QUARTILE",_.ic);_.z("clpp.events.AD_MIDPOINT",_.oc);_.z("clpp.events.AD_THIRD_QUARTILE",_.yc);_.z("clpp.events.AD_PAUSED",_.pc);_.z("clpp.events.AD_RESUMED",_.rc);_.z("clpp.events.AD_SKIPPED",_.tc);_.z("clpp.events.AD_CLICKED",_.gc);_.z("clpp.events.AD_IMPRESSION",_.mc);_.z("clpp.events.AD_COMPLETED",_.hc);_.z("clpp.events.AD_STOPPED",_.xc);
389
- _.z("clpp.events.AD_BREAK_STOPPED",_.ec);_.z("clpp.events.AD_HLS_ASSET_LIST_REQUEST",jc);_.z("clpp.events.AD_HLS_ASSET_LIST_RESPONSE",kc);_.z("clpp.events.AD_HLS_RESOLVED",lc);_.z("clpp.events.SIMID_CREATIVE_STARTED",_.Mf);_.z("clpp.events.SIMID_CREATIVE_STOPPED",_.Nf);_.z("clpp.events.CASTING_STARTED",_.Zc);_.z("clpp.events.CASTING_ENDED","castingended");_.z("clpp.events.CAST_STATUS_CHANGED",_.$c);_.z("clpp.events.AIRPLAY_STATUS_CHANGED",_.Dc);_.z("clpp.events.AIRPLAY_CASTING_STARTED",_.Cc);
390
- _.z("clpp.events.AIRPLAY_CASTING_ENDED",_.Bc);_.$h="timeline-cue-added";_.z("clpp.events.TIMELINE_CUE_ADDED",_.$h);_.Th="timeline-cue-enter";_.z("clpp.events.TIMELINE_CUE_ENTER",_.Th);_.Uh="timeline-cue-exit";_.z("clpp.events.TIMELINE_CUE_EXIT",_.Uh);_.Sh="timeline-cues-changed";_.z("clpp.events.TIMELINE_CUES_CHANGED",_.Sh);_.z("clpp.events.MPD_TYPE_CHANGED",_.He);_.z("clpp.events.LIVE_TURNED_STATIC",_.re);_.z("clpp.events.VIMOND_RESPONSE",_.yg);_.z("clpp.events.PLAYLIST_ITEM_CHANGED",_.lf);
391
- _.z("clpp.events.PLAYLIST_MODIFIED",_.mf);_.z("clpp.events.SC_PLAYLIST_TIMELINE_CHANGED",_.If);_.z("clpp.events.SC_PLAYLIST_ITEM_CHANGED",_.Gf);_.z("clpp.events.SC_PLAYLIST_ENDED",_.Ff);_.z("clpp.events.SC_PLAYLIST_LIVE_TURNED_STATIC",_.Hf);_.z("clpp.events.CDN_SWITCH_SUCCESS",_.ad);_.z("clpp.events.ONLINE_STATUS_CHANGED",Re);_.z("clpp.events.CMSD_EVENT","cmsd-event");_.z("clpp.events.YOSPACE_SESSION_STARTED",_.Ng);_.z("clpp.events.YOSPACE_SESSION_ENDED",_.Mg);
392
- _.z("clpp.events.CONTENT_STEERING_CHANGE",_.Ed);_.z("clpp.events.CONTENT_STEERING_LOCATION_BAN_UPDATE",_.Fd);var zl=["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",_.ea);_.z("clpp.name",_.qa);_.xl="application/x-mpegurl";_.z("clpp.Type",{DASH:_.Fc,HLS:_.xl,SMOOTH_STREAMING:_.Kc,MP4:_.vg,MP3:"audio/mp3"});_.Mh="scte35";_.Ph="hls-daterange";_.z("clpp.TimelineCueType",{SCTE35:_.Mh,DASH_CALLBACK:_.Ie,HLS_DATERANGE:_.Ph,UNKNOWN:_.gg});_.z("clpp.SpeedUpMode",{DECODER:_.Id,SEEK:"seek"});_.z("clpp.CodecSwitchingStrategy",{PREVENT:_.uf,SMOOTH:_.Pf});var ku=class{};_.z("clpp.utils.PlayerConfiguration",ku);ku.create=_.Gl;var lu=["abort",Xc,Yc,Yd,"emptied",$d,_.be,_.r,"interruptbegin","interruptend",_.we,_.xe,ye,"mozaudioavailable",_.Ve,_.Ze,_.kf,_.wf,_.yf,_.Jf,_.Kf,Qf,"suspend",_.bg,"volumechange",_.Bg,_.Cg,_.Df,Hg,Gg,Eg,Fg];_.mu=class extends _.ju{constructor(a){super();this.log=new _.S(a);this.configuration=this.da=_.El();this.ea=this.C=null;this.cd=this.Ne=!1;this.lf=new _.S("clpp.video.events");this.ib=null;this.Jd=-1;this.Cg=this.zg.bind(this);this.Ie=new _.lr;this.L=new _.xt;this.Ae=this.zc=this.Ec=this.O=null}init(a,b){this.configuration=this.da=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 lu)this.L.on(a,c,this.Cg,
393
- c!==_.r);this.ib||(this.ib=this.sg());this.ib.initialize(this);this.C.showMediaElement()}release(){this.O&&(this.O.destroy(),this.O=null);return Promise.resolve()}destroy(){this.L.release();return this.Ie.release()}canPlay(a,b){return _.vh[this.namespace()].canPlay(a,b)}getTimeline(){return null}setupPlaylist(){return Promise.reject(_.nb)}appendLoad(){return Promise.reject(_.nb)}seekWith(){return Promise.reject(_.nb)}detach(){return Promise.resolve()}setSeekInterceptor(){}setPlaybackSessionId(){}play(){if(!this.ea)return Promise.reject("No sources specified yet. You need to load content before calling play.");
394
- 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||""};Al(c)?(this.trigger(new _.E(_.Sc)),this.log.warn(_.ja)):c.name===ob&&this.log.warn('Unrecognized "NotAllowedError" on play(). '+`${b.name}: ${b.message}`);throw b;})}pause(){return this.ea?new Promise((a,b)=>{const c=this.getState();if(c!==_.Uo&&c!==_.Qo&&c!==_.ap&&c!==_.$o)b(new _.H(_.F,7,3201,"The player state does not allow pause."));
395
- else if(this.C.getMedia().pause(),this.getState()===_.ap)this.L.one(this,_.Sf,()=>{a()});else a()}):Promise.reject(new _.H(_.F,7,3201,"No sources specified yet. You need to load content before calling pause."))}isPaused(){return this.C.getMedia().paused}isEnded(){return this.C.getMedia().ended}getConfiguration(){return this.configuration}setDrmCustomDataModifier(a){this.Ec=a}setCdnErrorCallback(a){this.zc=a}Hc(){return this.Ec}getSurface(){return this.C}getBufferInfo(a){const b=this.getSurface().getMedia();
396
- return new _.iu(b?b.buffered:void 0,a)}getPosition(){return this.getMediaPosition()}getMediaPosition(){const a=this.C.getMedia();if(a)return a.currentTime;this.log.warn("No media element available, can not report current time!");return 0}seek(a){const b=this.getMediaPosition();if(void 0===a||null===a||typeof a!==_.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)?
397
- (this.log.info("Skip seek. Delta "+Math.abs(d)+" \x3c 0.1"),Promise.resolve()):new Promise((e,f)=>{const g=()=>{this.trigger(new _.E(_.lg));this.L.on(c,_.Jf,h);this.L.on(c,_.bg,h);this.L.on(c,_.wf,h);this.log.info("Seeking to "+a+". Delta "+d);this.cd=this.Ne=!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===_.Jf,y=l.type===_.wf,A=l.type===_.bg,D=y&&u;q=v||n&&D||A&&q;this.log.debug("Checking seeking state after "+
398
- l.type+" event. Seek completed:",q,"Current Time:",m,"Target Time:",a,"Native Event:",v,"Time reached",n,"Timeupdate:",A,"Progress:",y,"ReadyState:",u,"Progress Ready:",D);q?(this.cd=this.Ne=!1,this.L.off(c,_.Jf,h),this.L.off(c,_.bg,h),this.L.off(c,_.wf,h),this.kf(),this.trigger(new _.E(_.kg)),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,_.xe,g)};this.getState()===_.Yo?
399
- (this.log.debug("Player is in IDLE state. Postpone seek."),this.L.one(this,_.Sf,()=>{switch(this.getState()){case _.Uo:case _.ap:case _.$o:this.log.debug("Valid seek state reached.");k();break;default:this.log.warn("Invalid seek target state. Aborting seek"),f()}})):k()})}getVolume(){const a=this.C.getMedia();if(a)return a.volume;this.log.warn("No media element available, can not report volume!");return null}setVolume(a){const b=this.C.getMedia();b?_.gh(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
400
- 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===_.Uc&&(b.muted=a)}getDuration(){return this.getMediaDuration()}getMediaDuration(){return this.ea?this.C.getMedia().duration:-1}getTrackManager(){return this.ib}getPlaybackRate(){const a=this.C.getMedia();return a&&a.playbackRate||
401
- 1}setPlaybackRate(a){const b=this.C.getMedia();void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.Jd=a}getSourceIndex(){return this.Jd}getLoadedSource(){return this.ea&&-1!==this.Jd?this.ea[this.Jd]:null}getPeriods(){return[]}getNetworkEngine(){return this.Ie}setNetworkEngine(a){this.Ie=a}setCmsdManager(a){this.Ae=a}getTextDisplayer(){return this.O}getTimelineCues(){return[]}getCueTimeline(){return null}resetAbr(){}zg(a){var b=this.getSurface().getMedia();const c=this.getPosition();let d="Received Video Element Event: '"+
402
- a.type+"' with playhead at: "+c;if(a.type===_.bg||a.type===_.wf)this.lf.debug(d);else{let e="";switch(a.type){case _.yf:e=`Rate: ${this.getPlaybackRate()}`;break;case Yd:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.Ze:case _.kf:case "suspend":case _.Bg:case Qf:case _.Kf:case _.Jf:case _.bg:case _.wf:case Xc:case Yc:b=this.getBufferInfo().Ca(c);e=`State ${this.getSurface().getMedia().readyState} `+`Buffer: ${b}`;
403
- break;case _.Df:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+e);this.lf.info(d)}a.type!==_.r&&this.trigger(new _.E(a.type,{detail:a}))}kf(){}};var Kl;Kl=new _.S("clpp.Components");_.Il=new Map;_.z("clpp.install",function(a){Sl(a)});_.z("clpp.uninstall",function(a){Tl(a)});var nu=class{constructor(){this.a=this.f=null;this.g=new _.S("clpp.drm.csl")}release(){this.a=this.f=null}};_.z("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.Bb,SW_SECURE_DECODE:_.Cb,HW_SECURE_CRYPTO:Va,HW_SECURE_DECODE:Wa,HW_SECURE_ALL:Ua});_.z("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.z("clpp.drm.KeySystem",{NONE:_.Je,CLEAR_KEY:_.Te,WIDEVINE:_.Cd,PLAYREADY:_.Ad,FAIRPLAY:_.wd,PRIMETIME:_.vd});_.Wl={};_.z("clpp.drm.registerDrmEnvironment",_.Xl);var $l={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,
393
+ 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 U=class extends _.T{constructor(){super();this.g=new _.S("clpp.native.TrackManager");this.m=null;this.f=new _.Rt;this.h=[];this.G=0;this.o={};this.I=[];this.a=new Map;this.w=null;this.l=new Map;this.A=!0;this.M=this.B.bind(this,_.L);this.R=this.F.bind(this,_.L);this.O=this.C.bind(this,_.L);this.S=this.B.bind(this,_.N);this.W=this.F.bind(this,_.N);this.V=this.C.bind(this,_.N);this.J=this.B.bind(this,_.M);this.L=this.F.bind(this,_.M);this.K=this.C.bind(this,_.M);this.j=null}re(){return!_.$k()}B(a,
394
+ b){const c=this;return _.x(function*(){if(b){var d=b.track;if(d){var e=a===_.N,f=a===_.L,g=a===_.M||e,h=b.target,k=c.h.find(n=>pl(n,d,a));if(k)c.g.warn("Track from event already exists",d,k);else{var l=ek(a,d),m=ql(d);if(f){if(d.kind===_.Ke)return;let n;void 0!==d.id?n=c.o[d.id]:n=Object.values(c.o).find(q=>pl(l,q,a));l.kind&&"captions"===l.kind&&(l.mimeType=_.Ic);n&&(l.src=n.url,l.mimeType=n.mimeType)}else if(k=c.h.find(n=>n.type===a&&_.th(n,l,["kind","label","language"]))){k.id=d.id;m&&(c.g.debug(`Setting native ${a} track active`),
395
+ c.a.set(a,k));c.g.debug("Track from event seems to already exists, flipped native track to",d);return}try{l.renditions.push(new _.lk(l.id,l));c.h.push(l);const n=c.m.getConfiguration().safari;sl(c,a,n)?yield tl(c,l,n):ul(c,a,n)&&(yield vl(c,l,n));c.g.debug(a+" Track added",l);c.m.trigger(new _.D(_.og));const q=wl(c,a).length,u=!(!h||!h.length),v=h&&h.length||0;f=()=>{c.g.debug(`Setting native ${a} track active. `+`Native track active: ${m}. `+`Number of tracks: ${q}`,d);c.a.set(a,l)};m?f():1===q&&
396
+ g&&(e?f():u&&1!==v||f())}catch(n){c.g.error("Error while converting track data",n)}}}else c.g.warn(lb)}else c.g.warn(ib)})}F(a,b){if(b){var c=b.track;c?a===_.L&&c.kind!==_.Ke&&(b=this.h.find(d=>pl(d,c,a)))&&(this.h.splice(this.h.indexOf(b),1),(this.a.get(a)||null)===b&&(this.a.set(a,null),xl(this)),this.g.debug(a+" Track removed, id: ",b.id)):this.g.warn(lb)}else this.g.warn(ib)}C(a,b){this.g.debug(a+" Track changed",b);a===_.L&&xl(this);const c=zl(this,a);if(c)for(let d=0;d<c.length;++d)if(ql(c[d])){if(b=
397
+ this.h.find(e=>pl(e,c[d],a)))this.a.set(a,b),this.g.debug("Track change detected, id:",b.id),b===this.l.get(a)&&this.l.set(a,null),a===_.M?this.m.trigger(new _.D(_.Wc)):a===_.L&&this.m.trigger(new _.D(_.ig));break}}initialize(a){this.m=a;this.j=new xu(a.getNetworkEngine())}load(){this.A=!1;var a=yl(this,_.L);a&&(this.f.on(a,_.Dc,this.M),this.f.on(a,If,this.R),this.f.on(a,md,this.O));if(a=yl(this,_.M))this.f.on(a,_.Dc,this.J),this.f.on(a,If,this.L),this.f.on(a,md,this.K);if(a=yl(this,_.N))this.f.on(a,
398
+ _.Dc,this.S),this.f.on(a,If,this.W),this.f.on(a,md,this.V);this.f.one(this.m,dd,this.H.bind(this))}release(){this.A=!0;this.h=[];this.o={};this.a.clear();this.l.clear();this.f.release()}destroy(){this.release();this.m=null}getVideoTracks(){return wl(this,_.N)}getAudioTracks(){return wl(this,_.M)}na(){return wl(this,_.L)}oa(){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]||
399
+ null}Ra(){return Al(this,_.M)}Va(){return Al(this,_.L)}vb(){return Bl(this,_.N)}Gb(){return Bl(this,_.M)}Hb(){return Bl(this,_.L)}Ia(){return this.a.get(_.N)||null}ra(){return this.a.get(_.M)||null}xa(){return this.a.get(_.L)||null}Db(a){Cl(this,_.N,a)}ya(a){Cl(this,_.M,a)}Xa(a){Cl(this,_.L,a)}nb(a){Cl(this,_.N,a&&a.track)}Bb(a){Cl(this,_.M,a&&a.track)}Cb(a){Cl(this,_.L,a&&a.track)}addTextTrack(a){const b=this;return _.x(function*(){if(a.mimeType.match(/text\/vtt/)){const c="External_"+`${b.G++}`;
400
+ b.o[c]=a;Dl(b,a,c)}else yield El(b,a)})}ua(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;return _.x(function*(){const b=a.m.getConfiguration();Gl(a,_.M,b.preferredAudioLanguage);if(!zl(a,_.L).some(c=>ql(c))){const c=yl(a,_.L);yield new Promise(d=>{a.f.one(c,md,d);(new _.Mk(d)).ia(1)})}a.A||Gl(a,_.L,b.preferredTextLanguage)})}};U.prototype.isAbrEnabled=U.prototype.ua;U.prototype.addTextTrack=U.prototype.addTextTrack;U.prototype.setTextRendition=U.prototype.Cb;
401
+ U.prototype.setAudioRendition=U.prototype.Bb;U.prototype.setVideoRendition=U.prototype.nb;U.prototype.setTextTrack=U.prototype.Xa;U.prototype.setAudioTrack=U.prototype.ya;U.prototype.setVideoTrack=U.prototype.Db;U.prototype.getTextTrack=U.prototype.xa;U.prototype.getAudioTrack=U.prototype.ra;U.prototype.getVideoTrack=U.prototype.Ia;U.prototype.getLoadingTextRendition=U.prototype.Hb;U.prototype.getLoadingAudioRendition=U.prototype.Gb;U.prototype.getLoadingVideoRendition=U.prototype.vb;
402
+ U.prototype.getTextRendition=U.prototype.Va;U.prototype.getAudioRendition=U.prototype.Ra;U.prototype.getVideoRendition=U.prototype.oa;U.prototype.getTextTracks=U.prototype.na;U.prototype.getAudioTracks=U.prototype.getAudioTracks;U.prototype.getVideoTracks=U.prototype.getVideoTracks;U.prototype.canSelectVideoTracks=U.prototype.re;_.Au=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(Gb);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(Gb);}Qa(){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)}ma(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
403
+ 1)}Mb(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}Ca(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.ma(),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=
404
+ "";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",_.Au);_.Au.prototype.bufferedAheadOf=_.Au.prototype.Ca;_.Au.prototype.isBuffered=_.Au.prototype.Mb;_.Au.prototype.bufferEnd=_.Au.prototype.ma;_.Au.prototype.bufferStart=_.Au.prototype.Qa;_.Au.prototype.end=_.Au.prototype.end;_.Au.prototype.start=_.Au.prototype.start;_.Bu=class{constructor(){this.bd=new Pt(this);this.Zc=[]}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}on(a,b,c){return this.bd.on(a,b,c)}one(a,b,c){return this.bd.one(a,b,c)}off(a,b){return this.bd.off(a,b)}forwardEventsTo(a){a&&(0<=this.Zc.indexOf(a)||this.Zc.push(a))}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}stopForwardingEventsTo(a){a&&(a=this.Zc.indexOf(a),0<=a&&this.Zc.splice(a,1))}trigger(a){this.bd.trigger(a);for(const b of this.Zc)b.dispatchEvent(a)}};
405
+ _.Bu.prototype.off=_.Bu.prototype.off;_.Bu.prototype.one=_.Bu.prototype.one;_.Bu.prototype.on=_.Bu.prototype.on;_.Bu.prototype.removeEventListener=_.Bu.prototype.removeEventListener;_.Bu.prototype.addEventListener=_.Bu.prototype.addEventListener;var Hl=["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",_.ea);_.z("clpp.name",_.qa);_.Fl="application/x-mpegurl";_.z("clpp.Type",{DASH:_.Jc,HLS:_.Fl,SMOOTH_STREAMING:_.Oc,MP4:_.Hg,MP3:"audio/mp3"});_.fi="scte35";_.gi="hls-daterange";_.z("clpp.TimelineCueType",{SCTE35:_.fi,DASH_CALLBACK:_.Pe,HLS_DATERANGE:_.gi,UNKNOWN:_.tg});_.z("clpp.SpeedUpMode",{DECODER:_.Pd,SEEK:"seek"});_.z("clpp.CodecSwitchingStrategy",{PREVENT:_.Bf,SMOOTH:_.Wf});var Cu=class{};_.z("clpp.utils.PlayerConfiguration",Cu);Cu.create=_.Ol;var Du=["abort",bd,dd,ee,"emptied",ge,_.ie,_.r,"interruptbegin","interruptend",_.De,_.Ee,Fe,"mozaudioavailable",_.bf,_.ff,_.rf,_.Df,_.Ff,_.Qf,_.Rf,Xf,"suspend",_.ng,"volumechange",_.Ng,_.Og,_.Kf,Tg,Sg,Qg,Rg];_.Eu=class extends _.Bu{constructor(a){super();this.log=new _.S(a);this.configuration=this.ba=_.Ml();this.ga=this.F=null;this.hd=this.Se=!1;this.uf=new _.S("clpp.video.events");this.pb=null;this.Qd=-1;this.Kg=this.Hg.bind(this);this.Oe=new _.Dr;this.M=new _.Rt;this.He=this.Gc=this.Lc=this.O=null}init(a,b){this.configuration=this.ba=b;this.F=a;this.log.info("Initializing Player surface");a=this.F.getMedia();this.log.info("Attaching media element listeners");for(const c of Du)this.M.on(a,c,this.Kg,
406
+ c!==_.r);this.pb||(this.pb=this.Ag());this.pb.initialize(this);this.F.showMediaElement()}release(){this.O&&(this.O.destroy(),this.O=null);return Promise.resolve()}destroy(){this.M.release();return this.Oe.release()}canPlay(a,b){return _.Hh[this.namespace()].canPlay(a,b)}getTimeline(){return null}setupPlaylist(){return Promise.reject(_.nb)}appendLoad(){return Promise.reject(_.nb)}seekWith(){return Promise.reject(_.nb)}detach(){return Promise.resolve()}setSeekInterceptor(){}setPlaybackSessionId(){}getBandwidthEstimate(){return null}play(){if(!this.ga)return Promise.reject("No sources specified yet. You need to load content before calling play.");
407
+ const a=this.F.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||""};Il(c)?(this.trigger(new _.D(_.Xc)),this.log.warn(_.ja)):c.name===ob&&this.log.warn('Unrecognized "NotAllowedError" on play(). '+`${b.name}: ${b.message}`);throw b;})}pause(){return this.ga?new Promise((a,b)=>{const c=this.getState();if(c!==_.cp&&c!==_.Zo&&c!==_.jp&&c!==_.ip)b(new _.I(_.F,7,3201,"The player state does not allow pause."));
408
+ else if(this.F.getMedia().pause(),this.getState()===_.jp)this.M.one(this,_.Zf,()=>{a()});else a()}):Promise.reject(new _.I(_.F,7,3201,"No sources specified yet. You need to load content before calling pause."))}isPaused(){return this.F.getMedia().paused}isEnded(){return this.F.getMedia().ended}getConfiguration(){return this.configuration}setDrmCustomDataModifier(a){this.Lc=a}setCdnErrorCallback(a){this.Gc=a}Oc(){return this.Lc}getSurface(){return this.F}getBufferInfo(a){const b=this.getSurface().getMedia();
409
+ return new _.Au(b?b.buffered:void 0,a)}getPosition(){return this.getMediaPosition()}getMediaPosition(){const a=this.F.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.F.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)?
410
+ (this.log.info("Skip seek. Delta "+Math.abs(d)+" \x3c 0.1"),Promise.resolve()):new Promise((e,f)=>{const g=()=>{this.trigger(new _.D(_.Bg));this.M.on(c,_.Qf,h);this.M.on(c,_.ng,h);this.M.on(c,_.Df,h);this.log.info("Seeking to "+a+". Delta "+d);this.hd=this.Se=!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===_.Qf,y=l.type===_.Df,A=l.type===_.ng,E=y&&u;q=v||n&&E||A&&q;this.log.debug("Checking seeking state after "+
411
+ l.type+" event. Seek completed:",q,"Current Time:",m,"Target Time:",a,"Native Event:",v,"Time reached",n,"Timeupdate:",A,"Progress:",y,"ReadyState:",u,"Progress Ready:",E);q?(this.hd=this.Se=!1,this.M.off(c,_.Qf,h),this.M.off(c,_.ng,h),this.M.off(c,_.Df,h),this.tf(),this.trigger(new _.D(_.Ag)),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.M.one(c,_.Ee,g)};this.getState()===_.gp?
412
+ (this.log.debug("Player is in IDLE state. Postpone seek."),this.M.one(this,_.Zf,()=>{switch(this.getState()){case _.cp:case _.jp:case _.ip:this.log.debug("Valid seek state reached.");k();break;default:this.log.warn("Invalid seek target state. Aborting seek"),f()}})):k()})}getVolume(){const a=this.F.getMedia();if(a)return a.volume;this.log.warn("No media element available, can not report volume!");return null}setVolume(a){const b=this.F.getMedia();b?_.sh(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
413
+ 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.F.getMedia().muted}setMuted(a){const b=this.F.getMedia();typeof a===_.Zc&&(b.muted=a)}getDuration(){return this.getMediaDuration()}getMediaDuration(){return this.ga?this.F.getMedia().duration:-1}getTrackManager(){return this.pb}getPlaybackRate(){const a=this.F.getMedia();return a&&a.playbackRate||
414
+ 1}setPlaybackRate(a){const b=this.F.getMedia();void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.Qd=a}getSourceIndex(){return this.Qd}getLoadedSource(){return this.ga&&-1!==this.Qd?this.ga[this.Qd]:null}getPeriods(){return[]}getNetworkEngine(){return this.Oe}setNetworkEngine(a){this.Oe=a}setCmsdManager(a){this.He=a}getTextDisplayer(){return this.O}getTimelineCues(){return[]}getCueTimeline(){return null}resetAbr(){}Hg(a){var b=this.getSurface().getMedia();const c=this.getPosition();let d="Received Video Element Event: '"+
415
+ a.type+"' with playhead at: "+c;if(a.type===_.ng||a.type===_.Df)this.uf.debug(d);else{let e="";switch(a.type){case _.Ff:e=`Rate: ${this.getPlaybackRate()}`;break;case ee:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.ff:case _.rf:case "suspend":case _.Ng:case Xf:case _.Rf:case _.Qf:case _.ng:case _.Df:case bd:case dd:b=this.getBufferInfo().Ca(c);e=`State ${this.getSurface().getMedia().readyState} `+`Buffer: ${b}`;
416
+ break;case _.Kf:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+e);this.uf.info(d)}a.type!==_.r&&this.trigger(new _.D(a.type,{detail:a}))}tf(){}};var Sl;Sl=new _.S("clpp.Components");_.Ql=new Map;_.z("clpp.install",function(a){$l(a)});_.z("clpp.uninstall",function(a){am(a)});var Fu=class{constructor(){this.a=this.f=null;this.g=new _.S("clpp.drm.csl")}release(){this.a=this.f=null}};_.z("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.Ab,SW_SECURE_DECODE:_.Bb,HW_SECURE_CRYPTO:Wa,HW_SECURE_DECODE:Xa,HW_SECURE_ALL:Va});_.z("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.z("clpp.drm.KeySystem",{NONE:_.Qe,CLEAR_KEY:_.$e,WIDEVINE:_.Jd,PLAYREADY:_.Hd,FAIRPLAY:_.Dd,PRIMETIME:_.Cd});_.dm={};_.z("clpp.drm.registerDrmEnvironment",_.em);var hm={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,
404
417
  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,
405
418
  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,
406
419
  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,
@@ -414,99 +427,100 @@ break;case _.Df:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=".
414
427
  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,
415
428
  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,
416
429
  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,
417
- 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]};_.ou=class{constructor(a){this.I=a;this.f={}}Ya(a,b){this.f[a]=b}};_.z("clpp.drm.DrmEnvironment",_.ou);_.ou.prototype.setDrmSystem=_.ou.prototype.Ya;_.zm=class{constructor(a,b){b=void 0===b?!1:b;this.f=_.gh(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.h=b;this.buffer=this.f.buffer}getPosition(){return this.a}Pa(){return this.f.byteLength}seek(a){(0>a||a>=this.f.byteLength)&&_.bm();this.a=a}};_.rn=class{constructor(a,b){this.f=a;this.h=void 0===b?!0:b;this.a=0}getPosition(){return this.a}Pa(){return this.f.byteLength}skip(a){this.a+a>this.f.byteLength&&_.em();this.a+=a}seek(a){if(0>a||a>=this.f.byteLength)throw _.em();this.a=a}};
418
- _.z("clpp.utils.dataview.DataViewReader",_.rn);_.um=class{constructor(){this.h=[];this.f=[];this.a=!1;this.g=new _.S("clpp.mp4")}N(a,b){a=lm(a);this.h[a]=pu;this.f[a]=b;return this}ca(a,b){a=lm(a);this.h[a]=qu;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.K(a);a=new _.rn(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.dm(a)&&!this.a;)this.Xd(0,a,b)}Xd(a,b,c){const d=b.getPosition();let e=_.P(b);var f=_.P(b);let g=!1;this.g.debug("Parsing MP4 box",_.mm(f));switch(e){case 0:e=b.Pa()-d;break;case 1:e=_.im(b),g=!0}const h=
419
- this.f[f];if(h){let m=null;var k=null;this.h[f]===qu&&(k=_.P(b),m=k>>>24,k&=16777215);f=b.getPosition()-d;var l=d+e;c&&l>b.Pa()&&(l=b.Pa());l-=b.getPosition();b=0<l?_.km(b,l):new Uint8Array(0);b=new _.rn(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.Pa()-b.getPosition()),b.skip(a)}};_.z("clpp.utils.Mp4Parser",_.um);_.um.typeToString=_.mm;
420
- _.um.allData=_.pm;_.um.sampleDescription=_.om;_.um.children=_.nm;_.um.prototype.parseNext=_.um.prototype.Xd;_.um.prototype.parse=_.um.prototype.parse;_.um.prototype.stop=_.um.prototype.stop;_.um.prototype.fullBox=_.um.prototype.ca;_.um.prototype.box=_.um.prototype.N;_.um.headerSize=_.qm;var pu=0,qu=1;var ru=class{};_.z("clpp.utils.FairplayUtils",ru);ru.parseFairPlayResponse=_.Cm;ru.formatFairPlayRequest=_.Bm;ru.createFairplayPayload=Am;ru.extractContentId=_.tm;ru.extractExtXKeyUri=rm;var Im=new _.S("clpp.drm.DrmToday"),Sm="PRODUCTION",Tm="STAGING",Um="DEMO",Vm="TEST",su={PRODUCTION:Sm,STAGING:Tm,DEMO:Um,TEST:Vm};_.z("clpp.drm.DrmToday.Environment",su);_.z("clpp.drm.DrmToday.WidevineCertificates",{V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"});
421
- var Em="/license-proxy-widevine/cenc/",Fm="/license-proxy-headerauth/drmtoday/RightsManager.asmx",Gm="/license-server-fairplay/",Wm={"00000":"Success","01000":"General Internal Error","02000":"General Request Error","03000":"General Request Authentication Error",10001:"Bad Request",3E4:"General DRM error",4E4:"General Widevine Modular error",40001:"Widevine Device Certificate Revocation (wv 127)",40002:"Widevine Device Certificate Revocation - Permanently (wv 175)",41E3:"General Widevine Classic error",
422
- 42E3:"General Playready error",43E3:"General Fairplay error",44E3:"General OMA error",44001:"OMA Device registration failed",45E3:"General CDRM error",45001:"CDRM Device registration failed",6E4:"CSL",60001:"CSL - INVALID",60100:"CSL - Denied by Stream Limiting",7E4:"General Output Protection",70001:"All keys filtered by EOP settings",8E4:"TAKE DOWN",80001:"TAKE DOWN - Denied by Take Down",9E4:"General GBL error",90001:"License delivery prohibited in your region"},tu=[Ua,Wa,Va,_.Cb,_.Bb],uu=[Ua,Wa,
423
- Va,_.Cb,_.Bb],vu=["3000","2000","150"],wu=["2000","150"];
424
- for(const a of Object.keys(su)){let b=wa;a!==Sm&&(b+=`_${a}`);const c=new _.ou(b);let d=null;switch(a){case Sm:case Tm:case Um:d=am("V2");break;case Vm:d=null}c.Ya(_.Cd,{licenseUrl:Hm(_.Cd,a),videoRobustness:tu,audioRobustness:uu,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:d,modifiers:{licenseRequest:_.Km,licenseResponse:_.Lm}});c.Ya(_.wd,{licenseUrl:Hm(_.wd,a),certificateUrl:Dm(a)+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.Nm,licenseResponse:_.Om,
425
- extractContentId:_.Pm,certificateRequest:_.Qm}});c.Ya(_.Ad,{licenseUrl:Hm(_.Ad,a),videoRobustness:vu,audioRobustness:wu,modifiers:{licenseRequest:Rm}});_.Xl(c)};_.xu=class{constructor(a){this.f=a;this.a=void 0}value(){void 0===this.a&&(this.a=this.f());return this.a}};var zu=class{constructor(){this.size=0;this.a=void 0;this.g=new _.S("clpp.drm.eme.MediaKeyStatusMap")}getStatus(){return this.a}forEach(a){this.a&&a(this.a,yu.value())}get(a){if(this.has(a))return this.a}has(a){const b=yu.value();return this.a&&Ji(a,b)?!0:!1}entries(){}keys(){}values(){}},yu=new _.xu(()=>Pi(new Uint8Array([0])));var $m=new _.xu(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.xe],[HTMLMediaElement.HAVE_CURRENT_DATA,_.we],[HTMLMediaElement.HAVE_FUTURE_DATA,Xc],[HTMLMediaElement.HAVE_ENOUGH_DATA,Yc]]));var Bu=class{constructor(){this.j=this.w=null}l(a){this.w=a}h(a){const b=this.j;b&&b!==a&&bn(b,null);return(this.j=a)?bn(a,this.w):Promise.resolve()}o(){return this.j}a(a,b){_.th("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new Au(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return Nn}},Au=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.wd))for(var c of b){a:{a=c;if(a.persistentState===_.Cf){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
426
- persistentState:_.Se,distinctiveIdentifier:_.Se,initDataTypes:a.initDataTypes,sessionTypes:[Zf],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),
427
- e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.vg));a=e?b:null}if(a){this.a=a;return}}c=Error(Pb);c.name=pb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new Cu(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.th("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},Cu=class{constructor(a){this.f=null;this.h=new WebKitMediaKeys(a);this.a=new _.xt;this.j=0;this.g=new _.S(od);this.g.info("Created Media Keys for "+a)}createSession(a){a=
428
- void 0===a?Zf:a;this.g.debug("Creating Apple MediaKeys Session");if(a!==Zf)throw new TypeError("Session type "+a+ba);return new Du(this.h,`__session_${this.j++}`)}setServerCertificate(){this.g.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},Du=class extends _.ju{constructor(a,b){super();this.a=null;this.o=a;this.f=this.h=null;this.j=new _.xt;this.sessionId=b;this.expiration=NaN;this.closed=new _.hn;this.l=!1;this.keyStatuses=new zu;this.g=new _.S(od)}generateRequest(a,
429
- b){if(this.l)return Promise.reject(Eb);this.g.debug("generateRequest");this.h=new _.hn;try{const c=this.o.createSession(_.vg,_.K(b));this.a=c;this.sessionId=c.sessionId||this.sessionId||"";this.j.on(c,Gg,d=>{{const e=this.keyStatuses.getStatus();this.g.debug(`Received Key Message in ${this.sessionId}`);this.h&&(this.h.resolve(),this.h=null);d=new _.E(_.Ce,{messageType:void 0===e||e===Tf?oe:ne,message:Pi(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,Eg,d=>{this.g.debug("onWebkitKeyAdded_",
430
- d);this.f&&(cn(this,"usable"),this.f.resolve(),this.f=null)});this.j.on(c,Fg,()=>{var d=this.keyStatuses.getStatus();if(this.a&&this.a&&this.a.error&&this.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&d===Tf)this.g.warn(`Ignoring webkit key error for session ${this.sessionId}`);else if(this.g.error(`Received key error in session ${this.sessionId} `+`with code ${this.a.error.code}. `+`Session Status ${d}.`),d=Error("EME AppleEmeManager key error"),d.errorCode=this.a.error,null!==this.h)this.h.reject(d),
431
- this.h=null;else if(null!==this.f)this.f.reject(d),this.f=null;else switch(this.a.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:cn(this,"output-not-allowed");break;default:cn(this,_.ke)}});cn(this,Tf)}catch(c){this.h.reject(c)}return this.h}load(){this.g.debug(_.se);return Promise.reject(Error("MediaKeySession.load not yet supported"))}update(a){if(this.l)return Promise.reject(Eb);this.g.debug(hg);this.f=new _.hn;try{this.a.update(_.K(a))}catch(b){this.f.reject(b)}return this.f}close(){if(this.l)return this.closed;
432
- this.g.info(`Closing Key Session ${this.sessionId}`);this.l=!0;try{this.a.close(),this.closed.resolve(),_.Ah(this.j)}catch(a){this.closed.reject(a)}return this.closed}remove(){this.g.debug("remove");return Promise.reject(Error("MediaKeySession is only applicable for persistent licenses, which are not supported on this platform"))}},Eu=class{a(){return Nn}f(){return!!window.WebKitMediaKeys}create(){return new Bu}};var Fu=class{constructor(){this.j=null;this.g=new _.S("clpp.drm.eme.StandardEmeManager")}l(a){this.j=a}h(a){return this.j?this.j.setMediaKeys(a):Promise.reject(fb)}o(){return this.j&&this.j.mediaKeys}a(a,b){this.g.info("Requesting media key system access for",a,b.map(c=>Object.assign({},c,{drmInfos:c.drmInfos.map(()=>"_anonymous_")})));return navigator.requestMediaKeySystemAccess(a,b).catch(c=>{this.g.info("Failed to request media key system access for "+`${a}.`,c);return Promise.reject(c)})}f(){return ro}},
433
- Gu=class{a(){return ro}f(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new Fu}};var Ju=class{constructor(){this.w=this.j=null;this.A="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.A="webkit")}l(a){this.j=a}h(a){_.th("WebkitEmeManager.setMediaKeys");if(!this.j)return Promise.reject(fb);const b=this.w;b&&b!==a&&fn(b,null);(this.w=a)&&fn(a,this.j);return Promise.resolve()}o(){return this.w}a(a,b){_.th("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=
434
- new Hu(this.A,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return Iu}},Hu=class{constructor(a,b,c,d){this.h=a;this.a=this.keySystem=c;a=!1;c===_.Te&&(this.a=Dg,a=!1);let e=!1;for(const g of d){d=[];var f=[];let h=!1;if(g.audioCapabilities)for(const k of g.audioCapabilities)k.contentType&&(h=!0,b.canPlayType(k.contentType.split(";")[0],this.a)&&(d.push(k),e=!0));if(g.videoCapabilities)for(const k of g.videoCapabilities)k.contentType&&(h=!0,b.canPlayType(k.contentType,this.a)&&
435
- (f.push(k),e=!0));h||(e=b.canPlayType(_.vg,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.Cf||a||(e=!1);if(e){this.f=g;return}}b=Pb;if(c===_.Te||c===_.Cd)b="None of the requested configurations were supported.";c=Error(b);c.name=pb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){return Promise.resolve(new Ku(this.h,this.a))}getConfiguration(){return this.f}},Ku=class{constructor(a,b){this.h=a;this.o=b;this.a=null;this.f=new _.xt;this.j=[];this.l=new Map}createSession(a=
436
- Zf){if(a!==Zf&&a!==_.Xe)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=Za,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new Lu(this.h,this.a,this.o,a);this.j.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},Lu=class extends _.ju{constructor(a,b,c,d){super();this.w=a;this.j=b;this.o=!1;this.a=this.f=null;this.h=c;this.l=d;this.sessionId="";this.expiration=NaN;this.closed=new _.hn;this.keyStatuses=
437
- new zu}ready(){_.th("WebkitEmeManager.MediaKeySession.ready");en(this,"usable");this.a&&this.a.resolve();this.a=null}generateRequest(a,b){_.th("WebkitEmeManager.MediaKeySession.generateRequest");return jn(this,b,null)}load(a){_.th(Ub);return this.l===_.Xe?jn(this,null,a):Promise.reject(Error(mb))}update(a){_.th(Ub);const b=new _.hn;kn(this,b,a);return b}close(){_.th("WebkitEmeManager.MediaKeySession.close");if(this.l!==_.Xe){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),
438
- this.closed;const a=gn(this,"cancelKeyRequest");try{this.j[a](this.h,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed}remove(){_.th("WebkitEmeManager.MediaKeySession.remove");return this.l!==_.Xe?Promise.reject(Error(mb)):this.close()}},Mu=class{a(){return Iu}f(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new Ju}};var Ou=class{l(){}h(a){_.th("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}o(){return null}a(){_.th("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return Nu}},Pu=class{a(){return Nu}f(){return!0}create(){return new Ou}};var Qu=class{};_.z(pd,Qu);var mn=new _.S(pd),ln=[];ln=[new Gu,new Eu,new Mu,new Pu].filter(a=>a.f());var ro="STANDARD",Nn="APPLE",Iu="WEBKIT",Nu="NOP";Qu.Apis={STANDARD:ro,APPLE:Nn,WEBKIT:Iu,NOP:Nu};_.Ru=class{h(a,b){a=this.a(a,b);return 1!==a.length?null:a[0]}a(a,b){return Array.from(a.childNodes).filter(c=>c instanceof Element&&c.tagName===b)}getAttributeNS(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}f(a){return Array.from(a.childNodes).every(b=>b.nodeType===Node.TEXT_NODE||b.nodeType===Node.CDATA_SECTION_NODE)?a.textContent.trim():null}j(a,b){const c=new DOMParser;let d=null;try{d=c.parseFromString(a,_.ag)}catch(e){}if(!d)return null;a=d.documentElement;return b&&a.tagName!==
439
- b||0<d.getElementsByTagName("parsererror").length?null:a}removeChild(a,b){a.removeChild(b)}};_.Og=_.Ru.prototype;_.Og.td=_.Qg(19);_.Og.Zd=_.Qg(17);_.Og.Qd=_.Qg(15);_.Og.Rd=_.Qg(13);_.Og.Yd=_.Qg(11);_.Og.Ac=_.Qg(9);_.Og.Ed=_.Qg(7);_.Og.Y=_.Qg(5);_.Og.lc=_.Qg(3);_.Og.Lb=_.Qg(1);_.un=new _.Ru;_.Su=new _.S("clpp.xml.Parser");_.Dl="dom";var pn,Tu,on;_.yn=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];pn=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];Tu=class{constructor(a,b,c){this.j=new Uint8Array(a);this.a=b;this.f=c}};on=class extends Tu{};_.xn=class extends Tu{constructor(a,b,c,d,e,f){f=void 0===f?null:f;super(a,b,d);this.version=e;this.h=c;this.l=f}};var An=!!(performance&&performance.mark&&performance.measure);var eo=class{constructor(a){this.f=[];this.h=[];this.a=[];8<=a.byteLength&&(new _.um).ca("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=_.ij(_.km(a.reader,16)),c=[];if(0<a.version){var d=_.P(a.reader);for(let e=0;e<d;++e){const f=_.ij(_.km(a.reader,16));c.push(f)}}d=_.P(a.reader);a.reader.skip(d);this.h.push.apply(this.h,c);this.f.push(b);this.a.push({start:a.start,end:a.start+a.size-1});
440
- a.reader.getPosition()!==a.reader.Pa()&&_.C("Mismatch between box size and data size!")}}};var Zn,Uu;
441
- _.jp=class{constructor(a,b){this.D=a;this.Ga=b;this.J=new Set;this.C=this.I=this.l=null;this.S=!1;this.a=null;this.K=Uu;this.B=new _.xt;this.M=new nu;this.h=new Map;this.L=[];this.H=new _.hn;this.fa=0;this.f=null;this.w=c=>{this.A=!0;this.F=!1;this.H.reject(c);a.onError(c)};this.o=new Map;this.X=new Map;this.V=new _.Ck(()=>Qn(this));this.j=!1;this.da=new _.hn;this.G=!1;this.W=[];this.aa=!1;this.R=0;this.g=new _.S("clpp.drm.DrmEngine");this.Z=(new _.Ck(()=>{Rn(this)})).yb(1);this.H.catch(()=>{});this.A=
442
- this.F=!1;this.O=null}destroy(){const a=this;return _.x(function*(){a.j?yield a.da:(a.j=!0,yield Sn(a),a.da.resolve())})}keySystem(){return this.a?_.Fn(this.a.keySystem):""}getDrmInfo(){return this.a}Aa(a){const b=this;return _.x(function*(){b.G&&b.K===Zn||(!b.f.delayLicenseRequestUntilPlayed||b.C&&!b.C.paused||b.aa?yield jo(b,a):b.W.push(a))})}za(a){const b=a.target;this.g.info("Key status changed for session",b.sessionId);const c=this.h.get(b);let d=!1;b.keyStatuses.forEach((e,f)=>{if(typeof f===
443
- _.Vf){var g=f;f=e;e=g}if(En(this.a.keySystem)&&16===f.byteLength&&_.Ek()){g=_.Oi(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!==Tf&&(c.loaded=!0);c&&c.eb&&c.eb.resolve();"expired"===e&&(d=!0);f=_.K(f);let h=_.ij(f);"00"===h&&c&&c.keyId?h=c.keyId:this.a.keySystem.startsWith(_.wd)&&16!==f.byteLength&&(h=Qi(f));(f=h||"")?this.g.info(`Key status for Key ID '${h}': ${e}`):this.g.info(`Key status global keys: ${e}`);
444
- this.o.set(f,e);c&&!c.keyId&&this.h.forEach((k,l)=>{l===b||k.keyId!==h||k.loaded||(k.loaded=!0)})});c&&c.loaded&&c.jb.forEach(e=>{this.o.get(e)===Tf&&(this.g.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.o.set(e,_.Ue))});for(a=0;a<this.a.initData.length;a++){const e=this.a.initData[a];e.keyId&&this.o.get(e.keyId)===Tf&&_.jj(e.initData,c.initData)&&(this.g.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.o.set(e.keyId,_.Ue))}a=b.expiration-Date.now();(0>a||d&&1E3>
445
- a)&&c&&!c.ec&&(this.g.debug("Session has expired",b.sessionId),(a=this.h.get(b))&&a.Cc&&a.Cc.stop(),this.h.delete(b),b.close().catch(()=>{}));to(this)&&(this.H.resolve(),1!==this.h.size||d?this.V.ga(.5):Qn(this))}};Zn=0;Uu=3;_.Fo=new Map;_.Go=new _.S("clpp.text");var Vu=class{constructor(){this.a=null;this.f=[]}};var Wu=class{constructor(){this.h=this.f=this.j=null;this.a=[]}};_.Xu=class{constructor(){this.f=this.o=this.A=this.C=this.j=this.l=this.h=this.w=NaN;this.a=new Vu;this.B=new Wu}getStats(){return{width:this.w,height:this.h,streamBandwidth:this.o,decodedFrames:this.j,droppedFrames:this.l,corruptedFrames:this.C,estimatedBandwidth:this.f,loadLatency:this.A,playTime:Ko(this.a,_.ap),pauseTime:Ko(this.a,_.$o),bufferingTime:Ko(this.a,_.Uo),stateHistory:Lo(this.a),switchHistory:Mo(this.B)}}};var Zu=class{constructor(a){this.g=new _.S("clpp.StateManager");this.m=a;this.a=new _.xt;this.f=_.Yo;this.A=_.Yu;this.H=0;this.w=-1;this.K=this.o=this.I=this.B=0;this.j=this.h=this.F=!1;this.G=0;this.l=null;this.J=0;this.L=_.Qk();this.C=!1;this.I=Date.now();So(this)}Ua(a,b){this.m&&this.m.trigger(new _.E(a,{detail:b}))}getState(){return Vo(this,"")}destroy(){this.g.debug("Stop watching for video events for "+this.m.namespace());this.a.release()}};_.z("clpp.utils.media.detectType",bp);var ep=new _.S("clpp.sources");var $u=class extends _.mu{constructor(){super(qd);this.w=this.G=!1;this.l=this.A=this.o=this.a=this.j=null;this.h=new _.xt;this.F=this.B=this.f=this.H=null}init(a,b){super.init(a,b);this.j=new Zu(this);Po(this.j,_.Yo)}namespace(){return qd}unload(){const a=this;return _.x(function*(){if(a.ea){a.log.debug("Releasing player with source",a.ea);a.B&&(a.B.stop(),a.B=null);const b=a.getTrackManager();b&&b.release();a.A&&(a.A.destroy(),a.A=null);a.O&&(a.O.destroy(),a.O=null);a.l&&a.l.release();a.o&&(a.o.destroy(),
446
- a.o=null);_.Ah(a.h);a.f&&(a.f=new _.Xu);a.F=null;a.ea=null;a.G=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());yield gp(a)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.j&&Po(this.j,_.Yo)})}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(ya);const a=this.getTrackManager();a&&a.destroy();this.l&&(this.l.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",
447
- b)}),this.l=null);this.j&&(this.j.destroy(),this.j=null);this.f=null})}getDrmInfo(){return this.o?this.o.getDrmInfo():null}getTrackManager(){return this.ib}load(a){const b=this;return _.x(function*(){if(b.w)return fp();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 _.Xu;b.h.on(b,_.Sf,()=>{b.f&&_.Jo(b.f.a,b.getState())});Po(b.j,_.Zo);b.ea=_.dp(a);b.configuration=_.Gl(b.da,a);b.log.debug(_.cb,
448
- b.configuration);b.log.debug(_.vb,b.ea);const d=_.Io(b.configuration,[_.ie,"native"]);b.O=d.create(b);b.O.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.Jl(_.Yf)&&!_.Sk()&&(b.A=new Lt(b),b.A.start(c));b.l?b.l.release():b.l=new yt(b);c.textTracks&&Zh(b.l,c.textTracks);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.B(b.configuration.volume)||b.setVolume(b.configuration.volume);_.B(b.configuration.muted)||b.setMuted(b.configuration.muted);b.h.one(c,Xc,()=>{b.trigger(new _.E(_.hu))});
449
- null==b.configuration.startTime&&pp(b,c);_.Qk()&&qp(b,c);try{yield ip(b,c),yield lp(b),yield op(b).U}catch(e){b.G=!1,b.onError(e)}})}onError(a){this.G||(a.severity===_.F&&null!==this.j&&Po(this.j,_.Ro),this.trigger(new _.E(_.r,{detail:a})))}sg(){return new U}getState(){return null!==this.j?this.j.getState().currentState:_.Yu}getPresentationStartTime(){if(this.a&&this.a.getStartDate&&this.isLive()){const a=this.a.getStartDate();return isNaN(a.getTime())?null:a.getTime()/1E3}return null}getSeekRange(){var a=
450
- 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 _.No();this.f&&_.Jo(this.f.a,this.getState());var a=this.a,b=this.f,c=a.videoHeight;b.w=a.videoWidth;b.h=c;a.getVideoPlaybackQuality&&(c=a.getVideoPlaybackQuality(),a=this.f,b=Number(c.totalVideoFrames),a.l=Number(c.droppedVideoFrames),
451
- a.j=b,this.f.C=Number(c.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.la())a.bandwidth&&(this.f.o=a.bandwidth),a.Pc&&(this.f.f=a.Pc);return this.f.getStats()}getTimelineCues(){return this.l?this.l.getTimelineCues():[]}getCueTimeline(){return null}};
452
- _.xh(new class{a(){return qd}canPlay(a,b){a=a.type||"";const c=a===_.Fc,d=a===_.Kc,e=a===_.xl;var f;_.Pk()||c||d||e&&!_.Qk()?f=0:f=""!==Dk().canPlayType(a)?e&&_.Qk()&&(window.ManagedMediaSource||window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}f(a){return a===_.ma}create(){return new $u}});_.z("clpp.ads.PodType",{PREROLL:0,MIDROLL:1,POSTROLL:2});_.z("clpp.ads.Technology",{CLIENT_SIDE:0,SERVER_SIDE:1,SERVER_GUIDED:2});_.z("clpp.ads.ErrorType",{LOAD:0,PLAY:1,OTHER:2});var sp=new _.S("clpp.ads"),rp=[];var av=class{load(){}start(){}o(){}resume(){}pause(){}skip(){}getVolume(){}setVolume(){}getPosition(){}h(){}l(){}};_.z("clpp.ads.IAdsManager",av);av.prototype.getPosition=av.prototype.getPosition;av.prototype.setVolume=av.prototype.setVolume;av.prototype.getVolume=av.prototype.getVolume;av.prototype.skip=av.prototype.skip;av.prototype.pause=av.prototype.pause;av.prototype.resume=av.prototype.resume;var V=class{lb(){}nb(){}qb(){}getId(){}getCreativeId(){}Nb(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getPosition(){}getSkipTimeOffset(){}Qb(){}ob(){}getMediaUrl(){}bb(){}ab(){}Qa(){}Ra(){}getPodIndex(){}Cb(){}Db(){}cb(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}Pb(){}};_.z("clpp.ads.IAd",V);V.prototype.getVideoElement=V.prototype.Pb;V.prototype.getWrapperCreativeIds=V.prototype.getWrapperCreativeIds;
453
- V.prototype.getWrapperAdSystems=V.prototype.getWrapperAdSystems;V.prototype.getWrapperAdIds=V.prototype.getWrapperAdIds;V.prototype.getSequenceLength=V.prototype.cb;V.prototype.getPositionInSequence=V.prototype.Db;V.prototype.getPodTimeOffset=V.prototype.Cb;V.prototype.getPodIndex=V.prototype.getPodIndex;V.prototype.getPodType=V.prototype.Ra;V.prototype.getMediaBitrate=V.prototype.Qa;V.prototype.getMediaHeight=V.prototype.ab;V.prototype.getMediaWidth=V.prototype.bb;V.prototype.getMediaUrl=V.prototype.getMediaUrl;
454
- V.prototype.getClickThroughUrl=V.prototype.ob;V.prototype.isBumper=V.prototype.Qb;V.prototype.getSkipTimeOffset=V.prototype.getSkipTimeOffset;V.prototype.getPosition=V.prototype.getPosition;V.prototype.getDuration=V.prototype.getDuration;V.prototype.getTitle=V.prototype.getTitle;V.prototype.getAdvertiserName=V.prototype.getAdvertiserName;V.prototype.getAdSystem=V.prototype.getAdSystem;V.prototype.getApiFramework=V.prototype.getApiFramework;V.prototype.getSourceId=V.prototype.Nb;
455
- V.prototype.getCreativeId=V.prototype.getCreativeId;V.prototype.getId=V.prototype.getId;V.prototype.getTechnology=V.prototype.qb;V.prototype.getAdManagerVersion=V.prototype.nb;V.prototype.getAdManagerName=V.prototype.lb;var Q=class{constructor(a,b,c,d,e){this.w=this.o=this.l=!1;this.B=a;this.a=b;this.f=c;this.h=d;this.j=0;this.A=`${e}:${b}`;this.C=e;this.videoEl=null}lb(){return""}nb(){return""}qb(){return 2}getId(){return this.A}getCreativeId(){return""}Nb(){return this.C}getApiFramework(){return null}getAdSystem(){return""}getAdvertiserName(){return""}getTitle(){return""}getDuration(){return this.h}getPosition(){return this.j}getSkipTimeOffset(){return-1}Qb(){return!1}ob(){return null}getMediaUrl(){return null}bb(){return 0}ab(){return 0}Qa(){return 0}Ra(){return this.B}getPodIndex(){return 0}Cb(){return 0}Db(){return this.a}cb(){return this.f}getWrapperAdIds(){return[]}getWrapperAdSystems(){return[]}getWrapperCreativeIds(){return[]}Pb(){return this.videoEl}};
456
- Q.prototype.getVideoElement=Q.prototype.Pb;Q.prototype.getWrapperCreativeIds=Q.prototype.getWrapperCreativeIds;Q.prototype.getWrapperAdSystems=Q.prototype.getWrapperAdSystems;Q.prototype.getWrapperAdIds=Q.prototype.getWrapperAdIds;Q.prototype.getSequenceLength=Q.prototype.cb;Q.prototype.getPositionInSequence=Q.prototype.Db;Q.prototype.getPodTimeOffset=Q.prototype.Cb;Q.prototype.getPodIndex=Q.prototype.getPodIndex;Q.prototype.getPodType=Q.prototype.Ra;Q.prototype.getMediaBitrate=Q.prototype.Qa;
457
- Q.prototype.getMediaHeight=Q.prototype.ab;Q.prototype.getMediaWidth=Q.prototype.bb;Q.prototype.getMediaUrl=Q.prototype.getMediaUrl;Q.prototype.getClickThroughUrl=Q.prototype.ob;Q.prototype.isBumper=Q.prototype.Qb;Q.prototype.getSkipTimeOffset=Q.prototype.getSkipTimeOffset;Q.prototype.getPosition=Q.prototype.getPosition;Q.prototype.getDuration=Q.prototype.getDuration;Q.prototype.getTitle=Q.prototype.getTitle;Q.prototype.getAdvertiserName=Q.prototype.getAdvertiserName;Q.prototype.getAdSystem=Q.prototype.getAdSystem;
458
- Q.prototype.getApiFramework=Q.prototype.getApiFramework;Q.prototype.getSourceId=Q.prototype.Nb;Q.prototype.getCreativeId=Q.prototype.getCreativeId;Q.prototype.getId=Q.prototype.getId;Q.prototype.getTechnology=Q.prototype.qb;Q.prototype.getAdManagerVersion=Q.prototype.nb;Q.prototype.getAdManagerName=Q.prototype.lb;var bv=class{constructor(a){this.a=a.map(b=>({videoId:b.getSurface().getMedia().id,player:b,xd:!0,ready:Promise.resolve()}));this.g=new _.S("clpp.plist.PlayerPool")}has(){return this.a.some(a=>a.xd)}get(){const a=this;return _.x(function*(){const b=a.a.find(c=>c.xd);if(!b)throw Error("No available players in the pool");b.xd=!1;yield b.ready;return b.player})}release(a){const b=this.a.find(c=>c.player===a);if(!b)return Promise.resolve();b.xd=!0;b.ready=new Promise(c=>{a.release().catch(d=>{this.g.error("Failed to unload player",
459
- d)}).then(c)});return b.ready}destroy(){const a=this;return _.x(function*(){yield Promise.all(a.a.map(b=>b.player.destroy()))})}};_.z("clpp.utils.dom.createHTMLElement",_.yp);var cv=class{constructor(a){this.a=null;this.h=new Set;this.f=null;this.set(a||null)}set(a){this.h.clear();this.f&&(this.f.disconnect(),this.f=null);if(this.a=a)this.f=zp(this,a)}get(){return this.a}};var Fp=class{constructor(a,b){this.g=new _.S("clpp.PlayerSurface");this.w=_.Zg(dv,b);this.f=new cv;this.h=null;this.a=new cv;this.l=ev;ev+=1;this.o=`clpp-video-${this.l}`;this.j=new _.xt;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.g.debug("Initializing Player Surface on ",a);if("cast-media-player"===a.tagName.toLowerCase())this.h=a;else{if(!(a instanceof
460
- HTMLMediaElement))throw new _.H(_.F,7,7005,"Media element is not instance of HTMLMediaElement");if(!a.hasAttribute("crossorigin")){var c=b.crossorigin;this.g.info("Setting media elements crossorigin to "+c);a.setAttribute("crossorigin",c)}this.f.set(a);if(b.disableContainer)var d=null;else if(b.containerEl){if(a.parentNode!==b.containerEl)throw new _.H(_.F,7,7006,"Container element is not a direct parent of media element");d=b.containerEl}else{c=document.createElement(_.Ld);a.parentNode?a.parentNode.replaceChild(c,
461
- a):this.g.warn("Player Surface Element has no parent. Can not inject container. You have to manually add playerSurface.getContainer() to the DOM!");var e=[];for(let g=0;g<a.classList.length;g++)e.push(a.classList[g]);for(var f of e)a.classList.remove(f),_.wp(c,f);c.style.cssText=a.style.cssText;a.removeAttribute(_.Xf);for(d of[_.Ig,_.ge])f=a.getAttribute(d),f=parseInt(f,10),isNaN(f)||(c.style[d]=`${f}px`),_.Gk()||a.removeAttribute(d);c.appendChild(a);d=c}d&&(this.a.set(d),Ap(this.a,"clpp-container"),
462
- Ap(this.a,this.o),Ap(this.f,_.id),Ap(this.f,"clpp-video"));b.webOSStartupPatch&&Bp(this,a,d)}}getMedia(){return this.f.get()}getContainer(){return this.a.get()}getSafeContainer(){return this.a}getId(){return this.l}getUniqueCssClass(){return this.o}getCastElement(){return this.h}isFullscreen(){return!!document.fullscreenElement}hideMediaElement(){const a=this.getMedia();a?_.wp(a,jd):this.g.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove(jd):
463
- this.g.debug("No media element available that could be shown")}addElementToContainer(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;const d=this.getContainer();if(!d)throw Error("No container is available. Unable to add element");b&&_.wp(a,_.id);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){_.wp(a,jd)}show(a){a.classList.remove(jd)}release(){this.j.release()}};
464
- Fp.prototype.removeElementFromContainer=Fp.prototype.removeElementFromContainer;Fp.prototype.addElementToContainer=Fp.prototype.addElementToContainer;Fp.prototype.getCastElement=Fp.prototype.getCastElement;Fp.prototype.getContainer=Fp.prototype.getContainer;Fp.prototype.getMedia=Fp.prototype.getMedia;var dv={disableContainer:!1,webOSStartupPatch:!0,crossorigin:"anonymous",containerEl:null},ev=1;var fv=class{constructor(a){this.ua=a;this.o=!!a.sideAdContainer;this.h=[];this.f=a.ig;this.B=Ep(a);this.A=[];const b=Gp(this,this.B,this.ua.Tg);this.l=new bv(b);this.a=null;this.w=!1;this.j=new Map;this.C=a.toggleVisible;this.g=new _.S("clpp.interstitial.MultiController");Hp(this).forEach(c=>Ip(this,c,!1))}getCurrentItem(){return this.a}Fd(){return this.a?this.a.player:null}Lf(){return Array.from(this.j.values())}dd(){return 0<this.j.size}play(a){return Wp(this,a,_.Ze)}load(a){return Wp(this,a,_.se)}release(){const a=
465
- this;return _.x(function*(){yield Promise.all([Up(a),a.a?Tp(a,a.a):Promise.resolve()]);a.a=null;a.w=!1;Lp(a)})}destroy(){const a=this;return _.x(function*(){a.g.info("Destroy");yield a.release();yield a.l.destroy();fq(a)})}},$p="preload",Xp=_.ze;var gv=class extends _.ju{constructor(a){super();this.ua=_.Zg({Kh:.5},a);this.g=new _.S("clpp.interstitial.Player");this.f=a.player;this.f.setSeekInterceptor(b=>{const c=jq(this,b);return c&&[qq,Dq].includes(c.state)?(this.g.info("Seeking into an interstitial",c.ja),mq(this,c).catch(()=>{this.f.seek(b)}),!1):!0});this.qa=new fv({Tg:this.ua.config,ig:a.player,preloadMedia:!0,$a:a.$a,sideAdContainer:this.ua.sideAdContainer});this.h=[];this.a=[];this.j=!1;uq(this,a.player)}destroy(){const a=this;return _.x(function*(){vq(a);
466
- a.a=[];a.j=!1;a.f.setSeekInterceptor(null);yield a.qa.destroy()})}Fb(){return this.j}isLive(){const a=this.qa.Fd();return a?a.isLive():null}Ua(a){this.f.trigger(a)}},qq=0,Eq=1,Gq=2,Hq=3,Kq=4,Jq=5,Dq=6;var vr=class{constructor(){this.a=null}load(){return Promise.resolve()}start(){return Promise.resolve()}o(a,b,c){const d=a.getConfiguration();a=Object.assign({},{config:d,player:a,$a:b},d.ads.hls||{},{Jh:c});this.a=new gv(a);Cq(this.a)}resume(){const a=wq(this.a);a&&a.play()}pause(){const a=wq(this.a);a&&a.pause()}skip(){}getVolume(){const a=wq(this.a);return a?a.getVolume()||0:0}setVolume(a){const b=wq(this.a);if(b)return b.setVolume(a)}getPosition(){const a=wq(this.a);return a?a.getPosition():-1}l(){return!this.a.Fb()}h(){return this.a.destroy()}};
467
- vr.prototype.getPosition=vr.prototype.getPosition;vr.prototype.setVolume=vr.prototype.setVolume;vr.prototype.getVolume=vr.prototype.getVolume;vr.prototype.skip=vr.prototype.skip;vr.prototype.pause=vr.prototype.pause;vr.prototype.resume=vr.prototype.resume;var hv=class{constructor(a){this.m=a;this.j=this.m.getNetworkEngine();this.a=new _.xt;this.h=null;this.f=!0;Pq(this)}release(){this.a.release();Qq(this);this.m=null}};_.z("clpp.polyfill.installAll",Tq);var Sq=[];_.z("clpp.polyfill.register",_.Uq);var Yq=class{constructor(a,b,c){this.h=a;this.f=b;JSON.parse(_.Ri(_.gj(a)));this.a=JSON.parse(_.Ri(_.gj(b)));this.j=c}};var Wq={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},Bl="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var xr=class{constructor(a){this.f=a;this.a=null;this.g=new _.S("clpp.utils.LicenseKey")}},kr="vod",jr="live";var Rr,or,rr,pr;Rr=class{constructor(a){this.m=a;this.f=a.getNetworkEngine();this.h=sr(this);this.f.xc(this.h);this.a=null}release(){this.a=null;this.f.od(this.h)}};_.iv="maxSuggestedBitrateKbps";or={du:"duress",etp:_.ce,mb:_.iv,rd:"responseDelay",rtt:"roundTripTime"};rr={at:"availabilityTime",br:"encodedBitrateKbps",ht:"heldTime",n:"intermediaryIdentifier",nor:"nextObjectResponse",nrr:"nextRangeResponse",d:"objectDuration",ot:"objectType",su:"startup",st:"streamType",sf:"streamingFormat",v:ng};
468
- pr=new _.S("clpp.net.CmsdManager");var R=class extends _.ju{constructor(a,b,c){super();Tq();this.g=new _.S("clpp.Player");if(!a)throw new _.H(_.F,7,7102);this.Z=new _.xt;this.f=this.C=b||_.El();this.l=null;void 0===this.f.license&&(this.f.license=Bl,this.g.warn("You are using the embedded demo license!"));if(!this.f.license)throw this.g.error("You provided null or empty string as your license. Please check your license configuration."),new _.H(_.F,7,7101,"No license provided in configuration!");this.j=new Fp(a,c);this.G=this.A=this.a=
469
- this.F=null;this.I=new _.lr;this.h=null;this.W=[];this.X=!0;this.K={};this.da=null;this.R=!0;this.S=this.O=!1;this.L=this.Ec=null;this.ne=!1;this.fa=new hv(this);this.B=null;this.on(_.Sf,()=>{this.getState()===_.Ro&&(this.a?this.a.unload():Promise.resolve())});this.on(_.Cc,this.aa.bind(this));this.on(_.Bc,this.aa.bind(this));this.on(_.Sh,()=>wr(this));yr(this,this.f.license);this.j.getMedia()&&(a=this.j.getMedia(),a.hasAttribute("autoplay")&&(a.removeAttribute("autoplay"),this.g.debug("Removed autoplay attribute from video element. Auto play will be handled by configuration."),
470
- void 0===this.f.autoplay&&(this.f.autoplay=!0,this.g.debug("Setting autoplay in configuration since it was specified in the video element"))));a=[];for(const d of tr)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.g.error("Error while creating player plugin",e)}Ar(this,a);this.M=_.ma;Ol(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)}Zc(a){a=
471
- this.K[a];void 0===a&&(a=null);return a}getSurface(){return this.j}getConfiguration(){return _.$g(this.f)}getDrmInfo(){return this.a?this.a.getDrmInfo():null}detach(){return this.a?this.a.detach():Promise.resolve()}release(){if(null!=this.l)return this.g.info("Player release already in progress"),this.l;this.g.debug("Releasing player");this.l=Dr(this);return this.l.finally(()=>{Er(this);this.g.debug("Player released");this.l=null})}destroy(){if(this.O)return this.g.debug("The player is already destroyed. No-op"),
472
- new Promise(a=>a());this.O=!0;return this.release().then(()=>{this.g.debug(ya);this.trigger(new _.E("destroying"));return _.zr(this,_.Oe)}).then(()=>{this.a&&this.a.stopForwardingEventsTo(this);this.Wc.clear();this.fa.release();if(this.a)return this.a.destroy()}).then(()=>this.I.destroy()).then(()=>{Rl();this.A=this.a=null;this.trigger(new _.E("destroyed"))})}load(a){const b=this;return _.x(function*(){try{_.Bn(gf);b.M=_.ma;b.X=!0;const c=_.dp(a),d=Hl(a)?a:{};if(d.license)throw new _.H(_.F,7,7100,
473
- "License cannot be passed into the load method.");yield _.Mr(b,d,c);yield _.Nr(b);yield _.Pr(b);_.Bn(ff);_.Cn("player.load",gf,ff)}catch(c){Er(b);if(b.l)throw b.g.info(bb),new _.H(_.F,7,7E3);throw c;}})}preload(a){const b=this;return _.x(function*(){yield _.Mr(b,a);if(b.a){var c=b.a;c.preload?yield c.preload(b.f):b.g.warn(xb)}else b.g.warn(ub)})}use(a){(a=Sl(a))&&a.o(this)}remove(a){return(this.getState()<=_.Yo||this.R)&&null!==Ml(a)?(Tl(a),this.S=!0):!1}play(){return this.a?!this.h||this.h instanceof
474
- vr||this.a.namespace()===_.md?this.a.play():this.h.start(this.a):Promise.reject("No player initialized. You need to load content before calling play.")}pause(){return this.a?this.a.pause():Promise.reject("No player initialized. You need to load content before calling pause.")}getTrackManager(){return this.a&&this.a.getTrackManager()}getBufferInfo(a){return this.a?this.a.getBufferInfo(a):new _.iu}getState(){return this.a?this.a.getState():_.Yo}getPeriods(){return this.a?this.a.getPeriods():[]}isEnded(){return this.a&&
475
- 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()===_.Ro?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}}oc(){const a=this.a;return a&&a.oc?a.oc():null}getVolume(){return this.a?this.a.getVolume():
476
- null}setVolume(a){this.a&&this.a.setVolume(a)}getDuration(){return this.a?this.a.getDuration():-1}getAdsManager(){return this.h}namespace(){return this.a&&this.a.namespace()||"Undefined"}getPlaybackRate(){return this.a?this.a.getPlaybackRate():1}setPlaybackRate(a,b){this.a&&this.a.setPlaybackRate(a,b)}isMuted(){return this.a&&this.a.isMuted()||!1}setMuted(a){this.a&&this.a.setMuted(a)}getNetworkEngine(){return this.I}setNetworkEngine(a){this.I=a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&
477
- this.a.isLive()}getStats(){return this.a?this.a.getStats():null}Pf(){return Object.freeze(this.da)}getLoadedSource(){return this.a&&this.a.getLoadedSource()}getTimelineCues(){return this.a?this.a.getTimelineCues():[]}getCueTimeline(){return this.a?this.a.getCueTimeline():null}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.Ec=a;Jr(this)}setCdnErrorCallback(a){this.L=a;this.a&&this.a.setCdnErrorCallback(this.L)}aa(){this.ne=!0}};_.z("clpp.Player",R);R.registerPlugin=_.ur;
478
- R.prototype.setCdnErrorCallback=R.prototype.setCdnErrorCallback;R.prototype.setDrmCustomDataModifier=R.prototype.setDrmCustomDataModifier;R.prototype.resetAbr=R.prototype.resetAbr;R.prototype.getTimelineCues=R.prototype.getTimelineCues;R.prototype.getLoadedSource=R.prototype.getLoadedSource;R.prototype.getSources=R.prototype.Pf;R.prototype.getStats=R.prototype.getStats;R.prototype.isLive=R.prototype.isLive;R.prototype.getTextDisplayer=R.prototype.getTextDisplayer;R.prototype.setNetworkEngine=R.prototype.setNetworkEngine;
479
- R.prototype.getNetworkEngine=R.prototype.getNetworkEngine;R.prototype.setMuted=R.prototype.setMuted;R.prototype.isMuted=R.prototype.isMuted;R.prototype.setPlaybackRate=R.prototype.setPlaybackRate;R.prototype.getPlaybackRate=R.prototype.getPlaybackRate;R.prototype.namespace=R.prototype.namespace;R.prototype.getAdsManager=R.prototype.getAdsManager;R.prototype.getDuration=R.prototype.getDuration;R.prototype.setVolume=R.prototype.setVolume;R.prototype.getVolume=R.prototype.getVolume;
480
- R.prototype.getTimelineOffset=R.prototype.oc;R.prototype.getSeekRange=R.prototype.getSeekRange;R.prototype.getPresentationStartTime=R.prototype.getPresentationStartTime;R.prototype.seek=R.prototype.seek;R.prototype.getPosition=R.prototype.getPosition;R.prototype.isPaused=R.prototype.isPaused;R.prototype.isEnded=R.prototype.isEnded;R.prototype.getState=R.prototype.getState;R.prototype.getBufferInfo=R.prototype.getBufferInfo;R.prototype.getTrackManager=R.prototype.getTrackManager;
481
- R.prototype.pause=R.prototype.pause;R.prototype.play=R.prototype.play;R.prototype.remove=R.prototype.remove;R.prototype.use=R.prototype.use;R.prototype.load=R.prototype.load;R.prototype.destroy=R.prototype.destroy;R.prototype.release=R.prototype.release;R.prototype.getDrmInfo=R.prototype.getDrmInfo;R.prototype.getConfiguration=R.prototype.getConfiguration;R.prototype.getSurface=R.prototype.getSurface;R.prototype.getPlugin=R.prototype.Zc;R.prototype.off=R.prototype.off;R.prototype.one=R.prototype.one;
482
- R.prototype.on=R.prototype.on;_.Yo=0;_.Zo=1;_.Uo=2;_.ap=3;_.$o=4;_.Qo=5;_.Ro=6;_.Yu=7;_.Xo={IDLE:_.Yo,PREPARING:_.Zo,BUFFERING:_.Uo,PLAYING:_.ap,PAUSED:_.$o,ENDED:_.Qo,ERROR:_.Ro,UNSET:_.Yu};R.State=_.Xo;var tr=[];var jv=class extends R{constructor(a,b,c){super(a,b,c);a={manifest:{timeline:{version:2},keepTimelineLive:!0},streaming:{preferNativeHlsOnSafari:!1,enableLiveEdgeChasing:!1,startAtSegmentBoundary:!1}};this.C=_.Zg(this.C,a);this.f=_.Zg(this.f,a);this.H=0;this.o=[];this.V=!1;this.w=null;this.J=[]}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.");
483
- if(0===b.length)throw new _.H(_.F,7,7003,kb);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,
484
- 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{Tr(c),c.w="open",yield Wr(c,b),c.H=0,c.o=b,c.V=!0,Xr(c,b[0].playlist||{})}finally{c.w=null}})}Dg(a){const b=this;return _.x(function*(){if(b.w)throw new _.H(_.F,7,7008,`Cannot call addItem() while ${b.w}() is ongoing!`);
485
- if(!b.V)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 Yr(b,a)}finally{b.w=null}})}getCurrentItem(){return this.o[this.H]||null}getCurrentItemIndex(){return this.H}jh(){return[...this.o]}$c(){return this.o.length}getTimeline(){return this.a?
486
- this.a.getTimeline():null}seekWith(a){return this.a?this.a.seekWith(a):Promise.resolve()}release(){this.o=[];this.H=0;this.V=!1;return super.release()}destroy(){Tr(this);return super.destroy()}setCdnErrorCallback(){throw new _.H(1,7,7009,"CDN switching is not supported!");}};_.z("clpp.plist.ScPlaylist",jv);jv.prototype.setCdnErrorCallback=jv.prototype.setCdnErrorCallback;jv.prototype.destroy=jv.prototype.destroy;jv.prototype.release=jv.prototype.release;jv.prototype.seekWith=jv.prototype.seekWith;
487
- jv.prototype.getTimeline=jv.prototype.getTimeline;jv.prototype.getSize=jv.prototype.$c;jv.prototype.getPlaylist=jv.prototype.jh;jv.prototype.getCurrentItemIndex=jv.prototype.getCurrentItemIndex;jv.prototype.getCurrentItem=jv.prototype.getCurrentItem;jv.prototype.addItem=jv.prototype.Dg;jv.prototype.open=jv.prototype.open;var kv=class extends _.ju{constructor(a){super();this.ua=_.Zg({transition:_.Ve,preloadMedia:!1},a);this.h=[];this.a=0;const b=Zr(a.anchorId,this.ua.config);this.o=new bv(b);this.f=null;this.j=!1;this.l=new Map;this.w=a.toggleVisible;this.g=new _.S(rd);this.o.a.forEach(c=>$r(this,c.player,!1))}Yc(){return this.f}Fd(){return this.f?this.f.player:null}Kf(){return this.l.get(this.a+1)||null}Mf(){return this.l.get(this.a-1)||null}Lf(){return[this.Mf(),this.Kf()].filter(Boolean)}Xh(a){if(0<this.h.length)throw Error("Cannot re-set items in the playlist");
488
- this.g.info("Set items",a);this.h=a.map((b,c)=>({config:b,index:c,preloadPromise:Promise.resolve(),disposers:[]}))}Wh(a){if(0===this.h.length)throw Error(jb);if(0>a||a>this.h.length-1)throw Error("Index out of bounds");this.a=a}dd(){return this.a<this.h.length-1}Qf(){return 0<this.a}Hh(){const a=this;return _.x(function*(){if(a.j)a.g.warn("Cannot play first item while busy");else if(0===a.h.length)a.g.warn(jb);else{a.j=!0;a.g.info(`First (index: ${a.a})`);var b=a.h[a.a];try{a.g.info(`First loading (index: ${a.a})`),
489
- yield cs(a,b),a.g.info(`First playing (index: ${a.a})`)}catch(c){throw a.g.error(`First failed (index: ${a.a})`),c;}finally{a.j=!1,gs(a)}}})}fg(){const a=this;return _.x(function*(){if(a.j)a.g.warn("Cannot play next item while busy");else if(a.dd()){a.j=!0;a.a+=1;a.g.info(`Next (index: ${a.a})`);var b=a.f;a.ua.transition===_.Ve&&b.player.pause();ls(a,a.a+-2);a.l.delete(a.a);var c=a.h[a.a];try{a.g.info(`Next loading (index: ${a.a})`),yield hs(a,c),a.g.info(`Next playing (index: ${a.a})`)}catch(d){throw a.g.error(`Next failed (index: ${a.a})`),
490
- d;}finally{a.j=!1,b&&ks(a,b),gs(a)}}else a.g.warn("There are no more items in the playlist")})}Ih(){const a=this;return _.x(function*(){if(a.j)a.g.warn("Cannot play previous item while busy");else if(a.Qf()){a.j=!0;--a.a;a.g.info(`Previous (index: ${a.a})`);var b=a.f;a.ua.transition===_.Ve&&b.player.pause();ls(a,a.a+2);a.l.delete(a.a);var c=a.h[a.a];try{a.g.info(`Previous loading (index: ${a.a})`),yield hs(a,c),a.g.info(`Previous playing (index: ${a.a})`)}catch(d){throw a.g.error(`Previous failed (index: ${a.a})`),
491
- d;}finally{a.j=!1,b&&ks(a,b),gs(a)}}else a.g.warn("There are no more previous items in the playlist")})}destroy(){const a=this;return _.x(function*(){a.g.info("Destroy");yield Promise.all([ms(a),a.f?ks(a,a.f):Promise.resolve()]);yield ns(a)})}};_.z(rd,kv);kv.prototype.destroy=kv.prototype.destroy;kv.prototype.playPrev=kv.prototype.Ih;kv.prototype.playNext=kv.prototype.fg;kv.prototype.playFirst=kv.prototype.Hh;kv.prototype.hasPrev=kv.prototype.Qf;kv.prototype.hasNext=kv.prototype.dd;
492
- kv.prototype.setIndex=kv.prototype.Wh;kv.prototype.setItems=kv.prototype.Xh;kv.prototype.getPreloading=kv.prototype.Lf;kv.prototype.getPrev=kv.prototype.Mf;kv.prototype.getNext=kv.prototype.Kf;kv.prototype.getCurrentPlayer=kv.prototype.Fd;kv.prototype.getCurrent=kv.prototype.Yc;var js="preload",as=_.ze;var rs=new Map;var nv=class{constructor(a){this.h=a;this.f={keepOriginalTimestamps:!0,remux:!1};this.a=new muxjs.mp4.Transmuxer(this.f)}destroy(){this.a.dispose();this.a=null}reset(){this.a=new muxjs.mp4.Transmuxer(this.f)}isSupported(a,b){const c="mp2t"===a.toLowerCase().split(";")[0].split("/")[1],d=a.toLowerCase().split(";")[0]===_.Mc;if(!window.muxjs||!c&&!d)return!1;if(d)return _.ss(Qc);if(b)return _.ss(ts(b,a));b=ts(_.p,a);a=ts(_.w,a);return _.ss(b)||_.ss(a)}isMuxed(a,b){return 1<this.demuxMimeTypes(a,b).size}demuxMimeTypes(a,
493
- b){const c=new Map;c.set(a,b);try{const d=_.wk(b),e=_.xk(b).split(","),f=new Map,g=Bi(_.p,e),h=Bi(_.w,e);g&&f.set(_.p,this.convertCodecs(_.p,_.vk(d,g)));h&&f.set(_.w,this.convertCodecs(_.w,_.vk(d,h)));return f}catch(d){return c}}convertCodecs(a,b){return b.toLowerCase().split(";")[0]===_.Mc?Qc:"mp2t"===b.toLowerCase().split(";")[0].split("/")[1]?ts(a,b):b}getOriginalMimeType(){return this.h}transmux(a){const b=[],c=[];let d=[],e=null;a=_.K(a);const f=h=>{d=h.captions;const k=new Uint8Array(h.data.byteLength+
494
- h.initSegment.byteLength);k.set(h.initSegment,0);k.set(h.data,h.initSegment.byteLength);h.type===lv?b.push(k):h.type===mv&&c.push(k)},g=()=>{e={video:_.kj(...b),captions:d,audio:_.kj(...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}};qk(_.Mc,()=>new nv(_.Mc));qk(_.ug,()=>new nv(_.ug));var mv=_.p,lv=_.w;var ov=class{getCuePoints(){}Fb(){}Eb(){}};_.z("clpp.ads.IAdsTimeline",ov);ov.prototype.hasPostroll=ov.prototype.Eb;ov.prototype.hasPreroll=ov.prototype.Fb;ov.prototype.getCuePoints=ov.prototype.getCuePoints;_.pv=class{f(){}a(){}h(){}o(){}};var sv=class extends _.ou{constructor(a,b,c,d,e){super(Xa);this.l=a;this.j=b;this.h=c;this.a=d;this.o=e;this.g=new _.S(nd);_.aj(this.l)?this.g.warn(_.Vb):this.Ya(_.Cd,{licenseUrl:this.l,videoRobustness:[_.Cb,void 0],audioRobustness:[_.Bb,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.md.bind(this)}});_.aj(this.j)?this.g.warn(_.tb):this.Ya(_.Ad,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.md.bind(this)}});
495
- _.aj(this.h)?this.g.warn(_.Ra):_.aj(this.a)?this.g.warn(_.Qa):this.Ya(_.wd,{licenseUrl:this.h,certificateUrl:this.a,modifiers:{licenseRequest:this.ag.bind(this),licenseResponse:this.bg.bind(this),certificateRequest:this.md.bind(this),extractContentId:this.Ff.bind(this)}})}md(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}Ff(a,b){a=rm(b);switch(this.o){case qv:return a;case rv:return(new _.sm(a)).a;default:throw Error("Unknown content ID strategy");}}ag(a,b){b.headers[ta]=
496
- Lc;this.md(a,b);a={spc:_.ej(b.body)};b.body=_.Xi(_.Uj(a,!0))}bg(a,b){a=_.Ri(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=_.gj(a).buffer}};_.z(nd,sv);sv.prototype.onFairPlayLicenseResponse=sv.prototype.bg;sv.prototype.onFairPlayLicenseRequest=sv.prototype.ag;sv.prototype.extractFairPlayContentId=sv.prototype.Ff;sv.prototype.onLicenseRequest=sv.prototype.md;sv.prototype.constructor=sv.prototype.constructor;sv.NAME=Xa;
497
- var rv="hostname",qv="full-skd";sv.FairPlayContentIdStrategy={HOSTNAME:rv,FULL_SKD:qv};_.z("clpp.drm.HeaderDrmComponent",class extends _.pv{h(a){a=a.getConfiguration();if(a.drm&&a.drm&&a.drm.env===Xa){a=a.drm.customData;if(!a)throw new _.H(_.F,7,7100,_.Dd);a=new sv(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||qv);_.Xl(a)}}a(){delete _.Wl.HeaderDrm}id(){return"headerdrm"}});_.Uq(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=_.K(c);a=new Uint8Array(this,a,b-a);d.set(a);return c})});_.Uq(function(){_.th("mathRound.install")});_.Uq(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;ee in document||(Object.defineProperty(document,ee,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
498
- {get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",us);document.addEventListener("webkitfullscreenerror",us);document.addEventListener("mozfullscreenchange",us);document.addEventListener("mozfullscreenerror",us);document.addEventListener("MSFullscreenChange",us);document.addEventListener("MSFullscreenError",us)}});_.Uq(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.th("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=ws,document.exitPictureInPicture=xs,document.addEventListener("webkitpresentationmodechanged",vs,!0))}});_.Uq(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=ys)}});_.Uq(function(){if(window.VTTCue)_.sh("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.sh(Qb),window.VTTCue=zs;else if(6===a)_.sh("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=As;else{try{var b=!!zs(1,2,"")}catch(c){b=!1}b&&(_.sh(Qb),window.VTTCue=zs)}}else _.uh("VTTCue not available.")});var Bs;_.Uq(function(){_.th("InputEvent.install");_.Fk("Trident/")&&HTMLInputElement.prototype.addEventListener!==Cs&&(_.sh("Patching input event support on IE."),Bs=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=Cs)});_.Uq(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.Uq(function(){_.th("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 Fs=class{constructor(){this.a=Ds()}};var uv=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.h=b;this.f=0}};_.vv=class{constructor(a,b,c){this.h=a;this.j=b;this.f=c||this.h.getMedia();this.a=null}start(){this.a=new ResizeObserver(a=>{a=a[0];this.j(a.contentRect.width,a.contentRect.height,this.h.isFullscreen())});this.f&&this.a.observe(this.f)}stop(){this.a&&(this.a.disconnect(),this.a=null)}};var wv;_.xv=class{constructor(){this.a=new Blob([wv],{type:_.vg})}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 _.hn;b=b.play();const d=(new _.Ck(()=>{d.stop();c.resolve(a)})).ga(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===pb?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
499
- wv=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,
430
+ 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]};_.Gu=class{constructor(a){this.I=a;this.f={}}cb(a,b){this.f[a]=b}};_.z("clpp.drm.DrmEnvironment",_.Gu);_.Gu.prototype.setDrmSystem=_.Gu.prototype.cb;_.Em=class{constructor(a,b){b=void 0===b?!1:b;this.f=_.sh(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.h=b;this.buffer=this.f.buffer}getPosition(){return this.a}Sa(){return this.f.byteLength}seek(a){(0>a||a>=this.f.byteLength)&&_.jm();this.a=a}};_.zn=class{constructor(a,b){this.f=a;this.h=void 0===b?!0:b;this.a=0}getPosition(){return this.a}Sa(){return this.f.byteLength}skip(a){this.a+a>this.f.byteLength&&_.mm();this.a+=a}seek(a){if(0>a||a>=this.f.byteLength)throw _.mm();this.a=a}};
431
+ _.z("clpp.utils.dataview.DataViewReader",_.zn);_.Cm=class{constructor(){this.h=[];this.f=[];this.a=!1;this.g=new _.S("clpp.mp4")}N(a,b){a=tm(a);this.h[a]=Hu;this.f[a]=b;return this}ea(a,b){a=tm(a);this.h[a]=Iu;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.K(a);a=new _.zn(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.lm(a)&&!this.a;)this.de(0,a,b)}de(a,b,c){const d=b.getPosition();let e=_.P(b);var f=_.P(b);let g=!1;this.g.debug("Parsing MP4 box",_.um(f));switch(e){case 0:e=b.Sa()-d;break;case 1:e=_.qm(b),g=!0}const h=
432
+ this.f[f];if(h){let m=null;var k=null;this.h[f]===Iu&&(k=_.P(b),m=k>>>24,k&=16777215);f=b.getPosition()-d;var l=d+e;c&&l>b.Sa()&&(l=b.Sa());l-=b.getPosition();b=0<l?_.sm(b,l):new Uint8Array(0);b=new _.zn(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.Sa()-b.getPosition()),b.skip(a)}};_.z("clpp.utils.Mp4Parser",_.Cm);_.Cm.typeToString=_.um;
433
+ _.Cm.allData=_.xm;_.Cm.sampleDescription=_.wm;_.Cm.children=_.vm;_.Cm.prototype.parseNext=_.Cm.prototype.de;_.Cm.prototype.parse=_.Cm.prototype.parse;_.Cm.prototype.stop=_.Cm.prototype.stop;_.Cm.prototype.fullBox=_.Cm.prototype.ea;_.Cm.prototype.box=_.Cm.prototype.N;_.Cm.headerSize=_.ym;var Hu=0,Iu=1;var Ju=class{};_.z("clpp.utils.FairplayUtils",Ju);Ju.parseFairPlayResponse=_.Hm;Ju.formatFairPlayRequest=_.Gm;Ju.createFairplayPayload=Fm;Ju.extractContentId=_.Bm;Ju.extractExtXKeyUri=zm;var Qm=new _.S("clpp.drm.DrmToday"),$m="PRODUCTION",an="STAGING",bn="DEMO",cn="TEST",Ku={PRODUCTION:$m,STAGING:an,DEMO:bn,TEST:cn};_.z("clpp.drm.DrmToday.Environment",Ku);_.z("clpp.drm.DrmToday.WidevineCertificates",{V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"});
434
+ var Mm="/license-proxy-widevine/cenc/",Nm="/license-proxy-headerauth/drmtoday/RightsManager.asmx",Om="/license-server-fairplay/",dn={"00000":"Success","01000":"General Internal Error","02000":"General Request Error","03000":"General Request Authentication Error",10001:"Bad Request",3E4:"General DRM error",4E4:"General Widevine Modular error",40001:"Widevine Device Certificate Revocation (wv 127)",40002:"Widevine Device Certificate Revocation - Permanently (wv 175)",41E3:"General Widevine Classic error",
435
+ 42E3:"General Playready error",43E3:"General Fairplay error",44E3:"General OMA error",44001:"OMA Device registration failed",45E3:"General CDRM error",45001:"CDRM Device registration failed",6E4:"CSL",60001:"CSL - INVALID",60100:"CSL - Denied by Stream Limiting",7E4:"General Output Protection",70001:"All keys filtered by EOP settings",8E4:"TAKE DOWN",80001:"TAKE DOWN - Denied by Take Down",9E4:"General GBL error",90001:"License delivery prohibited in your region"},Lu=[Va,Xa,Wa,_.Bb,_.Ab],Mu=[Va,Xa,
436
+ Wa,_.Bb,_.Ab],Nu=["3000","2000","150"],Ou=["2000","150"];
437
+ for(const a of Object.keys(Ku)){let b=wa;a!==$m&&(b+=`_${a}`);const c=new _.Gu(b);let d=null;switch(a){case $m:case an:case bn:d=im("V2");break;case cn:d=null}c.cb(_.Jd,{licenseUrl:Pm(_.Jd,a),videoRobustness:Lu,audioRobustness:Mu,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:d,modifiers:{licenseRequest:_.Sm,licenseResponse:_.Tm}});c.cb(_.Dd,{licenseUrl:Pm(_.Dd,a),certificateUrl:Im(a)+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.Vm,licenseResponse:_.Wm,
438
+ extractContentId:_.Xm,certificateRequest:_.Ym}});c.cb(_.Hd,{licenseUrl:Pm(_.Hd,a),videoRobustness:Nu,audioRobustness:Ou,modifiers:{licenseRequest:Zm}});_.em(c)};_.Pu=class{constructor(a){this.f=a;this.a=void 0}value(){void 0===this.a&&(this.a=this.f());return this.a}};var Ru=class{constructor(){this.size=0;this.a=void 0;this.g=new _.S("clpp.drm.eme.MediaKeyStatusMap")}getStatus(){return this.a}forEach(a){this.a&&a(this.a,Qu.value())}get(a){if(this.has(a))return this.a}has(a){const b=Qu.value();return this.a&&Vi(a,b)?!0:!1}entries(){}keys(){}values(){}},Qu=new _.Pu(()=>aj(new Uint8Array([0])));var hn=new _.Pu(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.Ee],[HTMLMediaElement.HAVE_CURRENT_DATA,_.De],[HTMLMediaElement.HAVE_FUTURE_DATA,bd],[HTMLMediaElement.HAVE_ENOUGH_DATA,dd]]));var Tu=class{constructor(){this.j=this.w=null}l(a){this.w=a}h(a){const b=this.j;b&&b!==a&&kn(b,null);return(this.j=a)?kn(a,this.w):Promise.resolve()}o(){return this.j}a(a,b){_.Fh("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new Su(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return Wn}},Su=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.Dd))for(var c of b){a:{a=c;if(a.persistentState===_.Jf){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
439
+ persistentState:_.Ze,distinctiveIdentifier:_.Ze,initDataTypes:a.initDataTypes,sessionTypes:[fg],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),
440
+ e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.Hg));a=e?b:null}if(a){this.a=a;return}}c=Error(Pb);c.name=pb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new Uu(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.Fh("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},Uu=class{constructor(a){this.f=null;this.h=new WebKitMediaKeys(a);this.a=new _.Rt;this.j=0;this.g=new _.S(vd);this.g.info("Created Media Keys for "+a)}createSession(a){a=
441
+ void 0===a?fg:a;this.g.debug("Creating Apple MediaKeys Session");if(a!==fg)throw new TypeError("Session type "+a+ba);return new Vu(this.h,`__session_${this.j++}`)}setServerCertificate(){this.g.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},Vu=class extends _.Bu{constructor(a,b){super();this.a=null;this.o=a;this.f=this.h=null;this.j=new _.Rt;this.sessionId=b;this.expiration=NaN;this.closed=new _.qn;this.l=!1;this.keyStatuses=new Ru;this.g=new _.S(vd)}generateRequest(a,
442
+ b){if(this.l)return Promise.reject(Cb);this.g.debug("generateRequest");this.h=new _.qn;try{const c=this.o.createSession(_.Hg,_.K(b));this.a=c;this.sessionId=c.sessionId||this.sessionId||"";this.j.on(c,Sg,d=>{{const e=this.keyStatuses.getStatus();this.g.debug(`Received Key Message in ${this.sessionId}`);this.h&&(this.h.resolve(),this.h=null);d=new _.D(_.Je,{messageType:void 0===e||e===$f?ve:ue,message:aj(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,Qg,d=>{this.g.debug("onWebkitKeyAdded_",
443
+ d);this.f&&(ln(this,"usable"),this.f.resolve(),this.f=null)});this.j.on(c,Rg,()=>{var d=this.keyStatuses.getStatus();if(this.a&&this.a&&this.a.error&&this.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&d===$f)this.g.warn(`Ignoring webkit key error for session ${this.sessionId}`);else if(this.g.error(`Received key error in session ${this.sessionId} `+`with code ${this.a.error.code}. `+`Session Status ${d}.`),d=Error("EME AppleEmeManager key error"),d.errorCode=this.a.error,null!==this.h)this.h.reject(d),
444
+ this.h=null;else if(null!==this.f)this.f.reject(d),this.f=null;else switch(this.a.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:ln(this,"output-not-allowed");break;default:ln(this,_.re)}});ln(this,$f)}catch(c){this.h.reject(c)}return this.h}load(){this.g.debug(_.Ce);return Promise.reject(Error("MediaKeySession.load not yet supported"))}update(a){if(this.l)return Promise.reject(Cb);this.g.debug(ug);this.f=new _.qn;try{this.a.update(_.K(a))}catch(b){this.f.reject(b)}return this.f}close(){if(this.l)return this.closed;
445
+ this.g.info(`Closing Key Session ${this.sessionId}`);this.l=!0;try{this.a.close(),this.closed.resolve(),_.Sh(this.j)}catch(a){this.closed.reject(a)}return this.closed}remove(){this.g.debug("remove");return Promise.reject(Error("MediaKeySession is only applicable for persistent licenses, which are not supported on this platform"))}},Wu=class{a(){return Wn}f(){return!!window.WebKitMediaKeys}create(){return new Tu}};var Xu=class{constructor(){this.j=null;this.g=new _.S("clpp.drm.eme.StandardEmeManager")}l(a){this.j=a}h(a){return this.j?this.j.setMediaKeys(a):Promise.reject(fb)}o(){return this.j&&this.j.mediaKeys}a(a,b){this.g.info("Requesting media key system access for",a,b.map(c=>Object.assign({},c,{drmInfos:c.drmInfos.map(()=>"_anonymous_")})));return navigator.requestMediaKeySystemAccess(a,b).catch(c=>{this.g.info("Failed to request media key system access for "+`${a}.`,c);return Promise.reject(c)})}f(){return Ao}},
446
+ Yu=class{a(){return Ao}f(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new Xu}};var av=class{constructor(){this.w=this.j=null;this.A="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.A="webkit")}l(a){this.j=a}h(a){_.Fh("WebkitEmeManager.setMediaKeys");if(!this.j)return Promise.reject(fb);const b=this.w;b&&b!==a&&on(b,null);(this.w=a)&&on(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=
447
+ new Zu(this.A,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return $u}},Zu=class{constructor(a,b,c,d){this.h=a;this.a=this.keySystem=c;a=!1;c===_.$e&&(this.a=Pg,a=!1);let e=!1;for(const g of d){d=[];var f=[];let h=!1;if(g.audioCapabilities)for(const k of g.audioCapabilities)k.contentType&&(h=!0,b.canPlayType(k.contentType.split(";")[0],this.a)&&(d.push(k),e=!0));if(g.videoCapabilities)for(const k of g.videoCapabilities)k.contentType&&(h=!0,b.canPlayType(k.contentType,this.a)&&
448
+ (f.push(k),e=!0));h||(e=b.canPlayType(_.Hg,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.Jf||a||(e=!1);if(e){this.f=g;return}}b=Pb;if(c===_.$e||c===_.Jd)b="None of the requested configurations were supported.";c=Error(b);c.name=pb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){return Promise.resolve(new bv(this.h,this.a))}getConfiguration(){return this.f}},bv=class{constructor(a,b){this.h=a;this.o=b;this.a=null;this.f=new _.Rt;this.j=[];this.l=new Map}createSession(a=
449
+ fg){if(a!==fg&&a!==_.df)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=Za,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new cv(this.h,this.a,this.o,a);this.j.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},cv=class extends _.Bu{constructor(a,b,c,d){super();this.w=a;this.j=b;this.o=!1;this.a=this.f=null;this.h=c;this.l=d;this.sessionId="";this.expiration=NaN;this.closed=new _.qn;this.keyStatuses=
450
+ new Ru}ready(){_.Fh("WebkitEmeManager.MediaKeySession.ready");nn(this,"usable");this.a&&this.a.resolve();this.a=null}generateRequest(a,b){_.Fh("WebkitEmeManager.MediaKeySession.generateRequest");return rn(this,b,null)}load(a){_.Fh(Vb);return this.l===_.df?rn(this,null,a):Promise.reject(Error(mb))}update(a){_.Fh(Vb);const b=new _.qn;sn(this,b,a);return b}close(){_.Fh("WebkitEmeManager.MediaKeySession.close");if(this.l!==_.df){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),
451
+ this.closed;const a=pn(this,"cancelKeyRequest");try{this.j[a](this.h,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed}remove(){_.Fh("WebkitEmeManager.MediaKeySession.remove");return this.l!==_.df?Promise.reject(Error(mb)):this.close()}},dv=class{a(){return $u}f(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new av}};var fv=class{l(){}h(a){_.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 ev}},gv=class{a(){return ev}f(){return!0}create(){return new fv}};var hv=class{};_.z(wd,hv);var un=new _.S(wd),tn=[];tn=[new Yu,new Wu,new dv,new gv].filter(a=>a.f());var Ao="STANDARD",Wn="APPLE",$u="WEBKIT",ev="NOP";hv.Apis={STANDARD:Ao,APPLE:Wn,WEBKIT:$u,NOP:ev};_.iv=class{h(a,b){a=this.a(a,b);return 1!==a.length?null:a[0]}a(a,b){return Array.from(a.childNodes).filter(c=>c instanceof Element&&c.tagName===b)}getAttributeNS(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}f(a){return Array.from(a.childNodes).every(b=>b.nodeType===Node.TEXT_NODE||b.nodeType===Node.CDATA_SECTION_NODE)?a.textContent.trim():null}j(a,b){const c=new DOMParser;let d=null;try{d=c.parseFromString(a,_.hg)}catch(e){}if(!d)return null;a=d.documentElement;return b&&a.tagName!==
452
+ b||0<d.getElementsByTagName("parsererror").length?null:a}removeChild(a,b){a.removeChild(b)}};_.$g=_.iv.prototype;_.$g.Bd=_.bh(19);_.$g.fe=_.bh(17);_.$g.Wd=_.bh(15);_.$g.Xd=_.bh(13);_.$g.ee=_.bh(11);_.$g.Hc=_.bh(9);_.$g.Md=_.bh(7);_.$g.Z=_.bh(5);_.$g.qc=_.bh(3);_.$g.Rb=_.bh(1);_.Cn=new _.iv;_.jv=new _.S("clpp.xml.Parser");_.Ll="dom";var xn,kv,wn;_.Gn=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];xn=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];kv=class{constructor(a,b,c){this.j=new Uint8Array(a);this.a=b;this.f=c}};wn=class extends kv{};_.Fn=class extends kv{constructor(a,b,c,d,e,f){f=void 0===f?null:f;super(a,b,d);this.version=e;this.h=c;this.l=f}};var In=!!(performance&&performance.mark&&performance.measure),Kn=new _.S("clpp.perf");var no=class{constructor(a){this.f=[];this.h=[];this.a=[];8<=a.byteLength&&(new _.Cm).ea("pssh",this.j.bind(this)).parse(a.buffer);0===this.a.length&&_.C("No pssh box found!")}j(a){if(1<a.version)_.C("Unrecognized PSSH version found!");else{var b=_.uj(_.sm(a.reader,16)),c=[];if(0<a.version){var d=_.P(a.reader);for(let e=0;e<d;++e){const f=_.uj(_.sm(a.reader,16));c.push(f)}}d=_.P(a.reader);a.reader.skip(d);this.h.push.apply(this.h,c);this.f.push(b);this.a.push({start:a.start,end:a.start+a.size-1});
453
+ a.reader.getPosition()!==a.reader.Sa()&&_.C("Mismatch between box size and data size!")}}};var io,lv;
454
+ _.qp=class{constructor(a,b){this.D=a;this.Ha=b;this.J=new Set;this.C=this.I=this.l=null;this.S=!1;this.a=null;this.K=lv;this.B=new _.Rt;this.M=new Fu;this.h=new Map;this.L=[];this.H=new _.qn;this.ha=0;this.f=null;this.w=c=>{this.A=!0;this.F=!1;this.H.reject(c);a.onError(c)};this.o=new Map;this.Y=new Map;this.V=new _.Mk(()=>Zn(this));this.j=!1;this.da=new _.qn;this.G=!1;this.W=[];this.ba=!1;this.R=0;this.g=new _.S("clpp.drm.DrmEngine");this.$=(new _.Mk(()=>{$n(this)})).Eb(1);this.H.catch(()=>{});this.A=
455
+ this.F=!1;this.O=null}destroy(){const a=this;return _.x(function*(){a.j?yield a.da:(a.j=!0,yield ao(a),a.da.resolve())})}keySystem(){return this.a?_.On(this.a.keySystem):""}getDrmInfo(){return this.a}Aa(a){const b=this;return _.x(function*(){b.G&&b.K===io||(!b.f.delayLicenseRequestUntilPlayed||b.C&&!b.C.paused||b.ba?yield so(b,a):b.W.push(a))})}va(a){const b=a.target;this.g.info("Key status changed for session",b.sessionId);const c=this.h.get(b);let d=!1;b.keyStatuses.forEach((e,f)=>{if(typeof f===
456
+ _.bg){var g=f;f=e;e=g}if(Nn(this.a.keySystem)&&16===f.byteLength&&_.Ok()){g=_.$i(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!==$f&&(c.loaded=!0);c&&c.kb&&c.kb.resolve();"expired"===e&&(d=!0);f=_.K(f);let h=_.uj(f);"00"===h&&c&&c.keyId?h=c.keyId:this.a.keySystem.startsWith(_.Dd)&&16!==f.byteLength&&(h=bj(f));(f=h||"")?this.g.info(`Key status for Key ID '${h}': ${e}`):this.g.info(`Key status global keys: ${e}`);
457
+ this.o.set(f,e);c&&!c.keyId&&this.h.forEach((k,l)=>{l===b||k.keyId!==h||k.loaded||(k.loaded=!0)})});c&&c.loaded&&c.qb.forEach(e=>{this.o.get(e)===$f&&(this.g.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.o.set(e,_.af))});for(a=0;a<this.a.initData.length;a++){const e=this.a.initData[a];e.keyId&&this.o.get(e.keyId)===$f&&_.vj(e.initData,c.initData)&&(this.g.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.o.set(e.keyId,_.af))}a=b.expiration-Date.now();(0>a||d&&1E3>
458
+ a)&&c&&!c.jc&&(this.g.debug("Session has expired",b.sessionId),(a=this.h.get(b))&&a.Jc&&a.Jc.stop(),this.h.delete(b),b.close().catch(()=>{}));Co(this)&&(this.H.resolve(),1!==this.h.size||d?this.V.ia(.5):Zn(this))}};io=0;lv=3;_.Oo=new Map;_.Po=new _.S("clpp.text");var mv=class{constructor(){this.a=null;this.f=[]}};var nv=class{constructor(){this.h=this.f=this.j=null;this.a=[]}};_.ov=class{constructor(){this.h=this.w=this.B=this.C=this.l=this.o=this.j=this.A=NaN;this.a=new mv;this.f=new nv}getStats(){return{width:this.A,height:this.j,streamBandwidth:this.w,decodedFrames:this.l,droppedFrames:this.o,corruptedFrames:this.C,estimatedBandwidth:this.h,loadLatency:this.B,playTime:To(this.a,_.jp),pauseTime:To(this.a,_.ip),bufferingTime:To(this.a,_.cp),stateHistory:Uo(this.a),switchHistory:Vo(this.f)}}};var qv=class{constructor(a){this.g=new _.S("clpp.StateManager");this.m=a;this.a=new _.Rt;this.f=_.gp;this.A=_.pv;this.H=0;this.w=-1;this.K=this.o=this.I=this.B=0;this.j=this.h=this.F=!1;this.G=0;this.l=null;this.J=0;this.L=_.$k();this.C=!1;this.I=Date.now();ap(this)}Ya(a,b){this.m&&this.m.trigger(new _.D(a,{detail:b}))}getState(){return dp(this,"")}destroy(){this.g.debug("Stop watching for video events for "+this.m.namespace());this.a.release()}};_.z("clpp.utils.media.detectType",kp);var np=new _.S("clpp.sources");var rv=class extends _.Eu{constructor(){super(xd);this.w=this.G=!1;this.l=this.A=this.o=this.a=this.j=null;this.h=new _.Rt;this.C=this.B=this.f=this.H=null}init(a,b){super.init(a,b);this.j=new qv(this);Yo(this.j,_.gp)}namespace(){return xd}unload(){const a=this;return _.x(function*(){if(a.ga){a.log.debug("Releasing player with source",a.ga);a.B&&(a.B.stop(),a.B=null);var b=a.getTrackManager();b&&b.release();a.A&&(a.A.destroy(),a.A=null);a.O&&(a.O.destroy(),a.O=null);a.l&&a.l.release();a.o&&(a.o.destroy(),
459
+ a.o=null);_.Sh(a.h);a.f&&(a.f=new _.ov);a.C=null;a.ga=null;a.G=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());if(a.w)throw new _.I(_.F,7,7E3);a.a&&(b=a.a,a.h.off(b,_.r),a.h.off(b,_.Kf),a.a=null)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.j&&Yo(this.j,_.gp)})}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(ya);const a=this.getTrackManager();
460
+ a&&a.destroy();this.l&&(this.l.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",b)}),this.l=null);this.j&&(this.j.destroy(),this.j=null);this.f=null})}getDrmInfo(){return this.o?this.o.getDrmInfo():null}getTrackManager(){return this.pb}load(a){const b=this;return _.x(function*(){if(b.w)return Promise.reject(new _.I(_.F,7,7E3));if(!b.getSurface()||!b.getSurface().getMedia())return Promise.reject("No surface or no media element in surface");const c=b.F.getMedia();b.H=Date.now()/
461
+ 1E3;b.f=new _.ov;b.h.on(b,_.Zf,()=>{b.f&&_.So(b.f.a,b.getState())});Yo(b.j,_.hp);b.ga=_.mp(a);b.configuration=_.Ol(b.ba,a);b.log.debug(_.cb,b.configuration);b.log.debug(_.ub,b.ga);const d=_.Ro(b.configuration,[_.pe,"native"]);b.O=d.create(b);b.O.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.Rl(_.eg)&&!_.bl()&&(b.A=new eu(b),b.A.start(c));b.l?b.l.release():b.l=new St(b);c.textTracks&&ni(b.l,c.textTracks);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.B(b.configuration.volume)||
462
+ b.setVolume(b.configuration.volume);_.B(b.configuration.muted)||b.setMuted(b.configuration.muted);b.h.one(c,bd,()=>{b.trigger(new _.D(_.og))});null==b.configuration.startTime&&wp(b,c);_.$k()&&xp(b,c);try{pp(b,c),yield sp(b),yield vp(b).U}catch(e){b.G=!1,b.onError(e)}})}onError(a){this.G||(a.severity===_.F&&null!==this.j&&Yo(this.j,_.$o),this.trigger(new _.D(_.r,{detail:a})))}Ag(){return new U}getState(){return null!==this.j?this.j.getState().currentState:_.pv}getPresentationStartTime(){if(this.a&&
463
+ this.a.getStartDate&&this.isLive()){const a=this.a.getStartDate();return isNaN(a.getTime())?null:a.getTime()/1E3}return null}getSeekRange(){var a=this.getSurface().getMedia();if(a&&a.src){a=a.seekable;if(a.length)return this.C=a={start:a.start(0),end:a.end(a.length-1)};if(this.C)return this.C}return{start:0,end:0}}isLive(){return this.a&&this.a.src?Infinity===this.a.duration:!1}getStats(){if(!this.f||!this.a)return _.Wo();this.f&&_.So(this.f.a,this.getState());var a=this.a,b=this.f,c=a.videoHeight;
464
+ b.A=a.videoWidth;b.j=c;a.getVideoPlaybackQuality&&(c=a.getVideoPlaybackQuality(),a=this.f,b=Number(c.totalVideoFrames),a.o=Number(c.droppedVideoFrames),a.l=b,this.f.C=Number(c.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.oa())a.bandwidth&&(this.f.w=a.bandwidth),a.Vc&&(this.f.h=a.Vc);return this.f.getStats()}getTimelineCues(){return this.l?this.l.getTimelineCues():[]}getCueTimeline(){return null}};
465
+ _.Jh(new class{a(){return xd}canPlay(a,b){a=a.type||"";const c=a===_.Jc,d=a===_.Oc,e=a===_.Fl;var f;_.Zk()||c||d||e&&!_.$k()?f=0:f=""!==Nk().canPlayType(a)?e&&_.$k()&&(window.ManagedMediaSource||window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}f(a){return a===_.ma}create(){return new rv}});_.z("clpp.ads.PodType",{PREROLL:0,MIDROLL:1,POSTROLL:2});_.z("clpp.ads.Technology",{CLIENT_SIDE:0,SERVER_SIDE:1,SERVER_GUIDED:2});_.z("clpp.ads.ErrorType",{LOAD:0,PLAY:1,OTHER:2});var zp=new _.S("clpp.ads"),yp=[];var sv=class{load(){}start(){}o(){}resume(){}pause(){}skip(){}getVolume(){}setVolume(){}getPosition(){}h(){}l(){}};_.z("clpp.ads.IAdsManager",sv);sv.prototype.getPosition=sv.prototype.getPosition;sv.prototype.setVolume=sv.prototype.setVolume;sv.prototype.getVolume=sv.prototype.getVolume;sv.prototype.skip=sv.prototype.skip;sv.prototype.pause=sv.prototype.pause;sv.prototype.resume=sv.prototype.resume;var V=class{sb(){}tb(){}xb(){}getId(){}getCreativeId(){}Sb(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getPosition(){}getSkipTimeOffset(){}Vb(){}ub(){}getMediaUrl(){}ib(){}hb(){}Ta(){}Ua(){}getPodIndex(){}Ib(){}wb(){}jb(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}Ub(){}canSeek(){}};_.z("clpp.ads.IAd",V);V.prototype.canSeek=V.prototype.canSeek;V.prototype.getVideoElement=V.prototype.Ub;V.prototype.getWrapperCreativeIds=V.prototype.getWrapperCreativeIds;
466
+ V.prototype.getWrapperAdSystems=V.prototype.getWrapperAdSystems;V.prototype.getWrapperAdIds=V.prototype.getWrapperAdIds;V.prototype.getSequenceLength=V.prototype.jb;V.prototype.getPositionInSequence=V.prototype.wb;V.prototype.getPodTimeOffset=V.prototype.Ib;V.prototype.getPodIndex=V.prototype.getPodIndex;V.prototype.getPodType=V.prototype.Ua;V.prototype.getMediaBitrate=V.prototype.Ta;V.prototype.getMediaHeight=V.prototype.hb;V.prototype.getMediaWidth=V.prototype.ib;V.prototype.getMediaUrl=V.prototype.getMediaUrl;
467
+ V.prototype.getClickThroughUrl=V.prototype.ub;V.prototype.isBumper=V.prototype.Vb;V.prototype.getSkipTimeOffset=V.prototype.getSkipTimeOffset;V.prototype.getPosition=V.prototype.getPosition;V.prototype.getDuration=V.prototype.getDuration;V.prototype.getTitle=V.prototype.getTitle;V.prototype.getAdvertiserName=V.prototype.getAdvertiserName;V.prototype.getAdSystem=V.prototype.getAdSystem;V.prototype.getApiFramework=V.prototype.getApiFramework;V.prototype.getSourceId=V.prototype.Sb;
468
+ V.prototype.getCreativeId=V.prototype.getCreativeId;V.prototype.getId=V.prototype.getId;V.prototype.getTechnology=V.prototype.xb;V.prototype.getAdManagerVersion=V.prototype.tb;V.prototype.getAdManagerName=V.prototype.sb;var Q=class{constructor(a,b,c,d,e,f){this.w=this.o=this.l=!1;this.C=a;this.h=b;this.f=c;this.a=d;this.j=0;this.B=`${e}:${b}`;this.F=e;this.videoEl=null;this.A=f}sb(){return""}tb(){return""}xb(){return 2}getId(){return this.B}getCreativeId(){return""}Sb(){return this.F}getApiFramework(){return null}getAdSystem(){return""}getAdvertiserName(){return""}getTitle(){return""}getDuration(){return this.a}getPosition(){return this.j}getSkipTimeOffset(){return-1}canSeek(){return this.A}Vb(){return!1}ub(){return null}getMediaUrl(){return null}ib(){return 0}hb(){return 0}Ta(){return 0}Ua(){return this.C}getPodIndex(){return 0}Ib(){return 0}wb(){return this.h}jb(){return this.f}getWrapperAdIds(){return[]}getWrapperAdSystems(){return[]}getWrapperCreativeIds(){return[]}Ub(){return this.videoEl}};
469
+ Q.prototype.getVideoElement=Q.prototype.Ub;Q.prototype.getWrapperCreativeIds=Q.prototype.getWrapperCreativeIds;Q.prototype.getWrapperAdSystems=Q.prototype.getWrapperAdSystems;Q.prototype.getWrapperAdIds=Q.prototype.getWrapperAdIds;Q.prototype.getSequenceLength=Q.prototype.jb;Q.prototype.getPositionInSequence=Q.prototype.wb;Q.prototype.getPodTimeOffset=Q.prototype.Ib;Q.prototype.getPodIndex=Q.prototype.getPodIndex;Q.prototype.getPodType=Q.prototype.Ua;Q.prototype.getMediaBitrate=Q.prototype.Ta;
470
+ Q.prototype.getMediaHeight=Q.prototype.hb;Q.prototype.getMediaWidth=Q.prototype.ib;Q.prototype.getMediaUrl=Q.prototype.getMediaUrl;Q.prototype.getClickThroughUrl=Q.prototype.ub;Q.prototype.isBumper=Q.prototype.Vb;Q.prototype.canSeek=Q.prototype.canSeek;Q.prototype.getSkipTimeOffset=Q.prototype.getSkipTimeOffset;Q.prototype.getPosition=Q.prototype.getPosition;Q.prototype.getDuration=Q.prototype.getDuration;Q.prototype.getTitle=Q.prototype.getTitle;Q.prototype.getAdvertiserName=Q.prototype.getAdvertiserName;
471
+ Q.prototype.getAdSystem=Q.prototype.getAdSystem;Q.prototype.getApiFramework=Q.prototype.getApiFramework;Q.prototype.getSourceId=Q.prototype.Sb;Q.prototype.getCreativeId=Q.prototype.getCreativeId;Q.prototype.getId=Q.prototype.getId;Q.prototype.getTechnology=Q.prototype.xb;Q.prototype.getAdManagerVersion=Q.prototype.tb;Q.prototype.getAdManagerName=Q.prototype.sb;var uv=class{constructor(a){this.a=a.map(b=>({videoId:b.getSurface().getMedia().id,player:b,Fd:!0,ready:Promise.resolve()}));this.g=new _.S("clpp.plist.PlayerPool")}has(){return this.a.some(a=>a.Fd)}get(){const a=this;return _.x(function*(){const b=a.a.find(c=>c.Fd);if(!b)throw Error("No available players in the pool");b.Fd=!1;yield b.ready;return b.player})}release(a){const b=this.a.find(c=>c.player===a);if(!b)return Promise.resolve();b.Fd=!0;b.ready=new Promise(c=>{a.release().catch(d=>{this.g.error("Failed to unload player",
472
+ d)}).then(c)});return b.ready}destroy(){const a=this;return _.x(function*(){yield Promise.all(a.a.map(b=>b.player.destroy()))})}};_.z("clpp.utils.dom.createHTMLElement",_.Fp);var vv=class{constructor(a){this.a=null;this.h=new Set;this.f=null;this.set(a||null)}set(a){this.h.clear();this.f&&(this.f.disconnect(),this.f=null);if(this.a=a)this.f=Gp(this,a)}get(){return this.a}};var Mp=class{constructor(a,b){this.g=new _.S("clpp.PlayerSurface");this.w=_.kh(wv,b);this.f=new vv;this.h=null;this.a=new vv;this.l=xv;xv+=1;this.o=`clpp-video-${this.l}`;this.j=new _.Rt;if(null==a)throw new _.I(_.F,7,7102,"No Media element was provided");if(!(a instanceof Element||(a=document.getElementById(a),a)))throw new _.I(_.F,7,7004,"Media element not found");b=this.w;this.g.debug("Initializing Player Surface on ",a);if("cast-media-player"===a.tagName.toLowerCase())this.h=a;else{if(!(a instanceof
473
+ HTMLMediaElement))throw new _.I(_.F,7,7005,"Media element is not instance of HTMLMediaElement");if(!a.hasAttribute("crossorigin")){var c=b.crossorigin;this.g.info("Setting media elements crossorigin to "+c);a.setAttribute("crossorigin",c)}this.f.set(a);if(b.disableContainer)var d=null;else if(b.containerEl){if(a.parentNode!==b.containerEl)throw new _.I(_.F,7,7006,"Container element is not a direct parent of media element");d=b.containerEl}else{c=document.createElement(_.Sd);a.parentNode?a.parentNode.replaceChild(c,
474
+ a):this.g.warn("Player Surface Element has no parent. Can not inject container. You have to manually add playerSurface.getContainer() to the DOM!");var e=[];for(let g=0;g<a.classList.length;g++)e.push(a.classList[g]);for(var f of e)a.classList.remove(f),_.Dp(c,f);c.style.cssText=a.style.cssText;a.removeAttribute(_.dg);for(d of[_.Ug,_.ne])f=a.getAttribute(d),f=parseInt(f,10),isNaN(f)||(c.style[d]=`${f}px`),_.Qk()||a.removeAttribute(d);c.appendChild(a);d=c}d&&(this.a.set(d),Hp(this.a,"clpp-container"),
475
+ Hp(this.a,this.o),Hp(this.f,_.od),Hp(this.f,"clpp-video"));b.webOSStartupPatch&&Ip(this,a,d)}}getMedia(){return this.f.get()}getContainer(){return this.a.get()}getSafeContainer(){return this.a}getId(){return this.l}getUniqueCssClass(){return this.o}getCastElement(){return this.h}isFullscreen(){return!!document.fullscreenElement}hideMediaElement(){const a=this.getMedia();a?_.Dp(a,pd):this.g.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove(pd):
476
+ this.g.debug("No media element available that could be shown")}addElementToContainer(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;const d=this.getContainer();if(!d)throw Error("No container is available. Unable to add element");b&&_.Dp(a,_.od);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){_.Dp(a,pd)}show(a){a.classList.remove(pd)}release(){this.j.release()}};
477
+ Mp.prototype.removeElementFromContainer=Mp.prototype.removeElementFromContainer;Mp.prototype.addElementToContainer=Mp.prototype.addElementToContainer;Mp.prototype.getCastElement=Mp.prototype.getCastElement;Mp.prototype.getContainer=Mp.prototype.getContainer;Mp.prototype.getMedia=Mp.prototype.getMedia;var wv={disableContainer:!1,webOSStartupPatch:!0,crossorigin:"anonymous",containerEl:null},xv=1;var yv=class{constructor(a){this.ja=a;this.o=!!a.sideAdContainer;this.h=[];this.a=a.pg;this.C=Lp(a);this.A=[];const b=Np(this,this.C,this.ja.eh);this.l=new uv(b);this.f=null;this.w=!1;this.j=new Map;this.F=a.toggleVisible;this.g=new _.S("clpp.interstitial.MultiController");this.B=!1;Op(this).forEach(c=>Pp(this,c,!1))}getCurrentItem(){return this.f}Nd(){return this.f?this.f.player:null}Sf(){return Array.from(this.j.values())}jd(){return 0<this.j.size}play(a){return dq(this,a,_.ff)}load(a){return dq(this,
478
+ a,_.Ce)}release(){const a=this;return _.x(function*(){yield Promise.all([bq(a),a.f?aq(a,a.f):Promise.resolve()]);a.f=null;a.w=!1;iq(a)})}destroy(){const a=this;return _.x(function*(){a.g.info("Destroy");yield a.release();yield a.l.destroy();rq(a)})}isMuted(){return this.B}},mq="preload",kq=_.Ge,Up="primary",Tp="ad";var zv=class extends _.Bu{constructor(a){super();this.ja=_.kh({Xh:.5},a);this.g=new _.S("clpp.interstitial.Player");this.f=a.player;this.f.setSeekInterceptor((b,c)=>{c||zq(this,b);if(c=Aq(this,b)){if(wq(c))return this.g.info("Seeking into an interstitial",c.ka),Dq(this,c).catch(()=>{this.f.seek(b)}),!1}else{const d=Eq(this,b);d&&!d.gh&&(this.g.info("Trigger interstitial due to jump over it",d,"will resume at",b),Dq(this,d,b).catch(()=>{d.gh=new Date;this.f.seek(b)}))}return!0});this.fa=new yv({eh:this.ja.config,
479
+ pg:a.player,preloadMedia:!0,gb:a.gb,sideAdContainer:this.ja.sideAdContainer,onAudioDecision:this.ja.onAudioDecision});this.h=[];this.a=[];this.j=!1;Lq(this,a.player)}destroy(){const a=this;return _.x(function*(){Mq(a);a.a=[];a.j=!1;a.f.setSeekInterceptor(null);yield a.fa.destroy()})}Lb(){return this.j}setMuted(a){var b=this.fa;(b.B=a)?(b.a.setMuted(!0),jq(b,!0)):(a=(a=b.getCurrentItem())?a.Ja:null,Sp(b,a,a?Tp:Up))}isMuted(){return this.fa.isMuted()}isLive(){const a=this.fa.Nd();return a?a.isLive():
480
+ null}Ya(a){this.f.trigger(a)}},uq=0,Vq=1,Xq=2,Yq=3,br=4,ar=5,vq=6;var Nr=class{constructor(){this.a=null}load(){return Promise.resolve()}start(){return Promise.resolve()}o(a,b,c){const d=a.getConfiguration();a=Object.assign({},{config:d,player:a,gb:b},d.ads.hls||{},{Wh:c});this.a=new zv(a);Uq(this.a)}setMuted(a){this.a&&this.a.setMuted(a)}isMuted(){return this.a?this.a.isMuted():!0}resume(){const a=Nq(this.a);a&&a.play()}pause(){const a=Nq(this.a);a&&a.pause()}skip(){}getVolume(){const a=Nq(this.a);return a?a.getVolume()||0:0}setVolume(a){const b=Nq(this.a);if(b)return b.setVolume(a)}getPosition(){const a=
481
+ Nq(this.a);return a?a.getPosition():-1}l(){return!this.a.Lb()}h(){return this.a.destroy()}};Nr.prototype.getPosition=Nr.prototype.getPosition;Nr.prototype.setVolume=Nr.prototype.setVolume;Nr.prototype.getVolume=Nr.prototype.getVolume;Nr.prototype.skip=Nr.prototype.skip;Nr.prototype.pause=Nr.prototype.pause;Nr.prototype.resume=Nr.prototype.resume;var Av=class{constructor(a){this.m=a;this.j=this.m.getNetworkEngine();this.a=new _.Rt;this.h=null;this.f=!0;gr(this)}release(){this.a.release();hr(this);this.m=null}};_.z("clpp.polyfill.installAll",kr);var jr=[];_.z("clpp.polyfill.register",_.lr);var pr=class{constructor(a,b,c){this.h=a;this.f=b;JSON.parse(_.cj(_.sj(a)));this.a=JSON.parse(_.cj(_.sj(b)));this.j=c}};var nr={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},Jl="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var Pr=class{constructor(a){this.f=a;this.a=null;this.g=new _.S("clpp.utils.LicenseKey")}},Cr="vod",Br="live";var is,Gr,Jr,Hr;is=class{constructor(a){this.m=a;this.f=a.getNetworkEngine();this.h=Kr(this);this.f.Ec(this.h);this.a=null}release(){this.a=null;this.f.vd(this.h)}};_.Bv="maxSuggestedBitrateKbps";Gr={du:"duress",etp:_.je,mb:_.Bv,rd:"responseDelay",rtt:"roundTripTime"};Jr={at:"availabilityTime",br:"encodedBitrateKbps",ht:"heldTime",n:"intermediaryIdentifier",nor:"nextObjectResponse",nrr:"nextRangeResponse",d:"objectDuration",ot:"objectType",su:"startup",st:"streamType",sf:"streamingFormat",v:Dg};
482
+ Hr=new _.S("clpp.net.CmsdManager");var R=class extends _.Bu{constructor(a,b,c){super();kr();this.g=new _.S("clpp.Player");if(!a)throw new _.I(_.F,7,7102);this.$=new _.Rt;this.f=this.C=b||_.Ml();this.l=null;void 0===this.f.license&&(this.f.license=Jl,this.g.warn("You are using the embedded demo license!"));if(!this.f.license)throw this.g.error("You provided null or empty string as your license. Please check your license configuration."),new _.I(_.F,7,7101,"No license provided in configuration!");this.j=new Mp(a,c);this.G=this.A=this.a=
483
+ this.F=null;this.I=new _.Dr;this.h=null;this.W=[];this.Y=!0;this.K={};this.da=null;this.R=!0;this.S=this.O=!1;this.L=this.Lc=null;this.ue=!1;this.ha=new Av(this);this.B=null;this.on(_.Zf,()=>{this.getState()===_.$o&&(this.a?this.a.unload():Promise.resolve())});this.on(_.Gc,this.ba.bind(this));this.on(_.Fc,this.ba.bind(this));this.on(_.mg,()=>Or(this));Qr(this,this.f.license);this.j.getMedia()&&(a=this.j.getMedia(),a.hasAttribute("autoplay")&&(a.removeAttribute("autoplay"),this.g.debug("Removed autoplay attribute from video element. Auto play will be handled by configuration."),
484
+ void 0===this.f.autoplay&&(this.f.autoplay=!0,this.g.debug("Setting autoplay in configuration since it was specified in the video element"))));a=[];for(const d of Lr)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.g.error("Error while creating player plugin",e)}Sr(this,a);this.M=_.ma;Wl(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 _.D(_.r,{detail:a}),this.trigger(a)}ed(a){a=
485
+ this.K[a];void 0===a&&(a=null);return a}getSurface(){return this.j}getConfiguration(){return _.lh(this.f)}getDrmInfo(){return this.a?this.a.getDrmInfo():null}detach(){return this.a?this.a.detach():Promise.resolve()}release(){if(null!=this.l)return this.g.info("Player release already in progress"),this.l;this.g.debug("Releasing player");this.l=Vr(this);return this.l.finally(()=>{Wr(this);this.g.debug("Player released");this.l=null})}destroy(){if(this.O)return this.g.debug("The player is already destroyed. No-op"),
486
+ new Promise(a=>a());this.O=!0;return this.release().then(()=>{this.g.debug(ya);this.trigger(new _.D("destroying"));return _.Rr(this,_.Ve)}).then(()=>{this.a&&this.a.stopForwardingEventsTo(this);this.bd.clear();this.ha.release();if(this.a)return this.a.destroy()}).then(()=>this.I.destroy()).then(()=>{Zl();this.A=this.a=null;this.trigger(new _.D("destroyed"))})}load(a){const b=this;return _.x(function*(){try{_.Jn(of);b.M=_.ma;b.Y=!0;const c=_.mp(a),d=Pl(a)?a:{};if(d.license)throw new _.I(_.F,7,7100,
487
+ "License cannot be passed into the load method.");yield _.ds(b,d,c);yield _.es(b);yield _.gs(b);_.Jn(nf);_.Ln("player.load",of,nf)}catch(c){Wr(b);if(b.l)throw b.g.info(bb),new _.I(_.F,7,7E3);throw c;}})}preload(a){const b=this;return _.x(function*(){yield _.ds(b,a);if(b.a){var c=b.a;c.preload?yield c.preload(b.f):b.g.warn(wb)}else b.g.warn(tb)})}use(a){(a=$l(a))&&a.o(this)}remove(a){return(this.getState()<=_.gp||this.R)&&null!==Ul(a)?(am(a),this.S=!0):!1}play(){return this.a?!this.h||this.h instanceof
488
+ Nr||this.a.namespace()===_.td?this.a.play():this.h.start(this.a):Promise.reject("No player initialized. You need to load content before calling play.")}pause(){return this.a?this.a.pause():Promise.reject("No player initialized. You need to load content before calling pause.")}getTrackManager(){return this.a&&this.a.getTrackManager()}getBufferInfo(a){return this.a?this.a.getBufferInfo(a):new _.Au}getState(){return this.a?this.a.getState():_.gp}getPeriods(){return this.a?this.a.getPeriods():[]}isEnded(){return this.a&&
489
+ 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()===_.$o?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}}tc(){const a=this.a;return a&&a.tc?a.tc():null}getVolume(){return this.a?this.a.getVolume():
490
+ null}setVolume(a){this.a&&this.a.setVolume(a)}getDuration(){return this.a?this.a.getDuration():-1}getAdsManager(){return this.h}namespace(){return this.a&&this.a.namespace()||"Undefined"}getPlaybackRate(){return this.a?this.a.getPlaybackRate():1}setPlaybackRate(a,b){this.a&&this.a.setPlaybackRate(a,b)}isMuted(){return this.h&&this.h instanceof Nr?this.h.isMuted():this.a&&this.a.isMuted()||!1}setMuted(a){this.a&&this.a.setMuted(a);this.h&&this.h instanceof Nr&&this.h.setMuted(a)}getNetworkEngine(){return this.I}setNetworkEngine(a){this.I=
491
+ a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&this.a.isLive()}getStats(){return this.a?this.a.getStats():null}Wf(){return Object.freeze(this.da)}getLoadedSource(){return this.a&&this.a.getLoadedSource()}getTimelineCues(){return this.a?this.a.getTimelineCues():[]}getCueTimeline(){return this.a?this.a.getCueTimeline():null}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.Lc=a;as(this)}setCdnErrorCallback(a){this.L=a;this.a&&this.a.setCdnErrorCallback(this.L)}ba(){this.ue=
492
+ !0}};_.z("clpp.Player",R);R.registerPlugin=_.Mr;R.prototype.setCdnErrorCallback=R.prototype.setCdnErrorCallback;R.prototype.setDrmCustomDataModifier=R.prototype.setDrmCustomDataModifier;R.prototype.resetAbr=R.prototype.resetAbr;R.prototype.getTimelineCues=R.prototype.getTimelineCues;R.prototype.getLoadedSource=R.prototype.getLoadedSource;R.prototype.getSources=R.prototype.Wf;R.prototype.getStats=R.prototype.getStats;R.prototype.isLive=R.prototype.isLive;R.prototype.getTextDisplayer=R.prototype.getTextDisplayer;
493
+ R.prototype.setNetworkEngine=R.prototype.setNetworkEngine;R.prototype.getNetworkEngine=R.prototype.getNetworkEngine;R.prototype.setMuted=R.prototype.setMuted;R.prototype.isMuted=R.prototype.isMuted;R.prototype.setPlaybackRate=R.prototype.setPlaybackRate;R.prototype.getPlaybackRate=R.prototype.getPlaybackRate;R.prototype.namespace=R.prototype.namespace;R.prototype.getAdsManager=R.prototype.getAdsManager;R.prototype.getDuration=R.prototype.getDuration;R.prototype.setVolume=R.prototype.setVolume;
494
+ R.prototype.getVolume=R.prototype.getVolume;R.prototype.getTimelineOffset=R.prototype.tc;R.prototype.getSeekRange=R.prototype.getSeekRange;R.prototype.getPresentationStartTime=R.prototype.getPresentationStartTime;R.prototype.seek=R.prototype.seek;R.prototype.getPosition=R.prototype.getPosition;R.prototype.isPaused=R.prototype.isPaused;R.prototype.isEnded=R.prototype.isEnded;R.prototype.getState=R.prototype.getState;R.prototype.getBufferInfo=R.prototype.getBufferInfo;R.prototype.getTrackManager=R.prototype.getTrackManager;
495
+ R.prototype.pause=R.prototype.pause;R.prototype.play=R.prototype.play;R.prototype.remove=R.prototype.remove;R.prototype.use=R.prototype.use;R.prototype.load=R.prototype.load;R.prototype.destroy=R.prototype.destroy;R.prototype.release=R.prototype.release;R.prototype.getDrmInfo=R.prototype.getDrmInfo;R.prototype.getConfiguration=R.prototype.getConfiguration;R.prototype.getSurface=R.prototype.getSurface;R.prototype.getPlugin=R.prototype.ed;R.prototype.off=R.prototype.off;R.prototype.one=R.prototype.one;
496
+ R.prototype.on=R.prototype.on;_.gp=0;_.hp=1;_.cp=2;_.jp=3;_.ip=4;_.Zo=5;_.$o=6;_.pv=7;_.fp={IDLE:_.gp,PREPARING:_.hp,BUFFERING:_.cp,PLAYING:_.jp,PAUSED:_.ip,ENDED:_.Zo,ERROR:_.$o,UNSET:_.pv};R.State=_.fp;var Lr=[];var Cv=class extends R{constructor(a,b,c){super(a,b,c);a={manifest:{timeline:{version:2},keepTimelineLive:!0},streaming:{preferNativeHlsOnSafari:!1,enableLiveEdgeChasing:!1,startAtSegmentBoundary:!1}};this.C=_.kh(this.C,a);this.f=_.kh(this.f,a);this.H=0;this.o=[];this.V=!1;this.w=null;this.J=[]}open(a,b){const c=this;return _.x(function*(){if(c.w)throw new _.I(_.F,7,7008,`Cannot call open() while ${c.w}() is ongoing!`);if(0!==a)throw new _.I(_.F,7,7007,"The index parameter only supports the value of 0.");
497
+ if(0===b.length)throw new _.I(_.F,7,7003,kb);if(b.some(g=>!g.id||!g.source))throw new _.I(_.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 _.I(_.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 _.I(_.F,7,7100,"Unsupported `playlist.timeline` config value!");e=d.startTime;if(null!=e&&(typeof e!==_.t||0>e))throw new _.I(_.F,
498
+ 7,7100,"Invalid `playlist.startTime` config value!");f=d.endTime;if(null!=f&&(typeof f!==_.t||0>f||null!=e&&f<=e))throw new _.I(_.F,7,7100,"Invalid `playlist.endTime` config value!");if("DVR"===d.content&&!f)throw new _.I(_.F,7,7100,"`playlist.endTime` config value is required for DVR content!");}try{ks(c),c.w="open",yield ns(c,b),c.H=0,c.o=b,c.V=!0,os(c,b[0].playlist||{})}finally{c.w=null}})}Lg(a){const b=this;return _.x(function*(){if(b.w)throw new _.I(_.F,7,7008,`Cannot call addItem() while ${b.w}() is ongoing!`);
499
+ if(!b.V)throw new _.I(_.F,7,7008,"open() must be called before addItem()!");if(!a.id||!a.source)throw new _.I(_.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 _.I(_.F,7,7100,"A config with this `id` already exists in the playlist!");try{b.w="addItem",b.o.push(a),yield ps(b,a)}finally{b.w=null}})}getCurrentItem(){return this.o[this.H]||null}getCurrentItemIndex(){return this.H}vh(){return[...this.o]}fd(){return this.o.length}getTimeline(){return this.a?
500
+ this.a.getTimeline():null}seekWith(a){return this.a?this.a.seekWith(a):Promise.resolve()}release(){this.o=[];this.H=0;this.V=!1;return super.release()}destroy(){ks(this);return super.destroy()}setCdnErrorCallback(){throw new _.I(1,7,7009,"CDN switching is not supported!");}};_.z("clpp.plist.ScPlaylist",Cv);Cv.prototype.setCdnErrorCallback=Cv.prototype.setCdnErrorCallback;Cv.prototype.destroy=Cv.prototype.destroy;Cv.prototype.release=Cv.prototype.release;Cv.prototype.seekWith=Cv.prototype.seekWith;
501
+ Cv.prototype.getTimeline=Cv.prototype.getTimeline;Cv.prototype.getSize=Cv.prototype.fd;Cv.prototype.getPlaylist=Cv.prototype.vh;Cv.prototype.getCurrentItemIndex=Cv.prototype.getCurrentItemIndex;Cv.prototype.getCurrentItem=Cv.prototype.getCurrentItem;Cv.prototype.addItem=Cv.prototype.Lg;Cv.prototype.open=Cv.prototype.open;var Dv=class extends _.Bu{constructor(a){super();this.ja=_.kh({transition:_.bf,preloadMedia:!1},a);this.h=[];this.a=0;const b=qs(a.anchorId,this.ja.config);this.o=new uv(b);this.f=null;this.j=!1;this.l=new Map;this.w=a.toggleVisible;this.g=new _.S(yd);this.o.a.forEach(c=>rs(this,c.player,!1))}dd(){return this.f}Nd(){return this.f?this.f.player:null}Rf(){return this.l.get(this.a+1)||null}Tf(){return this.l.get(this.a-1)||null}Sf(){return[this.Tf(),this.Rf()].filter(Boolean)}ji(a){if(0<this.h.length)throw Error("Cannot re-set items in the playlist");
502
+ this.g.info("Set items",a);this.h=a.map((b,c)=>({config:b,index:c,preloadPromise:Promise.resolve(),disposers:[]}))}ii(a){if(0===this.h.length)throw Error(jb);if(0>a||a>this.h.length-1)throw Error("Index out of bounds");this.a=a}jd(){return this.a<this.h.length-1}Xf(){return 0<this.a}Uh(){const a=this;return _.x(function*(){if(a.j)a.g.warn("Cannot play first item while busy");else if(0===a.h.length)a.g.warn(jb);else{a.j=!0;a.g.info(`First (index: ${a.a})`);var b=a.h[a.a];try{a.g.info(`First loading (index: ${a.a})`),
503
+ yield us(a,b),a.g.info(`First playing (index: ${a.a})`)}catch(c){throw a.g.error(`First failed (index: ${a.a})`),c;}finally{a.j=!1,ys(a)}}})}ng(){const a=this;return _.x(function*(){if(a.j)a.g.warn("Cannot play next item while busy");else if(a.jd()){a.j=!0;a.a+=1;a.g.info(`Next (index: ${a.a})`);var b=a.f;a.ja.transition===_.bf&&b.player.pause();Ds(a,a.a+-2);a.l.delete(a.a);var c=a.h[a.a];try{a.g.info(`Next loading (index: ${a.a})`),yield zs(a,c),a.g.info(`Next playing (index: ${a.a})`)}catch(d){throw a.g.error(`Next failed (index: ${a.a})`),
504
+ d;}finally{a.j=!1,b&&Cs(a,b),ys(a)}}else a.g.warn("There are no more items in the playlist")})}Vh(){const a=this;return _.x(function*(){if(a.j)a.g.warn("Cannot play previous item while busy");else if(a.Xf()){a.j=!0;--a.a;a.g.info(`Previous (index: ${a.a})`);var b=a.f;a.ja.transition===_.bf&&b.player.pause();Ds(a,a.a+2);a.l.delete(a.a);var c=a.h[a.a];try{a.g.info(`Previous loading (index: ${a.a})`),yield zs(a,c),a.g.info(`Previous playing (index: ${a.a})`)}catch(d){throw a.g.error(`Previous failed (index: ${a.a})`),
505
+ d;}finally{a.j=!1,b&&Cs(a,b),ys(a)}}else a.g.warn("There are no more previous items in the playlist")})}destroy(){const a=this;return _.x(function*(){a.g.info("Destroy");yield Promise.all([Es(a),a.f?Cs(a,a.f):Promise.resolve()]);yield Fs(a)})}};_.z(yd,Dv);Dv.prototype.destroy=Dv.prototype.destroy;Dv.prototype.playPrev=Dv.prototype.Vh;Dv.prototype.playNext=Dv.prototype.ng;Dv.prototype.playFirst=Dv.prototype.Uh;Dv.prototype.hasPrev=Dv.prototype.Xf;Dv.prototype.hasNext=Dv.prototype.jd;
506
+ Dv.prototype.setIndex=Dv.prototype.ii;Dv.prototype.setItems=Dv.prototype.ji;Dv.prototype.getPreloading=Dv.prototype.Sf;Dv.prototype.getPrev=Dv.prototype.Tf;Dv.prototype.getNext=Dv.prototype.Rf;Dv.prototype.getCurrentPlayer=Dv.prototype.Nd;Dv.prototype.getCurrent=Dv.prototype.dd;var Bs="preload",ss=_.Ge;var Gs=new Map;var Gv=class{constructor(a){this.h=a;this.f={keepOriginalTimestamps:!0,remux:!1};this.a=new muxjs.mp4.Transmuxer(this.f)}destroy(){this.a.dispose();this.a=null}reset(){this.a=new muxjs.mp4.Transmuxer(this.f)}isSupported(a,b){const c="mp2t"===a.toLowerCase().split(";")[0].split("/")[1],d=a.toLowerCase().split(";")[0]===_.Qc;if(!window.muxjs||!c&&!d)return!1;if(d)return _.Hs(Uc);if(b)return _.Hs(Is(b,a));b=Is(_.p,a);a=Is(_.w,a);return _.Hs(b)||_.Hs(a)}isMuxed(a,b){return 1<this.demuxMimeTypes(a,b).size}demuxMimeTypes(a,
507
+ b){const c=new Map;c.set(a,b);try{const d=_.Ik(b),e=_.Jk(b).split(","),f=new Map,g=Ni(_.p,e),h=Ni(_.w,e);g&&f.set(_.p,this.convertCodecs(_.p,_.Hk(d,g)));h&&f.set(_.w,this.convertCodecs(_.w,_.Hk(d,h)));return f}catch(d){return c}}convertCodecs(a,b){return b.toLowerCase().split(";")[0]===_.Qc?Uc:"mp2t"===b.toLowerCase().split(";")[0].split("/")[1]?Is(a,b):b}getOriginalMimeType(){return this.h}transmux(a){const b=[],c=[];let d=[],e=null;a=_.K(a);const f=h=>{d=h.captions;const k=new Uint8Array(h.data.byteLength+
508
+ h.initSegment.byteLength);k.set(h.initSegment,0);k.set(h.data,h.initSegment.byteLength);h.type===Ev?b.push(k):h.type===Fv&&c.push(k)},g=()=>{e={video:_.wj(...b),captions:d,audio:_.wj(...c)}};this.a.on("data",f);this.a.on("done",g);this.a.push(a);this.a.flush();this.a.off("data",f);this.a.off("done",g);if(!e)throw new _.I(_.F,3,3018);return e}};Ck(_.Qc,()=>new Gv(_.Qc));Ck(_.Gg,()=>new Gv(_.Gg));var Fv=_.p,Ev=_.w;var Hv=class{getCuePoints(){}Lb(){}Kb(){}};_.z("clpp.ads.IAdsTimeline",Hv);Hv.prototype.hasPostroll=Hv.prototype.Kb;Hv.prototype.hasPreroll=Hv.prototype.Lb;Hv.prototype.getCuePoints=Hv.prototype.getCuePoints;_.Iv=class{f(){}a(){}h(){}o(){}};var Lv=class extends _.Gu{constructor(a,b,c,d,e){super(Ya);this.l=a;this.j=b;this.h=c;this.a=d;this.o=e;this.g=new _.S(ud);_.mj(this.l)?this.g.warn(_.Wb):this.cb(_.Jd,{licenseUrl:this.l,videoRobustness:[_.Bb,void 0],audioRobustness:[_.Ab,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.sd.bind(this)}});_.mj(this.j)?this.g.warn(_.sb):this.cb(_.Hd,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.sd.bind(this)}});
509
+ _.mj(this.h)?this.g.warn(_.Ta):_.mj(this.a)?this.g.warn(_.Ra):this.cb(_.Dd,{licenseUrl:this.h,certificateUrl:this.a,modifiers:{licenseRequest:this.ig.bind(this),licenseResponse:this.jg.bind(this),certificateRequest:this.sd.bind(this),extractContentId:this.Mf.bind(this)}})}sd(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}Mf(a,b){a=zm(b);switch(this.o){case Jv:return a;case Kv:return(new _.Am(a)).a;default:throw Error("Unknown content ID strategy");}}ig(a,b){b.headers[ta]=
510
+ Pc;this.sd(a,b);a={spc:_.qj(b.body)};b.body=_.ij(_.gk(a,!0))}jg(a,b){a=_.cj(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=_.sj(a).buffer}};_.z(ud,Lv);Lv.prototype.onFairPlayLicenseResponse=Lv.prototype.jg;Lv.prototype.onFairPlayLicenseRequest=Lv.prototype.ig;Lv.prototype.extractFairPlayContentId=Lv.prototype.Mf;Lv.prototype.onLicenseRequest=Lv.prototype.sd;Lv.prototype.constructor=Lv.prototype.constructor;Lv.NAME=Ya;
511
+ var Kv="hostname",Jv="full-skd";Lv.FairPlayContentIdStrategy={HOSTNAME:Kv,FULL_SKD:Jv};_.z("clpp.drm.HeaderDrmComponent",class extends _.Iv{h(a){a=a.getConfiguration();if(a.drm&&a.drm&&a.drm.env===Ya){a=a.drm.customData;if(!a)throw new _.I(_.F,7,7100,_.Kd);a=new Lv(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||Jv);_.em(a)}}a(){delete _.dm.HeaderDrm}id(){return"headerdrm"}});_.lr(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=_.K(c);a=new Uint8Array(this,a,b-a);d.set(a);return c})});_.lr(function(){_.Fh("mathRound.install")});_.lr(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;le in document||(Object.defineProperty(document,le,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
512
+ {get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Js);document.addEventListener("webkitfullscreenerror",Js);document.addEventListener("mozfullscreenchange",Js);document.addEventListener("mozfullscreenerror",Js);document.addEventListener("MSFullscreenChange",Js);document.addEventListener("MSFullscreenError",Js)}});_.lr(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=Ls,document.exitPictureInPicture=Ps,document.addEventListener("webkitpresentationmodechanged",Ks,!0))}});_.lr(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=Qs)}});_.lr(function(){if(window.VTTCue)_.Eh("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.Eh(Rb),window.VTTCue=Rs;else if(6===a)_.Eh("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=Ss;else{try{var b=!!Rs(1,2,"")}catch(c){b=!1}b&&(_.Eh(Rb),window.VTTCue=Rs)}}else _.Gh("VTTCue not available.")});var Ts;_.lr(function(){_.Fh("InputEvent.install");_.Pk("Trident/")&&HTMLInputElement.prototype.addEventListener!==Us&&(_.Eh("Patching input event support on IE."),Ts=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=Us)});_.lr(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.lr(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 Xs=class{constructor(){this.a=Vs()}};var Mv=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.h=b;this.f=0}};_.Nv=class{constructor(a,b,c){this.h=a;this.j=b;this.f=c||this.h.getMedia();this.a=null}start(){this.a=new ResizeObserver(a=>{a=a[0];this.j(a.contentRect.width,a.contentRect.height,this.h.isFullscreen())});this.f&&this.a.observe(this.f)}stop(){this.a&&(this.a.disconnect(),this.a=null)}};var Ov;_.Pv=class{constructor(){this.a=new Blob([Ov],{type:_.Hg})}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 _.qn;b=b.play();const d=(new _.Mk(()=>{d.stop();c.resolve(a)})).ia(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===pb?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
513
+ Ov=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,
500
514
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
501
515
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
502
516
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
503
517
  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,
504
518
  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,
505
- 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]);_.yv=class{constructor(a,b,c,d){this.id=a;this.f=b;this.a=c;this.h=d}getDuration(){return this.a}getId(){return this.id}Ob(){return this.f}gd(){return this.h}Fc(a){return this.getId()===a.getId()&&this.Ob()===a.Ob()&&this.getDuration()===a.getDuration()&&this.gd()===a.gd()}};_.z("clpp.media.TimelineWindow",_.yv);_.yv.prototype.isDynamic=_.yv.prototype.gd;_.yv.prototype.getStart=_.yv.prototype.Ob;_.yv.prototype.getId=_.yv.prototype.getId;_.yv.prototype.getDuration=_.yv.prototype.getDuration;_.zv=new _.S("clpp.media.TimestampParser");_.Av=class{constructor(){this.a=[];this.f=-1;this.h=null}mh(a){return this.a[a]||null}nh(){return this.a.length}oh(){return this.a}Jf(){return this.a[this.f]||null}gh(){return this.f}};_.z("clpp.media.Timeline",_.Av);_.Av.prototype.getCurrentWindowIndex=_.Av.prototype.gh;_.Av.prototype.getCurrentWindow=_.Av.prototype.Jf;_.Av.prototype.getWindows=_.Av.prototype.oh;_.Av.prototype.getWindowCount=_.Av.prototype.nh;_.Av.prototype.getWindow=_.Av.prototype.mh;_.Ks={};_.Ms={};var gt=class{constructor(a){this.a=new Uint8Array(a||65536);this.f=0;this.h=new Fs}};var Qs=window.XMLHttpRequest;var ft=class{constructor(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.j=new uv(a);this.length=a;this.A=b;this.f=this.a=this.h=0;this.l=null;this.o=-1;this.w=new Fs}};var bu=class extends _.np{constructor(a){super(new _.hn,()=>Promise.resolve());this.B=a;this.h=null;this.w=this.U;this.f=-1;this.j=this.l=this.o=null;$s(this)}then(a,b){this.U=this.U.then(a,b);return this}catch(a){this.U=this.U.catch(a);return this}abort(){if(this.a)return Promise.resolve();this.a=!0;return this.h.then(a=>{this.o&&clearTimeout(this.o);this.l&&this.l();return a.abort()}).catch(()=>{})}};var et=window.fetch,bt=window.AbortController,at=window.Headers;_.jt={};_.Cv=class{constructor(a){a=a.getConfiguration();a=_.$g(a.textStyle||a.textstyle||{});this.K=typeof a.backgroundColor===_.Vf?a.backgroundColor:null;this.R=typeof a.windowColor===_.Vf?a.windowColor:null;this.M=typeof a.fontColor===_.Vf?a.fontColor:null;this.O=typeof a.fontFamily===_.Vf?a.fontFamily:null;this.I=typeof a.fontSize===_.Vf?a.fontSize:null;this.C=typeof a.fontSizePercent===_.t?a.fontSizePercent:null;this.H=typeof a.edgeColor===_.Vf?a.edgeColor:"rgba(0, 0, 0, 1)";this.w=null;typeof a.edgeType===
506
- _.Vf&&(this.w=a.edgeType)}getBackgroundColor(){return this.K}setBackgroundColor(a){this.K=a;this.h()}getWindowColor(){return this.R}setWindowColor(a){this.R=a;this.h()}getFontFamily(){return this.O}setFontFamily(a){this.O=a;this.h()}getFontColor(){return this.M}setFontColor(a){this.M=a;this.h()}getFontSize(){return this.I}setFontSize(a){this.I=a;this.h()}getFontSizePercent(){return null===this.C?Bv:this.C}setFontSizePercent(a){this.C=a;this.h()}getEdgeColor(){return this.H}setEdgeColor(a){this.H=
507
- a;this.h()}getEdgeType(){return this.w}setEdgeType(a){this.w=a;this.h()}};_.Cv.prototype.setEdgeType=_.Cv.prototype.setEdgeType;_.Cv.prototype.getEdgeType=_.Cv.prototype.getEdgeType;_.Cv.prototype.setEdgeColor=_.Cv.prototype.setEdgeColor;_.Cv.prototype.getEdgeColor=_.Cv.prototype.getEdgeColor;_.Cv.prototype.setFontSizePercent=_.Cv.prototype.setFontSizePercent;_.Cv.prototype.getFontSizePercent=_.Cv.prototype.getFontSizePercent;_.Cv.prototype.setFontSize=_.Cv.prototype.setFontSize;
508
- _.Cv.prototype.getFontSize=_.Cv.prototype.getFontSize;_.Cv.prototype.setFontColor=_.Cv.prototype.setFontColor;_.Cv.prototype.getFontColor=_.Cv.prototype.getFontColor;_.Cv.prototype.setFontFamily=_.Cv.prototype.setFontFamily;_.Cv.prototype.getFontFamily=_.Cv.prototype.getFontFamily;_.Cv.prototype.setWindowColor=_.Cv.prototype.setWindowColor;_.Cv.prototype.getWindowColor=_.Cv.prototype.getWindowColor;_.Cv.prototype.setBackgroundColor=_.Cv.prototype.setBackgroundColor;
509
- _.Cv.prototype.getBackgroundColor=_.Cv.prototype.getBackgroundColor;var Bv=1/15;var nt="raised",ot="depressed",qt="dropshadow",pt="uniform";_.z("clpp.text.EdgeType",{NONE:_.Je,RAISED:nt,DEPRESSED:ot,DROP_SHADOW:qt,UNIFORM:pt});_.kt(Gc,class{constructor(a){this.f=a;this.a=null;this.g=new _.S("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.lt(_.Hc);c?(b=new c(this.f),b.parseInit(a)):this.g.warn("The clpp.ttml.Mp4TtmlParser class is not available. Please register the ttml component first.")}catch(c){b=null}if(b)this.a=b;else{try{const c=_.lt(_.Ic);c?(b=new c(this.f),b.parseInit(a)):this.g.warn("The clpp.vtt.Mp4VttParser class is not available. Please register the vtt component first.")}catch(c){b=null}if(b)this.a=
510
- 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 Dv;
511
- _.Ev=class extends _.Cv{constructor(a){super(a);this.o=a.getSurface().getMedia();this.f=`clpp-video-${Dv++}`;this.j=document.createElement(_.Xf);this.l=this.A=!1;_.wp(this.o,this.f);document.head.appendChild(this.j);this.h()}append(){}remove(){return!0}isTextVisible(){return this.A}setTextVisibility(a){this.A=a}h(){if(!this.l){var a={"background-color":this.getBackgroundColor(),color:this.getFontColor(),"font-family":this.getFontFamily(),"font-size":this.getFontSize(),"text-shadow":_.rt(this)},b=
512
- 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()}};Dv=0;_.Ho("native",new class{a(){return!0}create(a){return new _.Ev(a)}});_.Fv=class{onPlayerCreated(){}onContentWillLoad(){return Promise.resolve()}onContentLoaded(){return Promise.resolve()}onPlayerWillDestroy(){}onPlayerWillRelease(){}};};f.call(g,window);g.clpp._ = _;delete window.clpp; export let clpp = g.clpp; export default clpp;
519
+ 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]);_.Qv=class{constructor(a,b,c,d){this.id=a;this.f=b;this.a=c;this.h=d}getDuration(){return this.a}getId(){return this.id}Tb(){return this.f}md(){return this.h}Mc(a){return this.getId()===a.getId()&&this.Tb()===a.Tb()&&this.getDuration()===a.getDuration()&&this.md()===a.md()}};_.z("clpp.media.TimelineWindow",_.Qv);_.Qv.prototype.isDynamic=_.Qv.prototype.md;_.Qv.prototype.getStart=_.Qv.prototype.Tb;_.Qv.prototype.getId=_.Qv.prototype.getId;_.Qv.prototype.getDuration=_.Qv.prototype.getDuration;_.Rv=new _.S("clpp.media.TimestampParser");_.Sv=class{constructor(){this.a=[];this.f=-1;this.h=null}yh(a){return this.a[a]||null}zh(){return this.a.length}Ah(){return this.a}Qf(){return this.a[this.f]||null}sh(){return this.f}};_.z("clpp.media.Timeline",_.Sv);_.Sv.prototype.getCurrentWindowIndex=_.Sv.prototype.sh;_.Sv.prototype.getCurrentWindow=_.Sv.prototype.Qf;_.Sv.prototype.getWindows=_.Sv.prototype.Ah;_.Sv.prototype.getWindowCount=_.Sv.prototype.zh;_.Sv.prototype.getWindow=_.Sv.prototype.yh;_.bt={};_.dt={};var yt=class{constructor(a){this.a=new Uint8Array(a||65536);this.f=0;this.h=new Xs}};var ht=window.XMLHttpRequest;var xt=class{constructor(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.j=new Mv(a);this.length=a;this.A=b;this.f=this.a=this.h=0;this.l=null;this.o=-1;this.w=new Xs}};var vu=class extends _.up{constructor(a){super(new _.qn,()=>Promise.resolve());this.B=a;this.h=null;this.w=this.U;this.f=-1;this.j=this.l=this.o=null;rt(this)}then(a,b){this.U=this.U.then(a,b);return this}catch(a){this.U=this.U.catch(a);return this}abort(){if(this.a)return Promise.resolve();this.a=!0;return this.h.then(a=>{this.o&&clearTimeout(this.o);this.l&&this.l();return a.abort()}).catch(()=>{})}};var wt=window.fetch,tt=window.AbortController,st=window.Headers;_.Bt={};_.Uv=class{constructor(a){a=a.getConfiguration();a=_.lh(a.textStyle||a.textstyle||{});this.K=typeof a.backgroundColor===_.bg?a.backgroundColor:null;this.R=typeof a.windowColor===_.bg?a.windowColor:null;this.M=typeof a.fontColor===_.bg?a.fontColor:null;this.O=typeof a.fontFamily===_.bg?a.fontFamily:null;this.I=typeof a.fontSize===_.bg?a.fontSize:null;this.C=typeof a.fontSizePercent===_.t?a.fontSizePercent:null;this.H=typeof a.edgeColor===_.bg?a.edgeColor:"rgba(0, 0, 0, 1)";this.w=null;typeof a.edgeType===
520
+ _.bg&&(this.w=a.edgeType)}getBackgroundColor(){return this.K}setBackgroundColor(a){this.K=a;this.h()}getWindowColor(){return this.R}setWindowColor(a){this.R=a;this.h()}getFontFamily(){return this.O}setFontFamily(a){this.O=a;this.h()}getFontColor(){return this.M}setFontColor(a){this.M=a;this.h()}getFontSize(){return this.I}setFontSize(a){this.I=a;this.h()}getFontSizePercent(){return null===this.C?Tv:this.C}setFontSizePercent(a){this.C=a;this.h()}getEdgeColor(){return this.H}setEdgeColor(a){this.H=
521
+ a;this.h()}getEdgeType(){return this.w}setEdgeType(a){this.w=a;this.h()}};_.Uv.prototype.setEdgeType=_.Uv.prototype.setEdgeType;_.Uv.prototype.getEdgeType=_.Uv.prototype.getEdgeType;_.Uv.prototype.setEdgeColor=_.Uv.prototype.setEdgeColor;_.Uv.prototype.getEdgeColor=_.Uv.prototype.getEdgeColor;_.Uv.prototype.setFontSizePercent=_.Uv.prototype.setFontSizePercent;_.Uv.prototype.getFontSizePercent=_.Uv.prototype.getFontSizePercent;_.Uv.prototype.setFontSize=_.Uv.prototype.setFontSize;
522
+ _.Uv.prototype.getFontSize=_.Uv.prototype.getFontSize;_.Uv.prototype.setFontColor=_.Uv.prototype.setFontColor;_.Uv.prototype.getFontColor=_.Uv.prototype.getFontColor;_.Uv.prototype.setFontFamily=_.Uv.prototype.setFontFamily;_.Uv.prototype.getFontFamily=_.Uv.prototype.getFontFamily;_.Uv.prototype.setWindowColor=_.Uv.prototype.setWindowColor;_.Uv.prototype.getWindowColor=_.Uv.prototype.getWindowColor;_.Uv.prototype.setBackgroundColor=_.Uv.prototype.setBackgroundColor;
523
+ _.Uv.prototype.getBackgroundColor=_.Uv.prototype.getBackgroundColor;var Tv=1/15;var Ft="raised",Gt="depressed",It="dropshadow",Ht="uniform";_.z("clpp.text.EdgeType",{NONE:_.Qe,RAISED:Ft,DEPRESSED:Gt,DROP_SHADOW:It,UNIFORM:Ht});_.Ct(Kc,class{constructor(a){this.f=a;this.a=null;this.g=new _.S("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.Dt(_.Lc);c?(b=new c(this.f),b.parseInit(a)):this.g.warn("The clpp.ttml.Mp4TtmlParser class is not available. Please register the ttml component first.")}catch(c){b=null}if(b)this.a=b;else{try{const c=_.Dt(_.Mc);c?(b=new c(this.f),b.parseInit(a)):this.g.warn("The clpp.vtt.Mp4VttParser class is not available. Please register the vtt component first.")}catch(c){b=null}if(b)this.a=
524
+ b;else throw new _.I(_.F,2,2011);}}parseMedia(a,b){if(!this.a)throw new _.I(_.F,2,2011);return this.a.parseMedia(a,b)}});var Vv;
525
+ _.Wv=class extends _.Uv{constructor(a){super(a);this.o=a.getSurface().getMedia();this.f=`clpp-video-${Vv++}`;this.j=document.createElement(_.dg);this.l=this.A=!1;_.Dp(this.o,this.f);document.head.appendChild(this.j);this.h()}append(){}remove(){return!0}isTextVisible(){return this.A}setTextVisibility(a){this.A=a}h(){if(!this.l){var a={"background-color":this.getBackgroundColor(),color:this.getFontColor(),"font-family":this.getFontFamily(),"font-size":this.getFontSize(),"text-shadow":_.Jt(this)},b=
526
+ Object.keys(a).map(c=>null!==a[c]?`${c}:${a[c]};`:"").join("");this.j.textContent=`.${this.f}::cue {${b}}`}}destroy(){this.o.classList.remove(this.f);document.head.removeChild(this.j);this.l=!0;return Promise.resolve()}};Vv=0;_.Qo("native",new class{a(){return!0}create(a){return new _.Wv(a)}});_.Xv=class{onPlayerCreated(){}onContentWillLoad(){return Promise.resolve()}onContentLoaded(){return Promise.resolve()}onPlayerWillDestroy(){}onPlayerWillRelease(){}};};f.call(g,window);g.clpp._ = _;delete window.clpp; export let clpp = g.clpp; export default clpp;