shaka-player 4.9.20 → 4.9.21

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.
@@ -141,19 +141,19 @@ Rd.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Sd};v
141
141
  Rd.lineInterpretation={LINE_NUMBER:Wd,PERCENTAGE:1};var Xd="start",ge={CENTER:"center",START:Xd,END:"end"};Rd.lineAlign=ge;var he={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Rd.defaultTextColor=he;var ie={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Rd.defaultTextBackgroundColor=ie;var Zd=400;Rd.fontWeight={NORMAL:Zd,BOLD:700};
142
142
  var be="normal",je={NORMAL:be,ITALIC:"italic",OBLIQUE:"oblique"};Rd.fontStyle=je;Rd.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function ke(){}ke.prototype.destroy=function(){};function le(a,b,c){me[a.toLowerCase().split(";")[0]+"-"+c]={priority:c,ef:b}}function ne(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([oe,pe,qe,re]),e=d.next();!e.done;e=d.next())if(e=me[c+"-"+e.value]){var f=e.ef(),g=f.isSupported(a,b);f.destroy();if(g)return e.ef}return null}Q("shaka.transmuxer.TransmuxerEngine",ke);ke.findTransmuxer=ne;ke.unregisterTransmuxer=function(a,b){delete me[a.toLowerCase().split(";")[0]+"-"+b]};
143
143
  ke.registerTransmuxer=le;ke.prototype.destroy=ke.prototype.destroy;var me={},re=1,qe=2,pe=3,oe=4;ke.PluginPriority={FALLBACK:re,PREFERRED_SECONDARY:qe,PREFERRED:pe,APPLICATION:oe};function se(){}function te(a,b){var c=a;b&&!ue.includes(a)&&(c+='; codecs="'+b+'"');return c}function ve(a,b){b&&(a+='; codecs="'+b+'"');return a}function we(a,b,c){var d=te(a,b);b=ve(a,b);ne(b)?(a=ne(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
144
- function xe(a,b,c){var d=[b];De.forEach(function(e,f){var g=a[f];"codecs"==f?ue.includes(a.mimeType)||d.push('codecs="'+c+'"'):g&&d.push(e+'="'+g+'"')});"PQ"==a.hdr&&d.push('eotf="smpte2084"');return d.join(";")}function Ee(a){return a.split(";")[0].split("/")[1]}
145
- function Ge(a){var b=He(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:case "mp4a"===a&&"40.34"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===
144
+ function xe(a,b,c){var d=[b];ye.forEach(function(e,f){var g=a[f];"codecs"==f?ue.includes(a.mimeType)||d.push('codecs="'+c+'"'):g&&d.push(e+'="'+g+'"')});"PQ"==a.hdr&&d.push('eotf="smpte2084"');return d.join(";")}function Ee(a){return a.split(";")[0].split("/")[1]}
145
+ function Fe(a){var b=He(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:case "mp4a"===a&&"40.34"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===
146
146
  a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi-hevc";case "dvav"===a:case "dva1"===a:return"dovi-avc";case "dav1"===a:return"dovi-av1"}return a}function Ie(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=He(c.value),b.push(c[0]);return b.sort().join(",")}function Je(a){return a.split(";")[0]}
147
147
  function Ke(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Le(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}function He(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}Q("shaka.util.MimeUtils",se);se.getFullTypeWithAllCodecs=ve;se.getFullType=te;
148
- var De=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),ue=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Me(a){this.i=null;this.j=a;this.F=!1;this.l=this.u=0;this.m=Infinity;this.h=this.g=null;this.G="";this.A=function(){};this.o=new Map}function Ne(a){return Oe[a]?!0:"application/cea-608"==a||"application/cea-708"==a?!!Jd:!1}Me.prototype.destroy=function(){this.j=this.i=null;this.o.clear();return Promise.resolve()};
148
+ var ye=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),ue=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Me(a){this.i=null;this.j=a;this.F=!1;this.l=this.u=0;this.m=Infinity;this.h=this.g=null;this.G="";this.A=function(){};this.o=new Map}function Ne(a){return Oe[a]?!0:"application/cea-608"==a||"application/cea-708"==a?!!Jd:!1}Me.prototype.destroy=function(){this.j=this.i=null;this.o.clear();return Promise.resolve()};
149
149
  function Pe(a,b,c,d,e){var f,g,h,k,l,m,n;return O(function(p){if(1==p.g)return E(p,Promise.resolve(),2);if(!a.i||!a.j)return p.return();if(null==c||null==d)return a.i.parseInit(Gb(b)),p.return();f=a.F?c:a.u;g={periodStart:a.u,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(Gb(b),g,e);k=t(h);for(l=k.next();!l.done;l=k.next())m=l.value,a.A(m,e||null,g);n=h.filter(function(r){return r.startTime>=a.l&&r.startTime<a.m});a.j.append(n);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);F(p)})}
150
150
  Me.prototype.remove=function(a,b){var c=this;return O(function(d){if(1==d.g)return E(d,Promise.resolve(),2);!c.j||!c.j.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));F(d)})};function Qe(a,b,c){a.l=b;a.m=c}function Re(a,b,c){a.G=b;if(b=a.o.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)}
151
151
  function Se(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Se(a,d.value,c)}
152
152
  function Te(a,b,c,d,e){var f=c+" "+d,g=new Map;b=t(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);Se(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.G&&a.j.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.o.has(f)||a.o.set(f,new Map),b=t(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.o.get(f).set(h,k);a.g=null==a.g?Math.max(c,
153
153
  a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}Q("shaka.text.TextEngine",Me);Me.prototype.destroy=Me.prototype.destroy;Me.findParser=function(a){return Oe[a]};Me.unregisterParser=function(a){delete Oe[a]};Me.registerParser=function(a,b){Oe[a]=b};var Oe={};function Ue(a,b){return a.concat(b)}function Ve(){}function We(a){return null!=a};function Xe(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer instanceof ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new WeakSet;return b(a)}function Ye(a){var b={},c;for(c in a)b[c]=a[c];return b};function Ze(){}
154
154
  function $e(a,b,c,d){var e=a.variants;if(b.length||c.length)e=af(e,b,c);if(d.length){b=new fb;c=t(e);for(e=c.next();!e.done;e=c.next())e=e.value,b.push(String(e.video.width||0),e);var f=[];b.forEach(function(u,v){u=0;var w=[],A={};v=t(v);for(var y=v.next();!y.done;A={Jd:A.Jd},y=v.next())A.Jd=y.value,y=d.filter(function(C){return function(z){return C.Jd.decodingInfos[0][z]}}(A)).length,y>u?(u=y,w=[A.Jd]):y==u&&w.push(A.Jd);f.push.apply(f,x(w))});e=f}c=new Set;b=new Set;var g=t(e);for(e=g.next();!e.done;e=
155
- g.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);c=Array.from(c).sort(function(u,v){return u.bandwidth-v.bandwidth});var h=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;var k=g.language+(g.channelsCount||0)+(g.audioSamplingRate||0)+g.roles.join(",")+g.label+g.groupId+g.fastSwitching,l=e.get(k)||[];if(l.length){var m=l[l.length-1],n=Ge(m.codecs),p=Ge(g.codecs);n!=p||g.bandwidth&&m.bandwidth&&!(g.bandwidth>m.bandwidth)||(l.push(g),h.push(g.id))}else l.push(g),h.push(g.id);
156
- e.set(k,l)}c=Array.from(b).sort(function(u,v){return u.bandwidth&&v.bandwidth?u.bandwidth-v.bandwidth:u.width-v.width});b=vd();var r=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;k=Math.round(g.frameRate||0)+(g.hdr||"")+g.fastSwitching;l=e.get(k)||[];if(l.length){m=l[l.length-1];if(!b&&(n=Ge(m.codecs),p=Ge(g.codecs),n!==p))continue;g.width>m.width||g.height>m.height?(l.push(g),r.push(g.id)):g.width==m.width&&g.height==m.height&&(n=Ge(m.codecs),p=Ge(g.codecs),n!=p||g.bandwidth&&
155
+ g.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);c=Array.from(c).sort(function(u,v){return u.bandwidth-v.bandwidth});var h=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;var k=g.language+(g.channelsCount||0)+(g.audioSamplingRate||0)+g.roles.join(",")+g.label+g.groupId+g.fastSwitching,l=e.get(k)||[];if(l.length){var m=l[l.length-1],n=Fe(m.codecs),p=Fe(g.codecs);n!=p||g.bandwidth&&m.bandwidth&&!(g.bandwidth>m.bandwidth)||(l.push(g),h.push(g.id))}else l.push(g),h.push(g.id);
156
+ e.set(k,l)}c=Array.from(b).sort(function(u,v){return u.bandwidth&&v.bandwidth?u.bandwidth-v.bandwidth:u.width-v.width});b=vd();var r=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;k=Math.round(g.frameRate||0)+(g.hdr||"")+g.fastSwitching;l=e.get(k)||[];if(l.length){m=l[l.length-1];if(!b&&(n=Fe(m.codecs),p=Fe(g.codecs),n!==p))continue;g.width>m.width||g.height>m.height?(l.push(g),r.push(g.id)):g.width==m.width&&g.height==m.height&&(n=Fe(m.codecs),p=Fe(g.codecs),n!=p||g.bandwidth&&
157
157
  m.bandwidth&&!(g.bandwidth>m.bandwidth)||(l.push(g),r.push(g.id)))}else l.push(g),r.push(g.id);e.set(k,l)}a.variants=a.variants.filter(function(u){var v=u.audio;u=u.video;return v&&!h.includes(v.id)||u&&!r.includes(u.id)?!1:!0})}
158
158
  function af(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={If:d.If},e=b.next())if(d.If=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.If)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={zf:d.zf},b=c.next())if(d.zf=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.zf)}}(d)),b.length){a=b;break}return a}function bf(a,b,c){a.variants=a.variants.filter(function(d){return cf(d,b,c)})}
159
159
  function cf(a,b,c){function d(h,k,l){return h>=k&&h<=l}var e=a.video;if(e&&e.width&&e.height){var f=e.width,g=e.height;g>f&&(g=t([g,f]),f=g.next().value,g=g.next().value);if(!d(f,b.minWidth,Math.min(b.maxWidth,c.width))||!d(g,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))return!1}return a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||a&&a.audio&&a.audio.channelsCount&&!d(a.audio.channelsCount,b.minChannelsCount,b.maxChannelsCount)||
@@ -195,10 +195,10 @@ q.chooseVariant=function(a){a=void 0===a?!1:a;var b=Infinity,c=Infinity;this.g.r
195
195
  (e=this.u);d=e;a&&e.length!=this.u.length&&(d=this.u.filter(function(l){return l&&(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1)}));a=Jf(this,this.g.restrictions,d,Infinity,Infinity);if(Infinity!=b||Infinity!=c){a=Kf(a);a=t(a);for(e=a.next();!e.done;e=a.next())if(e=e.value,e.height>=b&&e.width>=c){b=e.height;c=e.width;break}a=Jf(this,this.g.restrictions,d,b,c)}b=this.getBandwidthEstimate();d.length&&!a.length&&(a=Jf(this,null,d,Infinity,Infinity),a=[a[0]]);c=a[0]||null;for(d=
196
196
  0;d<a.length;d++){e=a[d];for(var f=isNaN(this.F)?1:Math.abs(this.F),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&(c.bandwidth!=e.bandwidth||c.bandwidth==e.bandwidth&&c.video&&e.video&&(c.video.width<e.video.width||c.video.height<e.video.height))&&(c=e)}this.j=Date.now();return c};q.enable=function(){this.m=!0};q.disable=function(){this.m=!1};
197
197
  q.segmentDownloaded=function(a,b,c){a<this.g.cacheLoadThreshold||(this.i.sample(a,b),c&&null!=this.j&&this.m&&Lf(this))};q.trySuggestStreams=function(){null!=this.j&&this.m&&Lf(this)};q.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=1E6*navigator.connection.downlink);a=this.i.getBandwidthEstimate(a);return this.l?this.l.getBandwidthEstimate(a):a};q.setVariants=function(a){this.u=a};
198
- q.playbackRateChanged=function(a){this.F=a};q.setMediaElement=function(a){var b=this;this.o=a;this.h&&(this.h.disconnect(),this.h=null);this.o&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.G.V(Qf)}),this.h.observe(this.o))};q.setCmsdManager=function(a){this.l=a};q.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
198
+ q.playbackRateChanged=function(a){this.F=a};q.setMediaElement=function(a){var b=this;this.o=a;this.h&&(this.h.disconnect(),this.h=null);this.o&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.G.V(Mf)}),this.h.observe(this.o))};q.setCmsdManager=function(a){this.l=a};q.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
199
199
  function Lf(a){if(!a.I){var b=a.i;if(!(b.g>=b.i))return;a.I=!0;a.j-=1E3*(a.g.switchInterval-a.g.minTimeToSwitch)}Date.now()-a.j<1E3*a.g.switchInterval||(b=a.chooseVariant(),a.getBandwidthEstimate(),b&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch))}function Jf(a,b,c,d,e){if(a.l){var f=a.l.Ih();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return cf(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}
200
200
  function Kf(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}Q("shaka.abr.SimpleAbrManager",If);If.prototype.configure=If.prototype.configure;If.prototype.setCmsdManager=If.prototype.setCmsdManager;If.prototype.setMediaElement=If.prototype.setMediaElement;If.prototype.playbackRateChanged=If.prototype.playbackRateChanged;If.prototype.setVariants=If.prototype.setVariants;
201
- If.prototype.getBandwidthEstimate=If.prototype.getBandwidthEstimate;If.prototype.trySuggestStreams=If.prototype.trySuggestStreams;If.prototype.segmentDownloaded=If.prototype.segmentDownloaded;If.prototype.disable=If.prototype.disable;If.prototype.enable=If.prototype.enable;If.prototype.chooseVariant=If.prototype.chooseVariant;If.prototype.init=If.prototype.init;If.prototype.release=If.prototype.release;If.prototype.stop=If.prototype.stop;var Qf=1;Q("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});Q("shaka.config.CodecSwitchingStrategy",{ql:"reload",Bi:"smooth"});function Rf(a,b,c,d){c=void 0===c?!0:c;d=void 0===d?!1:d;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c,d)}Rf.prototype.add=function(a,b,c){return Sf(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
201
+ If.prototype.getBandwidthEstimate=If.prototype.getBandwidthEstimate;If.prototype.trySuggestStreams=If.prototype.trySuggestStreams;If.prototype.segmentDownloaded=If.prototype.segmentDownloaded;If.prototype.disable=If.prototype.disable;If.prototype.enable=If.prototype.enable;If.prototype.chooseVariant=If.prototype.chooseVariant;If.prototype.init=If.prototype.init;If.prototype.release=If.prototype.release;If.prototype.stop=If.prototype.stop;var Mf=1;Q("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});Q("shaka.config.CodecSwitchingStrategy",{ql:"reload",Bi:"smooth"});function Rf(a,b,c,d){c=void 0===c?!0:c;d=void 0===d?!1:d;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c,d)}Rf.prototype.add=function(a,b,c){return Sf(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
202
202
  function Sf(a,b,c,d){var e;if(!(e=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(e=a.audio&&b.audio)){e=a.audio;var f=b.audio;e=!!((!e.channelsCount||!f.channelsCount||2<e.channelsCount||2<f.channelsCount)&&e.channelsCount!=f.channelsCount||e.spatialAudio!==f.spatialAudio||c&&!Tf(e,f)||!Uf(e.roles,f.roles)||d&&e.groupId!==f.groupId)}!(d=e)&&(d=a.video&&b.video)&&(a=a.video,b=b.video,d=!((!c||Tf(a,b))&&Uf(a.roles,b.roles)));return d?!1:!0}Rf.prototype.values=function(){return this.g.values()};
203
203
  function Tf(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return Ie(d)});b=b.codecs.split(",").map(function(d){return Ie(d)});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}function Uf(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};function Vf(a,b,c){b=void 0===b?"reload":b;c=void 0===c?!1:c;this.i=a;this.h=b;this.g=c;this.j=new Wf(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"",!1,"","","",b,c)}Vf.prototype.create=function(a){var b=this,c="smooth"==this.h&&vd(),d=a.filter(function(e){return Sf(b.i,e,!c,b.g)});return d.length?new Rf(d[0],d,!c,this.g):this.j.create(a)};
204
204
  function Wf(a,b,c,d,e,f,g,h,k,l){this.u=a;this.A=b;this.h=c;this.i=d;this.F=e;this.l=f;this.g=void 0===g?"":g;this.j=void 0===h?"":h;this.m=void 0===k?"reload":k;this.o=void 0===l?!1:l}
@@ -471,9 +471,9 @@ b,c.ra),u=function(){var A,y,C,z,B,D,K;return O(function(G){switch(G.g){case 1:r
471
471
  Xg).box("hev1",Xg).box("hvc1",Xg).box("dvav",Xg).box("dva1",Xg).box("dvh1",Xg).box("dvhe",Xg).box("vexu",Ug).box("proj",Ug).W("prji",function(I){I=I.reader.Kc();z.projection=I}).box("hfov",function(I){I=I.reader.T()/1E3;z.hfov=I}).parse(A),hm(a,z),C.has(b.type)?c.ra.timescale=C.get(b.type):null!=y&&(c.ra.timescale=y),D=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,E(G,a.g.sh(b.type,A),5);case 5:return E(G,ik(a.g.ka,b.type,A,null,b.stream,D),6);case 6:va(G,0);break;case 2:throw K=wa(G),b.gd=
472
472
  null,K;}})},a.g.Uj(c.startTime,c.ra),e.push(u()))),a.m.sequenceMode&&(v=b.pb?b.pb.i:null,c.i!=v&&e.push(tk(a.g.ka,b.type,c.startTime))),E(w,Promise.all(e),0)}})}
473
473
  function dm(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,p;return O(function(r){switch(r.g){case 1:h=d.closedCaptions&&0<d.closedCaptions.size;l=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;m=a.h.parsePrftBox&&!a.H;if(l||m)k=new Pg;l&&k.W("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var w=u.reader.Kc();var A=u.reader.Kc();var y=u.reader.T();var C=u.reader.T();var z=u.reader.T();var B=u.reader.T();var D=e.startTime+C/y}else y=u.reader.T(),D=u.reader.md()/
474
- y+e.timestampOffset,C=D-e.startTime,z=u.reader.T(),B=u.reader.T(),w=u.reader.Kc(),A=u.reader.Kc();u=u.reader.Hb(u.reader.getLength()-u.reader.Ja());if(v&&v.includes(w)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==w?a.g.Vj():(v=(new Map).set("detail",{startTime:D,endTime:D+z/y,schemeIdUri:w,value:A,timescale:y,presentationTimeDelta:C,eventDuration:z,id:B,messageData:u}),v=new S("emsg",v),v.cancelable=!0,a.g.onEvent(v),v.defaultPrevented||"https://aomedia.org/emsg/ID3"!=w&&"https://developer.apple.com/streaming/emsg-id3"!=
475
- w||(w=Xi(u),w.length&&e&&a.g.cf([{cueTime:e.startTime,data:u,frames:w,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});m&&k.W("prft",function(u){if(!a.H&&e.ra.timescale){var v=u.reader,w=u.version;v.T();u=v.T();var A=v.T();u=1E3*u+A/Math.pow(2,32)*1E3;0===w?v=v.T():(w=v.T(),v=v.T(),v=w*Math.pow(2,32)+v);u=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+u)).getTime();v=(new Map).set("detail",{wallClockTime:u,programStartDate:new Date(u-v/e.ra.timescale*1E3)});v=new S("prft",v);a.g.onEvent(v);
476
- a.H=!0}});(l||m)&&k.parse(f);return E(r,im(a,b,c),2);case 2:return Jg(a.l),n=b.le,b.le=!1,p=b.ph,b.ph=!1,E(r,a.g.sh(b.type,f),3);case 3:return E(r,ik(a.g.ka,b.type,f,e,d,h,n,p,g),4);case 4:Jg(a.l),F(r)}})}function im(a,b,c){var d,e,f,g;return O(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=Wj(a.g.ka,b.type);if(null==e)return h.return();f=c-e;g=f-d;return g<=a.h.evictionGoal?h.return():E(h,a.g.ka.remove(b.type,e,e+g),2)}Jg(a.l);F(h)})}
474
+ y+e.timestampOffset,C=D-e.startTime,z=u.reader.T(),B=u.reader.T(),w=u.reader.Kc(),A=u.reader.Kc();u=u.reader.Hb(u.reader.getLength()-u.reader.Ja());if(v&&v.includes(w)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==w?a.g.Vj():(v=D+z/y,y=(new Map).set("detail",{startTime:D,endTime:v,schemeIdUri:w,value:A,timescale:y,presentationTimeDelta:C,eventDuration:z,id:B,messageData:u}),y=new S("emsg",y),y.cancelable=!0,a.g.onEvent(y),y.defaultPrevented||"https://aomedia.org/emsg/ID3"!=w&&"https://developer.apple.com/streaming/emsg-id3"!=
475
+ w||(w=Xi(u),w.length&&a.g.cf([{cueTime:D,data:u,frames:w,dts:D,pts:D}],0,v)))});m&&k.W("prft",function(u){if(!a.H&&e.ra.timescale){var v=u.reader,w=u.version;v.T();u=v.T();var A=v.T();u=1E3*u+A/Math.pow(2,32)*1E3;0===w?v=v.T():(w=v.T(),v=v.T(),v=w*Math.pow(2,32)+v);u=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+u)).getTime();v=(new Map).set("detail",{wallClockTime:u,programStartDate:new Date(u-v/e.ra.timescale*1E3)});v=new S("prft",v);a.g.onEvent(v);a.H=!0}});(l||m)&&k.parse(f);return E(r,
476
+ im(a,b,c),2);case 2:return Jg(a.l),n=b.le,b.le=!1,p=b.ph,b.ph=!1,E(r,a.g.sh(b.type,f),3);case 3:return E(r,ik(a.g.ka,b.type,f,e,d,h,n,p,g),4);case 4:Jg(a.l),F(r)}})}function im(a,b,c){var d,e,f,g;return O(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=Wj(a.g.ka,b.type);if(null==e)return h.return();f=c-e;g=f-d;return g<=a.h.evictionGoal?h.return():E(h,a.g.ka.remove(b.type,e,e+g),2)}Jg(a.l);F(h)})}
477
477
  function Zl(a){return a&&a.type==Sc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
478
478
  function em(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.Td())return l.return(e);f=null;if(b.Z){var m=b.Z,n=m.h;c instanceof Gi&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.eh=d),f=m.df):f=null}f||(f=Vl(c,b.stream,d||null,a.h.retryParameters,a.g.Zb));g=0;b.ua&&(g=b.ua.h);b.Ab=f;return E(l,f.promise,2);case 2:h=l.h;b.Ab=null;k=h.data;if(!c.aesKey){l.B(3);break}return E(l,gm(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
479
479
  function Vl(a,b,c,d,e){var f=a instanceof Ii?a:void 0,g=f?1:0;a=Bl(a.P(),a.Wa,a.Da,d,c);a.contentType=b.type;return e.request(Gg,a,{type:g,stream:b,segment:f})}
@@ -540,9 +540,10 @@ g.viewportAnchorX-g.regionAnchorX*g.width/100+m);0!==g.heightUnits&&0!==g.widthU
540
540
  "flex-start":"center"==b.displayAlign?"center":"flex-end";a.F.set(c,e);c=e}}e=f;d&&(e=W("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.i.set(b,{Zf:f,zi:e,Lc:c})}function nn(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Sd?c:"left"===a||"start"===a&&b===Ud||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Ud?"line-right":"center"}
541
541
  function mn(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=on(c.linePadding,c,a.u);f.paddingRight=on(c.linePadding,c,a.u);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
542
542
  "url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",c.backgroundColor&&(f.backgroundColor=c.backgroundColor),f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=W("span"),b.appendChild(l);c.border&&(l.style.border=c.border);!e&&((b=pn(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"),b=pn(d,function(m){return m.fontFamily}))&&(l.style.fontFamily=
543
- b);k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=on(c.fontSize,c,a.u);d=c.line;null!=d&&(g=c.lineInterpretation,g==Wd&&(g=1,h=16,a.l&&1>a.l&&(h=32),d=0>d?100+d/h*100:
544
- d/h*100),1==g&&(f.position="absolute",c.writingMode==Vd?(f.width="100%",c.lineAlign==Xd?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Xd?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Xd?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==Vd?f.paddingLeft=c.position:f.paddingTop=c.position);a=nn(c);"line-left"==a?f.cssFloat="left":
545
- "line-right"==a&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Vd?f.width=c.size+"%":f.height=c.size+"%")}
543
+ b);k&&(l.textContent=k)}if(h&&!d[d.length-1].isContainer)f.display="inline";else{f.display="flex";f.flexDirection="column";f.alignItems="center";if("left"==c.textAlign||"start"==c.textAlign)f.width="100%",f.alignItems="start";else if("right"==c.textAlign||"end"==c.textAlign)f.width="100%",f.alignItems="end";f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end"}g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=
544
+ c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=on(c.fontSize,c,a.u);d=c.line;null!=d&&(g=c.lineInterpretation,g==Wd&&(g=1,h=16,a.l&&1>a.l&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==Vd?(f.width="100%",c.lineAlign==Xd?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Xd?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Xd?f.right=d+"%":"end"==c.lineAlign&&(f.left=
545
+ 100-d+"%"))));f.lineHeight=c.lineHeight;a=nn(c);"line-left"==a?(f.cssFloat="left",null!==c.position&&(f.position="absolute",c.writingMode==Vd?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%")):"line-right"==a?(f.cssFloat="right",null!==c.position&&(f.position="absolute",c.writingMode==Vd?(f.right=c.position+"%",f.width="auto"):f.bottom=c.position+"%")):null!==c.position&&50!=c.position&&(f.position="absolute",c.writingMode==Vd?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%");
546
+ f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Vd?f.width=c.size+"%":f.height=c.size+"%")}
546
547
  function on(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function pn(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}Q("shaka.text.UITextDisplayer",gn);gn.prototype.setTextVisibility=gn.prototype.setTextVisibility;
547
548
  gn.prototype.isTextVisible=gn.prototype.isTextVisible;gn.prototype.remove=gn.prototype.remove;gn.prototype.destroy=gn.prototype.destroy;gn.prototype.append=gn.prototype.append;gn.prototype.configure=gn.prototype.configure;function qn(a,b){function c(f){for(var g=f,h=t(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=Ym(a);a="WEBVTT\n\n";d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
548
549
  break;case "right":g.push("align:right");break;case Td:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}Q("shaka.text.WebVttGenerator",function(){});function rn(a,b){this.h=a;this.g=b;this.m=void 0;this.i=!1;this.l=!0;this.j=!1}rn.prototype.configure=function(a){this.g=a};function sn(a){a.i=!1;a.l=!0;a.j=!1}
@@ -605,7 +606,7 @@ a.m.s(d.textTracks,"change",function(){return Ko(a)})),d.src=tn(a.O,a.X,c),(ac()
605
606
  l]),2);if((m=a.U())&&(a.g.streaming.liveSync||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)n=function(){return dp(a)},a.m.s(d,"timeupdate",n);m||(p=function(){return ep(a)},a.m.s(d,"timeupdate",p),ep(a));a.A&&(a.A.onManifestUpdated(m),m&&(r=a.Ta().end,a.m.s(d,"progress",function(){var v=a.Ta().end;r!=v&&(a.A.onManifestUpdated(a.U()),r=v)})));a.Na=!0;F(u)})}function hp(a){var b=a.g.preferredAudioLanguage;""!=b&&a.lf(b,a.g.preferredVariantRole)}
606
607
  function jp(a){var b=a.g.preferredTextLanguage;""!=b&&a.Ug(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
607
608
  function fp(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.s(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,kp(a,e.startTime,e.endTime,e.type,e.value),a.A)a.A.onCueMetadataChange(e.value)});var c=(new Ub(function(){var d=lp(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Pa().V(.5);a.ae.push(function(){c.stop()})}}
608
- function Oo(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=t(e.frames),k=h.next();!k.done;k=h.next())kp(a,f,g,"org.id3",k.value);if(a.A)a.A.onHlsTimedMetadata(e,f)}}function kp(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(qo("metadata",b))}
609
+ function Oo(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&"number"==typeof e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=t(e.frames),k=h.next();!k.done;k=h.next())kp(a,f,g,"org.id3",k.value);if(a.A)a.A.onHlsTimedMetadata(e,f)}}function kp(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(qo("metadata",b))}
609
610
  function Vo(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Ub(function(){b.mode="hidden"})).Pa().V(.5);a.ae.push(function(){c.stop()})}}q.dk=function(){for(var a=this.S;a.g;)a.release()};q.Xc=function(a){return new Jh(a)};
610
611
  function ko(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?Bm(b(),!0,e):e()}b||(b=function(){return null});return new vg(function(e,f,g,h){var k=b()?b().i:a.o;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){f=(new Map).set("headers",e).set("request",f).set("requestType",g);c(qo("downloadheadersreceived",f));d(function(){if(a.$){var h=a.$;if(h.h.enabled){var k=e["cmsd-static"];if(k)try{var l=new Map,m=k.split(",");for(k=0;k<m.length;k++){var n=m[k].split("=");l.set(n[0],
611
612
  Qn(n[1]))}}catch(w){}if(l=e["cmsd-dynamic"]){try{var p=new Map,r=l.split(";");for(l=1;l<r.length;l++){var u=r[l].split("=");p.set(u[0],Qn(u[1]))}var v=p}catch(w){v=null}v&&(h.g=v)}}}})},function(e,f,g,h){e=(new Map).set("request",e).set("error",f).set("httpResponseCode",g).set("aborted",h);c(qo("downloadfailed",e))},function(e,f,g){d(function(){var h=a.O,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)An(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
@@ -699,14 +700,14 @@ X.prototype.isAudioOnly=X.prototype.ed;X.prototype.isInProgress=X.prototype.Gc;X
699
700
  X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.dk;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.Bh;X.prototype.unloadAndSavePreload=X.prototype.Ck;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Gk;X.prototype.unload=X.prototype.Pc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.qh;X.prototype.attach=X.prototype.vc;
700
701
  X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:b={};if(!a){k.B(2);break}return E(k,qi(),3);case 3:b=k.h;case 2:var l={};if(Vb())for(var m in Bi)l[m]=!0;m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,l[n]=Vb()?!!Bi[n]:Wb(n);c=l;m='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(x(ue));
701
702
  l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=Ne(n)?!0:Vb()?td(n)||(ne(n)?!0:!1):Wb(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return E(k,uc(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=Ap;for(h in g)f[h]=g[h]();return k.return(f)}})};X.isBrowserSupported=so;X.setAdManagerFactory=function(a){lo=a};X.registerSupportPlugin=function(a,b){Ap[a]=b};X.prototype.destroy=X.prototype.destroy;var ro=0,ho=1,Uo=2,gp=3;
702
- X.LoadMode={DESTROYED:ro,NOT_LOADED:ho,MEDIA_SOURCE:Uo,SRC_EQUALS:gp};X.version="v4.9.20";var Bp=["4","9"];yd=new function(a){this.g=a;this.i=zd;this.h=Ad}(new wd(Number(Bp[0]),Number(Bp[1])));var Ap={},lo=null;function Cp(){this.h=[];this.j=this.i=this.g=0};function Dp(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new od;this.m.s(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.s(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=Dp.prototype;q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};q.isPaused=function(){return this.i};
703
+ X.LoadMode={DESTROYED:ro,NOT_LOADED:ho,MEDIA_SOURCE:Uo,SRC_EQUALS:gp};X.version="v4.9.21";var Bp=["4","9"];yd=new function(a){this.g=a;this.i=zd;this.h=Ad}(new wd(Number(Bp[0]),Number(Bp[1])));var Ap={},lo=null;function Cp(){this.h=[];this.j=this.i=this.g=0};function Dp(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new od;this.m.s(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.s(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=Dp.prototype;q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};q.isPaused=function(){return this.i};
703
704
  q.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.h.getAdSkippableState()};q.skip=function(){return this.h.skip()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.resume()};q.getVolume=function(){return this.h.getVolume()};q.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
704
705
  q.isMuted=function(){return 0==this.h.getVolume()};q.isLinear=function(){return this.g.isLinear()};q.resize=function(a,b){var c=!1,d=this.j;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
705
706
  q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
706
707
  q.getAdId=function(){return this.g.getAdId()};q.getCreativeAdId=function(){return this.g.getCreativeAdId()};q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return this.g.getMediaUrl()};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.g=null};Q("shaka.ads.ClientSideAd",Dp);Dp.prototype.release=Dp.prototype.release;
707
708
  Dp.prototype.getPodIndex=Dp.prototype.getPodIndex;Dp.prototype.getTimeOffset=Dp.prototype.getTimeOffset;Dp.prototype.getMediaUrl=Dp.prototype.getMediaUrl;Dp.prototype.getAdvertiserName=Dp.prototype.getAdvertiserName;Dp.prototype.getCreativeAdId=Dp.prototype.getCreativeAdId;Dp.prototype.getAdId=Dp.prototype.getAdId;Dp.prototype.getVastMediaWidth=Dp.prototype.getVastMediaWidth;Dp.prototype.getVastMediaHeight=Dp.prototype.getVastMediaHeight;Dp.prototype.getVastMediaBitrate=Dp.prototype.getVastMediaBitrate;
708
709
  Dp.prototype.getDescription=Dp.prototype.getDescription;Dp.prototype.getTitle=Dp.prototype.getTitle;Dp.prototype.getPositionInSequence=Dp.prototype.getPositionInSequence;Dp.prototype.getSequenceLength=Dp.prototype.getSequenceLength;Dp.prototype.setMuted=Dp.prototype.setMuted;Dp.prototype.resize=Dp.prototype.resize;Dp.prototype.isLinear=Dp.prototype.isLinear;Dp.prototype.isMuted=Dp.prototype.isMuted;Dp.prototype.setVolume=Dp.prototype.setVolume;Dp.prototype.getVolume=Dp.prototype.getVolume;
709
- Dp.prototype.play=Dp.prototype.play;Dp.prototype.pause=Dp.prototype.pause;Dp.prototype.skip=Dp.prototype.skip;Dp.prototype.canSkipNow=Dp.prototype.canSkipNow;Dp.prototype.getTimeUntilSkippable=Dp.prototype.getTimeUntilSkippable;Dp.prototype.isSkippable=Dp.prototype.isSkippable;Dp.prototype.isPaused=Dp.prototype.isPaused;Dp.prototype.getRemainingTime=Dp.prototype.getRemainingTime;Dp.prototype.getMinSuggestedDuration=Dp.prototype.getMinSuggestedDuration;Dp.prototype.getDuration=Dp.prototype.getDuration;function Ep(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.H=!1;this.A=this.u=null;this.I=NaN;this.m=e;this.j=null;this.h=new od;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.G=new google.ima.AdDisplayContainer(this.o,this.i);this.G.initialize();this.l=new google.ima.AdsLoader(this.G);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.9.20");this.g=null;this.F=d||new google.ima.AdsRenderingSettings;this.h.s(this.l,
710
+ Dp.prototype.play=Dp.prototype.play;Dp.prototype.pause=Dp.prototype.pause;Dp.prototype.skip=Dp.prototype.skip;Dp.prototype.canSkipNow=Dp.prototype.canSkipNow;Dp.prototype.getTimeUntilSkippable=Dp.prototype.getTimeUntilSkippable;Dp.prototype.isSkippable=Dp.prototype.isSkippable;Dp.prototype.isPaused=Dp.prototype.isPaused;Dp.prototype.getRemainingTime=Dp.prototype.getRemainingTime;Dp.prototype.getMinSuggestedDuration=Dp.prototype.getMinSuggestedDuration;Dp.prototype.getDuration=Dp.prototype.getDuration;function Ep(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.H=!1;this.A=this.u=null;this.I=NaN;this.m=e;this.j=null;this.h=new od;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.G=new google.ima.AdDisplayContainer(this.o,this.i);this.G.initialize();this.l=new google.ima.AdsLoader(this.G);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.9.21");this.g=null;this.F=d||new google.ima.AdsRenderingSettings;this.h.s(this.l,
710
711
  google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){Fp(f,g)});this.h.s(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Gp(f,g)});this.h.s(this.i,"ended",function(){f.l.contentComplete()});this.h.oa(this.i,"play",function(){f.H=!0})}Ep.prototype.configure=function(a){this.u=a};Ep.prototype.stop=function(){this.g&&this.g.stop();this.o&&fn(this.o)};
711
712
  Ep.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy();this.G.destroy()};function Gp(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new S("ad-error",b));Hp(a,null);a.m(new S("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
712
713
  function Fp(a,b){a.m(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));if(a.u.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.F);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.s(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.s(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.F);a.m(new S("ima-ad-manager-loaded",(new Map).set("imaAdManager",
@@ -758,8 +759,8 @@ function dq(a,b){a.i(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-
758
759
  q.release=function(){this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);gb.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new S("ad-stopped"));this.j=new Cp};q.requestClientSideAds=function(a){if(!this.i)throw new U(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.I=Date.now()/1E3;b.l.requestAds(a)};
759
760
  q.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new U(1,10,10001);var b=this.i;b.F=a;b.g&&b.g.updateAdsRenderingSettings(b.F)};q.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new Rp(a,b,c,function(e){return fq(d,e)})};q.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new U(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new U(1,10,10004)):(d.l=new lg,Up(d,a,b),d.J=c||"",d.S=Date.now()/1E3,a=d.l);return a};
760
761
  q.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new U(1,10,10005);var b=this.h;b.I=a;b.i(new S("ads-loaded",(new Map).set("loadTime",0)))};q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new U(2,10,10002);this.g&&this.g.release();this.g=new cq(a,b,this.m,function(d){return fq(c,d)});this.g.configure(this.l)};
761
- q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new U(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ya('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.9.20";c=this.g;c.j?a=Promise.reject(new U(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
762
- (c.I=!0),c.j=new lg,c.g.requestStream(a),c.F=b||"",c.H=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new U(1,10,10003);(a.mpt||a.mpv)&&Ya('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.9.20";this.g.g.replaceAdTagParameters(a)};
762
+ q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new U(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ya('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.9.21";c=this.g;c.j?a=Promise.reject(new U(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
763
+ (c.I=!0),c.j=new lg,c.g.requestStream(a),c.F=b||"",c.H=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new U(1,10,10003);(a.mpt||a.mpv)&&Ya('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.9.21";this.g.g.replaceAdTagParameters(a)};
763
764
  q.getServerSideCuePoints=function(){xd("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};q.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.getCuePoints()));return a};q.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onManifestUpdated=function(a){if(this.h)this.h.onManifestUpdated(a)};
764
765
  q.onDashTimedMetadata=function(a){this.g&&"urn:google:dai:2018"==a.schemeIdUri&&this.g.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};
765
766
  function fq(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.j.h.push(b.loadTime);break;case "ad-started":a.j.g++;break;case "ad-complete":a.j.i++;break;case "ad-skipped":a.j.j++}a.dispatchEvent(b)}Q("shaka.ads.AdManager",eq);eq.prototype.onCueMetadataChange=eq.prototype.onCueMetadataChange;eq.prototype.onHlsTimedMetadata=eq.prototype.onHlsTimedMetadata;eq.prototype.onDashTimedMetadata=eq.prototype.onDashTimedMetadata;eq.prototype.onManifestUpdated=eq.prototype.onManifestUpdated;
@@ -933,7 +934,7 @@ function $t(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType
933
934
  function Vt(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Xk([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set}}
934
935
  function su(a,b,c){if(b==a&&a!=c)return uu;if(c==a&&a!=b)return tu;if(b>a){if(c<=a||c-a<b-a)return tu;if(c-a>b-a)return uu}else{if(c>a)return uu;if(a-c<a-b)return tu;if(a-c>a-b)return uu}return wu}function vu(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?tu:b<a?uu:wu}function eu(a){switch(a.type){case Sc:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
935
936
  function St(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,ru(a.codecs),a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function Rt(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,ru(a.codecs),a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function Tt(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
936
- function Ut(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function ru(a){if(!xu.has(a)){var b=Ge(a);xu.set(a,b)}return xu.get(a)}Q("shaka.util.PeriodCombiner",Pt);Pt.prototype.setUseStreamOnce=Pt.prototype.ki;Pt.prototype.setAllowMultiTypeVariants=Pt.prototype.ai;Pt.prototype.combinePeriods=Pt.prototype.Xf;Pt.prototype.getImageStreams=Pt.prototype.bj;Pt.prototype.getTextStreams=Pt.prototype.ug;Pt.prototype.getVariants=Pt.prototype.xj;var tu=1,wu=0,uu=-1,xu=new Map;function yu(a,b){var c=new DOMParser,d=zu.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function Au(a,b){try{var c=zc(a);return yu(c,b)}catch(d){return null}}
937
+ function Ut(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function ru(a){if(!xu.has(a)){var b=Fe(a);xu.set(a,b)}return xu.get(a)}Q("shaka.util.PeriodCombiner",Pt);Pt.prototype.setUseStreamOnce=Pt.prototype.ki;Pt.prototype.setAllowMultiTypeVariants=Pt.prototype.ai;Pt.prototype.combinePeriods=Pt.prototype.Xf;Pt.prototype.getImageStreams=Pt.prototype.bj;Pt.prototype.getTextStreams=Pt.prototype.ug;Pt.prototype.getVariants=Pt.prototype.xj;var tu=1,wu=0,uu=-1,xu=new Map;function yu(a,b){var c=new DOMParser,d=zu.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function Au(a,b){try{var c=zc(a);return yu(c,b)}catch(d){return null}}
937
938
  var zu=new Nb(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Bu(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.S=1;this.F=[];this.l={Ze:"",type:"",profiles:[],Yb:null,Ya:0,Va:null,ie:0};this.o=new Map;this.u={};this.O={};this.m=new Pt;this.H=0;this.R=new ld(5);this.I=new Ub(function(){Cu(a)});this.L=new tg;this.J=null;this.X=[];this.K=Infinity;this.G=!1;this.h=null;this.N=!1}q=Bu.prototype;
938
939
  q.configure=function(a){var b=this.j&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.i&&this.i.presentationTimeline.U()&&this.I.Pa();this.h&&this.h.configure(this.g);this.m&&(this.m.ai(this.g.dash.multiTypeVariantsAllowed&&vd()),this.m.ki(this.g.dash.useStreamOnceInPeriodFlattening))};q.start=function(a,b){var c=this,d;return O(function(e){if(1==e.g)return c.G=b.isLowLatencyMode(),c.A=[a],c.j=b,E(e,Du(c),2);d=e.h;c.j&&Eu(c,d);if(!c.j)throw new U(2,7,7001);return e.return(c.i)})};
939
940
  q.stop=function(){for(var a=t(Object.values(this.u)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.j=null;this.A=[];this.i=null;this.u={};this.o.clear();this.l={Ze:"",type:"",profiles:[],Yb:null,Ya:0,Va:null,ie:0};this.m=null;null!=this.I&&(this.I.stop(),this.I=null);this.h&&this.h.destroy();return this.L.destroy()};
@@ -942,13 +943,13 @@ q.banLocation=function(a){this.h&&this.h.banLocation(a)};
942
943
  function Du(a){var b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g)return b="MPD",c=Fu(a),d=a.A,c.length?(d=c,b="Patch"):1<a.A.length&&a.h&&(e=Ot(a.h,"Location",!0),e.length&&(d=e)),f=Ag(d,a.g.retryParameters),g=Date.now(),E(m,Gu(a,f,0,{type:4}),2);if(3!=m.g){h=m.h;if(!a.j)return m.return(0);h.uri&&h.uri!=h.originalUri&&!a.A.includes(h.uri)&&a.A.unshift(h.uri);return E(m,Hu(a,h.data,h.uri,b),3)}k=Date.now();l=(k-g)/1E3;a.R.sample(1,l);return m.return(l)})}
943
944
  function Hu(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u;return O(function(v){if(1==v.g){e=b;f=a.g.dash.manifestPreprocessor;g=wm;if(f!=g){xd("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=Au(e,d);if(!h)throw new U(2,4,4001,c);f(h);e=Ac(h.outerHTML)}k=bh(e,d);if(!k)throw new U(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=xm;l!=m&&l(k);if("Patch"===d)return v.return(Iu(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(Ju(a,k,c));
944
945
  p=a.g.dash.xlinkFailGracefully;r=Ws(k,a.g.retryParameters,p,c,a.j.networkingEngine);ug(a.L,r);return E(v,r.promise,2)}u=v.h;return v.return(Ju(a,u,c))})}
945
- function Ju(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,G,I,J,H,L,N,M,P,T,R,la,ra,Ca,Fa,Ia,Pa,Ja,db,Da,$a,xb,ad,ye,Fd,Rc,ze,Ae,Be,Gd,pj,dh,qj,rj,eh,Ce;return O(function(rc){switch(rc.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=kh(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=mh(l))p=Lc(d,[n])[0],m&&(a.h?Nt(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(r=Ot(a.h,"Location",!0),0<r.length&&(d=a.A=r)):e.length&&(d=a.A=e);a.l.Ze=
946
+ function Ju(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,G,I,J,H,L,N,M,P,T,R,la,ra,Ca,Fa,Ia,Pa,Ja,db,Da,$a,xb,ad,ze,Fd,Rc,Ae,Be,Ce,Gd,pj,dh,qj,rj,eh,De;return O(function(rc){switch(rc.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=kh(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=mh(l))p=Lc(d,[n])[0],m&&(a.h?Nt(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(r=Ot(a.h,"Location",!0),0<r.length&&(d=a.A=r)):e.length&&(d=a.A=e);a.l.Ze=
946
947
  b.attributes.id||"";a.l.ie=th(b,"publishTime",wh)||0;a.F=kh(b,"PatchLocation");u=Promise.resolve();if((v=oh(b,"ContentSteering"))&&a.j){w=v.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new Jt(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,A=mh(v))(y=th(v,"queryBeforeStart",Dh,!1))?u=Kt(a.h,A):Kt(a.h,A);C=t(f.keys());for(z=C.next();!z.done;z=C.next())B=z.value,D=f.get(B),Nt(a.h,"Location",B,D)}K=kh(b,"BaseURL");I=!1;if(a.h)for(J=t(K),H=J.next();!H.done;H=
947
948
  J.next())L=H.value,N=L.attributes.serviceLocation,M=mh(L),N&&M&&(Nt(a.h,"BaseURL",N,M),I=!0);I&&a.h||(P=K.map(mh),G=Lc(d,P));T=function(){return a.h&&I?Ot(a.h,"BaseURL"):G?G:[]};a.l.Va=T;R=0;K&&K.length&&(R=th(K[0],"availabilityTimeOffset",Ch)||0);a.l.Ya=R;la=a.g.dash.ignoreMinBufferTime;ra=0;la||(ra=th(b,"minBufferTime",xh)||0);a.H=th(b,"minimumUpdatePeriod",xh,-1);Ca=th(b,"availabilityStartTime",wh);Fa=th(b,"timeShiftBufferDepth",xh);Ia=a.g.dash.ignoreSuggestedPresentationDelay;Pa=null;Ia||(Pa=
948
- th(b,"suggestedPresentationDelay",xh));Ja=a.g.dash.ignoreMaxSegmentDuration;db=null;Ja||(db=th(b,"maxSegmentDuration",xh));Da=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.N=a.i.presentationTimeline.U()&&"static"==Da);a.l.type=Da;if(a.i)for($a=a.i.presentationTimeline,xb=t(Object.values(a.u)),ad=xb.next();!ad.done;ad=xb.next())ye=ad.value,ye.segmentIndex&&ye.segmentIndex.eb($a.Cb());else Fd=a.g.defaultPresentationDelay||1.5*ra,Rc=null!=Pa?Pa:Fd,$a=new Bk(Ca,Rc,a.g.dash.autoCorrectDrift);
949
- $a.Nc("static"==Da);(ze=$a.U())&&!isNaN(a.g.availabilityWindowOverride)&&(Fa=a.g.availabilityWindowOverride);null==Fa&&(Fa=Infinity);$a.nf(Fa);Ae=b.attributes.profiles||"";a.l.profiles=Ae.split(",");Be={Lb:"static"!=Da,presentationTimeline:$a,La:null,va:null,Ia:null,M:null,bandwidth:0,Ag:!1,Ya:R,Yb:null,profiles:Ae.split(",")};Gd=Ku(a,Be,T,b);pj=Gd.duration;dh=Gd.periods;("static"!=Da||a.N)&&Gd.Ch||$a.sb(pj||Infinity);a.K&&!a.G&&(qj=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),a.G=a.j.isLowLatencyMode());
950
- a.G?$a.bi(a.K):a.K&&Ya("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");$a.Jg(db||1);return E(rc,u,2);case 2:return a.G&&(ra=0,rj=null!=Pa?Pa:a.g.defaultPresentationDelay,$a.Xg(rj)),a.i?E(rc,Lu(a,Gd.periods,!1),4):E(rc,a.m.Xf(dh,Be.Lb),6);case 6:a.i={presentationTimeline:$a,variants:a.m.j,textStreams:a.m.ug(),imageStreams:a.m.i,offlineSessionIds:[],
951
- minBufferTime:ra||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Mu(b),nextUrl:Nu(b)};if(!$a.si()){rc.B(7);break}eh=kh(b,"UTCTiming");return E(rc,Ou(a,T,eh),8);case 8:Ce=rc.h;if(!a.j)return rc.return();$a.ci(Ce);case 7:$a.Ue();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),F(rc)}})}
949
+ th(b,"suggestedPresentationDelay",xh));Ja=a.g.dash.ignoreMaxSegmentDuration;db=null;Ja||(db=th(b,"maxSegmentDuration",xh));Da=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.N=a.i.presentationTimeline.U()&&"static"==Da);a.l.type=Da;if(a.i)for($a=a.i.presentationTimeline,xb=t(Object.values(a.u)),ad=xb.next();!ad.done;ad=xb.next())ze=ad.value,ze.segmentIndex&&ze.segmentIndex.eb($a.Cb());else Fd=a.g.defaultPresentationDelay||1.5*ra,Rc=null!=Pa?Pa:Fd,$a=new Bk(Ca,Rc,a.g.dash.autoCorrectDrift);
950
+ $a.Nc("static"==Da);(Ae=$a.U())&&!isNaN(a.g.availabilityWindowOverride)&&(Fa=a.g.availabilityWindowOverride);null==Fa&&(Fa=Infinity);$a.nf(Fa);Be=b.attributes.profiles||"";a.l.profiles=Be.split(",");Ce={Lb:"static"!=Da,presentationTimeline:$a,La:null,va:null,Ia:null,M:null,bandwidth:0,Ag:!1,Ya:R,Yb:null,profiles:Be.split(",")};Gd=Ku(a,Ce,T,b);pj=Gd.duration;dh=Gd.periods;("static"!=Da||a.N)&&Gd.Ch||$a.sb(pj||Infinity);a.K&&!a.G&&(qj=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),a.G=a.j.isLowLatencyMode());
951
+ a.G?$a.bi(a.K):a.K&&Ya("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");$a.Jg(db||1);return E(rc,u,2);case 2:return a.G&&(ra=0,rj=null!=Pa?Pa:a.g.defaultPresentationDelay,$a.Xg(rj)),a.i?E(rc,Lu(a,Gd.periods,!1),4):E(rc,a.m.Xf(dh,Ce.Lb),6);case 6:a.i={presentationTimeline:$a,variants:a.m.j,textStreams:a.m.ug(),imageStreams:a.m.i,offlineSessionIds:[],
952
+ minBufferTime:ra||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Mu(b),nextUrl:Nu(b)};if(!$a.si()){rc.B(7);break}eh=kh(b,"UTCTiming");return E(rc,Ou(a,T,eh),8);case 8:De=rc.h;if(!a.j)return rc.return();$a.ci(De);case 7:$a.Ue();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),F(rc)}})}
952
953
  function Lu(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,a.m.Xf(b,!0,c),2);a.i.variants=a.m.j;d=a.m.ug();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);F(e)})}
953
954
  function Iu(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,G,I,J;return O(function(H){if(1==H.g){c=b.attributes.mpdId;d=th(b,"originalPublishTime",wh);if(!c||c!==a.l.Ze||d!==a.l.ie)throw a.F=[],new U(1,4,4052);e=[];f=[];g=new Set;h=t(jh(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=Fh(l.attributes.sel||""),n=m[m.length-1],p=mh(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.ec){r=mh(l)||"";var L=xh(r);if(null!=L){a.l.Yb=L;for(var N=t(a.o.values()),M=N.next();!M.done;M=N.next())M.value.Yb=
954
955
  L}}else if("type"===n.ec){a.i.presentationTimeline.Nc("static"==p);a.l.type=p;L=t(a.o.values());for(N=L.next();!N.done;N=L.next())N.value.Lb="dynamic"==p;"static"==p&&(a.H=-1)}else"publishTime"===n.ec?a.l.ie=wh(p)||0:null===n.ec&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)Gh(a.F,l);else if("Period"===n.name)if("add"===l.tagName)f.push(l);else{if("remove"===l.tagName&&n.id)for(L=n.id,N=t(a.o.keys()),M=N.next();!M.done;M=N.next())if(M=M.value,M.startsWith(L)){var P=a.o.get(M);Ts(P,
@@ -961,7 +962,7 @@ return c}function Nu(a){a=kh(a,"SupplementalProperty");if(!a.length)return null;
961
962
  function Ku(a,b,c,d){var e=b.Yb;e||(e=th(d,"mediaPresentationDuration",xh),a.l.Yb=e);var f=0;a.i&&a.i.presentationTimeline&&a.N&&(f=a.i.presentationTimeline.ic());var g=[],h=f;d=kh(d,"Period");for(var k=0;k<d.length;k++){var l=d[k],m=d[k+1],n=th(l,"start",xh,h),p=l.attributes.id,r=th(l,"duration",xh),u=null;if(m){var v=th(m,"start",xh);null!=v&&(u=v-n)}else null!=e&&(u=e-n+f);null==u&&(u=r);if(!(null!==a.J&&null!==p&&null!==n&&n<a.J)||a.X.includes(p)||k+1==d.length){null!==n&&(null===a.J||n>a.J)&&
962
963
  (a.J=n);h=Su(a,b,c,{start:n,duration:u,node:l,$d:null==u||!m});g.push(h);b.La.id&&u&&(a.O[b.La.id]=u);if(null==u){h=null;break}h=n+u}}a.X=g.map(function(w){return w.id});return null!=e?{periods:g,duration:e+f,Ch:!1}:{periods:g,duration:h,Ch:!0}}
963
964
  function Su(a,b,c,d){b.La=Tu(a,d.node,null,c);b.va=d;b.La.Ya=b.Ya;b.La.id||(b.La.id="__shaka_period_"+d.start);var e=kh(d.node,"EventStream");c=b.presentationTimeline.Cb();e=t(e);for(var f=e.next();!f.done;f=e.next())Uu(a,d.start,d.duration,f.value,c);c=kh(d.node,"AdaptationSet").map(function(m){return Vu(a,b,m)}).filter(We);if(b.Lb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.gk);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new U(2,4,4018);
964
- }d=c.filter(function(m){return!m.ih});c=c.filter(function(m){return m.ih});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.ih.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={ye:h.ye},l=k.next())h.ye=l.value,h.ye.trickModeVideo=e.streams.find(function(m){return function(n){return Ge(m.ye.codecs)==Ge(n.codecs)}}(h))}}}c=Wu(a.g.disableAudio,d,"audio");e=Wu(a.g.disableVideo,d,"video");f=Wu(a.g.disableText,
965
+ }d=c.filter(function(m){return!m.ih});c=c.filter(function(m){return m.ih});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.ih.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={ye:h.ye},l=k.next())h.ye=l.value,h.ye.trickModeVideo=e.streams.find(function(m){return function(n){return Fe(m.ye.codecs)==Fe(n.codecs)}}(h))}}}c=Wu(a.g.disableAudio,d,"audio");e=Wu(a.g.disableVideo,d,"video");f=Wu(a.g.disableText,
965
966
  d,Sc);d=Wu(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new U(2,4,4004);return{id:b.La.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function Wu(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,x(e.streams));return d},[])}
966
967
  function Vu(a,b,c){function d(H){switch(H){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function e(H){switch(H){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.Ia=Tu(a,c,b.La,null);var f=!1,g=kh(c,"Role"),h=g.map(function(H){return H.attributes.value}).filter(We),k=void 0,l=b.Ia.contentType==Sc;l&&(k="subtitle");g=t(g);for(var m=g.next();!m.done;m=g.next()){m=m.value;var n=m.attributes.schemeIdUri;if(null==
967
968
  n||"urn:mpeg:dash:role:2011"==n)switch(m=m.attributes.value,m){case "main":f=!0;break;case "caption":case "subtitle":k=m}}var p,r;n=kh(c,"EssentialProperty");g=null;var u=!1;m=!1;n=t(n);for(var v=n.next();!v.done;v=n.next()){v=v.value;var w=v.attributes.schemeIdUri;"http://dashif.org/guidelines/trickmode"==w?g=v.attributes.value:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==w?p=e(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w?r=d(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=
@@ -1346,7 +1347,7 @@ function mD(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function
1346
1347
  var iD=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],jD=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],kD=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],lD=[0,1,1,4];function oD(a){this.i=a;this.h=0;this.g=new Map}q=oD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?td(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};q.getOriginalMimeType=function(){return this.i};
1347
1348
  q.transmux=function(a,b,c,d){for(var e=Gb(a),f=Yi(e).length;f<e.length&&!nD(e,f);f++);var g;for(a=[];f<e.length;){var h=hD(e,f);if(!h)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));g||(g=h);f+h.ia<=e.length&&a.push({data:e.subarray(f,f+h.ia),size:h.ia,duration:1152,wb:0,flags:{xb:0,ob:0,mb:0,ib:0,jb:2,yb:0}});f+=h.ia}if(!g)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));e=9E4*g.kk/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
1348
1349
  duration:d,ub:[],ya:new Uint8Array([]),Ma:new Uint8Array([]),Sa:0,Ua:0,data:{Ib:this.h,baseMediaDecodeTime:e,rb:a},stream:b};d=new Uw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=lx(d),this.g.set(c,b));c=Cx(d);this.h++;b=Kc(b,c);return Promise.resolve(b)};Q("shaka.transmuxer.Mp3Transmuxer",oD);oD.prototype.transmux=oD.prototype.transmux;oD.prototype.getOriginalMimeType=oD.prototype.getOriginalMimeType;oD.prototype.convertCodecs=oD.prototype.convertCodecs;oD.prototype.isSupported=oD.prototype.isSupported;
1349
- oD.prototype.destroy=oD.prototype.destroy;le("audio/mpeg",function(){return new oD("audio/mpeg")},re);function pD(a){this.h=a;this.g=null}q=pD.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=Ke(a).split(","),c=Pc("audio",b);b=Pc("video",b);return!c||b||"mp3"!=Ge(c)?!1:td(this.convertCodecs("audio",a))};q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};q.getOriginalMimeType=function(){return this.h};
1350
+ oD.prototype.destroy=oD.prototype.destroy;le("audio/mpeg",function(){return new oD("audio/mpeg")},re);function pD(a){this.h=a;this.g=null}q=pD.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=Ke(a).split(","),c=Pc("audio",b);b=Pc("video",b);return!c||b||"mp3"!=Fe(c)?!1:td(this.convertCodecs("audio",a))};q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};q.getOriginalMimeType=function(){return this.h};
1350
1351
  q.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new vj;a=Gb(a);a=this.g.parse(a);if("mp3"!=a.Pd().audio||"audio"!=e)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));c=new Uint8Array([]);e=t(a.fc());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=hD(a,b))?(b+d.ia<=a.length&&(c=Kc(c,a.subarray(b,b+d.ia))),b+=d.ia):b++;return Promise.resolve(c)};Q("shaka.transmuxer.MpegTsTransmuxer",pD);pD.prototype.transmux=pD.prototype.transmux;
1351
1352
  pD.prototype.getOriginalMimeType=pD.prototype.getOriginalMimeType;pD.prototype.convertCodecs=pD.prototype.convertCodecs;pD.prototype.isSupported=pD.prototype.isSupported;pD.prototype.destroy=pD.prototype.destroy;le("video/mp2t",function(){return new pD("video/mp2t")},qe);/*
1352
1353
  @license
@@ -1363,23 +1364,23 @@ q.transmux=function(a,b,c){if(!c)return Promise.resolve(Gb(a));if(!b.mssPrivateD
1363
1364
  m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var p=e.fetch("saio");if(null===p){p=this.g.createFullBox("saio",h);p.version=0;p.flags=0;p.entry_count=1;p.offset=[0];var r=this.g.createFullBox("saiz",h);r.version=0;r.flags=0;r.sample_count=n.sample_count;r.default_sample_info_size=0;r.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)r.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else r.default_sample_info_size=
1364
1365
  8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=tD(u,"traf")+tD(h,"senc")+16);var w=Gb(e.write());return Promise.resolve(w)}catch(A){return A instanceof U?Promise.reject(A):Promise.reject(new U(2,3,3022,c?c.P()[0]:null))}};function tD(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}Q("shaka.transmuxer.MssTransmuxer",qD);qD.prototype.transmux=qD.prototype.transmux;
1365
1366
  qD.prototype.getOriginalMimeType=qD.prototype.getOriginalMimeType;qD.prototype.convertCodecs=qD.prototype.convertCodecs;qD.prototype.isSupported=qD.prototype.isSupported;qD.prototype.destroy=qD.prototype.destroy;var sD=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);le("mss/audio/mp4",function(){return new qD("mss/audio/mp4")},re);le("mss/video/mp4",function(){return new qD("mss/video/mp4")},re);function uD(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}q=uD.prototype;q.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
1366
- q.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=Ke(c).split(",");c=Pc("audio",d);d=Pc("video",d);if(c&&(c=Ge(c),!vD.includes(c))||d&&(c=Ge(d),!wD.includes(c)))return!1;if(b)return td(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return td(b)||td(a)};
1367
+ q.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=Ke(c).split(",");c=Pc("audio",d);d=Pc("video",d);if(c&&(c=Fe(c),!vD.includes(c))||d&&(c=Fe(d),!wD.includes(c)))return!1;if(b)return td(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return td(b)||td(a)};
1367
1368
  q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=Ke(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return nf(c,"audio/mp4")}).map(mf).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};q.getOriginalMimeType=function(){return this.l};
1368
1369
  q.transmux=function(a,b,c,d,e){var f=Gb(a);if("audio"==e&&!Cj(f)){for(var g=Yi(f),h=g.length;h<f.length;h++)if(nD(f,h))return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));for(h=g.length;h<f.length;h++)if(SC(f,h))return this.h||(this.h=new UC("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new U(2,3,3018,c?c.P()[0]:null))}this.j?this.j.clearData():this.j=new vj;var k=this.j.parse(f),l=[],m=k.Pd();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],r=null,u=[],v=k.cd();
1369
1370
  if(!v.length)throw new U(2,3,3023,c?c.P()[0]:null);for(var w=0;w<v.length;w++){var A=v[w],y=A.nalus;u.push.apply(u,x(y));var C=bD(y);if(C){null==r&&(r=A.dts);var z=void 0;z=w+1<v.length?(v[w+1].dts||0)-(A.dts||0):1<v.length?(A.dts||0)-(v[w-1].dts||0):9E4*(c.endTime-c.startTime);p.push({data:C.data,size:C.data.byteLength,duration:z,wb:Math.round((A.pts||0)-(A.dts||0)),flags:{xb:0,ob:0,mb:0,ib:0,jb:C.Zd?2:1,yb:C.Zd?0:1}})}}var B=$C(u);if(!B||null==r)throw new U(2,3,3018,c?c.P()[0]:null);b.height=B.height;
1370
1371
  b.width=B.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,ub:[],ya:new Uint8Array([]),Ma:B.Ma,Sa:B.Sa,Ua:B.Ua,data:{Ib:this.g,baseMediaDecodeTime:r,rb:p},stream:b};break;case "hvc":var D=[],K=null,G=[],I=k.cd();if(!I.length)throw new U(2,3,3023,c?c.P()[0]:null);for(var J=0;J<I.length;J++){var H=I[J],L=H.nalus;G.push.apply(G,x(L));for(var N=!1,M=[],P=!1,T=t(L),R=T.next();!R.done;R=T.next()){var la=R.value;switch(la.type){case 1:case 0:var ra=
1371
1372
  P=!0;break;case 19:case 20:case 21:N=ra=P=!0;break;case 32:ra=!0;break;case 33:ra=!0;break;case 34:ra=!0;break;case 35:P=ra=!0;break;case 39:case 40:ra=!0;break;default:ra=!1}if(P&&ra){var Ca=la.fullData.byteLength,Fa=new Uint8Array(4);Fa[0]=Ca>>24&255;Fa[1]=Ca>>16&255;Fa[2]=Ca>>8&255;Fa[3]=Ca&255;M.push(Fa);M.push(la.fullData)}}var Ia=M.length?{data:Kc.apply(Ec,x(M)),Zd:N}:null;if(Ia){null==K&&null!=H.dts&&(K=H.dts);var Pa=void 0;Pa=J+1<I.length?(I[J+1].dts||0)-(H.dts||0):1<I.length?(H.dts||0)-(I[J-
1372
1373
  1].dts||0):9E4*(c.endTime-c.startTime);D.push({data:Ia.data,size:Ia.data.byteLength,duration:Pa,wb:Math.round((H.pts||0)-(H.dts||0)),flags:{xb:0,ob:0,mb:0,ib:0,jb:Ia.Zd?2:1,yb:Ia.Zd?0:1}})}}var Ja=cD(G);if(!Ja||null==K)throw new U(2,3,3018,c?c.P()[0]:null);b.height=Ja.height;b.width=Ja.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,ub:[],ya:new Uint8Array([]),Ma:Ja.Ma,Sa:Ja.Sa,Ua:Ja.Ua,data:{Ib:this.g,baseMediaDecodeTime:K,rb:D},stream:b}}n&&
1373
- (l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var db=[],Da,$a=null,xb=t(k.fc()),ad=xb.next();!ad.done;ad=xb.next()){var ye=ad.value,Fd=ye.data;if(Fd){var Rc=0;Da=RC(Fd,Rc);if(!Da)throw new U(2,3,3018,c?c.P()[0]:null);b.audioSamplingRate=Da.sampleRate;b.channelsCount=Da.channelCount;null==$a&&null!==ye.pts&&($a=ye.pts);for(;Rc<Fd.length;){var ze=QC(Fd,Rc);if(ze){var Ae=ze.Pe+ze.ia;Rc+Ae<=Fd.length&&db.push({data:Fd.subarray(Rc+ze.Pe,Rc+Ae),size:ze.ia,duration:1024,wb:0,flags:{xb:0,
1374
- ob:0,mb:0,ib:0,jb:2,yb:0}});Rc+=Ae}else Rc++}}}if(!Da||null==$a){if(!k.cd().length)throw new U(2,3,3018,c?c.P()[0]:null);$a=9E4*c.startTime;var Be=Pc("audio",b.codecs.split(","));if(!Be||!b.channelsCount||!b.audioSamplingRate)throw new U(2,3,3018,c?c.P()[0]:null);Da={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,cb:Be};var Gd=TC(Be,b.channelsCount);if(!Gd)throw new U(2,3,3018,c?c.P()[0]:null);for(var pj=$a+9E4*(c.endTime-c.startTime),dh=$a;dh<pj;)db.push({data:Gd,size:Gd.byteLength,
1375
- duration:1024,wb:0,flags:{xb:0,ob:0,mb:0,ib:0,jb:2,yb:0}}),dh+=1024/Da.sampleRate*9E4}var qj=Da.sampleRate,rj=$a/9E4*qj;n={id:b.id,type:"audio",codecs:Da.cb,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:qj,duration:d,ub:[],ya:new Uint8Array([]),Ma:new Uint8Array([]),Sa:0,Ua:0,data:{Ib:this.g,baseMediaDecodeTime:rj,rb:db},stream:b};break;case "ac3":for(var eh=[],Ce=0,rc=new Uint8Array([]),bk=null,Vw=t(k.fc()),Rn=Vw.next();!Rn.done;Rn=Vw.next()){var Sn=Rn.value,Tn=Sn.data;null==bk&&null!==Sn.pts&&
1376
- (bk=Sn.pts);for(var Mf=0;Mf<Tn.length;){var $d=VC(Tn,Mf);$d?(b.audioSamplingRate=$d.sampleRate,b.channelsCount=$d.channelCount,Ce=$d.sampleRate,rc=$d.ya,eh.push({data:Tn.subarray(Mf,Mf+$d.ia),size:$d.ia,duration:1536,wb:0,flags:{xb:0,ob:0,mb:0,ib:0,jb:2,yb:0}}),Mf+=$d.ia):Mf++}}if(0==Ce||0==rc.byteLength||null==bk)throw new U(2,3,3018,c?c.P()[0]:null);var PG=bk/9E4*Ce;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Ce,duration:d,ub:[],ya:rc,Ma:new Uint8Array([]),
1377
- Sa:0,Ua:0,data:{Ib:this.g,baseMediaDecodeTime:PG,rb:eh},stream:b};break;case "ec3":for(var Ww=[],ck=0,Un=new Uint8Array([]),dk=null,Xw=t(k.fc()),Vn=Xw.next();!Vn.done;Vn=Xw.next()){var Wn=Vn.value,Xn=Wn.data;null==dk&&null!==Wn.pts&&(dk=Wn.pts);for(var Nf=0;Nf<Xn.length;){var ae=YC(Xn,Nf);ae?(b.audioSamplingRate=ae.sampleRate,b.channelsCount=ae.channelCount,ck=ae.sampleRate,Un=ae.ya,Ww.push({data:Xn.subarray(Nf,Nf+ae.ia),size:ae.ia,duration:1536,wb:0,flags:{xb:0,ob:0,mb:0,ib:0,jb:2,yb:0}}),Nf+=ae.ia):
1378
- Nf++}}if(0==ck||0==Un.byteLength||null==dk)throw new U(2,3,3018,c?c.P()[0]:null);var QG=dk/9E4*ck;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ck,duration:d,ub:[],ya:Un,Ma:new Uint8Array([]),Sa:0,Ua:0,data:{Ib:this.g,baseMediaDecodeTime:QG,rb:Ww},stream:b};break;case "mp3":for(var Yw=[],ek,fk=null,Zw=t(k.fc()),Yn=Zw.next();!Yn.done;Yn=Zw.next()){var Zn=Yn.value,rh=Zn.data;if(rh){null==fk&&null!==Zn.pts&&(fk=Zn.pts);for(var Fe=0;Fe<rh.length;){var Of=hD(rh,
1379
- Fe);Of?(ek||(ek=Of),Fe+Of.ia<=rh.length&&Yw.push({data:rh.subarray(Fe,Fe+Of.ia),size:Of.ia,duration:1152,wb:0,flags:{xb:0,ob:0,mb:0,ib:0,jb:2,yb:0}}),Fe+=Of.ia):Fe++}}}if(!ek||null==fk)throw new U(2,3,3018,c?c.P()[0]:null);var $w=ek.sampleRate,RG=fk/9E4*$w;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:$w,duration:d,ub:[],ya:new Uint8Array([]),Ma:new Uint8Array([]),Sa:0,Ua:0,data:{Ib:this.g,baseMediaDecodeTime:RG,rb:Yw},stream:b};break;case "opus":var ax=
1374
+ (l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var db=[],Da,$a=null,xb=t(k.fc()),ad=xb.next();!ad.done;ad=xb.next()){var ze=ad.value,Fd=ze.data;if(Fd){var Rc=0;Da=RC(Fd,Rc);if(!Da)throw new U(2,3,3018,c?c.P()[0]:null);b.audioSamplingRate=Da.sampleRate;b.channelsCount=Da.channelCount;null==$a&&null!==ze.pts&&($a=ze.pts);for(;Rc<Fd.length;){var Ae=QC(Fd,Rc);if(Ae){var Be=Ae.Pe+Ae.ia;Rc+Be<=Fd.length&&db.push({data:Fd.subarray(Rc+Ae.Pe,Rc+Be),size:Ae.ia,duration:1024,wb:0,flags:{xb:0,
1375
+ ob:0,mb:0,ib:0,jb:2,yb:0}});Rc+=Be}else Rc++}}}if(!Da||null==$a){if(!k.cd().length)throw new U(2,3,3018,c?c.P()[0]:null);$a=9E4*c.startTime;var Ce=Pc("audio",b.codecs.split(","));if(!Ce||!b.channelsCount||!b.audioSamplingRate)throw new U(2,3,3018,c?c.P()[0]:null);Da={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,cb:Ce};var Gd=TC(Ce,b.channelsCount);if(!Gd)throw new U(2,3,3018,c?c.P()[0]:null);for(var pj=$a+9E4*(c.endTime-c.startTime),dh=$a;dh<pj;)db.push({data:Gd,size:Gd.byteLength,
1376
+ duration:1024,wb:0,flags:{xb:0,ob:0,mb:0,ib:0,jb:2,yb:0}}),dh+=1024/Da.sampleRate*9E4}var qj=Da.sampleRate,rj=$a/9E4*qj;n={id:b.id,type:"audio",codecs:Da.cb,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:qj,duration:d,ub:[],ya:new Uint8Array([]),Ma:new Uint8Array([]),Sa:0,Ua:0,data:{Ib:this.g,baseMediaDecodeTime:rj,rb:db},stream:b};break;case "ac3":for(var eh=[],De=0,rc=new Uint8Array([]),bk=null,Vw=t(k.fc()),Rn=Vw.next();!Rn.done;Rn=Vw.next()){var Sn=Rn.value,Tn=Sn.data;null==bk&&null!==Sn.pts&&
1377
+ (bk=Sn.pts);for(var Nf=0;Nf<Tn.length;){var $d=VC(Tn,Nf);$d?(b.audioSamplingRate=$d.sampleRate,b.channelsCount=$d.channelCount,De=$d.sampleRate,rc=$d.ya,eh.push({data:Tn.subarray(Nf,Nf+$d.ia),size:$d.ia,duration:1536,wb:0,flags:{xb:0,ob:0,mb:0,ib:0,jb:2,yb:0}}),Nf+=$d.ia):Nf++}}if(0==De||0==rc.byteLength||null==bk)throw new U(2,3,3018,c?c.P()[0]:null);var PG=bk/9E4*De;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:De,duration:d,ub:[],ya:rc,Ma:new Uint8Array([]),
1378
+ Sa:0,Ua:0,data:{Ib:this.g,baseMediaDecodeTime:PG,rb:eh},stream:b};break;case "ec3":for(var Ww=[],ck=0,Un=new Uint8Array([]),dk=null,Xw=t(k.fc()),Vn=Xw.next();!Vn.done;Vn=Xw.next()){var Wn=Vn.value,Xn=Wn.data;null==dk&&null!==Wn.pts&&(dk=Wn.pts);for(var Of=0;Of<Xn.length;){var ae=YC(Xn,Of);ae?(b.audioSamplingRate=ae.sampleRate,b.channelsCount=ae.channelCount,ck=ae.sampleRate,Un=ae.ya,Ww.push({data:Xn.subarray(Of,Of+ae.ia),size:ae.ia,duration:1536,wb:0,flags:{xb:0,ob:0,mb:0,ib:0,jb:2,yb:0}}),Of+=ae.ia):
1379
+ Of++}}if(0==ck||0==Un.byteLength||null==dk)throw new U(2,3,3018,c?c.P()[0]:null);var QG=dk/9E4*ck;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ck,duration:d,ub:[],ya:Un,Ma:new Uint8Array([]),Sa:0,Ua:0,data:{Ib:this.g,baseMediaDecodeTime:QG,rb:Ww},stream:b};break;case "mp3":for(var Yw=[],ek,fk=null,Zw=t(k.fc()),Yn=Zw.next();!Yn.done;Yn=Zw.next()){var Zn=Yn.value,rh=Zn.data;if(rh){null==fk&&null!==Zn.pts&&(fk=Zn.pts);for(var Ge=0;Ge<rh.length;){var Pf=hD(rh,
1380
+ Ge);Pf?(ek||(ek=Pf),Ge+Pf.ia<=rh.length&&Yw.push({data:rh.subarray(Ge,Ge+Pf.ia),size:Pf.ia,duration:1152,wb:0,flags:{xb:0,ob:0,mb:0,ib:0,jb:2,yb:0}}),Ge+=Pf.ia):Ge++}}}if(!ek||null==fk)throw new U(2,3,3018,c?c.P()[0]:null);var $w=ek.sampleRate,RG=fk/9E4*$w;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:$w,duration:d,ub:[],ya:new Uint8Array([]),Ma:new Uint8Array([]),Sa:0,Ua:0,data:{Ib:this.g,baseMediaDecodeTime:RG,rb:Yw},stream:b};break;case "opus":var ax=
1380
1381
  [],gk=null,cd=k.H;if(!cd)throw new U(2,3,3018,c?c.P()[0]:null);var Hb=[];switch(cd.Ki){case 1:case 2:Hb=[0];break;case 0:Hb=[255,1,1,0,1];break;case 128:Hb=[255,2,0,0,1];break;case 3:Hb=[1,2,1,0,2,1];break;case 4:Hb=[1,2,2,0,1,2,3];break;case 5:Hb=[1,3,2,0,4,1,2,3];break;case 6:Hb=[1,4,2,0,4,1,2,3,5];break;case 7:Hb=[1,4,2,0,4,1,2,3,5,6];break;case 8:Hb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Hb=[1,1,2,0,1];break;case 131:Hb=[1,1,3,0,1,2];break;case 132:Hb=[1,1,4,0,1,2,3];break;case 133:Hb=[1,1,5,
1381
- 0,1,2,3,4];break;case 134:Hb=[1,1,6,0,1,2,3,4,5];break;case 135:Hb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Hb=[1,1,8,0,1,2,3,4,5,6,7]}var bx=new Uint8Array([0,cd.channelCount,0,0,cd.sampleRate>>>24&255,cd.sampleRate>>>17&255,cd.sampleRate>>>8&255,cd.sampleRate>>>0&255,0,0].concat(x(Hb)));for(var cx=cd.sampleRate,dx=t(k.fc()),$n=dx.next();!$n.done;$n=dx.next()){var ao=$n.value,Pf=ao.data;null==gk&&null!==ao.pts&&(gk=ao.pts);for(var sh=0;sh<Pf.length;){for(var SG=0!==(Pf[sh+1]&16),TG=0!==(Pf[sh+1]&8),
1382
- Id=sh+2,hk=0;255===Pf[Id];)hk+=255,Id+=1;hk+=Pf[Id];Id+=1;Id+=SG?2:0;Id+=TG?2:0;var ex=Pf.slice(Id,Id+hk);ax.push({data:ex,size:ex.byteLength,duration:960,wb:0,flags:{xb:0,ob:0,mb:0,ib:0,jb:2,yb:0}});sh=Id+hk}}if(0==bx.byteLength||null==gk)throw new U(2,3,3018,c?c.P()[0]:null);b.audioSamplingRate=cd.sampleRate;b.channelsCount=cd.channelCount;var UG=gk/9E4*cx;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:cx,duration:d,ub:[],ya:bx,Ma:new Uint8Array([]),Sa:0,
1382
+ 0,1,2,3,4];break;case 134:Hb=[1,1,6,0,1,2,3,4,5];break;case 135:Hb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Hb=[1,1,8,0,1,2,3,4,5,6,7]}var bx=new Uint8Array([0,cd.channelCount,0,0,cd.sampleRate>>>24&255,cd.sampleRate>>>17&255,cd.sampleRate>>>8&255,cd.sampleRate>>>0&255,0,0].concat(x(Hb)));for(var cx=cd.sampleRate,dx=t(k.fc()),$n=dx.next();!$n.done;$n=dx.next()){var ao=$n.value,Qf=ao.data;null==gk&&null!==ao.pts&&(gk=ao.pts);for(var sh=0;sh<Qf.length;){for(var SG=0!==(Qf[sh+1]&16),TG=0!==(Qf[sh+1]&8),
1383
+ Id=sh+2,hk=0;255===Qf[Id];)hk+=255,Id+=1;hk+=Qf[Id];Id+=1;Id+=SG?2:0;Id+=TG?2:0;var ex=Qf.slice(Id,Id+hk);ax.push({data:ex,size:ex.byteLength,duration:960,wb:0,flags:{xb:0,ob:0,mb:0,ib:0,jb:2,yb:0}});sh=Id+hk}}if(0==bx.byteLength||null==gk)throw new U(2,3,3018,c?c.P()[0]:null);b.audioSamplingRate=cd.sampleRate;b.channelsCount=cd.channelCount;var UG=gk/9E4*cx;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:cx,duration:d,ub:[],ya:bx,Ma:new Uint8Array([]),Sa:0,
1383
1384
  Ua:0,data:{Ib:this.g,baseMediaDecodeTime:UG,rb:ax},stream:b}}n&&(l.push(n),n=null)}}catch(bo){return bo&&3023==bo.code?Promise.resolve(new Uint8Array([])):Promise.reject(bo)}if(!l.length)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));var fx=new Uw(l),co=b.id+"_"+c.i;if(this.i.has(co))var eo=this.i.get(co);else eo=lx(fx),this.i.set(co,eo);var VG=Cx(fx);this.g++;var WG=Kc(eo,VG);return Promise.resolve(WG)};Q("shaka.transmuxer.TsTransmuxer",uD);uD.prototype.transmux=uD.prototype.transmux;
1384
1385
  uD.prototype.getOriginalMimeType=uD.prototype.getOriginalMimeType;uD.prototype.convertCodecs=uD.prototype.convertCodecs;uD.prototype.isSupported=uD.prototype.isSupported;uD.prototype.destroy=uD.prototype.destroy;var vD=["aac","ac-3","ec-3","mp3","opus"],wD=["avc","hevc"];le("video/mp2t",function(){return new uD("video/mp2t")},pe);/*
1385
1386
  @license