shaka-player 3.3.18 → 3.3.19

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 (50) hide show
  1. package/.github/workflows/selenium-lab-tests.yaml +23 -1
  2. package/AUTHORS +2 -1
  3. package/CHANGELOG.md +22 -0
  4. package/CONTRIBUTORS +4 -1
  5. package/dist/controls.css +1 -1
  6. package/dist/locales.js +29 -29
  7. package/dist/shaka-player.compiled.d.ts +6 -2
  8. package/dist/shaka-player.compiled.debug.d.ts +6 -2
  9. package/dist/shaka-player.compiled.debug.js +132 -130
  10. package/dist/shaka-player.compiled.debug.map +3 -3
  11. package/dist/shaka-player.compiled.js +299 -297
  12. package/dist/shaka-player.compiled.map +3 -3
  13. package/dist/shaka-player.ui.d.ts +6 -2
  14. package/dist/shaka-player.ui.debug.d.ts +6 -2
  15. package/dist/shaka-player.ui.debug.js +196 -194
  16. package/dist/shaka-player.ui.debug.map +3 -3
  17. package/dist/shaka-player.ui.js +482 -480
  18. package/dist/shaka-player.ui.map +3 -3
  19. package/docs/tutorials/fairplay.md +2 -2
  20. package/externs/shaka/net.js +1 -0
  21. package/externs/shaka/player.js +13 -7
  22. package/lib/ads/client_side_ad_manager.js +6 -3
  23. package/lib/dash/dash_parser.js +49 -48
  24. package/lib/media/media_source_engine.js +9 -4
  25. package/lib/media/streaming_engine.js +8 -3
  26. package/lib/net/http_fetch_plugin.js +79 -57
  27. package/lib/net/networking_engine.js +1 -0
  28. package/lib/player.js +17 -2
  29. package/lib/polyfill/media_capabilities.js +13 -0
  30. package/lib/text/mp4_vtt_parser.js +4 -0
  31. package/lib/text/text_engine.js +1 -0
  32. package/lib/util/manifest_parser_utils.js +1 -2
  33. package/lib/util/mime_utils.js +11 -0
  34. package/lib/util/periods.js +5 -5
  35. package/lib/util/stream_utils.js +2 -2
  36. package/maintained-branches.md +3 -4
  37. package/package.json +1 -1
  38. package/test/media/content_workarounds_unit.js +43 -0
  39. package/test/media/drm_engine_integration.js +4 -17
  40. package/test/media/streaming_engine_unit.js +6 -1
  41. package/test/net/networking_engine_unit.js +6 -1
  42. package/test/player_integration.js +39 -0
  43. package/test/player_unit.js +54 -0
  44. package/test/polyfill/media_capabilities_unit.js +0 -1
  45. package/test/test/assets/text-clip-alt.vtt +63 -0
  46. package/test/test/util/fake_drm_engine.js +3 -0
  47. package/test/test/util/simple_fakes.js +3 -0
  48. package/test/test/util/test_scheme.js +9 -14
  49. package/test/text/mp4_vtt_parser_unit.js +8 -0
  50. package/test/util/mime_utils_unit.js +10 -0
@@ -15,8 +15,8 @@ ha("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("
15
15
  ha("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=fa[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&da(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ia(ca(this))}})}return a});function ia(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
16
16
  function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:ca(a)}}function ja(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ka="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},la;
17
17
  if("function"==typeof Object.setPrototypeOf)la=Object.setPrototypeOf;else{var ma;a:{var na={a:!0},oa={};try{oa.__proto__=na;ma=oa.a;break a}catch(a){}ma=!1}la=ma?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var pa=la;
18
- function qa(a,b){a.prototype=ka(b.prototype);a.prototype.constructor=a;if(pa)pa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Qg=b.prototype}function ra(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.u=this.i=null}function sa(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}ra.prototype.s=function(a){this.h=a};
19
- function ta(a,b){a.i={ke:b,re:!0};a.g=a.m||a.j}ra.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}ra.prototype.B=function(a){this.g=a};function A(a){a.g=0}function C(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a){a.m=0;a.j=2}function va(a,b){a.g=b;a.m=0}function E(a){a.m=0;var b=a.i.ke;a.i=null;return b}function wa(a){a.u=[a.i];a.m=0;a.j=0}
18
+ function qa(a,b){a.prototype=ka(b.prototype);a.prototype.constructor=a;if(pa)pa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Pg=b.prototype}function ra(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.u=this.i=null}function sa(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}ra.prototype.s=function(a){this.h=a};
19
+ function ta(a,b){a.i={ke:b,re:!0};a.g=a.m||a.j}ra.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}ra.prototype.B=function(a){this.g=a};function A(a){a.g=0}function C(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a){a.m=0;a.j=2}function va(a,b){a.g=b;a.m=0}function F(a){a.m=0;var b=a.i.ke;a.i=null;return b}function wa(a){a.u=[a.i];a.m=0;a.j=0}
20
20
  function ya(a,b){var c=a.u.splice(0)[0];(c=a.i=a.i||c)?c.re?a.g=a.m||a.j:void 0!=c.B&&a.j<c.B?(a.g=c.B,a.i=null):a.g=a.j:a.g=b}function za(a){this.g=new ra;this.h=a}function Aa(a,b){sa(a.g);var c=a.g.l;if(c)return Ba(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Ca(a)}
21
21
  function Ba(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.o=!1,e;var f=e.value}catch(g){return a.g.l=null,ta(a.g,g),Ca(a)}a.g.l=null;d.call(a.g,f);return Ca(a)}
22
22
  function Ca(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ta(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.re)throw b.ke;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
@@ -32,10 +32,10 @@ while(!k.done)})};return b});function Ia(a,b){return Object.prototype.hasOwnProp
32
32
  ha("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ia(k,g)){var l=new c;da(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
33
33
  m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m["delete"](k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ia(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ia(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
34
34
  Ia(k,g)&&Ia(k[g],this.g)};b.prototype["delete"]=function(k){return d(k)&&Ia(k,g)&&Ia(k[g],this.g)?delete k[g][this.g]:!1};return b});
35
- ha("Map",function(a){function b(){var h={};return h.Sa=h.next=h.head=h}function c(h,k){var l=h.g;return ia(function(){if(l){for(;l.head!=h.g;)l=l.Sa;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.h[l];if(m&&Ia(h.h,l))for(var n=0;n<m.length;n++){var p=m[n];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:n,ja:p}}return{id:l,
35
+ ha("Map",function(a){function b(){var h={};return h.Ra=h.next=h.head=h}function c(h,k){var l=h.g;return ia(function(){if(l){for(;l.head!=h.g;)l=l.Ra;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.h[l];if(m&&Ia(h.h,l))for(var n=0;n<m.length;n++){var p=m[n];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:n,ja:p}}return{id:l,
36
36
  list:m,index:-1,ja:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=t(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
37
- "t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.ja?l.ja.value=k:(l.ja={next:this.g,Sa:this.g.Sa,head:this.g,key:h,value:k},l.list.push(l.ja),this.g.Sa.next=l.ja,this.g.Sa=l.ja,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.ja&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.ja.Sa.next=h.ja.next,h.ja.next.Sa=h.ja.Sa,
38
- h.ja.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Sa=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).ja};e.prototype.get=function(h){return(h=d(this,h).ja)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=function(h,k){for(var l=this.entries(),
37
+ "t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.ja?l.ja.value=k:(l.ja={next:this.g,Ra:this.g.Ra,head:this.g,key:h,value:k},l.list.push(l.ja),this.g.Ra.next=l.ja,this.g.Ra=l.ja,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.ja&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.ja.Ra.next=h.ja.next,h.ja.next.Ra=h.ja.Ra,
38
+ h.ja.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Ra=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).ja};e.prototype.get=function(h){return(h=d(this,h).ja)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=function(h,k){for(var l=this.entries(),
39
39
  m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});
40
40
  ha("Set",function(a){function b(c){this.g=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
41
41
  f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype["delete"]=function(c){c=this.g["delete"](c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;
@@ -59,7 +59,7 @@ function tb(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b
59
59
  ib.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:lb};var mb="center",ub={LEFT:"left",RIGHT:"right",CENTER:mb,START:"start",END:"end"};ib.textAlign=ub;var qb="after",vb={BEFORE:"before",CENTER:"center",AFTER:qb};ib.displayAlign=vb;var jb="ltr";ib.direction={HORIZONTAL_LEFT_TO_RIGHT:jb,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var nb="horizontal-tb";ib.writingMode={HORIZONTAL_TOP_TO_BOTTOM:nb,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var ob=0;
60
60
  ib.lineInterpretation={LINE_NUMBER:ob,PERCENTAGE:1};var pb="start",wb={CENTER:"center",START:pb,END:"end"};ib.lineAlign=wb;var xb={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};ib.defaultTextColor=xb;var yb={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};ib.defaultTextBackgroundColor=yb;var rb=400;ib.fontWeight={NORMAL:rb,BOLD:700};
61
61
  var sb="normal",zb={NORMAL:sb,ITALIC:"italic",OBLIQUE:"oblique"};ib.fontStyle=zb;ib.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function kb(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Ab;this.scroll=Bb}M("shaka.text.CueRegion",kb);var Ab=1;kb.units={PX:0,PERCENTAGE:Ab,LINES:2};var Bb="";kb.scrollMode={NONE:Bb,UP:"up"};function Cb(){}function Db(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Eb(a)==Eb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=Fb(a),d=Fb(b),e=0;e<a.byteLength;e++)if(c[e]!=d[e])return!1;return!0}function Eb(a){return a instanceof ArrayBuffer?a:a.buffer}function Gb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
62
- function Fb(a,b,c){c=void 0===c?Infinity:c;return Hb(a,void 0===b?0:b,c,Uint8Array)}function Ib(a,b,c){c=void 0===c?Infinity:c;return Hb(a,void 0===b?0:b,c,DataView)}function Hb(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(Eb(a),b,Math.min(b+Math.max(c,0),e)-b)}M("shaka.util.BufferUtils",Cb);Cb.toDataView=Ib;Cb.toUint8=Fb;Cb.toArrayBuffer=Gb;Cb.equal=Db;function Jb(a,b){this.g=a;this.h=b}Jb.prototype.toString=function(){return"v"+this.g+"."+this.h};function Kb(a,b){var c=new Jb(4,0),d=Lb,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Mb(a,b,c,d){Ua([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Nb(a,b,c,d){Ta([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Lb=null;function Ob(a,b){return a.concat(b)}function Pb(){}function Qb(a){return null!=a}function Sb(a){var b=Object.create(a.prototype||Object.prototype);try{var c=a.call(b);c||(Kb("Factories requiring new","Factories should be plain functions"),c=b)}catch(d){Kb("Factories requiring new","Factories should be plain functions"),c=new a}return c};function Tb(){}M("shaka.dependencies",Tb);Tb.has=function(a){return Ub.has(a)};Tb.add=function(a,b){if(!Vb[a])throw Error(a+" is not supported");Ub.set(a,function(){return b})};var Vb={muxjs:"muxjs"};Tb.Allowed=Vb;var Ub=new Map([["muxjs",function(){return window.muxjs}]]);function N(a,b,c){var d=Ha.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1}N.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};M("shaka.util.Error",N);N.Severity={RECOVERABLE:1,CRITICAL:2};N.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
62
+ function Fb(a,b,c){c=void 0===c?Infinity:c;return Hb(a,void 0===b?0:b,c,Uint8Array)}function Ib(a,b,c){c=void 0===c?Infinity:c;return Hb(a,void 0===b?0:b,c,DataView)}function Hb(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(Eb(a),b,Math.min(b+Math.max(c,0),e)-b)}M("shaka.util.BufferUtils",Cb);Cb.toDataView=Ib;Cb.toUint8=Fb;Cb.toArrayBuffer=Gb;Cb.equal=Db;function Jb(a,b){this.g=a;this.h=b}Jb.prototype.toString=function(){return"v"+this.g+"."+this.h};function Kb(a,b){var c=new Jb(4,0),d=Lb,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Mb(a,b,c,d){Ua([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Nb(a,b,c,d){Ta([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Lb=null;function Ob(a,b){return a.concat(b)}function Pb(){}function Qb(a){return null!=a}function Rb(a){var b=Object.create(a.prototype||Object.prototype);try{var c=a.call(b);c||(Kb("Factories requiring new","Factories should be plain functions"),c=b)}catch(d){Kb("Factories requiring new","Factories should be plain functions"),c=new a}return c};function Tb(){}M("shaka.dependencies",Tb);Tb.has=function(a){return Ub.has(a)};Tb.add=function(a,b){if(!Vb[a])throw Error(a+" is not supported");Ub.set(a,function(){return b})};var Vb={muxjs:"muxjs"};Tb.Allowed=Vb;var Ub=new Map([["muxjs",function(){return window.muxjs}]]);function N(a,b,c){var d=Ha.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1}N.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};M("shaka.util.Error",N);N.Severity={RECOVERABLE:1,CRITICAL:2};N.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
63
63
  N.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_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,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,
64
64
  TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,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,
65
65
  WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,
@@ -82,10 +82,10 @@ r.toString=function(){var a=[],b=this.Fa;b&&a.push(cc(b,dc,!0),":");if(b=this.Ha
82
82
  r.resolve=function(a){var b=this.clone();"data"===b.Fa&&(b=new Xb);var c=!!a.Fa;c?Yb(b,a.Fa):c=!!a.rb;c?b.rb=a.rb:c=!!a.Ha;c?b.Ha=a.Ha:c=null!=a.Jb;var d=a.wa;if(c)Zb(b,a.Jb);else if(c=!!a.wa){if("/"!=d.charAt(0))if(this.Ha&&!this.wa)d="/"+d;else{var e=b.wa.lastIndexOf("/");-1!=e&&(d=b.wa.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(""):".."==
83
83
  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.wa=d:c=""!==a.g.toString();c?$b(b,a.g.clone()):c=!!a.fb;c&&(b.fb=a.fb);return b};r.clone=function(){return new Xb(this)};function Yb(a,b,c){a.Fa=c?ac(b,!0):b;a.Fa&&(a.Fa=a.Fa.replace(/:$/,""))}function Zb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Jb=b}else a.Jb=null}function $b(a,b,c){b instanceof bc?a.g=b:(c||(b=cc(b,hc)),a.g=new bc(b))}
84
84
  function ac(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function cc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,ic),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function ic(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var dc=/[#\/\?@]/g,fc=/[#\?:]/g,ec=/[#\?]/g,hc=/[#\?@]/g,gc=/#/g;function bc(a){this.g=a||null}
85
- function jc(a){if(!a.na&&(a.na={},a.Bc=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),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," ")))}}r=bc.prototype;r.na=null;r.Bc=null;r.add=function(a,b){jc(this);this.g=null;var c=this.na.hasOwnProperty(a)&&this.na[a];c||(this.na[a]=c=[]);c.push(b);this.Bc++;return this};
86
- r.set=function(a,b){jc(this);this.g=null;this.na.hasOwnProperty(a)?this.na[a]=[b]:this.add(a,b);return this};r.toString=function(){if(this.g)return this.g;if(!this.na)return"";var a=[],b;for(b in this.na)for(var c=encodeURIComponent(b),d=this.na[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};r.clone=function(){var a=new bc;a.g=this.g;if(this.na){var b={},c;for(c in this.na)b[c]=this.na[c].concat();a.na=b;a.Bc=this.Bc}return a};function kc(a,b){if(0==b.length)return a;var c=b.map(function(d){return new Xb(d)});return a.map(function(d){return new Xb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Ob,[]).map(function(d){return d.toString()})}function lc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
85
+ function jc(a){if(!a.oa&&(a.oa={},a.Bc=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),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," ")))}}r=bc.prototype;r.oa=null;r.Bc=null;r.add=function(a,b){jc(this);this.g=null;var c=this.oa.hasOwnProperty(a)&&this.oa[a];c||(this.oa[a]=c=[]);c.push(b);this.Bc++;return this};
86
+ r.set=function(a,b){jc(this);this.g=null;this.oa.hasOwnProperty(a)?this.oa[a]=[b]:this.add(a,b);return this};r.toString=function(){if(this.g)return this.g;if(!this.oa)return"";var a=[],b;for(b in this.oa)for(var c=encodeURIComponent(b),d=this.oa[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};r.clone=function(){var a=new bc;a.g=this.g;if(this.oa){var b={},c;for(c in this.oa)b[c]=this.oa[c].concat();a.oa=b;a.Bc=this.Bc}return a};function kc(a,b){if(0==b.length)return a;var c=b.map(function(d){return new Xb(d)});return a.map(function(d){return new Xb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Ob,[]).map(function(d){return d.toString()})}function lc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
87
87
  function mc(a,b){if(1==b.length)return b[0];var c=nc(a,b);if(null!=c)return c;throw new N(2,4,4025,b);}function nc(a,b){for(var c=t(oc[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==pc?"":null}
88
- var pc="text",qc={Na:"video",cb:"audio",Z:pc,Tb:"image",ig:"application"},oc={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cx]$/,/^[du]dts$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvhe/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function rc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}rc.prototype.resolve=function(){};rc.prototype.reject=function(){};function sc(a){this.h=a;this.g=void 0}sc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function tc(a){this.h=a;this.g=null}tc.prototype.S=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};tc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function O(a){this.h=a;this.g=null}O.prototype.Nb=function(){this.stop();this.h();return this};O.prototype.S=function(a){var b=this;this.stop();this.g=(new tc(function(){b.h()})).S(a);return this};O.prototype.Da=function(a){var b=this;this.stop();this.g=(new tc(function(){b.g.S(a);b.h()})).S(a);return this};O.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};M("shaka.util.Timer",O);O.prototype.stop=O.prototype.stop;O.prototype.tickEvery=O.prototype.Da;O.prototype.tickAfter=O.prototype.S;
88
+ var pc="text",qc={Na:"video",cb:"audio",Z:pc,Tb:"image",hg:"application"},oc={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvhe/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function rc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}rc.prototype.resolve=function(){};rc.prototype.reject=function(){};function sc(a){this.h=a;this.g=void 0}sc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function tc(a){this.h=a;this.g=null}tc.prototype.S=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};tc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function O(a){this.h=a;this.g=null}O.prototype.Nb=function(){this.stop();this.h();return this};O.prototype.S=function(a){var b=this;this.stop();this.g=(new tc(function(){b.h()})).S(a);return this};O.prototype.Da=function(a){var b=this;this.stop();this.g=(new tc(function(){b.g.S(a);b.h()})).S(a);return this};O.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};M("shaka.util.Timer",O);O.prototype.stop=O.prototype.stop;O.prototype.tickEvery=O.prototype.Da;O.prototype.tickAfter=O.prototype.S;
89
89
  O.prototype.tickNow=O.prototype.Nb;function uc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function vc(a){return""!=wc().canPlayType(a)}function xc(){return yc("Xbox One")}function zc(){return yc("Tizen")}function Ac(){return yc("Web0S")}function Bc(){return yc("CrKey")}function Cc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!zc()&&!yc("PC=EOS")&&!yc("VirginMedia")&&!Dc()&&!yc("AFT")}function Dc(){return yc("PlayStation 4")}
90
90
  function Fc(){if(!Cc())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function yc(a){return(navigator.userAgent||"").includes(a)}function wc(){if(Gc)return Gc;Hc||(Hc=new O(function(){Gc=null}));(Gc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Gc=document.createElement("video"));Hc.S(1);return Gc}var Hc=null,Gc=null;function Ic(){}
91
91
  function Jc(a){if(!a)return"";a=Fb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!Dc())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ta('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
@@ -93,19 +93,19 @@ function Jc(a){if(!a)return"";a=Fb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.suba
93
93
  function Kc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new N(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Ib(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return Lc.value()(d)}
94
94
  function Mc(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Fb(a);if(239==c[0]&&187==c[1]&&191==c[2])return Jc(c);if(254==c[0]&&255==c[1])return Kc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Kc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Kc(a,!1);if(0==c[1]&&0==c[3])return Kc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Jc(a);throw new N(2,2,2003);}
95
95
  function Nc(a){if(window.TextEncoder&&!Dc()){var b=new TextEncoder;return Gb(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Gb(b)}function Oc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}M("shaka.util.StringUtils",Ic);Ic.resetFromCharCode=function(){Lc.g=void 0};Ic.toUTF16=Oc;Ic.toUTF8=Nc;Ic.fromBytesAutoDetect=Mc;Ic.fromUTF16=Kc;
96
- Ic.fromUTF8=Jc;var Lc=new sc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Va:65536};0<b.Va;b={Va:b.Va},b.Va/=2)if(a(b.Va))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Va)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Va));return e}}(b);return null});function Pc(){}function Qc(a){a=Fb(a);a=Lc.value()(a);return btoa(a)}function Rc(a,b){b=void 0==b?!0:b;var c=Qc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function Sc(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function Tc(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
96
+ Ic.fromUTF8=Jc;var Lc=new sc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Ua:65536};0<b.Ua;b={Ua:b.Ua},b.Ua/=2)if(a(b.Ua))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Ua)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Ua));return e}}(b);return null});function Pc(){}function Qc(a){a=Fb(a);a=Lc.value()(a);return btoa(a)}function Rc(a,b){b=void 0==b?!0:b;var c=Qc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function Sc(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function Tc(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
97
97
  function Uc(a){var b=Fb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Vc(){for(var a=Ha.apply(0,arguments),b=0,c=t(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=t(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(Fb(d),c),c+=d.byteLength;return b}M("shaka.util.Uint8ArrayUtils",Pc);Pc.concat=Vc;Pc.toHex=Uc;Pc.fromHex=Tc;Pc.fromBase64=Sc;Pc.toBase64=Rc;Pc.toStandardBase64=Qc;
98
98
  Pc.equal=function(a,b){Kb("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return Db(a,b)};function Wc(){var a=this;this.o=Ub.get("muxjs")();this.h=this.g=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.o&&(this.g=new this.o.mp4.Transmuxer({keepOriginalTimestamps:!0}),this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(Vc(b.initSegment,b.data))}),this.g.on("done",function(){var b={data:Vc.apply(Pc,ja(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1}))}Wc.prototype.destroy=function(){this.g&&this.g.dispose();this.g=null;return Promise.resolve()};
99
99
  function Xc(a,b){if(!Ub.get("muxjs")()||!Yc(a))return!1;if(b)return MediaSource.isTypeSupported(Zc(b,a));var c=Zc("audio",a),d=Zc("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function Yc(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
100
100
  function Zc(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function $c(a,b){a.l=!0;a.h=new rc;a.m=[];a.j=[];a.i=[];var c=Fb(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new N(2,3,3018));return a.h};function ad(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function bd(a,b,c){b=ad(a,b);if(Yc(b)){if(Ub.get("muxjs")())return Zc(c,b)}else if("video/mp2t"!=a&&"audio"==c)return b.replace("video","audio");return b}
101
101
  function cd(a){var b=dd(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===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"===a&&"b2"===b:return"dtsx";
102
102
  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"}return a}function ed(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function dd(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}
103
- (new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function fd(a){this.l=null;this.i=a;this.j=this.u=0;this.m=Infinity;this.h=this.g=null;this.s="";this.o=new Map}function gd(a){return hd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}fd.prototype.destroy=function(){this.i=this.l=null;this.o.clear();return Promise.resolve()};
104
- function id(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g)return u(h,Promise.resolve(),2);if(!a.l||!a.i)return h["return"]();if(null==c||null==d)return a.l.parseInit(Fb(b)),h["return"]();e={periodStart:a.u,segmentStart:c,segmentEnd:d};f=a.l.parseMedia(Fb(b),e);g=f.filter(function(k){return k.startTime>=a.j&&k.startTime<a.m});a.i.append(g);null==a.g&&(a.g=Math.max(c,a.j));a.h=Math.min(d,a.m);A(h)})}
105
- fd.prototype.remove=function(a,b){var c=this;return L(function(d){if(1==d.g)return u(d,Promise.resolve(),2);!c.i||!c.i.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));A(d)})};function jd(a,b,c){a.j=b;a.m=c}function kd(a,b,c){a.s=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.i.append(e)}
103
+ (new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function fd(a){this.j=null;this.i=a;this.l=this.u=0;this.m=Infinity;this.h=this.g=null;this.s="";this.o=new Map}function gd(a){return hd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}fd.prototype.destroy=function(){this.i=this.j=null;this.o.clear();return Promise.resolve()};
104
+ function id(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g)return u(h,Promise.resolve(),2);if(!a.j||!a.i)return h["return"]();if(null==c||null==d)return a.j.parseInit(Fb(b)),h["return"]();e={periodStart:a.u,segmentStart:c,segmentEnd:d};f=a.j.parseMedia(Fb(b),e);g=f.filter(function(k){return k.startTime>=a.l&&k.startTime<a.m});a.i.append(g);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);A(h)})}
105
+ fd.prototype.remove=function(a,b){var c=this;return L(function(d){if(1==d.g)return u(d,Promise.resolve(),2);!c.i||!c.i.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));A(d)})};function jd(a,b,c){a.l=b;a.m=c}function kd(a,b,c){a.s=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.i.append(e)}
106
106
  function ld(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push({stream:c.stream,cue:new ib(c.startTime,c.endTime,c.text)});return b}function md(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())md(a,d.value,c)}
107
- function od(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,[]);md(a,k,e);k.startTime>=a.j&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.s&&a.i.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,
108
- a.j):Math.min(a.g,Math.max(c,a.j));a.h=Math.max(a.h,Math.min(d,a.m))}M("shaka.text.TextEngine",fd);fd.prototype.destroy=fd.prototype.destroy;fd.findParser=function(a){return hd[a]};fd.unregisterParser=function(a){delete hd[a]};fd.registerParser=function(a,b){hd[a]=b};var hd={};function pd(){}function qd(a,b){a=rd(a);b=rd(b);return a.split("-")[0]==b.split("-")[0]}function sd(a,b){a=rd(a);b=rd(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function td(a,b){a=rd(a);b=rd(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function rd(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=ud.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}
107
+ function od(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,[]);md(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.s&&a.i.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,
108
+ a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}M("shaka.text.TextEngine",fd);fd.prototype.destroy=fd.prototype.destroy;fd.findParser=function(a){return hd[a]};fd.unregisterParser=function(a){delete hd[a]};fd.registerParser=function(a,b){hd[a]=b};var hd={};function pd(){}function qd(a,b){a=rd(a);b=rd(b);return a.split("-")[0]==b.split("-")[0]}function sd(a,b){a=rd(a);b=rd(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function td(a,b){a=rd(a);b=rd(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function rd(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=ud.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}
109
109
  function vd(a,b){a=rd(a);b=rd(b);return b==a?4:sd(b,a)?3:td(b,a)?2:sd(a,b)?1:0}function wd(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=ud.get(a)||a}function xd(a){return a.language?rd(a.language):a.audio&&a.audio.language?rd(a.audio.language):a.video&&a.video.language?rd(a.video.language):"und"}
110
110
  function yd(a,b){for(var c=rd(a),d=new Set,e=t(b),f=e.next();!f.done;f=e.next())d.add(rd(f.value));e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,f==c)return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,sd(f,c))return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,td(f,c))return f;d=t(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,sd(c,f))return f;return null}M("shaka.util.LanguageUtils",pd);pd.findClosestLocale=yd;pd.getLocaleForVariant=xd;
111
111
  pd.getLocaleForText=function(a){return rd(a.language||"und")};pd.getBase=wd;pd.relatedness=vd;pd.areSiblings=function(a,b){var c=wd(a),d=wd(b);return a!=c&&b!=d&&c==d};pd.normalize=rd;pd.isSiblingOf=td;pd.isParentOf=sd;pd.areLanguageCompatible=qd;pd.areLocaleCompatible=function(a,b){a=rd(a);b=rd(b);return a==b};
@@ -123,7 +123,7 @@ function Od(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;return e&&e
123
123
  function Pd(a,b){return L(function(c){if(1==c.g)return u(c,Qd(b,0<b.offlineSessionIds.length),2);Rd(a,b);Sd(b);Td(b);A(c)})}
124
124
  function Qd(a,b){return L(function(c){if(1==c.g)return u(c,Ud(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=Vd(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=mc("video",g);f=Vd(f);g=mc("audio",g);g=Wd(g);var h=bd(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(h))return!1;f=[f,g].join()}g=bd(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(g))return!1;e.codecs=f}if(f=d.audio){g=Wd(f.codecs);h=bd(f.mimeType,g,"audio");if(!MediaSource.isTypeSupported(h))return!1;
125
125
  f.codecs=g}if(xc()&&e&&(e.width&&1920<e.width||e.height&&1080<e.height)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return Za(Xd(d)),!1;(e=d.decodingInfos.some(function(k){return k.supported}))||Za(Xd(d));return e});A(c)})}
126
- function Ud(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;return L(function(v){if(d=a.some(function(w){return w.decodingInfos.length}))return v["return"]();e=navigator.mediaCapabilities;f=[];g=function(w,x){var y;return L(function(D){if(1==D.g)return C(D,2),u(D,e.decodingInfo(x),4);if(2!=D.g)return y=D.h,w.decodingInfos.push(y),va(D,0);E(D);JSON.stringify(x);A(D)})};h=t(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Yd(l,b,c),n=t(m),p=n.next();!p.done;p=n.next())q=p.value,f.push(g(l,q));return u(v,Promise.all(f),
126
+ function Ud(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;return L(function(v){if(d=a.some(function(w){return w.decodingInfos.length}))return v["return"]();e=navigator.mediaCapabilities;f=[];g=function(w,y){var x;return L(function(D){if(1==D.g)return C(D,2),u(D,e.decodingInfo(y),4);if(2!=D.g)return x=D.h,w.decodingInfos.push(x),va(D,0);F(D);JSON.stringify(y);A(D)})};h=t(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Yd(l,b,c),n=t(m),p=n.next();!p.done;p=n.next())q=p.value,f.push(g(l,q));return u(v,Promise.all(f),
127
127
  0)})}
128
128
  function Yd(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=mc("video",g);f=Vd(f);g=mc("audio",g);g=bd(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Vd(f);f=bd(e.mimeType,f,"video");c.video={contentType:f,width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
129
129
  break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=Wd(d.codecs),f=bd(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);
@@ -158,59 +158,59 @@ function Ke(a){return new Fe(Promise.all(a.map(function(b){return b.promise})),f
158
158
  Fe.prototype.$=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Le(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new rc,g=new N(2,7,7001);this.promise.then(c(!0),c(!1));return new Fe(f,function(){return d()})};
159
159
  function Le(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}M("shaka.util.AbortableOperation",Fe);Fe.prototype.chain=Fe.prototype.$;Fe.prototype["finally"]=Fe.prototype["finally"];Fe.all=Ke;Fe.prototype.abort=Fe.prototype.abort;Fe.notAbortable=Je;Fe.completed=Ie;Fe.aborted=He;Fe.failed=Ge;function Q(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});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.g=!1}
160
160
  function Me(a){var b=new Q(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}Q.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};Q.prototype.stopImmediatePropagation=function(){this.g=!0};Q.prototype.stopPropagation=function(){};M("shaka.util.FakeEvent",Q);function Ne(){this.fa=new zd;this.Ec=this}Ne.prototype.addEventListener=function(a,b){this.fa&&this.fa.push(a,b)};Ne.prototype.removeEventListener=function(a,b){this.fa&&this.fa.remove(a,b)};Ne.prototype.dispatchEvent=function(a){if(!this.fa)return!0;var b=this.fa.get(a.type)||[],c=this.fa.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Ec;a.currentTarget=this.Ec;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
161
- Ne.prototype.release=function(){this.fa=null};function Oe(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&&d.buffer.constructor==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 Set;return b(a)}function Pe(a){var b={},c;for(c in a)b[c]=a[c];return b};function Qe(){this.g=[]}function Re(a,b){a.g.push(b["finally"](function(){fb(a.g,b)}))}Qe.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise["catch"](function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function Se(a,b,c){Ne.call(this);this.i=!1;this.m=new Qe;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.o=!1}qa(Se,Ne);r=Se.prototype;r.Wd=function(a){this.o=a};function Te(a,b,c,d){c=c||Ue;var e=Ve[a];if(!e||c>=e.priority)Ve[a]={priority:c,Mf:b,Nf:void 0===d?!1:d}}r.Of=function(a){this.g.add(a)};r.dg=function(a){this.g["delete"](a)};r.Ue=function(){this.g.clear()};r.Pf=function(a){this.h.add(a)};r.eg=function(a){this.h["delete"](a)};r.Ve=function(){this.h.clear()};
161
+ Ne.prototype.release=function(){this.fa=null};function Oe(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&&d.buffer.constructor==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 Set;return b(a)}function Pe(a){var b={},c;for(c in a)b[c]=a[c];return b};function Qe(){this.g=[]}function Re(a,b){a.g.push(b["finally"](function(){fb(a.g,b)}))}Qe.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise["catch"](function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function Se(a,b,c){Ne.call(this);this.i=!1;this.m=new Qe;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.o=!1}qa(Se,Ne);r=Se.prototype;r.Wd=function(a){this.o=a};function Te(a,b,c,d){c=c||Ue;var e=Ve[a];if(!e||c>=e.priority)Ve[a]={priority:c,Lf:b,Mf:void 0===d?!1:d}}r.Nf=function(a){this.g.add(a)};r.cg=function(a){this.g["delete"](a)};r.Te=function(){this.g.clear()};r.Of=function(a){this.h.add(a)};r.dg=function(a){this.h["delete"](a)};r.Ue=function(){this.h.clear()};
162
162
  function We(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,streamDataCallback:void 0===c?null:c}}r.destroy=function(){this.i=!0;this.g.clear();this.h.clear();Ne.prototype.release.call(this);return this.m.destroy()};
163
163
  r.request=function(a,b){var c=this,d=new Xe;if(this.i){var e=Promise.reject(new N(2,7,7001));e["catch"](function(){});return new Ye(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Oe(b.retryParameters):De();b.uris=Oe(b.uris);e=Ze(this,a,b);var f=e.$(function(){return $e(c,a,b,new Ce(b.retryParameters,!1),0,null,d)}),g=f.$(function(n){return af(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
164
- var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.$(function(n){var p=Date.now()-l,q=n.response;q.timeMs+=k;q.timeMs+=p;n.Bf||!c.l||q.fromCache||a!=bf||c.l(q.timeMs,q.data.byteLength);return q},function(n){n&&(n.severity=2);throw n;});e=new Ye(m.promise,function(){return m.abort()},d);Re(this.m,e);return e};
164
+ var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.$(function(n){var p=Date.now()-l,q=n.response;q.timeMs+=k;q.timeMs+=p;n.Af||!c.l||q.fromCache||"HEAD"==b.method||a!=bf||c.l(q.timeMs,q.data.byteLength);return q},function(n){n&&(n.severity=2);throw n;});e=new Ye(m.promise,function(){return m.abort()},d);Re(this.m,e);return e};
165
165
  function Ze(a,b,c){var d=Ie(void 0),e={};a=t(a.g);for(var f=a.next();!f.done;e={gd:e.gd},f=a.next())e.gd=f.value,d=d.$(function(g){return function(){c.body&&(c.body=Gb(c.body));return g.gd(b,c)}}(e));return d.$(void 0,function(g){if(g instanceof N&&7001==g.code)throw g;throw new N(2,1,1006,g);})}
166
- function $e(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new Xb(c.uris[e]),k=h.Fa,l=!1;k||(k=location.protocol,k=k.slice(0,-1),Yb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=Ve[k])?k.Mf:null;if(!m)return Ge(new N(2,1,1E3,h));var n=k.Nf,p=null,q=null,v=!1,w=!1,x;return Je(Ee(d)).$(function(){if(a.i)return He();x=Date.now();var y=m(c.uris[e],c,b,function(B,F,G){p&&p.stop();q&&q.S(z/1E3);a.l&&b==bf&&(a.l(B,F),l=!0,g.g=G)},function(B){a.j&&a.j(B,c,b);w=!0});
167
- if(!n)return y;var D=c.retryParameters.connectionTimeout;D&&(p=new O(function(){v=!0;y.abort()}),p.S(D/1E3));var z=c.retryParameters.stallTimeout;z&&(q=new O(function(){v=!0;y.abort()}));return y}).$(function(y){p&&p.stop();q&&q.stop();void 0==y.timeMs&&(y.timeMs=Date.now()-x);var D={response:y,Bf:l};!w&&a.j&&a.j(y.headers,c,b);return D},function(y){p&&p.stop();q&&q.stop();if(a.s){var D=null,z=0;y instanceof N&&(D=y,1001==y.code&&(z=y.data[1]));a.s(c,D,z,v)}if(a.i)return He();v&&(y=new N(1,1,1003,
168
- c.uris[e],b));if(y instanceof N){if(7001==y.code)throw y;if(1010==y.code)throw f;if(1==y.severity)return D=(new Map).set("error",y),D=new Q("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,$e(a,b,c,d,e,y,g)}throw y;})}
166
+ function $e(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new Xb(c.uris[e]),k=h.Fa,l=!1;k||(k=location.protocol,k=k.slice(0,-1),Yb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=Ve[k])?k.Lf:null;if(!m)return Ge(new N(2,1,1E3,h));var n=k.Mf,p=null,q=null,v=!1,w=!1,y;return Je(Ee(d)).$(function(){if(a.i)return He();y=Date.now();var x=m(c.uris[e],c,b,function(B,E,G){p&&p.stop();q&&q.S(z/1E3);a.l&&b==bf&&(a.l(B,E),l=!0,g.g=G)},function(B){a.j&&a.j(B,c,b);w=!0});
167
+ if(!n)return x;var D=c.retryParameters.connectionTimeout;D&&(p=new O(function(){v=!0;x.abort()}),p.S(D/1E3));var z=c.retryParameters.stallTimeout;z&&(q=new O(function(){v=!0;x.abort()}));return x}).$(function(x){p&&p.stop();q&&q.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-y);var D={response:x,Af:l};!w&&a.j&&a.j(x.headers,c,b);return D},function(x){p&&p.stop();q&&q.stop();if(a.s){var D=null,z=0;x instanceof N&&(D=x,1001==x.code&&(z=x.data[1]));a.s(c,D,z,v)}if(a.i)return He();v&&(x=new N(1,1,1003,
168
+ c.uris[e],b));if(x instanceof N){if(7001==x.code)throw x;if(1010==x.code)throw f;if(1==x.severity)return D=(new Map).set("error",x),D=new Q("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,$e(a,b,c,d,e,x,g)}throw x;})}
169
169
  function af(a,b,c){var d=Ie(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={hd:e.hd},f=a.next())e.hd=f.value,d=d.$(function(g){return function(){var h=c.response;h.data&&(h.data=Gb(h.data));return g.hd(b,h)}}(e));return d.$(function(){return c},function(g){var h=2;if(g instanceof N){if(7001==g.code)throw g;h=g.severity}throw new N(h,1,1007,g);})}M("shaka.net.NetworkingEngine",Se);Se.prototype.request=Se.prototype.request;Se.prototype.destroy=Se.prototype.destroy;Se.makeRequest=We;
170
- Se.defaultRetryParameters=function(){return De()};Se.prototype.clearAllResponseFilters=Se.prototype.Ve;Se.prototype.unregisterResponseFilter=Se.prototype.eg;Se.prototype.registerResponseFilter=Se.prototype.Pf;Se.prototype.clearAllRequestFilters=Se.prototype.Ue;Se.prototype.unregisterRequestFilter=Se.prototype.dg;Se.prototype.registerRequestFilter=Se.prototype.Of;Se.unregisterScheme=function(a){delete Ve[a]};Se.registerScheme=Te;Se.prototype.setForceHTTPS=Se.prototype.Wd;function Xe(){this.g=0}
171
- Se.NumBytesRemainingClass=Xe;function Ye(a,b,c){Fe.call(this,a,b);this.h=c}qa(Ye,Fe);Se.PendingRequest=Ye;var bf=1;Se.RequestType={MANIFEST:0,SEGMENT:bf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var Ue=3;Se.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Ue};var Ve={};function cf(a){this.g=!1;this.h=new rc;this.i=a}cf.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function df(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function ef(){this.g=new zd}r=ef.prototype;r.release=function(){this.Ta();this.g=null};r.A=function(a,b,c,d){this.g&&(a=new ff(a,b,c,d),this.g.push(b,a))};r.oa=function(a,b,c,d){function e(g){f.qc(a,b,e);c(g)}var f=this;this.A(a,b,e,d)};r.qc=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.qc(),this.g.remove(b,e))}};
172
- r.Ta=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ja(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.qc();this.g.g={}}};M("shaka.util.EventManager",ef);ef.prototype.removeAll=ef.prototype.Ta;ef.prototype.unlisten=ef.prototype.qc;ef.prototype.listenOnce=ef.prototype.oa;ef.prototype.listen=ef.prototype.A;ef.prototype.release=ef.prototype.release;function ff(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=gf(a,d);this.target.addEventListener(b,c,this.g)}
170
+ Se.defaultRetryParameters=function(){return De()};Se.prototype.clearAllResponseFilters=Se.prototype.Ue;Se.prototype.unregisterResponseFilter=Se.prototype.dg;Se.prototype.registerResponseFilter=Se.prototype.Of;Se.prototype.clearAllRequestFilters=Se.prototype.Te;Se.prototype.unregisterRequestFilter=Se.prototype.cg;Se.prototype.registerRequestFilter=Se.prototype.Nf;Se.unregisterScheme=function(a){delete Ve[a]};Se.registerScheme=Te;Se.prototype.setForceHTTPS=Se.prototype.Wd;function Xe(){this.g=0}
171
+ Se.NumBytesRemainingClass=Xe;function Ye(a,b,c){Fe.call(this,a,b);this.h=c}qa(Ye,Fe);Se.PendingRequest=Ye;var bf=1;Se.RequestType={MANIFEST:0,SEGMENT:bf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var Ue=3;Se.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Ue};var Ve={};function cf(a){this.g=!1;this.h=new rc;this.i=a}cf.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function df(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function ef(){this.g=new zd}r=ef.prototype;r.release=function(){this.Sa();this.g=null};r.A=function(a,b,c,d){this.g&&(a=new ff(a,b,c,d),this.g.push(b,a))};r.ka=function(a,b,c,d){function e(g){f.qc(a,b,e);c(g)}var f=this;this.A(a,b,e,d)};r.qc=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.qc(),this.g.remove(b,e))}};
172
+ r.Sa=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ja(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.qc();this.g.g={}}};M("shaka.util.EventManager",ef);ef.prototype.removeAll=ef.prototype.Sa;ef.prototype.unlisten=ef.prototype.qc;ef.prototype.listenOnce=ef.prototype.ka;ef.prototype.listen=ef.prototype.A;ef.prototype.release=ef.prototype.release;function ff(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=gf(a,d);this.target.addEventListener(b,c,this.g)}
173
173
  ff.prototype.qc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function gf(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return hf(a)?b:b.capture||!1}
174
174
  function hf(a){var b=jf;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}jf=b}return b||!1}var jf=void 0;function kf(){}function lf(a){a=Mc(a);return(new Xb(a)).Ha}function mf(a,b,c){function d(h){Ib(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Fb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=Oc(b,!0):e=b;a=Mc(a);a=Oc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}M("shaka.util.FairPlayUtils",kf);kf.initDataTransform=mf;kf.defaultGetContentId=lf;function nf(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function of(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0};function pf(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function qf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function rf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=t(a),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function sf(a,b){var c=tf(a,b);return 1!=c.length?null:c[0]}function uf(a,b,c){a=vf(a,b,c);return 1!=a.length?null:a[0]}function tf(a,b){for(var c=[],d=t(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,e instanceof Element&&e.tagName==b&&c.push(e);return c}function wf(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
175
175
  function vf(a,b,c){var d=[];a=t(a.childNodes);for(var e=a.next();!e.done;e=a.next())e=e.value,e instanceof Element&&e.localName==c&&e.namespaceURI==b&&d.push(e);return d}function xf(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function yf(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,a.hasAttributeNS(d,c))return a.getAttributeNS(d,c);return null}function zf(a){return Array.from(a.childNodes).every(Af)?a.textContent.trim():null}
176
176
  function Af(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function Bf(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}function Cf(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:Math.floor(a/1E3)}
177
177
  function Df(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
178
- function Ef(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function Ff(a){a=Number(a);return 0===a%1?a:null}function If(a){a=Number(a);return 0===a%1&&0<a?a:null}function Jf(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Kf(a){a=Number(a);return isNaN(a)?null:a}function Lf(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
178
+ function Ef(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function Ff(a){a=Number(a);return 0===a%1?a:null}function Gf(a){a=Number(a);return 0===a%1&&0<a?a:null}function Jf(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Kf(a){a=Number(a);return isNaN(a)?null:a}function Lf(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
179
179
  function Mf(a,b){var c=new DOMParser,d=Nf.value()(a),e=null;try{e=c.parseFromString(d,"text/xml")}catch(f){return null}c=e.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;for(e=document.createNodeIterator(e,NodeFilter.SHOW_ALL);d=e.nextNode();)if(d instanceof HTMLElement||d instanceof SVGElement)return null;return c}function Of(a,b){try{var c=Jc(a);return Mf(c,b)}catch(d){return null}}
180
180
  var Nf=new sc(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 Pf(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.F=new Set;this.l=this.s=null;this.fa=this.ca=!1;this.G=0;this.g=null;this.o=new ef;this.i=new Map;this.C=[];this.u=new rc;this.h=null;this.m=function(d){c.u.reject(d);a.onError(d)};this.ga=new Map;this.da=new Map;this.V=new O(function(){return Qf(c)});this.L=!1;this.I=[];this.N=!1;this.ea=(new O(function(){Rf(c)})).Da(b);this.u["catch"](function(){});this.j=new cf(function(){return Sf(c)});this.W=!1}r=Pf.prototype;r.destroy=function(){return this.j.destroy()};
181
- function Sf(a){return L(function(b){switch(b.g){case 1:return a.o.release(),a.o=null,a.u.reject(),a.ea.stop(),a.ea=null,a.V.stop(),a.V=null,u(b,Tf(a),2);case 2:if(!a.l){b.B(3);break}C(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:E(b);case 5:a.l=null;case 3:a.g=null,a.F.clear(),a.s=null,a.C=[],a.h=null,a.m=function(){},a.D=null,a.W=!1,A(b)}})}r.configure=function(a){this.h=a};function Uf(a,b,c){a.fa=!0;a.C=[];a.L=c;return Vf(a,b)}
181
+ function Sf(a){return L(function(b){switch(b.g){case 1:return a.o.release(),a.o=null,a.u.reject(),a.ea.stop(),a.ea=null,a.V.stop(),a.V=null,u(b,Tf(a),2);case 2:if(!a.l){b.B(3);break}C(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:F(b);case 5:a.l=null;case 3:a.g=null,a.F.clear(),a.s=null,a.C=[],a.h=null,a.m=function(){},a.D=null,a.W=!1,A(b)}})}r.configure=function(a){this.h=a};function Uf(a,b,c){a.fa=!0;a.C=[];a.L=c;return Vf(a,b)}
182
182
  function Wf(a,b,c){a.C=c;a.L=0<c.length;return Vf(a,b)}function Xf(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return Yf(a,g,[])}
183
- function Vf(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,w;return L(function(x){if(1==x.g){if(c=Zf(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(y){return y.video&&y.video.drmInfos.length||y.audio&&y.audio.drmInfos.length?!0:!1});g||(h=pf(a.h.servers),$f(b,h));k=t(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=ag(l),n=t(m),p=n.next();!p.done;p=n.next())q=p.value,bg(q,pf(a.h.servers),pf(a.h.advanced||{}));return u(x,
184
- Ud(b,a.L,a.W),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.ca=!0,x["return"](Promise.resolve());w=Yf(a,void 0,b);return x["return"](g?w:w["catch"](function(){}))})}
185
- r.Wb=function(a){var b=this,c,d;return L(function(e){if(1==e.g){if(!b.s)return b.o.oa(a,"encrypted",function(){b.m(new N(2,6,6010))}),e["return"]();b.l=a;b.o.oa(b.l,"play",function(){for(var f=t(b.I),g=f.next();!g.done;g=f.next())cg(b,g.value);b.N=!0;b.I=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.o.A(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Tf(b)});c=b.l.setMediaKeys(b.s);c=c["catch"](function(f){return Promise.reject(new N(2,6,6003,f.message))});return u(e,
183
+ function Vf(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,w;return L(function(y){if(1==y.g){if(c=Zf(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(x){return x.video&&x.video.drmInfos.length||x.audio&&x.audio.drmInfos.length?!0:!1});g||(h=pf(a.h.servers),$f(b,h));k=t(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=ag(l),n=t(m),p=n.next();!p.done;p=n.next())q=p.value,bg(q,pf(a.h.servers),pf(a.h.advanced||{}));return u(y,
184
+ Ud(b,a.L,a.W),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.ca=!0,y["return"](Promise.resolve());w=Yf(a,void 0,b);return y["return"](g?w:w["catch"](function(){}))})}
185
+ r.Wb=function(a){var b=this,c,d;return L(function(e){if(1==e.g){if(!b.s)return b.o.ka(a,"encrypted",function(){b.m(new N(2,6,6010))}),e["return"]();b.l=a;b.o.ka(b.l,"play",function(){for(var f=t(b.I),g=f.next();!g.done;g=f.next())cg(b,g.value);b.N=!0;b.I=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.o.A(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Tf(b)});c=b.l.setMediaKeys(b.s);c=c["catch"](function(f){return Promise.reject(new N(2,6,6003,f.message))});return u(e,
186
186
  c,2)}df(b.j);dg(b);b.g.initData.length||b.C.length||(d=function(f){return eg(b,f.initDataType,Fb(f.initData))},b.o.A(b.l,"encrypted",d));A(e)})};
187
- function fg(a){var b,c,d,e,f;return L(function(g){switch(g.g){case 1:if(!a.s||!a.g)return g["return"]();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.B(2);break}b=We([a.g.serverCertificateUri],a.h.retryParameters);C(g,3);c=a.D.nb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Fb(d.data);va(g,4);break;case 3:throw e=E(g),new N(2,6,6017,e);case 4:if(a.j.g)return g["return"]();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g["return"]();
188
- C(g,6);return u(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=E(g),new N(2,6,6004,f.message);}})}function gg(a,b){var c,d,e;return L(function(f){if(1==f.g)return u(f,hg(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.Ka=new rc,d.push(e.Ka);d.push(c.remove());return u(f,Promise.all(d),3)}a.i["delete"](c);A(f)})}
187
+ function fg(a){var b,c,d,e,f;return L(function(g){switch(g.g){case 1:if(!a.s||!a.g)return g["return"]();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.B(2);break}b=We([a.g.serverCertificateUri],a.h.retryParameters);C(g,3);c=a.D.nb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Fb(d.data);va(g,4);break;case 3:throw e=F(g),new N(2,6,6017,e);case 4:if(a.j.g)return g["return"]();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g["return"]();
188
+ C(g,6);return u(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=F(g),new N(2,6,6004,f.message);}})}function gg(a,b){var c,d,e;return L(function(f){if(1==f.g)return u(f,hg(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.Ka=new rc,d.push(e.Ka);d.push(c.remove());return u(f,Promise.all(d),3)}a.i["delete"](c);A(f)})}
189
189
  function dg(a){for(var b=(a.g?a.g.initData:[])||[],c=t(b),d=c.next();!d.done;d=c.next())d=d.value,eg(a,d.initDataType,d.initData);c=t(a.C);for(d=c.next();!d.done;d=c.next())hg(a,d.value);b.length||a.C.length||a.u.resolve();return a.u}function eg(a,b,c){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Db(c,e.value.initData)&&!yc("Tizen 2"))return;ig(a,b,c,a.g.sessionType)}function jg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}
190
190
  function kg(a){a=a.i.keys();a=nf(a,function(b){return b.sessionId});return Array.from(a)}r.cc=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};r.Gc=function(){return qf(this.da)};
191
- function Yf(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,w;return L(function(x){switch(x.g){case 1:d=new Map;if(c.length){e=lg(a,c,d);x.B(2);break}return u(x,mg(a,b),3);case 3:e=x.h;case 2:f=e;if(!f)throw new N(2,6,6001);df(a.j);C(x,4);a.F.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.F.add(n.contentType.toLowerCase());p=t(k);for(m=p.next();!m.done;m=p.next())q=m.value,a.F.add(q.contentType.toLowerCase());if(c.length){var y=
192
- f.keySystem;var D=d.get(f.keySystem);var z=[],B=[],F=[],G=[],H=new Set;ng(D,z,F,B,G,H);var I=a.L?"persistent-license":"temporary";y={keySystem:y,licenseServerUri:z[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||I,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:F[0],serverCertificateUri:B[0],initData:G,keyIds:H};D=t(D);for(z=D.next();!z.done;z=
193
- D.next())z=z.value,z.distinctiveIdentifierRequired&&(y.distinctiveIdentifierRequired=z.distinctiveIdentifierRequired),z.persistentStateRequired&&(y.persistentStateRequired=z.persistentStateRequired);D=y}else D=f.keySystem,y=b.get(f.keySystem),z=[],B=[],F=[],G=[],H=new Set,ng(y.drmInfos,z,F,B,G,H),D={keySystem:D,licenseServerUri:z[0],distinctiveIdentifierRequired:"required"==y.distinctiveIdentifier,persistentStateRequired:"required"==y.persistentState,sessionType:y.sessionTypes[0]||"temporary",audioRobustness:(y.audioCapabilities?
194
- y.audioCapabilities[0].robustness:"")||"",videoRobustness:(y.videoCapabilities?y.videoCapabilities[0].robustness:"")||"",serverCertificate:F[0],serverCertificateUri:B[0],initData:G,keyIds:H};a.g=D;if(!a.g.licenseServerUri)throw new N(2,6,6012,a.g.keySystem);return u(x,f.createMediaKeys(),6);case 6:return v=x.h,df(a.j),a.s=v,a.ca=!0,u(x,fg(a),7);case 7:df(a.j);va(x,0);break;case 4:w=E(x);df(a.j,w);a.g=null;a.F.clear();if(w instanceof N)throw w;throw new N(2,6,6002,w.message);}})}
191
+ function Yf(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,w;return L(function(y){switch(y.g){case 1:d=new Map;if(c.length){e=lg(a,c,d);y.B(2);break}return u(y,mg(a,b),3);case 3:e=y.h;case 2:f=e;if(!f)throw new N(2,6,6001);df(a.j);C(y,4);a.F.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.F.add(n.contentType.toLowerCase());p=t(k);for(m=p.next();!m.done;m=p.next())q=m.value,a.F.add(q.contentType.toLowerCase());if(c.length){var x=
192
+ f.keySystem;var D=d.get(f.keySystem);var z=[],B=[],E=[],G=[],H=new Set;ng(D,z,E,B,G,H);var I=a.L?"persistent-license":"temporary";x={keySystem:x,licenseServerUri:z[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||I,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:E[0],serverCertificateUri:B[0],initData:G,keyIds:H};D=t(D);for(z=D.next();!z.done;z=
193
+ D.next())z=z.value,z.distinctiveIdentifierRequired&&(x.distinctiveIdentifierRequired=z.distinctiveIdentifierRequired),z.persistentStateRequired&&(x.persistentStateRequired=z.persistentStateRequired);D=x}else D=f.keySystem,x=b.get(f.keySystem),z=[],B=[],E=[],G=[],H=new Set,ng(x.drmInfos,z,E,B,G,H),D={keySystem:D,licenseServerUri:z[0],distinctiveIdentifierRequired:"required"==x.distinctiveIdentifier,persistentStateRequired:"required"==x.persistentState,sessionType:x.sessionTypes[0]||"temporary",audioRobustness:(x.audioCapabilities?
194
+ x.audioCapabilities[0].robustness:"")||"",videoRobustness:(x.videoCapabilities?x.videoCapabilities[0].robustness:"")||"",serverCertificate:E[0],serverCertificateUri:B[0],initData:G,keyIds:H};a.g=D;if(!a.g.licenseServerUri)throw new N(2,6,6012,a.g.keySystem);return u(y,f.createMediaKeys(),6);case 6:return v=y.h,df(a.j),a.s=v,a.ca=!0,u(y,fg(a),7);case 7:df(a.j);va(y,0);break;case 4:w=F(y);df(a.j,w);a.g=null;a.F.clear();if(w instanceof N)throw w;throw new N(2,6,6002,w.message);}})}
195
195
  function lg(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(ag(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new N(2,6,6E3);d={};a=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={ed:d.ed},e=a.next())for(d.ed=e.value,f=t(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
196
196
  l.ed}}(d)))return e.keySystemAccess;a=t([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=t(b),e=f.next();!e.done;e=f.next()){var g=t(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=t(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
197
- function mg(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,w,x;return L(function(y){switch(y.g){case 1:if(1==b.size&&b.has(""))throw new N(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){y.B(4);break}k=h.value;if(!b.has(k)){y.B(3);break}l=b.get(k);C(y,6);return u(y,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
198
- y.h,y["return"](c);case 6:E(y);case 7:df(a.j);case 3:h=g.next();y.B(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){y.B(11);break}p=n.value;q=t(b.keys());h=q.next();case 12:if(h.done){n=m.next();y.B(9);break}v=h.value;w=b.get(v);x=w.drmInfos.some(function(D){return!!D.licenseServerUri});if(x!=p){y.B(13);break}C(y,15);return u(y,navigator.requestMediaKeySystemAccess(v,[w]),17);case 17:return c=y.h,y["return"](c);case 15:E(y);case 16:df(a.j);case 13:h=q.next();y.B(12);break;case 11:return y["return"](c)}})}
197
+ function mg(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,w,y;return L(function(x){switch(x.g){case 1:if(1==b.size&&b.has(""))throw new N(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){x.B(4);break}k=h.value;if(!b.has(k)){x.B(3);break}l=b.get(k);C(x,6);return u(x,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
198
+ x.h,x["return"](c);case 6:F(x);case 7:df(a.j);case 3:h=g.next();x.B(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){x.B(11);break}p=n.value;q=t(b.keys());h=q.next();case 12:if(h.done){n=m.next();x.B(9);break}v=h.value;w=b.get(v);y=w.drmInfos.some(function(D){return!!D.licenseServerUri});if(y!=p){x.B(13);break}C(x,15);return u(x,navigator.requestMediaKeySystemAccess(v,[w]),17);case 17:return c=x.h,x["return"](c);case 15:F(x);case 16:df(a.j);case 13:h=q.next();x.B(12);break;case 11:return x["return"](c)}})}
199
199
  function Zf(a){a=pf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=Tc(f),h=Tc(e);g={kty:"oct",kid:Rc(g,!1),k:Rc(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Fb(Nc(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
200
200
  serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
201
201
  function hg(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:try{c=a.s.createSession("persistent-license")}catch(k){return d=new N(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.o.A(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.I.push(k):cg(a,k)});a.o.A(c,"keystatuseschange",function(k){return og(a,k)});e={initData:null,loaded:!1,Ld:Infinity,Ka:null,type:"persistent-license"};a.i.set(c,e);C(h,2);return u(h,c.load(b),4);case 4:f=h.h;df(a.j);
202
- if(!f)return a.i["delete"](c),a.m(new N(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;pg(a)&&a.u.resolve();return h["return"](c);case 2:g=E(h),df(a.j,g),a.i["delete"](c),a.m(new N(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
202
+ if(!f)return a.i["delete"](c),a.m(new N(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;pg(a)&&a.u.resolve();return h["return"](c);case 2:g=F(h),df(a.j,g),a.i["delete"](c),a.m(new N(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
203
203
  function ig(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.m(new N(2,6,6005,f.message));return}a.o.A(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.I.push(f):cg(a,f)});a.o.A(e,"keystatuseschange",function(f){return og(a,f)});a.i.set(e,{initData:c,loaded:!1,Ld:Infinity,Ka:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof N||(b=new N(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&Rc(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
204
204
  var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.m(new N(2,6,6006,f.message,f,h))}})}function qg(a,b,c){"skd"==b&&(b=c.serverCertificate,c=lf(a),a=mf(a,c,b));return a}
205
- function cg(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,w;L(function(x){switch(x.g){case 1:return c=b.target,a.h.logLicenseExchange&&Rc(b.message),d=a.i.get(c),e=a.g.licenseServerUri,f=a.h.advanced[a.g.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=We([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,jg(a.g.keySystem)&&rg(g),h=Date.now(),C(x,2),l=a.D.nb.request(2,g),u(x,
206
- l.promise,4);case 4:k=x.h;va(x,3);break;case 2:return m=E(x),n=new N(2,6,6007,m),a.m(n),d&&d.Ka&&d.Ka.reject(n),x["return"]();case 3:if(a.j.g)return x["return"]();a.G+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Rc(k.data);C(x,5);return u(x,c.update(k.data),7);case 7:va(x,6);break;case 5:return p=E(x),q=new N(2,6,6008,p.message),a.m(q),d&&d.Ka&&d.Ka.reject(q),x["return"]();case 6:if(a.j.g)return x["return"]();v=new Q("drmsessionupdate");a.D.onEvent(v);d&&(d.Ka&&d.Ka.resolve(),w=new O(function(){d.loaded=
207
- !0;pg(a)&&a.u.resolve()}),w.S(sg));A(x)}})}function rg(a){var b=Kc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=Mf(b,"PlayReadyKeyMessage");for(var c=t(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=Sc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
205
+ function cg(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,w;L(function(y){switch(y.g){case 1:return c=b.target,a.h.logLicenseExchange&&Rc(b.message),d=a.i.get(c),e=a.g.licenseServerUri,f=a.h.advanced[a.g.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=We([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,jg(a.g.keySystem)&&rg(g),h=Date.now(),C(y,2),l=a.D.nb.request(2,g),u(y,
206
+ l.promise,4);case 4:k=y.h;va(y,3);break;case 2:return m=F(y),n=new N(2,6,6007,m),a.m(n),d&&d.Ka&&d.Ka.reject(n),y["return"]();case 3:if(a.j.g)return y["return"]();a.G+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Rc(k.data);C(y,5);return u(y,c.update(k.data),7);case 7:va(y,6);break;case 5:return p=F(y),q=new N(2,6,6008,p.message),a.m(q),d&&d.Ka&&d.Ka.reject(q),y["return"]();case 6:if(a.j.g)return y["return"]();v=new Q("drmsessionupdate");a.D.onEvent(v);d&&(d.Ka&&d.Ka.resolve(),w=new O(function(){d.loaded=
207
+ !0;pg(a)&&a.u.resolve()}),w.S(sg));A(y)}})}function rg(a){var b=Kc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=Mf(b,"PlayReadyKeyMessage");for(var c=t(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=Sc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
208
208
  function og(a,b){var c=b.target,d=a.i.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(jg(a.g.keySystem)&&16==h.byteLength&&(navigator.userAgent.match(/Edge?\//)||Dc())){k=Ib(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=Uc(h).slice(0,32);a.ga.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.Ka&&(a.i["delete"](c),
209
209
  c.close()["catch"](function(){}));pg(a)&&(a.u.resolve(),a.V.S(tg))}function Qf(a){var b=a.ga,c=a.da;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new N(2,6,6014));a.D.Pc(qf(c))}
210
210
  function ug(){var a,b,c,d,e,f,g,h;return L(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,
211
- c],f=new Map,g=function(l){var m,n,p;return L(function(q){switch(q.g){case 1:return C(q,2),u(q,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=q.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,yc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),u(q,m.createMediaKeys(),5);case 5:va(q,0);break;case 2:E(q),f.set(l,null),A(q)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](qf(f))})}
212
- function vg(a){var b;return L(function(c){if(1==c.g)return b=new Promise(function(d,e){(new O(e)).S(wg)}),C(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);E(c);A(c)})}
213
- function Tf(a){var b;return L(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return L(function(g){if(1==g.g)return C(g,2),a.fa||a.C.includes(e.sessionId)||"persistent-license"!==f.type?u(g,vg(e),5):u(g,e.remove(),5);if(2!=g.g)return va(g,0);E(g);A(g)})})),0)})}
211
+ c],f=new Map,g=function(l){var m,n,p;return L(function(q){switch(q.g){case 1:return C(q,2),u(q,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=q.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,yc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),u(q,m.createMediaKeys(),5);case 5:va(q,0);break;case 2:F(q),f.set(l,null),A(q)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](qf(f))})}
212
+ function vg(a){var b;return L(function(c){if(1==c.g)return b=new Promise(function(d,e){(new O(e)).S(wg)}),C(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);F(c);A(c)})}
213
+ function Tf(a){var b;return L(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return L(function(g){if(1==g.g)return C(g,2),a.fa||a.C.includes(e.sessionId)||"persistent-license"!==f.type?u(g,vg(e),5):u(g,e.remove(),5);if(2!=g.g)return va(g,0);F(g);A(g)})})),0)})}
214
214
  function xg(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=t(b),h=g.next();!h.done;f={Ea:f.Ea},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Ea=[];f.Ea=f.Ea.concat(e.initData||[]);f.Ea=f.Ea.concat(h.initData||[]);f.Ea=f.Ea.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Ea.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ja(e.keyIds),ja(h.keyIds))):
215
215
  e.keyIds||h.keyIds;c.push({keySystem:e.keySystem,licenseServerUri:e.licenseServerUri||h.licenseServerUri,distinctiveIdentifierRequired:e.distinctiveIdentifierRequired||h.distinctiveIdentifierRequired,persistentStateRequired:e.persistentStateRequired||h.persistentStateRequired,videoRobustness:e.videoRobustness||h.videoRobustness,audioRobustness:e.audioRobustness||h.audioRobustness,serverCertificate:e.serverCertificate||h.serverCertificate,serverCertificateUri:e.serverCertificateUri||h.serverCertificateUri,
216
216
  initData:f.Ea,keyIds:g});break}}return c}function ag(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Rf(a){a.i.forEach(function(b,c){var d=b.Ld,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Ld=e)})}function pg(a){a=a.i.values();return of(a,function(b){return b.loaded})}
@@ -220,25 +220,25 @@ m.tc;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Db(n.in
220
220
  function bg(a,b,c){if(a.keySystem&&("org.w3.clearkey"!=a.keySystem||!a.licenseServerUri)){b.size&&(b=b.get(a.keySystem)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(a.keySystem))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||
221
221
  (a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var wg=1,sg=5,tg=.5,yg=new sc(function(){return Gb(new Uint8Array([0]))});function zg(){}function Ag(a,b,c,d){var e,f,g,h;return L(function(k){if(1==k.g){if(d&&(e=Bg[d.toLowerCase()]))return k["return"](e);if(f=Cg(a))if(g=Dg[f])return k["return"](g);return d?k.B(2):u(k,Eg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=Bg[d]))return k["return"](h);throw new N(2,4,4E3,a);})}
222
222
  function Eg(a,b,c){var d,e,f;return L(function(g){if(1==g.g)return d=We([a],c),d.method="HEAD",u(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function Cg(a){a=(new Xb(a)).wa.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}M("shaka.media.ManifestParser",zg);zg.unregisterParserByMime=function(a){delete Bg[a]};zg.registerParserByMime=function(a,b){Bg[a]=b};
223
- zg.registerParserByExtension=function(a,b){Dg[a]=b};var Bg={},Dg={};function Fg(a,b){this.O=Ib(a);this.h=b==Gg;this.g=0}r=Fg.prototype;r.ma=function(){return this.g<this.O.byteLength};r.X=function(){return this.g};r.gf=function(){return this.O.byteLength};r.Y=function(){try{var a=this.O.getUint8(this.g);this.g+=1;return a}catch(b){throw Hg();}};r.Kb=function(){try{var a=this.O.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw Hg();}};r.M=function(){try{var a=this.O.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw Hg();}};
224
- r.we=function(){try{var a=this.O.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw Hg();}};r.Lb=function(){try{if(this.h){var a=this.O.getUint32(this.g,!0);var b=this.O.getUint32(this.g+4,!0)}else b=this.O.getUint32(this.g,!1),a=this.O.getUint32(this.g+4,!1)}catch(c){throw Hg();}if(2097151<b)throw new N(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.Za=function(a){if(this.g+a>this.O.byteLength)throw Hg();var b=Fb(this.O,this.g,a);this.g+=a;return b};
225
- r.skip=function(a){if(this.g+a>this.O.byteLength)throw Hg();this.g+=a};r.ye=function(a){if(this.g<a)throw Hg();this.g-=a};r.seek=function(a){if(0>a||a>this.O.byteLength)throw Hg();this.g=a};r.kc=function(){for(var a=this.g;this.ma()&&0!=this.O.getUint8(this.g);)this.g+=1;a=Fb(this.O,a,this.g-a);this.g+=1;return Jc(a)};function Hg(){return new N(2,3,3E3)}M("shaka.util.DataViewReader",Fg);Fg.prototype.readTerminatedString=Fg.prototype.kc;Fg.prototype.seek=Fg.prototype.seek;Fg.prototype.rewind=Fg.prototype.ye;
226
- Fg.prototype.skip=Fg.prototype.skip;Fg.prototype.readBytes=Fg.prototype.Za;Fg.prototype.readUint64=Fg.prototype.Lb;Fg.prototype.readInt32=Fg.prototype.we;Fg.prototype.readUint32=Fg.prototype.M;Fg.prototype.readUint16=Fg.prototype.Kb;Fg.prototype.readUint8=Fg.prototype.Y;Fg.prototype.getLength=Fg.prototype.gf;Fg.prototype.getPosition=Fg.prototype.X;Fg.prototype.hasMoreData=Fg.prototype.ma;var Gg=1;Fg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Gg};function Ig(){this.i=[];this.h=[];this.g=!1}r=Ig.prototype;r.box=function(a,b){var c=Jg(a);this.i[c]=Kg;this.h[c]=b;return this};r.P=function(a,b){var c=Jg(a);this.i[c]=Lg;this.h[c]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new Fg(a,0);for(this.g=!1;a.ma()&&!this.g;)this.Rc(0,a,b,c)};
223
+ zg.registerParserByExtension=function(a,b){Dg[a]=b};var Bg={},Dg={};function Fg(a,b){this.O=Ib(a);this.h=b==Gg;this.g=0}r=Fg.prototype;r.na=function(){return this.g<this.O.byteLength};r.X=function(){return this.g};r.ff=function(){return this.O.byteLength};r.Y=function(){try{var a=this.O.getUint8(this.g);this.g+=1;return a}catch(b){throw Hg();}};r.Kb=function(){try{var a=this.O.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw Hg();}};r.M=function(){try{var a=this.O.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw Hg();}};
224
+ r.ve=function(){try{var a=this.O.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw Hg();}};r.Lb=function(){try{if(this.h){var a=this.O.getUint32(this.g,!0);var b=this.O.getUint32(this.g+4,!0)}else b=this.O.getUint32(this.g,!1),a=this.O.getUint32(this.g+4,!1)}catch(c){throw Hg();}if(2097151<b)throw new N(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.Za=function(a){if(this.g+a>this.O.byteLength)throw Hg();var b=Fb(this.O,this.g,a);this.g+=a;return b};
225
+ r.skip=function(a){if(this.g+a>this.O.byteLength)throw Hg();this.g+=a};r.xe=function(a){if(this.g<a)throw Hg();this.g-=a};r.seek=function(a){if(0>a||a>this.O.byteLength)throw Hg();this.g=a};r.kc=function(){for(var a=this.g;this.na()&&0!=this.O.getUint8(this.g);)this.g+=1;a=Fb(this.O,a,this.g-a);this.g+=1;return Jc(a)};function Hg(){return new N(2,3,3E3)}M("shaka.util.DataViewReader",Fg);Fg.prototype.readTerminatedString=Fg.prototype.kc;Fg.prototype.seek=Fg.prototype.seek;Fg.prototype.rewind=Fg.prototype.xe;
226
+ Fg.prototype.skip=Fg.prototype.skip;Fg.prototype.readBytes=Fg.prototype.Za;Fg.prototype.readUint64=Fg.prototype.Lb;Fg.prototype.readInt32=Fg.prototype.ve;Fg.prototype.readUint32=Fg.prototype.M;Fg.prototype.readUint16=Fg.prototype.Kb;Fg.prototype.readUint8=Fg.prototype.Y;Fg.prototype.getLength=Fg.prototype.ff;Fg.prototype.getPosition=Fg.prototype.X;Fg.prototype.hasMoreData=Fg.prototype.na;var Gg=1;Fg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Gg};function Ig(){this.i=[];this.h=[];this.g=!1}r=Ig.prototype;r.box=function(a,b){var c=Jg(a);this.i[c]=Kg;this.h[c]=b;return this};r.P=function(a,b){var c=Jg(a);this.i[c]=Lg;this.h[c]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new Fg(a,0);for(this.g=!1;a.na()&&!this.g;)this.Rc(0,a,b,c)};
227
227
  r.Rc=function(a,b,c,d){var e=b.X();if(d&&e+8>b.O.byteLength)this.g=!0;else{var f=b.M(),g=b.M(),h=!1;switch(f){case 0:f=b.O.byteLength-e;break;case 1:if(d&&b.X()+8>b.O.byteLength){this.g=!0;return}f=b.Lb();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==Lg){if(d&&b.X()+4>b.O.byteLength){this.g=!0;return}m=b.M();l=m>>>24;m&=16777215}g=e+f;c&&g>b.O.byteLength&&(g=b.O.byteLength);d&&g>b.O.byteLength?this.g=!0:(d=g-b.X(),b=0<d?b.Za(d):new Uint8Array(0),b=new Fg(b,0),k({parser:this,partialOkay:c||
228
- !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.X(),b.O.byteLength-b.X()))}};function Mg(a){for(var b=Ng(a);a.reader.ma()&&!a.parser.g;)a.parser.Rc(a.start+b,a.reader,a.partialOkay)}function Og(a){for(var b=Ng(a),c=a.reader.M(),d=0;d<c&&(a.parser.Rc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Pg(a){return function(b){a(b.reader.Za(b.reader.O.byteLength-b.reader.X()))}}
228
+ !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.X(),b.O.byteLength-b.X()))}};function Mg(a){for(var b=Ng(a);a.reader.na()&&!a.parser.g;)a.parser.Rc(a.start+b,a.reader,a.partialOkay)}function Og(a){for(var b=Ng(a),c=a.reader.M(),d=0;d<c&&(a.parser.Rc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Pg(a){return function(b){a(b.reader.Za(b.reader.O.byteLength-b.reader.X()))}}
229
229
  function Jg(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Qg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Ng(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}M("shaka.util.Mp4Parser",Ig);Ig.headerSize=Ng;Ig.typeToString=Qg;Ig.allData=Pg;Ig.sampleDescription=Og;Ig.children=Mg;Ig.prototype.parseNext=Ig.prototype.Rc;Ig.prototype.parse=Ig.prototype.parse;Ig.prototype.stop=Ig.prototype.stop;
230
230
  Ig.prototype.fullBox=Ig.prototype.P;Ig.prototype.box=Ig.prototype.box;var Kg=0,Lg=1;function Rg(a){function b(){d=!0}function c(l){f.push(l);Mg(l)}a=Fb(a);var d=!1,e,f=[],g=[];(new Ig).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).P("stsd",function(l){e=l;f.push(l);Og(l)}).P("encv",b).P("enca",b).P("hev1",function(l){g.push({box:l,ob:1701733238})}).P("hvc1",function(l){g.push({box:l,ob:1701733238})}).P("avc1",function(l){g.push({box:l,ob:1701733238})}).P("avc3",function(l){g.push({box:l,ob:1701733238})}).P("ac-3",function(l){g.push({box:l,ob:1701733217})}).P("ec-3",
231
231
  function(l){g.push({box:l,ob:1701733217})}).P("mp4a",function(l){g.push({box:l,ob:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw ab(Uc(a)),new N(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,a=Sg(a,e,k.box,f,k.ob);return a}
232
232
  function Sg(a,b,c,d,e){var f=Tg.value(),g=a.subarray(c.start,c.start+c.size),h=Ib(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Ib(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Ug(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=xc()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,Ug(e,d.start,d.size+k.byteLength);k=Ib(e,b.start);b=Ng(b);a=k.getUint32(b);
233
233
  k.setUint32(b,a+1);return e}function Ug(a,b,c){a=Ib(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var Tg=new sc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Vg(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Wg(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],q=-1,v=-1,w=0;w<p.length;w++)if(null!=p[w]&&""!==p[w].g.trim()){q=w;break}for(w=p.length-1;0<=w;w--)if(null!=p[w]&&""!==p[w].g.trim()){v=w;break}if(-1===
234
- q||-1===v)p=Xg(d,e),a.nestedCues.push(p);else{for(;q<=v;q++)if(w=p[q]){var x=w.l,y=w.i,D=w.j,z=w.h;if(x!=h||y!=k||D!=l||z!=m)n.payload&&a.nestedCues.push(n),n=Wg(d,e,x,y,D,z),h=x,k=y,l=D,m=z;n.payload+=w.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Xg(d,e),a.nestedCues.push(n));n=Wg(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
234
+ q||-1===v)p=Xg(d,e),a.nestedCues.push(p);else{for(;q<=v;q++)if(w=p[q]){var y=w.l,x=w.i,D=w.j,z=w.h;if(y!=h||x!=k||D!=l||z!=m)n.payload&&a.nestedCues.push(n),n=Wg(d,e,y,x,D,z),h=y,k=x,l=D,m=z;n.payload+=w.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Xg(d,e),a.nestedCues.push(n));n=Wg(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
235
235
  function Wg(a,b,c,d,e,f){a=new ib(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Xg(a,b){var c=new ib(a,b,"");c.lineBreak=!0;return c}function Yg(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Zg(a,b){this.i=[];this.g=1;this.h=0;this.u=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";$g(this)}function ah(a,b,c){return Vg(new ib(b,c,""),"CC"+(a.u<<1|a.s+1),a.i,b,c)}function $g(a){bh(a,0,15);a.g=1}function ch(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case dh:d=eh.has(c)?eh.get(c):String.fromCharCode(c);break;case fh:d=gh.get(c);break;case hh:a.i[a.g].pop();d=ih.get(c);break;case jh:a.i[a.g].pop(),d=kh.get(c)}d&&a.i[a.g].push(new Yg(d,a.m,a.j,a.o,a.l))}}
236
236
  function lh(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function bh(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
237
237
  var dh=0,fh=1,hh=2,jh=3,eh=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),gh=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57,"\u2800"],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),ih=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
238
238
  [35,"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),kh=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
239
239
  [39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]);function mh(a,b){this.h=nh;this.o=new Zg(a,b);this.i=new Zg(a,b);this.l=new Zg(a,b);this.g=this.i;this.j=0;this.m=null}function oh(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==ph&&a.h!==qh&&(e=ah(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,bh(c,0,15),c=a.l,c.g=0<c.h?c.h:0,bh(c,0,15),d.g=15);a.h=ph;d.h=b;return e}function rh(a){a.h=sh;a.g=a.l;a.g.h=0}function th(a){Va("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=qh}
240
240
  var nh=0,sh=1,ph=3,qh=4,uh="black green blue cyan red yellow magenta black".split(" "),vh="white green blue cyan red yellow magenta white_italics".split(" ");function wh(){this.l=!1;this.C=this.F=0;this.D=xh;this.i=[];this.g=this.h=this.j=0;this.u=this.o=!1;this.s="white";this.m="black";yh(this)}function yh(a){a.i=[];for(var b=0;16>b;b++)a.i.push(zh())}function zh(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Ah(a,b){Bh(a)&&(a.i[a.h][a.g]=new Yg(b,a.u,a.o,a.m,a.s),a.g++)}function Bh(a){var b=a.g<a.C&&0<=a.g;return a.h<a.F&&0<=a.h&&b}wh.prototype.isVisible=function(){return this.l};
241
- function Ch(a,b,c){var d=new ib(a.j,b,"");d.textAlign=a.D===Dh?"left":a.D===Eh?"right":mb;if(c=Vg(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Dh=0,Eh=1,xh=2;function Fh(){this.i=[];this.h=null;this.g=0}function Gh(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new Hh(a.h)),a.h=null,a.g=0))}function Hh(a){this.g=0;this.h=a}Hh.prototype.ma=function(){return this.g<this.h.length};Hh.prototype.X=function(){return this.g};function Ih(a){if(!a.ma())throw new N(2,2,3E3);return a.h[a.g++]}Hh.prototype.skip=function(a){if(this.g+a>this.h.length)throw new N(2,2,3E3);this.g+=a};function Jh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
241
+ function Ch(a,b,c){var d=new ib(a.j,b,"");d.textAlign=a.D===Dh?"left":a.D===Eh?"right":mb;if(c=Vg(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Dh=0,Eh=1,xh=2;function Fh(){this.i=[];this.h=null;this.g=0}function Gh(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new Hh(a.h)),a.h=null,a.g=0))}function Hh(a){this.g=0;this.h=a}Hh.prototype.na=function(){return this.g<this.h.length};Hh.prototype.X=function(){return this.g};function Ih(a){if(!a.na())throw new N(2,2,3E3);return a.h[a.g++]}Hh.prototype.skip=function(a){if(this.g+a>this.h.length)throw new N(2,2,3E3);this.g+=a};function Jh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
242
242
  function Kh(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=Ih(b).value;b=null;c=t(Lh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Ch(e,d,a.i)),yh(e);return b}if(137===c)for(b=Ih(b).value,b=t(Lh(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=Ih(b).value;b=null;c=t(Lh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Ch(e,d,a.i)),e.l=!1;return b}if(139===c){c=Ih(b).value;
243
243
  b=null;c=t(Lh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Ch(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Ih(b).value,Mh(a,b,d);if(143===c)return d=Mh(a,255,d),Nh(a),d;if(144===c)b.skip(1),d=Ih(b).value,a.g&&(a.g.o=0<(d&128),a.g.u=0<(d&64));else if(145===c)d=Ih(b).value,c=Ih(b).value,b.skip(1),a.g&&(b=Oh((c&48)>>4,(c&12)>>2,c&3),a.g.s=Oh((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=Ih(b).value,b=Ih(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
244
244
  b.skip(1),d=Ih(b).value,b.skip(1),a.g&&(a.g.D=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new wh;f.j=d;a.h[c]=f}d=Ih(b).value;Ih(b);Ih(b);f=Ih(b).value;var g=Ih(b).value;b=Ih(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.u=!1,b.o=!1,b.s="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.F=(f&15)+1;b.C=(g&63)+1;a.g=a.h[c]}}}return null}function Lh(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
@@ -249,49 +249,49 @@ function Uh(a,b){var c=b.type;if(16===(b.Aa&112)){var d=b.Aa>>3&1;0===c?a.m=d:a.
249
249
  d=1===(d&1);if(c.h!==qh){f=c.g;if(c.h===ph&&e!==f.g){var k=1+e-f.h;lh(f,k,1+f.g-f.h,f.h);bh(f,0,k-1);bh(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.o="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",ch(c.g,dh,32),g=!1,e=vh[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.m=1===(d&1),c.g.j=g,c.g.l=e;else if(16===(e&247)&&32===(d&240)||23===(e&247)&&45===(d&255))g="black",0===(e&7)&&(g=uh[(d&14)>>1]),c.g.o=g;else if(17===(e&247)&&48===(d&240))ch(c.g,fh,d);else if(18===
250
250
  (e&246)&&32===(d&224))ch(c.g,e&1?jh:hh,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.Oa){case 32:rh(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=oh(c,2,d);break;case 38:e=oh(c,3,d);break;case 39:e=oh(c,4,d);break;case 40:ch(c.g,dh,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:$g(c.o);th(c);break;case 43:th(c);break;case 44:e=c.i;g=null;c.h!==qh&&(g=ah(e,c.j,d));bh(e,0,15);e=g;break;case 45:e=c.g;c.h!==ph?e=null:(g=ah(e,c.j,d),h=e.g-e.h+1,lh(e,h-1,h,e.h),bh(e,
251
251
  0,h-1),bh(e,e.g,15-e.g),c.j=d,e=g);break;case 46:bh(c.l,0,15);break;case 47:e=null,c.h!==qh&&(e=ah(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,rh(c),c.j=d}d=e;break a}d=null}else e=b.Oa,ch(c.g,dh,b.Aa),ch(c.g,dh,e);return d}
252
- function Vh(a,b){var c=[];try{for(;b.ma();){var d=Ih(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Ih(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Jh(e));for(var g=a.j.get(e),h=b.X();b.X()-h<f;){e=b;var k=Ih(e),l=k.value,m=k.pts;if(16===l){var n=Ih(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var q=g.g;e=null;switch(l){case 8:!Bh(q)||0>=q.g&&0>=q.h||(0>=q.g?(q.g=q.C-1,q.h--):q.g--,q.i[q.h][q.g]=null);break;case 13:q.isVisible()&&(e=Ch(q,p,g.i));if(q.h+1>=q.F){p=q;for(var v=0,w=1;16>w;w++,
253
- v++)p.i[v]=p.i[w];for(w=0;1>w;w++,v++)p.i[v]=zh()}else q.h++;q.g=0;break;case 14:q.isVisible()&&(e=Ch(q,p,g.i));q.i[q.h]=zh();q.g=0;break;case 12:q.isVisible()&&(e=Ch(q,p,g.i)),yh(q),p=q,p.h=0,p.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=Kh(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Ah(g.g,"\u266a"):Ah(g.g,
254
- String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Ah(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Qh.has(e)){var y=Qh.get(e);Ah(g.g,y)}else Ah(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Ah(g.g,"_"):Ah(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(D){if(D instanceof N&&3E3===D.code)Va("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function Wh(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Xh(a,b){var c=null,d=null,e=a.M();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.M());b&16&&(d=a.M());return{trackId:e,ie:c,Xe:d}}function Yh(a,b){return{pd:1==b?a.Lb():a.M()}}function Zh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.M()}}
255
- function $h(a,b,c){var d=a.M(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={Sd:null,sampleSize:null,Tc:null};c&256&&(g.Sd=a.M());c&512&&(g.sampleSize=a.M());c&1024&&a.skip(4);c&2048&&(g.Tc=0==b?a.M():a.we());e.push(g)}return{Pg:d,ze:e}};function ai(){this.i=new Map;this.h=this.g=0}
252
+ function Vh(a,b){var c=[];try{for(;b.na();){var d=Ih(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Ih(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Jh(e));for(var g=a.j.get(e),h=b.X();b.X()-h<f;){e=b;var k=Ih(e),l=k.value,m=k.pts;if(16===l){var n=Ih(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var q=g.g;e=null;switch(l){case 8:!Bh(q)||0>=q.g&&0>=q.h||(0>=q.g?(q.g=q.C-1,q.h--):q.g--,q.i[q.h][q.g]=null);break;case 13:q.isVisible()&&(e=Ch(q,p,g.i));if(q.h+1>=q.F){p=q;for(var v=0,w=1;16>w;w++,
253
+ v++)p.i[v]=p.i[w];for(w=0;1>w;w++,v++)p.i[v]=zh()}else q.h++;q.g=0;break;case 14:q.isVisible()&&(e=Ch(q,p,g.i));q.i[q.h]=zh();q.g=0;break;case 12:q.isVisible()&&(e=Ch(q,p,g.i)),yh(q),p=q,p.h=0,p.g=0}var y=e}else y=null}else if(128<=l&&159>=l)y=Kh(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Ah(g.g,"\u266a"):Ah(g.g,
254
+ String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Ah(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Qh.has(e)){var x=Qh.get(e);Ah(g.g,x)}else Ah(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Ah(g.g,"_"):Ah(g.g,"[CC]"));y=null}(e=y)&&c.push(e)}}}}catch(D){if(D instanceof N&&3E3===D.code)Va("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function Wh(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Xh(a,b){var c=null,d=null,e=a.M();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.M());b&16&&(d=a.M());return{trackId:e,ie:c,We:d}}function Yh(a,b){return{pd:1==b?a.Lb():a.M()}}function Zh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.M()}}
255
+ function $h(a,b,c){var d=a.M(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={Sd:null,sampleSize:null,Tc:null};c&256&&(g.Sd=a.M());c&512&&(g.sampleSize=a.M());c&1024&&a.skip(4);c&2048&&(g.Tc=0==b?a.M():a.ve());e.push(g)}return{Og:d,ye:e}};function ai(){this.i=new Map;this.h=this.g=0}
256
256
  ai.prototype.init=function(a){var b=this,c=[],d=[];(new Ig).box("moov",Mg).box("mvex",Mg).P("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.M();f=f.M();b.g=e;b.h=f}).box("trak",Mg).P("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.M();c.push(e)}).box("mdia",Mg).P("mdhd",function(e){e=Zh(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new N(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
257
- ai.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new Ig).box("moof",Mg).box("traf",Mg).P("trun",function(k){f=$h(k.reader,k.version,k.flags).ze}).P("tfhd",function(k){k=Xh(k.reader,k.flags);d=k.ie||b.g;e=k.Xe||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).P("tfdt",function(k){g=Yh(k.reader,k.version).pd}).box("mdat",function(k){if(null===g)throw new N(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,q=f,v=0,w=p;for(q.length&&(w=q[0].sampleSize||p);k.ma();){var x=k.M();if(6==
258
- (k.Y()&31)){var y=0;q.length>v&&(y=q[v].Tc||0);y=(l+y)/m;for(var D=[],z,B=k.Za(x-1),F=z=0;F<B.length;)2==z&&3==B[F]?(z=0,B=[].concat(ja(B)),B.splice(F,1),B=new Uint8Array(B)):0==B[F]?z++:z=0,F++;z=B;for(F=0;F<z.length;){for(B=0;255==z[F];)B+=255,F++;B+=z[F++];for(var G=0;255==z[F];)G+=255,F++;G+=z[F++];4==B&&D.push(z.subarray(F,F+G));F+=G}D=t(D);for(z=D.next();!z.done;z=D.next())c.push({Lf:z.value,pts:y})}else try{k.skip(x-1)}catch(H){break}w-=x+4;0==w&&(l=q.length>v?l+(q[v].Sd||n):l+n,v++,w=q.length>
257
+ ai.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new Ig).box("moof",Mg).box("traf",Mg).P("trun",function(k){f=$h(k.reader,k.version,k.flags).ye}).P("tfhd",function(k){k=Xh(k.reader,k.flags);d=k.ie||b.g;e=k.We||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).P("tfdt",function(k){g=Yh(k.reader,k.version).pd}).box("mdat",function(k){if(null===g)throw new N(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,q=f,v=0,w=p;for(q.length&&(w=q[0].sampleSize||p);k.na();){var y=k.M();if(6==
258
+ (k.Y()&31)){var x=0;q.length>v&&(x=q[v].Tc||0);x=(l+x)/m;for(var D=[],z,B=k.Za(y-1),E=z=0;E<B.length;)2==z&&3==B[E]?(z=0,B=[].concat(ja(B)),B.splice(E,1),B=new Uint8Array(B)):0==B[E]?z++:z=0,E++;z=B;for(E=0;E<z.length;){for(B=0;255==z[E];)B+=255,E++;B+=z[E++];for(var G=0;255==z[E];)G+=255,E++;G+=z[E++];4==B&&D.push(z.subarray(E,E+G));E+=G}D=t(D);for(z=D.next();!z.done;z=D.next())c.push({Kf:z.value,pts:x})}else try{k.skip(y-1)}catch(H){break}w-=y+4;0==w&&(l=q.length>v?l+(q[v].Sd||n):l+n,v++,w=q.length>
259
259
  v?q[v].sampleSize||p:p)}}).parse(a,!1);return c};function bi(){this.h=new ai;this.g=new Rh}bi.prototype.init=function(a){this.h.init(a)};
260
- function ci(a,b){var c=a.h.parse(b);c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Fb(e.Lf);if(0<f.length&&(d=a.g,e=e.pts,f=new Fg(f,0),181===f.Y()&&49===f.Kb()&&1195456820===f.M()&&3===f.Y())){var g=f.Y();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.Y(),l=(k&4)>>2,m=f.Y(),n=f.Y();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,Aa:m,Oa:n,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:n,order:d.g.length})))}}}}return Th(a.g)}
260
+ function ci(a,b){var c=a.h.parse(b);c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Fb(e.Kf);if(0<f.length&&(d=a.g,e=e.pts,f=new Fg(f,0),181===f.Y()&&49===f.Kb()&&1195456820===f.M()&&3===f.Y())){var g=f.Y();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.Y(),l=(k&4)>>2,m=f.Y(),n=f.Y();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,Aa:m,Oa:n,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:n,order:d.g.length})))}}}}return Th(a.g)}
261
261
  ;function di(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function ei(a,b,c){c=void 0===c?0:c;return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b+c>=a.start(0)}function fi(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=t(gi(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}
262
- function hi(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=gi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function gi(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function ii(a,b,c,d){var e=this;this.j=a;this.l=c;this.h={};this.I={};this.G={};this.g=null;this.L=d||function(){};this.i={};this.o=new ef;this.s={};this.u=b;this.D=new rc;this.m=mi(this,this.D);this.C=new cf(function(){return ni(e)});this.F=""}function mi(a,b){var c=new MediaSource;a.o.oa(c,"sourceopen",function(){URL.revokeObjectURL(a.F);b.resolve()});a.F=oi(c);a.j.src=a.F;return c}r=ii.prototype;r.destroy=function(){return this.C.destroy()};
263
- function ni(a){var b,c,d,e,f,g,h,k;return L(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p["catch"](Pb)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new N(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.l&&b.push(a.l.destroy());for(k in a.s)b.push(a.s[k].destroy());return u(l,Promise.all(b),2)}a.o&&(a.o.release(),a.o=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.m=null;a.g=null;a.l=null;a.h={};a.s={};a.u=null;a.i=
262
+ function hi(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=gi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function gi(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function ii(a,b,c,d){var e=this;this.j=a;this.m=c;this.h={};this.I={};this.G={};this.g=null;this.L=d||function(){};this.i={};this.o=new ef;this.s={};this.u=b;this.D=new rc;this.l=mi(this,this.D);this.C=new cf(function(){return ni(e)});this.F=""}function mi(a,b){var c=new MediaSource;a.o.ka(c,"sourceopen",function(){URL.revokeObjectURL(a.F);b.resolve()});a.F=oi(c);a.j.src=a.F;return c}r=ii.prototype;r.destroy=function(){return this.C.destroy()};
263
+ function ni(a){var b,c,d,e,f,g,h,k;return L(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p["catch"](Pb)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new N(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.m&&b.push(a.m.destroy());for(k in a.s)b.push(a.s[k].destroy());return u(l,Promise.all(b),2)}a.o&&(a.o.release(),a.o=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.l=null;a.g=null;a.m=null;a.h={};a.s={};a.u=null;a.i=
264
264
  {};A(l)})}
265
- r.init=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){if(1==m.g)return d=qc,u(m,c.D,2);e={};f=t(a.keys());for(g=f.next();!g.done;e={qa:e.qa},g=f.next())e.qa=g.value,h=a.get(e.qa),k=ad(h.mimeType,h.codecs),e.qa==d.Z?pi(c,k):(!b&&MediaSource.isTypeSupported(k)||!Xc(k,e.qa)||(c.s[e.qa]=new Wc,k=Zc(e.qa,k)),l=c.m.addSourceBuffer(k),c.o.A(l,"error",function(n){return function(){c.i[n.qa][0].p.reject(new N(2,3,3014,c.j.error?c.j.error.code:0))}}(e)),c.o.A(l,"updateend",function(n){return function(){return qi(c,n.qa)}}(e)),
266
- c.h[e.qa]=l,c.I[e.qa]=k,c.i[e.qa]=[],c.G[e.qa]=!!h.drmInfos.length);A(m)})};function pi(a,b){a.g||(a.g=new fd(a.l));"application/cea-608"!=b&&"application/cea-708"!=b&&(a.g.l=Sb(hd[b]))}function ri(a){return a.m?"ended"==a.m.readyState:!0}function si(a,b){if(b==pc)var c=a.g.g;else c=ti(a,b),c=!c||1==c.length&&1E-6>c.end(0)-c.start(0)?null:1==c.length&&0>c.start(0)?0:c.length?c.start(0):null;return c}function ui(a,b){return b==pc?a.g.h:di(ti(a,b))}
265
+ r.init=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){if(1==m.g)return d=qc,u(m,c.D,2);e={};f=t(a.keys());for(g=f.next();!g.done;e={qa:e.qa},g=f.next())e.qa=g.value,h=a.get(e.qa),k=ad(h.mimeType,h.codecs),e.qa==d.Z?pi(c,k):(!b&&MediaSource.isTypeSupported(k)||!Xc(k,e.qa)||(c.s[e.qa]=new Wc,k=Zc(e.qa,k)),l=c.l.addSourceBuffer(k),c.o.A(l,"error",function(n){return function(){c.i[n.qa][0].p.reject(new N(2,3,3014,c.j.error?c.j.error.code:0))}}(e)),c.o.A(l,"updateend",function(n){return function(){return qi(c,n.qa)}}(e)),
266
+ c.h[e.qa]=l,c.I[e.qa]=k,c.i[e.qa]=[],c.G[e.qa]=!!h.drmInfos.length);A(m)})};function pi(a,b){a.g||(a.g=new fd(a.m));var c=a.g;"application/cea-608"==b||"application/cea-708"==b?c.j=null:c.j=Rb(hd[b])}function ri(a){return a.l?"ended"==a.l.readyState:!0}function si(a,b){if(b==pc)var c=a.g.g;else c=ti(a,b),c=!c||1==c.length&&1E-6>c.end(0)-c.start(0)?null:1==c.length&&0>c.start(0)?0:c.length?c.start(0):null;return c}function ui(a,b){return b==pc?a.g.h:di(ti(a,b))}
267
267
  function vi(a,b,c){if(b==pc)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=ti(a,b);return fi(a,c)}r.Ya=function(){var a={total:gi(this.j.buffered),audio:gi(ti(this,"audio")),video:gi(ti(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function ti(a,b){try{return a.h[b].buffered}catch(c){return null}}
268
- function wi(a,b,c,d,e,f){var g,h,k,l,m,n,p,q;return L(function(v){if(1==v.g){g=qc;if(b==g.Z)return u(v,id(a.g,c,d,e),0);if(a.s[b])return u(v,$c(a.s[b],c),10);if(f)return a.g||pi(a,"text/vtt"),null==d&&null==e?a.u.init(c):(h=ci(a.u,c),h.length&&(k=a.h[g.Na].timestampOffset,od(a.g,h,d,e,k))),c=xi(a,c,d,b),u(v,yi(a,b,function(){a.h[b].appendBuffer(c)}),0);c=xi(a,c,d,b);return u(v,yi(a,b,function(){a.h[b].appendBuffer(c)}),0)}l=v.h;a.g||pi(a,"text/vtt");l.metadata&&(m=a.h[b].timestampOffset,a.L(l.metadata,
269
- m,e));l.captions&&l.captions.length&&(n=a.h[g.Na].timestampOffset,p=ld(l.captions),od(a.g,p,d,e,n));q=l.data;q=xi(a,q,d,b);return u(v,yi(a,b,function(){a.h[b].appendBuffer(q)}),0)})}function zi(a,b){var c=ui(a,"video")||0;kd(a.g,b,c)}function Ai(a){a.g&&kd(a.g,"",0)}r.remove=function(a,b,c){var d=this,e;return L(function(f){e=qc;return a==e.Z?u(f,d.g.remove(b,c),0):u(f,yi(d,a,function(){c<=b?qi(d,a):d.h[a].remove(b,c)}),0)})};
270
- function Bi(a,b){var c;return L(function(d){c=qc;return b==c.Z?a.g?u(d,a.g.remove(0,Infinity),0):d["return"]():u(d,yi(a,b,function(){var e=a.m.duration;0>=e?qi(a,b):a.h[b].remove(0,e)}),0)})}r.flush=function(a){var b=this,c;return L(function(d){c=qc;return a==c.Z?d["return"]():u(d,yi(b,a,function(){b.j.currentTime-=.001;qi(b,a)}),0)})};
268
+ function wi(a,b,c,d,e,f){var g,h,k,l,m,n,p,q;return L(function(v){if(1==v.g){g=qc;if(b==g.Z)return u(v,id(a.g,c,d,e),0);if(a.s[b])return u(v,$c(a.s[b],c),10);if(f)return a.g||pi(a,"application/cea-608"),null==d&&null==e?a.u.init(c):(h=ci(a.u,c),h.length&&(k=a.h[g.Na].timestampOffset,od(a.g,h,d,e,k))),c=xi(a,c,d,b),u(v,yi(a,b,function(){a.h[b].appendBuffer(c)}),0);c=xi(a,c,d,b);return u(v,yi(a,b,function(){a.h[b].appendBuffer(c)}),0)}l=v.h;a.g||pi(a,"application/cea-608");l.metadata&&(m=a.h[b].timestampOffset,
269
+ a.L(l.metadata,m,e));l.captions&&l.captions.length&&(n=a.h[g.Na].timestampOffset,p=ld(l.captions),od(a.g,p,d,e,n));q=l.data;q=xi(a,q,d,b);return u(v,yi(a,b,function(){a.h[b].appendBuffer(q)}),0)})}function zi(a,b){var c=ui(a,"video")||0;kd(a.g,b,c)}function Ai(a){a.g&&kd(a.g,"",0)}r.remove=function(a,b,c){var d=this,e;return L(function(f){e=qc;return a==e.Z?u(f,d.g.remove(b,c),0):u(f,yi(d,a,function(){c<=b?qi(d,a):d.h[a].remove(b,c)}),0)})};
270
+ function Bi(a,b){var c;return L(function(d){c=qc;return b==c.Z?a.g?u(d,a.g.remove(0,Infinity),0):d["return"]():u(d,yi(a,b,function(){var e=a.l.duration;0>=e?qi(a,b):a.h[b].remove(0,e)}),0)})}r.flush=function(a){var b=this,c;return L(function(d){c=qc;return a==c.Z?d["return"]():u(d,yi(b,a,function(){b.j.currentTime-=.001;qi(b,a)}),0)})};
271
271
  function Ci(a,b,c,d,e){var f;return L(function(g){f=qc;return b==f.Z?(a.g.u=c,jd(a.g,d,e),g["return"]()):u(g,Promise.all([yi(a,b,function(){var h=a.h[b].appendWindowStart,k=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=h;a.h[b].appendWindowEnd=k;qi(a,b)}),yi(a,b,function(){var h=c;0>h&&(h+=.001);a.h[b].timestampOffset=h;qi(a,b)}),yi(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;qi(a,b)})]),0)})}
272
- r.endOfStream=function(a){var b=this;return L(function(c){return u(c,Di(b,function(){ri(b)||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};r.Ja=function(a){var b=this;return L(function(c){return u(c,Di(b,function(){b.m.duration=a}),0)})};r.getDuration=function(){return this.m.duration};function qi(a,b){var c=a.i[b][0];c&&(c.p.resolve(),Ei(a,b))}function yi(a,b,c){df(a.C);c={start:c,p:new rc};a.i[b].push(c);1==a.i[b].length&&Fi(a,b);return c.p}
273
- function Di(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:df(a.C);c=[];d={};for(e in a.h)d.Rb=new rc,f={start:function(l){return function(){return l.Rb.resolve()}}(d),p:d.Rb},a.i[e].push(f),c.push(d.Rb),1==a.i[e].length&&f.start(),d={Rb:d.Rb};C(k,2);return u(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=E(k),g;case 3:try{b()}catch(l){throw new N(2,3,3015,l);}finally{for(h in a.h)Ei(a,h)}A(k)}})}function Ei(a,b){a.i[b].shift();Fi(a,b)}
272
+ r.endOfStream=function(a){var b=this;return L(function(c){return u(c,Di(b,function(){ri(b)||"closed"===b.l.readyState||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};r.Ja=function(a){var b=this;return L(function(c){return u(c,Di(b,function(){b.l.duration=a}),0)})};r.getDuration=function(){return this.l.duration};function qi(a,b){var c=a.i[b][0];c&&(c.p.resolve(),Ei(a,b))}function yi(a,b,c){df(a.C);c={start:c,p:new rc};a.i[b].push(c);1==a.i[b].length&&Fi(a,b);return c.p}
273
+ function Di(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:df(a.C);c=[];d={};for(e in a.h)d.Rb=new rc,f={start:function(l){return function(){return l.Rb.resolve()}}(d),p:d.Rb},a.i[e].push(f),c.push(d.Rb),1==a.i[e].length&&f.start(),d={Rb:d.Rb};C(k,2);return u(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=F(k),g;case 3:try{b()}catch(l){throw new N(2,3,3015,l);}finally{for(h in a.h)Ei(a,h)}A(k)}})}function Ei(a,b){a.i[b].shift();Fi(a,b)}
274
274
  function Fi(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new N(2,3,3017,b)):c.p.reject(new N(2,3,3015,d)),Ei(a,b)}}function xi(a,b,c,d){var e=a.G[d];null==c&&e&&(zc()||xc())&&"mp4"==a.I[d].split(";")[0].split("/")[1]&&(b=Rg(b));return b}var oi=window.URL.createObjectURL;function Gi(a,b,c,d){this.sa=a;this.pa=b;this.ia=c;this.Ed=void 0===d?null:d}Gi.prototype.fc=function(){return this.pa};Gi.prototype.bc=function(){return this.ia};function Hi(a,b){return a&&b?a.fc()==b.fc()&&a.bc()==b.bc()&&hb(a.sa(),b.sa()):a==b}M("shaka.media.InitSegmentReference",Gi);Gi.prototype.getEndByte=Gi.prototype.bc;Gi.prototype.getStartByte=Gi.prototype.fc;
275
- function Ii(a,b,c,d,e,f,g,h,k,l,m,n){l=void 0===l?[]:l;this.startTime=a;this.l=this.endTime=b;this.j=c;this.pa=d;this.ia=e;this.g=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.i=void 0===n?null:n}r=Ii.prototype;r.sa=function(){return this.j()};r.getStartTime=function(){return this.startTime};r.ef=function(){return this.endTime};r.fc=function(){return this.pa};r.bc=function(){return this.ia};r.yf=function(){return this.tilesLayout};
276
- r.xf=function(){return this.i};M("shaka.media.SegmentReference",Ii);Ii.prototype.getTileDuration=Ii.prototype.xf;Ii.prototype.getTilesLayout=Ii.prototype.yf;Ii.prototype.getEndByte=Ii.prototype.bc;Ii.prototype.getStartByte=Ii.prototype.fc;Ii.prototype.getEndTime=Ii.prototype.ef;Ii.prototype.getStartTime=Ii.prototype.getStartTime;Ii.prototype.getUris=Ii.prototype.sa;function S(a,b,c){this.l=a;this.Sc=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.o=0;this.s=!0;this.u=0;this.C=void 0===c?!0:c;this.D=0;this.F=!1}r=S.prototype;r.getDuration=function(){return this.i};r.lf=function(){return this.g};r.Ja=function(a){this.i=a};r.rf=function(){return this.l};r.Ee=function(a){this.o=a};r.pc=function(a){this.s=a};r.Zd=function(a){this.m=a};r.$f=function(a){this.Sc=a};r.df=function(){return this.Sc};
275
+ function Ii(a,b,c,d,e,f,g,h,k,l,m,n){l=void 0===l?[]:l;this.startTime=a;this.l=this.endTime=b;this.j=c;this.pa=d;this.ia=e;this.g=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.i=void 0===n?null:n}r=Ii.prototype;r.sa=function(){return this.j()};r.getStartTime=function(){return this.startTime};r.df=function(){return this.endTime};r.fc=function(){return this.pa};r.bc=function(){return this.ia};r.xf=function(){return this.tilesLayout};
276
+ r.wf=function(){return this.i};M("shaka.media.SegmentReference",Ii);Ii.prototype.getTileDuration=Ii.prototype.wf;Ii.prototype.getTilesLayout=Ii.prototype.xf;Ii.prototype.getEndByte=Ii.prototype.bc;Ii.prototype.getStartByte=Ii.prototype.fc;Ii.prototype.getEndTime=Ii.prototype.df;Ii.prototype.getStartTime=Ii.prototype.getStartTime;Ii.prototype.getUris=Ii.prototype.sa;function S(a,b,c){this.l=a;this.Sc=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.o=0;this.s=!0;this.u=0;this.C=void 0===c?!0:c;this.D=0;this.F=!1}r=S.prototype;r.getDuration=function(){return this.i};r.kf=function(){return this.g};r.Ja=function(a){this.i=a};r.qf=function(){return this.l};r.De=function(a){this.o=a};r.pc=function(a){this.s=a};r.Zd=function(a){this.m=a};r.Zf=function(a){this.Sc=a};r.cf=function(){return this.Sc};
277
277
  r.Hb=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.Jd(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.l&&this.C&&!this.F&&(this.l=(Date.now()+this.o)/1E3-this.h-this.g)}};r.Cd=function(){this.F=!0};r.Jd=function(a){this.j=null==this.j?a:Math.min(this.j,a)};r.Id=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};
278
- r.U=function(){return Infinity==this.i&&!this.s};r.mb=function(){return Infinity!=this.i&&!this.s};r.Ra=function(){return Math.max(this.u,this.hb()-this.m)};r.Fe=function(a){this.u=a};r.hb=function(){return this.U()||this.mb()?Math.min(Math.max(0,(Date.now()+this.o)/1E3-this.g-this.l)+this.D,this.i):this.h?Math.min(this.h,this.i):this.i};r.ec=function(a){var b=Math.max(this.j,this.u);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.hb()-this.m+a,this.Qa()))};r.Db=function(){return this.ec(0)};
279
- r.Qa=function(){return Math.max(0,this.hb()-(this.U()||this.mb()?this.Sc:0))};r.Ie=function(){return null==this.l||null!=this.h&&this.C?!1:!0};r.De=function(a){this.D=a};M("shaka.media.PresentationTimeline",S);S.prototype.setAvailabilityTimeOffset=S.prototype.De;S.prototype.usingPresentationStartTime=S.prototype.Ie;S.prototype.getSeekRangeEnd=S.prototype.Qa;S.prototype.getSeekRangeStart=S.prototype.Db;S.prototype.getSafeSeekRangeStart=S.prototype.ec;S.prototype.getSegmentAvailabilityEnd=S.prototype.hb;
280
- S.prototype.setUserSeekStart=S.prototype.Fe;S.prototype.getSegmentAvailabilityStart=S.prototype.Ra;S.prototype.isInProgress=S.prototype.mb;S.prototype.isLive=S.prototype.U;S.prototype.offset=S.prototype.offset;S.prototype.notifyMaxSegmentDuration=S.prototype.Id;S.prototype.notifyMinSegmentStartTime=S.prototype.Jd;S.prototype.lockStartTime=S.prototype.Cd;S.prototype.notifySegments=S.prototype.Hb;S.prototype.getDelay=S.prototype.df;S.prototype.setDelay=S.prototype.$f;
281
- S.prototype.setSegmentAvailabilityDuration=S.prototype.Zd;S.prototype.setStatic=S.prototype.pc;S.prototype.setClockOffset=S.prototype.Ee;S.prototype.getPresentationStartTime=S.prototype.rf;S.prototype.setDuration=S.prototype.Ja;S.prototype.getMaxSegmentDuration=S.prototype.lf;S.prototype.getDuration=S.prototype.getDuration;function Ji(a,b){this.j=a;this.m=Ki(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.o=b;this.i=function(){}}Ji.prototype.release=function(){this.j=null;this.i=function(){}};function Li(a,b){a.i=b}function Mi(a){this.g=a}function Ki(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(gi(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function Ni(a,b,c,d,e){var f=this;this.g=a;this.C=b;this.l=c;this.u=e;this.i=new ef;this.s=!1;this.D=a.readyState;this.j=!1;this.h=d;this.o=!1;this.i.A(a,"waiting",function(){return Oi(f)});this.m=(new O(function(){Oi(f)})).Da(.25)}Ni.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.C=this.u=null};Ni.prototype.Md=function(){this.o=!0;Oi(this)};
278
+ r.U=function(){return Infinity==this.i&&!this.s};r.mb=function(){return Infinity!=this.i&&!this.s};r.Qa=function(){return Math.max(this.u,this.hb()-this.m)};r.Ee=function(a){this.u=a};r.hb=function(){return this.U()||this.mb()?Math.min(Math.max(0,(Date.now()+this.o)/1E3-this.g-this.l)+this.D,this.i):this.h?Math.min(this.h,this.i):this.i};r.ec=function(a){var b=Math.max(this.j,this.u);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.hb()-this.m+a,this.Pa()))};r.Db=function(){return this.ec(0)};
279
+ r.Pa=function(){return Math.max(0,this.hb()-(this.U()||this.mb()?this.Sc:0))};r.He=function(){return null==this.l||null!=this.h&&this.C?!1:!0};r.Ce=function(a){this.D=a};M("shaka.media.PresentationTimeline",S);S.prototype.setAvailabilityTimeOffset=S.prototype.Ce;S.prototype.usingPresentationStartTime=S.prototype.He;S.prototype.getSeekRangeEnd=S.prototype.Pa;S.prototype.getSeekRangeStart=S.prototype.Db;S.prototype.getSafeSeekRangeStart=S.prototype.ec;S.prototype.getSegmentAvailabilityEnd=S.prototype.hb;
280
+ S.prototype.setUserSeekStart=S.prototype.Ee;S.prototype.getSegmentAvailabilityStart=S.prototype.Qa;S.prototype.isInProgress=S.prototype.mb;S.prototype.isLive=S.prototype.U;S.prototype.offset=S.prototype.offset;S.prototype.notifyMaxSegmentDuration=S.prototype.Id;S.prototype.notifyMinSegmentStartTime=S.prototype.Jd;S.prototype.lockStartTime=S.prototype.Cd;S.prototype.notifySegments=S.prototype.Hb;S.prototype.getDelay=S.prototype.cf;S.prototype.setDelay=S.prototype.Zf;
281
+ S.prototype.setSegmentAvailabilityDuration=S.prototype.Zd;S.prototype.setStatic=S.prototype.pc;S.prototype.setClockOffset=S.prototype.De;S.prototype.getPresentationStartTime=S.prototype.qf;S.prototype.setDuration=S.prototype.Ja;S.prototype.getMaxSegmentDuration=S.prototype.kf;S.prototype.getDuration=S.prototype.getDuration;function Ji(a,b){this.j=a;this.m=Ki(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.o=b;this.i=function(){}}Ji.prototype.release=function(){this.j=null;this.i=function(){}};function Li(a,b){a.i=b}function Mi(a){this.g=a}function Ki(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(gi(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function Ni(a,b,c,d,e){var f=this;this.g=a;this.C=b;this.l=c;this.u=e;this.i=new ef;this.s=!1;this.D=a.readyState;this.j=!1;this.h=d;this.o=!1;this.i.A(a,"waiting",function(){return Oi(f)});this.m=(new O(function(){Oi(f)})).Da(.25)}Ni.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.C=this.u=null};Ni.prototype.Md=function(){this.o=!0;Oi(this)};
282
282
  function Oi(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.s)return}else a.s=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.D&&(a.j=!1,a.D=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=Ki(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.h=!1;e=f-b.l;if(d=e>=b.o&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}if(b){e=a.l.smallGapLimit;var g=a.g.currentTime;b=a.g.buffered;c=hi(b,g,a.l.gapDetectionThreshold);if(!(null==
283
- c||0==c&&!a.o||(d=b.start(c),d>=a.C.Qa()))){var h=d-g;e=h<=e;f=!1;.001>h||(e||a.j||(a.j=!0,g=(new Map).set("currentTime",g).set("gapSize",h),g=new Q("largegap",g),g.cancelable=!0,a.u(g),a.l.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function Pi(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Qi.value().get(b),c.oa(a,b,d))}var Qi=new sc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Ri(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new ef;this.i=new Si(a);Pi(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Ti(d,d.j)})}Ri.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function Ui(a){return a.m?a.g.currentTime:a.j}function Vi(a,b){0<a.g.readyState?Wi(a.i,b):Pi(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Ti(a,a.j)})}
284
- function Ti(a,b){.001>Math.abs(a.g.currentTime-b)?Xi(a):(a.h.oa(a.g,"seeking",function(){Xi(a)}),Wi(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Xi(a){a.m=!0;a.h.A(a.g,"seeking",function(){return a.l()})}function Si(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new O(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Si.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
285
- function Wi(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Da(.1)};function Yi(a){this.g=a;this.j=!1;this.h=null;this.i=new ef}r=Yi.prototype;r.nd=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.oa(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;Pi(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};r.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};r.od=function(a){this.h=this.j?this.h:a};r.xc=function(){return(this.j?this.g.currentTime:this.h)||0};r.ue=function(){};
286
- function Zi(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.u=b.minBufferTime||0;this.l=c;this.s=e;this.o=null;this.j=new Ni(a,b.presentationTimeline,c,$i(a,c),f);this.h=new Ri(a,function(){a:{var h=g.j;h.s=!0;h.o=!1;h.j=!1;var k=Ui(g.h);h=aj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.o||g.o<k-1)){g.o=k;Vi(g.h,h);h=void 0;break a}g.s();h=void 0}return h},bj(this,d));this.m=new O(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ui(g.h),k=g.g.Db(),l=g.g.Qa();3>l-k&&(k=l-
283
+ c||0==c&&!a.o||(d=b.start(c),d>=a.C.Pa()))){var h=d-g;e=h<=e;f=!1;.001>h||(e||a.j||(a.j=!0,g=(new Map).set("currentTime",g).set("gapSize",h),g=new Q("largegap",g),g.cancelable=!0,a.u(g),a.l.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function Pi(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Qi.value().get(b),c.ka(a,b,d))}var Qi=new sc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Ri(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new ef;this.i=new Si(a);Pi(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Ti(d,d.j)})}Ri.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function Ui(a){return a.m?a.g.currentTime:a.j}function Vi(a,b){0<a.g.readyState?Wi(a.i,b):Pi(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Ti(a,a.j)})}
284
+ function Ti(a,b){.001>Math.abs(a.g.currentTime-b)?Xi(a):(a.h.ka(a.g,"seeking",function(){Xi(a)}),Wi(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Xi(a){a.m=!0;a.h.A(a.g,"seeking",function(){return a.l()})}function Si(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new O(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Si.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
285
+ function Wi(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Da(.1)};function Yi(a){this.g=a;this.j=!1;this.h=null;this.i=new ef}r=Yi.prototype;r.nd=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.ka(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;Pi(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};r.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};r.od=function(a){this.h=this.j?this.h:a};r.xc=function(){return(this.j?this.g.currentTime:this.h)||0};r.ue=function(){};
286
+ function Zi(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.u=b.minBufferTime||0;this.l=c;this.s=e;this.o=null;this.j=new Ni(a,b.presentationTimeline,c,$i(a,c),f);this.h=new Ri(a,function(){a:{var h=g.j;h.s=!0;h.o=!1;h.j=!1;var k=Ui(g.h);h=aj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.o||g.o<k-1)){g.o=k;Vi(g.h,h);h=void 0;break a}g.s();h=void 0}return h},bj(this,d));this.m=new O(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ui(g.h),k=g.g.Db(),l=g.g.Pa();3>l-k&&(k=l-
287
287
  3);h<k&&(h=aj(g,h),g.i.currentTime=h)}})}r=Zi.prototype;r.nd=function(){this.m.Da(.25)};r.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.s=function(){}};r.od=function(a){Vi(this.h,a)};r.xc=function(){var a=Ui(this.h);return 0<this.i.readyState&&!this.i.paused?cj(this,a):a};
288
- function bj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Db():a.g.Qa():0>b&&(b=a.g.Qa()+b);return dj(a,cj(a,b))}r.ue=function(){this.j.Md()};function dj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function aj(a,b){var c=Math.max(a.u,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Db(),f=a.g.Qa(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.ec(c),k=a.g.ec(d);c=a.g.ec(c+d);return b>=g?dj(a,b):b>f?f:b<e?ei(a.i.buffered,k)?k:c:b>=h||ei(a.i.buffered,b)?b:c}
289
- function cj(a,b){var c=a.g.Db();if(b<c)return c;c=a.g.Qa();return b>c?c:b}function $i(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new Ji(new Mi(a),b.stallThreshold);Li(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function T(a){this.K=a;this.g=null;this.h=0;this.i=!1}r=T.prototype;r.destroy=function(){Kb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};r.release=function(){this.i||(this.K=[],this.g&&this.g.stop(),this.g=null)};r.Ff=function(){this.i=!0};
288
+ function bj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Db():a.g.Pa():0>b&&(b=a.g.Pa()+b);return dj(a,cj(a,b))}r.ue=function(){this.j.Md()};function dj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function aj(a,b){var c=Math.max(a.u,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Db(),f=a.g.Pa(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.ec(c),k=a.g.ec(d);c=a.g.ec(c+d);return b>=g?dj(a,b):b>f?f:b<e?ei(a.i.buffered,k)?k:c:b>=h||ei(a.i.buffered,b)?b:c}
289
+ function cj(a,b){var c=a.g.Db();if(b<c)return c;c=a.g.Pa();return b>c?c:b}function $i(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new Ji(new Mi(a),b.stallThreshold);Li(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function T(a){this.K=a;this.g=null;this.h=0;this.i=!1}r=T.prototype;r.destroy=function(){Kb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};r.release=function(){this.i||(this.K=[],this.g&&this.g.stop(),this.g=null)};r.Ef=function(){this.i=!0};
290
290
  r.find=function(a){for(var b=this.K.length-1,c=b;0<=c;--c){var d=this.K[c],e=c<b?this.K[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.K.length&&a<this.K[0].startTime?this.h:null};r.get=function(a){if(0==this.K.length)return null;a-=this.h;return 0>a||a>=this.K.length?null:this.K[a]};r.offset=function(a){if(!this.i)for(var b=t(this.K),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};
291
291
  r.Fb=function(a){!this.i&&a.length&&(this.K=this.K.filter(function(b){return b.startTime<a[0].startTime}),this.K.push.apply(this.K,ja(a)))};r.Gb=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.K.length||d.endTime>c.K[0].startTime)});this.Fb(a);this.eb(b)};r.eb=function(a){if(!this.i){var b=this.K.length;this.K=this.K.filter(function(c){return c.endTime>a});this.h+=b-this.K.length}};
292
292
  r.Xa=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.K.length;)if(this.K[this.K.length-1].startTime>=b)this.K.pop();else break;for(;this.K.length;)if(this.K[0].endTime<=a)this.K.shift(),c||this.h++;else break;0!=this.K.length&&(a=this.K[this.K.length-1],this.K[this.K.length-1]=new Ii(a.startTime,b,a.j,a.pa,a.ia,a.g,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.i))}};
293
293
  r.Uc=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new O(function(){var d=b();d?c.K.push.apply(c.K,ja(d)):(c.g.stop(),c.g=null)}),this.g.Da(a))};T.prototype[Symbol.iterator]=function(){return this.gb(0)};T.prototype.gb=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new ej(this,b,d)};
294
- function fj(a,b,c){return new T([new Ii(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",T);T.forSingleSegment=fj;T.prototype.getIteratorForTime=T.prototype.gb;T.prototype.updateEvery=T.prototype.Uc;T.prototype.fit=T.prototype.Xa;T.prototype.evict=T.prototype.eb;T.prototype.mergeAndEvict=T.prototype.Gb;T.prototype.merge=T.prototype.Fb;T.prototype.offset=T.prototype.offset;T.prototype.get=T.prototype.get;T.prototype.find=T.prototype.find;T.prototype.markImmutable=T.prototype.Ff;
294
+ function fj(a,b,c){return new T([new Ii(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",T);T.forSingleSegment=fj;T.prototype.getIteratorForTime=T.prototype.gb;T.prototype.updateEvery=T.prototype.Uc;T.prototype.fit=T.prototype.Xa;T.prototype.evict=T.prototype.eb;T.prototype.mergeAndEvict=T.prototype.Gb;T.prototype.merge=T.prototype.Fb;T.prototype.offset=T.prototype.offset;T.prototype.get=T.prototype.get;T.prototype.find=T.prototype.find;T.prototype.markImmutable=T.prototype.Ef;
295
295
  T.prototype.release=T.prototype.release;T.prototype.destroy=T.prototype.destroy;function ej(a,b,c){this.i=a;this.h=b;this.g=c}ej.prototype.seek=function(a){Kb("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");(a=this.i.gb(a))?(this.h=a.h,this.g=a.g):(this.h=Number.MAX_VALUE,this.g=0);return this.next().value};
296
296
  ej.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.h.length&&a.sa().length&&this.g>=a.h.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.h.length?a.h[this.g]:a};ej.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.h.length?(this.g++,a.sa().length&&this.g==a.h.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};M("shaka.media.SegmentIterator",ej);ej.prototype.next=ej.prototype.next;ej.prototype.current=ej.prototype.current;
297
297
  ej.prototype.seek=ej.prototype.seek;function gj(){T.call(this,[]);this.j=[]}qa(gj,T);r=gj.prototype;r.clone=function(){var a=new gj;a.j=this.j.slice();return a};r.release=function(){for(var a=t(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};r.find=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.K.length}return null};
@@ -300,9 +300,9 @@ gj.prototype.offset=gj.prototype.offset;gj.prototype.get=gj.prototype.get;gj.pro
300
300
  lj.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.jc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Ed;break a}}d=null}if(e=d)e=c.ge,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
301
301
  if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.ge=d,JSON.stringify(d),c=new Q("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function oj(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.jc;b.jc=f.filter(function(g,h){return g.position<=d&&h+1<f.length&&f[h+1].position<=d||g.position>=e?!1:!0})}else b.jc=[]};function pj(a){Ne.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new O(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g["delete"](e),e=new Q("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Da(2)}qa(pj,Ne);pj.prototype.release=function(){this.g.clear();this.h.stop();Ne.prototype.release.call(this)};function qj(a){Ne.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{ub:null,sb:rj,lb:function(c,d){return sj(b,"enter",c,d)}},{ub:tj,sb:rj,lb:function(c,d){return sj(b,"enter",c,d)}},{ub:uj,sb:rj,lb:function(c,d){return sj(b,"enter",c,d)}},{ub:rj,sb:tj,lb:function(c,d){return sj(b,"exit",c,d)}},{ub:rj,sb:uj,lb:function(c,d){return sj(b,"exit",c,d)}},{ub:tj,sb:uj,lb:function(c,d){return sj(b,"skip",c,d)}},{ub:uj,sb:tj,lb:function(c,d){return sj(b,"skip",c,d)}}];this.h=new ef;this.h.A(this.i,"regionremove",
302
302
  function(c){b.g["delete"](c.region)})}qa(qj,Ne);qj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;Ne.prototype.release.call(this)};qj.prototype.j=function(a,b){for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?tj:a>d.endTime?uj:rj;this.g.set(d,f);for(var g=t(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.ub==e&&h.sb==f&&h.lb(d,b)}};
303
- function sj(a,b,c,d){b=new Q(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var tj=1,rj=2,uj=3;function vj(a,b,c,d,e){a=We(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function wj(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.u=1;this.o=this.l=null;this.j=new Map;this.C=!1;this.D=null;this.s=!1;this.i=new cf(function(){return xj(c)})}wj.prototype.destroy=function(){return this.i.destroy()};function xj(a){var b,c,d,e;return L(function(f){if(1==f.g){b=[];c=t(a.j.values());for(d=c.next();!d.done;d=c.next())e=d.value,yj(e),b.push(zj(e));return u(f,Promise.all(b),2)}a.j.clear();a.g=null;a.m=null;a.h=null;A(f)})}
304
- wj.prototype.configure=function(a){this.h=a;this.D=new Ce({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0)};wj.prototype.start=function(){var a=this;return L(function(b){if(1==b.g)return u(b,Aj(a),2);df(a.i);a.C=!0;A(b)})};
305
- function Bj(a,b){var c,d,e,f,g,h;L(function(k){switch(k.g){case 1:return c=qc,C(k,2),u(k,Bi(a.g.R,c.Z),4);case 4:va(k,3);break;case 2:if(d=E(k),a.g)a.g.onError(d);case 3:e=ad(b.mimeType,b.codecs);pi(a.g.R,e);f=a.g.R.l;if(g=f.isTextVisible()||a.h.alwaysStreamText)h=Cj(b),a.j.set(c.Z,h),Dj(a,h,0);A(k)}})}function Ej(a){var b=a.j.get(pc);b&&(yj(b),zj(b)["catch"](function(){}),a.j["delete"](pc));a.o=null}
303
+ function sj(a,b,c,d){b=new Q(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var tj=1,rj=2,uj=3;function vj(a,b,c,d,e){a=We(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function wj(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.u=1;this.o=this.l=null;this.D=0;this.j=new Map;this.C=!1;this.F=null;this.s=!1;this.i=new cf(function(){return xj(c)})}wj.prototype.destroy=function(){return this.i.destroy()};function xj(a){var b,c,d,e;return L(function(f){if(1==f.g){b=[];c=t(a.j.values());for(d=c.next();!d.done;d=c.next())e=d.value,yj(e),b.push(zj(e));return u(f,Promise.all(b),2)}a.j.clear();a.g=null;a.m=null;a.h=null;A(f)})}
304
+ wj.prototype.configure=function(a){this.h=a;this.F=new Ce({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0)};wj.prototype.start=function(){var a=this;return L(function(b){if(1==b.g)return u(b,Aj(a),2);df(a.i);a.C=!0;A(b)})};
305
+ function Bj(a,b){var c,d,e,f,g,h,k;L(function(l){switch(l.g){case 1:return c=qc,a.D++,d=a.D,C(l,2),u(l,Bi(a.g.R,c.Z),4);case 4:va(l,3);break;case 2:if(e=F(l),a.g)a.g.onError(e);case 3:f=ad(b.mimeType,b.codecs),pi(a.g.R,f),g=a.g.R.m,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.D==d&&(k=Cj(b),a.j.set(c.Z,k),Dj(a,k,0)),A(l)}})}function Ej(a){var b=a.j.get(pc);b&&(yj(b),zj(b)["catch"](function(){}),a.j["delete"](pc));a.o=null}
306
306
  function Fj(a,b){var c=a.j.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.qb&&(Gj(a,e,!1,0,!1),c.qb=d)}else if(d=c.qb)c.qb=null,Gj(a,d,!0,0,!1)}}function Hj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.l=b;a.C&&(b.video&&Gj(a,b.video,c,d,e),b.audio&&Gj(a,b.audio,c,d,e))}function Ij(a,b){a.o=b;a.C&&Gj(a,b,!0,0,!1)}
307
307
  function Gj(a,b,c,d,e){var f=a.j.get(b.type);f||b.type!=pc?f&&(f.qb&&(b.trickModeVideo?(f.qb=b,b=b.trickModeVideo):f.qb=null),f.stream!=b||e)&&(b.type==pc&&pi(a.g.R,ad(b.mimeType,b.codecs)),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.ba=null,c&&(f.Zb?f.Xc=!0:f.ta?(f.ab=!0,f.Ac=d,f.Xc=!0):(yj(f),Jj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),Kj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):Bj(a,b)}
308
308
  function Kj(a,b){var c,d;return L(function(e){if(1==e.g){if(!b.va)return e["return"]();c=b.stream;d=b.va;return c.segmentIndex?e.B(2):u(e,c.createSegmentIndex(),2)}if(b.va!=d||b.stream!=c)return e["return"]();var f=a.g.Ic();var g=ui(a.g.R,b.type),h=b.stream.segmentIndex.find(b.Ba?b.Ba.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ia?k.ia-k.pa:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.g)&&(h+=(k.ia?k.ia-k.pa:null)||0),k=a.g.getBandwidthEstimate(),
@@ -310,25 +310,25 @@ f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.va.h.g>h?
310
310
  function Aj(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){if(1==n.g){b=qc;if(!a.l)throw new N(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.cb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.Na,a.l.video),d.add(a.l.video));a.o&&(c.set(b.Z,a.o),d.add(a.o));e=a.g.R;f=a.h.forceTransmuxTS;return u(n,e.init(c,f),2)}df(a.i);var p=a.m.presentationTimeline.getDuration();Infinity>p?a.g.R.Ja(p):a.g.R.Ja(Math.pow(2,32));g=t(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.j.has(k)||
311
311
  (m=Cj(l),a.j.set(k,m),Dj(a,m,0));A(n)})}function Cj(a){return{stream:a,type:a.type,ba:null,Ba:null,Mc:null,Bd:null,zd:null,yd:null,qb:null,endOfStream:!1,ta:!1,La:null,ab:!1,Ac:0,Xc:!1,Zb:!1,Qd:!1,hc:!1,va:null}}
312
312
  function Mj(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:df(a.i);if(b.ta||null==b.La||b.Zb)return h["return"]();b.La=null;if(!b.ab){h.B(2);break}return u(h,Jj(a,b,b.Xc,b.Ac),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.B(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.ta||b.La||Dj(a,b,0),h["return"]();case 4:C(h,6);d=Nj(a,b);null!=d&&(Dj(a,b,d),b.hc=!1);va(h,7);break;case 6:return e=
313
- E(h),u(h,Oj(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.j.values());if(!a.C||!f.every(function(k){return k.endOfStream})){h.B(0);break}return u(h,a.g.R.endOfStream(),10);case 10:df(a.i),g=a.g.R.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ja(g),A(h)}})}
313
+ F(h),u(h,Oj(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.j.values());if(!a.C||!f.every(function(k){return k.endOfStream})){h.B(0);break}return u(h,a.g.R.endOfStream(),10);case 10:df(a.i),g=a.g.R.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ja(g),A(h)}})}
314
314
  function Nj(a,b){if(Pj(b))return zi(a.g.R,b.stream.originalId||""),null;b.type==pc&&Ai(a.g.R);var c=a.g.Ic(),d=b.Ba?b.Ba.endTime:c,e=vi(a.g.R,b.type,c),f=Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.u,g=a.m.presentationTimeline.getDuration()-d,h=ui(a.g.R,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(c=a.j.get(pc))&&Pj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Qj(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;
315
315
  f=Infinity;g=Array.from(a.j.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,Pj(h)||h.ba&&!h.ba.current()||(f=Math.min(f,h.Ba?h.Ba.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;Rj(a,b,c,e)["catch"](function(){});return null}
316
316
  function Qj(a,b,c,d){if(b.ba)return b.ba.current();if(b.Ba||d)return b.ba=b.stream.segmentIndex.gb(b.Ba?b.Ba.endTime:d),b.ba&&b.ba.next().value;a=a.h.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ba=b.stream.segmentIndex.gb(d),e=b.ba&&b.ba.next().value);e||(b.ba=b.stream.segmentIndex.gb(c),e=b.ba&&b.ba.next().value);return e}
317
- function Rj(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,v,w,x,y,D;return L(function(z){switch(z.g){case 1:return e=qc,f=b.stream,g=b.ba,b.ta=!0,C(z,2),u(z,Sj(a,b,d),4);case 4:df(a.i);if(a.s)return z["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h)return n=new Uint8Array(0),q=p=!1,v=function(B){var F,G,H;return L(function(I){if(p)return I["return"]();q=!0;df(a.i);if(a.s)return I["return"]();n=Tj(n,B);F=!1;G=0;(new Ig).box("mdat",function(J){G=
318
- J.size+J.start;F=!0}).parse(n,!1,!0);if(!F)return I.B(0);H=n.subarray(0,G);n=n.subarray(G);return u(I,Uj(a,b,c,f,d,H),0)})},u(z,Vj(a,b,d,v),9);l=Vj(a,b,d);return u(z,l,7);case 7:return m=z.h,df(a.i),a.s?z["return"]():b.ab?(b.ta=!1,Dj(a,b,0),z["return"]()):u(z,Uj(a,b,c,f,d,m),6);case 9:w=z.h;if(q){z.B(6);break}p=!0;df(a.i);return a.s?z["return"]():b.ab?(b.ta=!1,Dj(a,b,0),z["return"]()):u(z,Uj(a,b,c,f,d,w),6);case 6:df(a.i);if(a.s)return z["return"]();b.Ba=d;g.next();b.ta=!1;b.Qd=!1;x=a.g.R.Ya();y=
319
- x[b.type];$a(JSON.stringify(y));b.ab||a.g.Md();Dj(a,b,0);va(z,0);break;case 2:D=E(z);df(a.i,D);if(a.s)return z["return"]();b.ta=!1;if(7001==D.code)b.ta=!1,yj(b),Dj(a,b,0),z.B(0);else if(b.type==e.Z&&a.h.ignoreTextStreamFailures)a.j["delete"](e.Z),z.B(0);else if(3017==D.code)Wj(a,b,D),z.B(0);else return b.hc=!0,D.severity=2,u(z,Oj(a,D),0)}})}function Tj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
317
+ function Rj(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,v,w,y,x,D;return L(function(z){switch(z.g){case 1:return e=qc,f=b.stream,g=b.ba,b.ta=!0,C(z,2),u(z,Sj(a,b,d),4);case 4:df(a.i);if(a.s)return z["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h)return n=new Uint8Array(0),q=p=!1,v=function(B){var E,G,H;return L(function(I){if(p)return I["return"]();q=!0;df(a.i);if(a.s)return I["return"]();n=Tj(n,B);E=!1;G=0;(new Ig).box("mdat",function(J){G=
318
+ J.size+J.start;E=!0}).parse(n,!1,!0);if(!E)return I.B(0);H=n.subarray(0,G);n=n.subarray(G);return u(I,Uj(a,b,c,f,d,H),0)})},u(z,Vj(a,b,d,v),9);l=Vj(a,b,d);return u(z,l,7);case 7:return m=z.h,df(a.i),a.s?z["return"]():b.ab?(b.ta=!1,Dj(a,b,0),z["return"]()):u(z,Uj(a,b,c,f,d,m),6);case 9:w=z.h;if(q){z.B(6);break}p=!0;df(a.i);return a.s?z["return"]():b.ab?(b.ta=!1,Dj(a,b,0),z["return"]()):u(z,Uj(a,b,c,f,d,w),6);case 6:df(a.i);if(a.s)return z["return"]();b.Ba=d;g.next();b.ta=!1;b.Qd=!1;y=a.g.R.Ya();x=
319
+ y[b.type];$a(JSON.stringify(x));b.ab||a.g.Md();Dj(a,b,0);va(z,0);break;case 2:D=F(z);df(a.i,D);if(a.s)return z["return"]();b.ta=!1;if(7001==D.code)b.ta=!1,yj(b),Dj(a,b,0),z.B(0);else if(b.type==e.Z&&a.h.ignoreTextStreamFailures)a.j["delete"](e.Z),z.B(0);else if(3017==D.code)Wj(a,b,D),z.B(0);else return b.hc=!0,D.severity=2,u(z,Oj(a,D),0)}})}function Tj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
320
320
  function Wj(a,b,c){if(!Array.from(a.j.values()).some(function(e){return e!=b&&e.Qd})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.hc=!0;a.s=!0;a.g.onError(c);return}b.Qd=!0}Dj(a,b,4)}
321
- function Sj(a,b,c){var d,e,f,g,h,k,l;return L(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.Bd||e!=b.zd||f!=b.yd)h=function(){var n;return L(function(p){if(1==p.g)return C(p,2),b.zd=e,b.yd=f,b.Bd=g,u(p,Ci(a.g.R,b.type,g,e,f),4);if(2!=p.g)return va(p,0);n=E(p);b.zd=null;b.yd=null;b.Bd=null;throw n;})},d.push(h());!Hi(c.g,b.Mc)&&(b.Mc=c.g)&&(k=Vj(a,b,c.g),l=function(){var n,p,q;return L(function(v){switch(v.g){case 1:return C(v,2),u(v,k,4);
322
- case 4:return n=v.h,df(a.i),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(v,wi(a.g.R,b.type,n,null,null,p),5);case 5:va(v,0);break;case 2:throw q=E(v),b.Mc=null,q;}})},a.g.Jf(c.startTime,c.g),d.push(l()));return u(m,Promise.all(d),0)})}
323
- function Uj(a,b,c,d,e,f){var g;return L(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,(null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes)&&(new Ig).P("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.kc();var n=k.reader.kc();var p=k.reader.M();var q=k.reader.M();var v=k.reader.M();var w=k.reader.M();var x=e.startTime+q/p}else p=k.reader.M(),x=k.reader.Lb()/p+e.timestampOffset,q=x-e.startTime,v=k.reader.M(),w=k.reader.M(),
324
- m=k.reader.kc(),n=k.reader.kc();k=k.reader.Za(k.reader.O.byteLength-k.reader.X());if(l&&l.includes(m)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==m?a.g.Kf():(l=(new Map).set("detail",{startTime:x,endTime:x+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:q,eventDuration:v,id:w,messageData:k}),l=new Q(Xj,l),a.g.onEvent(l))}).parse(f),u(h,Yj(a,b,c),2);if(3!=h.g)return df(a.i),u(h,wi(a.g.R,b.type,f,e.startTime,e.endTime,g),3);df(a.i);A(h)})}
321
+ function Sj(a,b,c){var d,e,f,g,h,k,l;return L(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.Bd||e!=b.zd||f!=b.yd)h=function(){var n;return L(function(p){if(1==p.g)return C(p,2),b.zd=e,b.yd=f,b.Bd=g,u(p,Ci(a.g.R,b.type,g,e,f),4);if(2!=p.g)return va(p,0);n=F(p);b.zd=null;b.yd=null;b.Bd=null;throw n;})},d.push(h());!Hi(c.g,b.Mc)&&(b.Mc=c.g)&&(k=Vj(a,b,c.g),l=function(){var n,p,q;return L(function(v){switch(v.g){case 1:return C(v,2),u(v,k,4);
322
+ case 4:return n=v.h,df(a.i),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(v,wi(a.g.R,b.type,n,null,null,p),5);case 5:va(v,0);break;case 2:throw q=F(v),b.Mc=null,q;}})},a.g.If(c.startTime,c.g),d.push(l()));return u(m,Promise.all(d),0)})}
323
+ function Uj(a,b,c,d,e,f){var g;return L(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,(null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes)&&(new Ig).P("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.kc();var n=k.reader.kc();var p=k.reader.M();var q=k.reader.M();var v=k.reader.M();var w=k.reader.M();var y=e.startTime+q/p}else p=k.reader.M(),y=k.reader.Lb()/p+e.timestampOffset,q=y-e.startTime,v=k.reader.M(),w=k.reader.M(),
324
+ m=k.reader.kc(),n=k.reader.kc();k=k.reader.Za(k.reader.O.byteLength-k.reader.X());if(l&&l.includes(m)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==m?a.g.Jf():(l=(new Map).set("detail",{startTime:y,endTime:y+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:q,eventDuration:v,id:w,messageData:k}),l=new Q(Xj,l),a.g.onEvent(l))}).parse(f),u(h,Yj(a,b,c),2);if(3!=h.g)return df(a.i),u(h,wi(a.g.R,b.type,f,e.startTime,e.endTime,g),3);df(a.i);A(h)})}
325
325
  function Yj(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=si(a.g.R,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.g.R.remove(b.type,e,e+g),2)}df(a.i);A(h)})}function Pj(a){return a&&a.type==pc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
326
326
  function Vj(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=bf,f=vj(c.sa(),c.pa,c.ia,a.h.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof Gi,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.nb.request(e,f),b.va=h,u(l,h.promise,2);k=l.h;b.va=null;return l["return"](k.data)})}
327
327
  function Jj(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.ab=!1,b.Xc=!1,b.Ac=0,b.Zb=!0,b.Ba=null,b.Mc=null,b.ba=null,d?(e=a.g.Ic(),f=a.g.R.getDuration(),u(g,a.g.R.remove(b.type,e+d,f),3)):u(g,Bi(a.g.R,b.type),4);if(3!=g.g)return df(a.i),c?u(g,a.g.R.flush(b.type),3):g.B(3);df(a.i);b.Zb=!1;b.endOfStream=!1;b.ta||b.La||Dj(a,b,0);A(g)})}
328
- function Dj(a,b,c){var d=b.type;if(d!=pc||a.j.has(d))b.La=(new tc(function(){var e;return L(function(f){if(1==f.g)return C(f,2),u(f,Mj(a,b),4);if(2!=f.g)return va(f,0);e=E(f);if(a.g)a.g.onError(e);A(f)})})).S(c)}function yj(a){null!=a.La&&(a.La.stop(),a.La=null)}function zj(a){return L(function(b){return a.va?u(b,a.va.abort(),0):b.B(0)})}function Oj(a,b){return L(function(c){if(1==c.g)return u(c,Ee(a.D),2);df(a.i);a.g.onError(b);b.handled||a.h.failureCallback(b);A(c)})};function Zj(a,b){var c=ak(),d=this;this.j=b;this.i=a;this.l=c;this.o=null;this.m=[];this.h=this.g=null;this.u=Promise.resolve().then(function(){return bk(d)});this.s=new cf(function(){return ck(d)})}Zj.prototype.destroy=function(){return this.s.destroy()};function ck(a){var b,c,d;return L(function(e){if(1==e.g)return a.h&&a.h.abort(),dk(a),u(e,a.u,2);a.g&&a.g.Ia.pb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ia.pb();a.g=null;a.m=[];a.j=null;A(e)})}
329
- function ek(a,b){var c={Ib:function(){},Oc:function(){},pb:function(){},onError:function(){},Qc:function(){},Og:function(){}};a.m.push({create:b,Ia:c});a.h&&a.h.abort();dk(a);return c}
330
- function bk(a){return L(function(b){if(a.s.g)b=b.B(0);else{if(0==a.m.length||a.g&&!a.g.kb)var c=!1;else{a.g&&(a.g.Ia.pb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ia.Ib(),a.g={node:d.node,payload:d.payload,kb:d.kb,Ia:c.Ia}):c.Ia.Qc();c=!0}c?c=Promise.resolve():a.g?c=fk(a):(a.j.If(a.i),a.o=new rc,c=a.o);b=u(b,c,1)}return b})}
331
- function fk(a){var b,c;return L(function(d){switch(d.g){case 1:return a.i=a.j.nf(a.i,a.l,a.g.node,a.g.payload),C(d,2),a.h=a.j.Ze(a.i,a.l,a.g.payload),u(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.Ia.Oc(),a.g=null);va(d,0);break;case 2:b=E(d);if(7001==b.code)a.g.Ia.pb();else a.g.Ia.onError(b);a.g=null;a.h=null;c=a;return u(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,A(d)}})}function dk(a){a.o&&(a.o.resolve(),a.o=null)};function gk(a){this.g=null;for(var b=t(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}r=gk.prototype;r.remove=function(a,b){if(!this.g)return!1;hk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
328
+ function Dj(a,b,c){var d=b.type;if(d!=pc||a.j.has(d))b.La=(new tc(function(){var e;return L(function(f){if(1==f.g)return C(f,2),u(f,Mj(a,b),4);if(2!=f.g)return va(f,0);e=F(f);if(a.g)a.g.onError(e);A(f)})})).S(c)}function yj(a){null!=a.La&&(a.La.stop(),a.La=null)}function zj(a){return L(function(b){return a.va?u(b,a.va.abort(),0):b.B(0)})}function Oj(a,b){return L(function(c){if(1==c.g)return u(c,Ee(a.F),2);df(a.i);a.g.onError(b);b.handled||a.h.failureCallback(b);A(c)})};function Zj(a,b){var c=ak(),d=this;this.j=b;this.i=a;this.l=c;this.o=null;this.m=[];this.h=this.g=null;this.u=Promise.resolve().then(function(){return bk(d)});this.s=new cf(function(){return ck(d)})}Zj.prototype.destroy=function(){return this.s.destroy()};function ck(a){var b,c,d;return L(function(e){if(1==e.g)return a.h&&a.h.abort(),dk(a),u(e,a.u,2);a.g&&a.g.Ia.pb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ia.pb();a.g=null;a.m=[];a.j=null;A(e)})}
329
+ function ek(a,b){var c={Ib:function(){},Oc:function(){},pb:function(){},onError:function(){},Qc:function(){},Ng:function(){}};a.m.push({create:b,Ia:c});a.h&&a.h.abort();dk(a);return c}
330
+ function bk(a){return L(function(b){if(a.s.g)b=b.B(0);else{if(0==a.m.length||a.g&&!a.g.kb)var c=!1;else{a.g&&(a.g.Ia.pb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ia.Ib(),a.g={node:d.node,payload:d.payload,kb:d.kb,Ia:c.Ia}):c.Ia.Qc();c=!0}c?c=Promise.resolve():a.g?c=fk(a):(a.j.Hf(a.i),a.o=new rc,c=a.o);b=u(b,c,1)}return b})}
331
+ function fk(a){var b,c;return L(function(d){switch(d.g){case 1:return a.i=a.j.mf(a.i,a.l,a.g.node,a.g.payload),C(d,2),a.h=a.j.Ye(a.i,a.l,a.g.payload),u(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.Ia.Oc(),a.g=null);va(d,0);break;case 2:b=F(d);if(7001==b.code)a.g.Ia.pb();else a.g.Ia.onError(b);a.g=null;a.h=null;c=a;return u(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,A(d)}})}function dk(a){a.o&&(a.o.resolve(),a.o=null)};function gk(a){this.g=null;for(var b=t(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}r=gk.prototype;r.remove=function(a,b){if(!this.g)return!1;hk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
332
332
  r.append=function(a){function b(h,k){for(var l=t(h),m=l.next();!m.done;m=l.next())if(m=m.value,m.isContainer)b(m.nestedCues,k);else{var n=m.clone();n.nestedCues=[];n.payload=c(m);k.push(n)}return k}function c(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,q){return p+"<"+q+">"},"");k=k.reduceRight(function(p,q){return p+"</"+q+">"},"");return h.lineBreak||h.spacer?(h.spacer&&Kb("shaka.extern.Cue",
333
333
  "Please use lineBreak instead of spacer."),"\n"):h.nestedCues.length?h.nestedCues.map(c).join(""):l+h.payload+k}var d=b(a,[]),e=[];a=this.g.cues?Array.from(this.g.cues):[];var f={};d=t(d);for(var g=d.next();!g.done;f={vb:f.vb},g=d.next())f.vb=g.value,a.some(function(h){return function(k){return k.startTime==h.vb.startTime&&k.endTime==h.vb.endTime&&k.text==h.vb.payload?!0:!1}}(f))||(g=ik(f.vb))&&e.push(g);a=e.slice().sort(function(h,k){return h.startTime!=k.startTime?h.startTime-k.startTime:h.endTime!=
334
334
  k.endTime?h.endTime-k.startTime:"line"in VTTCue.prototype?e.indexOf(k)-e.indexOf(h):e.indexOf(h)-e.indexOf(k)});a=t(a);for(f=a.next();!f.done;f=a.next())this.g.addCue(f.value)};r.destroy=function(){this.g&&(hk(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};r.isTextVisible=function(){return"showing"==this.g.mode};r.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
@@ -337,11 +337,11 @@ function hk(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t
337
337
  window&&(this.l=new ResizeObserver(function(){mk(c,!0)}),this.l.observe(this.g));this.o=new Map}r=lk.prototype;r.append=function(a){var b=[].concat(ja(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={rc:c.rc},d=a.next())c.rc=d.value,b.some(function(e){return function(f){return tb(f,e.rc)}}(c))||this.i.push(c.rc);mk(this)};
338
338
  r.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.u&&this.u.stop();this.h.clear();this.s&&(this.s.release(),this.s=null);this.l&&(this.l.disconnect(),this.l=null)};r.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});mk(this,c>this.i.length);return!0};r.isTextVisible=function(){return this.j};r.setTextVisibility=function(a){this.j=a};
339
339
  function nk(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
340
- function ok(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Je:null;l&&(g.push(l.qd),l.lc&&g.push(l.lc),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l?nk(a,n)||(f=!0):(pk(a,k,e),l=a.h.get(k),n=l.Je,f=!0));0<k.nestedCues.length&&n&&ok(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,q){return p.startTime!=
340
+ function ok(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Ie:null;l&&(g.push(l.qd),l.lc&&g.push(l.lc),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l?nk(a,n)||(f=!0):(pk(a,k,e),l=a.h.get(k),n=l.Ie,f=!0));0<k.nestedCues.length&&n&&ok(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,q){return p.startTime!=
341
341
  q.startTime?p.startTime-q.startTime:p.endTime-q.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.lc?(c.appendChild(d.lc),d.lc.appendChild(d.qd)):c.appendChild(d.qd)}}function mk(a,b){if(a.g){var c=a.C.currentTime;if(!a.j||(void 0===b?0:b)){for(var d=t(a.o.values()),e=d.next();!e.done;e=d.next())kk(e.value);kk(a.g);a.h.clear();a.o.clear()}if(a.j){d=new Map;e=t(a.h.keys());for(var f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.h.get(f));ok(a,a.i,a.g,c,[])}}}
342
342
  function pk(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&Kb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&qk(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,e=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==Ab?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==Ab?"%":"px"),a.o.has(e))c=a.o.get(e);else{var g=document.createElement("span"),h=c.heightUnits==
343
343
  Ab?"%":"px",k=c.widthUnits==Ab?"%":"px",l=c.viewportAnchorUnits==Ab?"%":"px";g.id="shaka-text-region---"+e;g.classList.add("shaka-text-region");g.style.height=c.height+h;g.style.width=c.width+k;g.style.position="absolute";g.style.top=c.viewportAnchorY+l;g.style.left=c.viewportAnchorX+l;g.style.display="flex";g.style.flexDirection="column";g.style.alignItems="center";g.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.o.set(e,g);c=g}e=f;d&&(e=
344
- document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.h.set(b,{qd:f,Je:e,lc:c})}
344
+ document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.h.set(b,{qd:f,Ie:e,lc:c})}
345
345
  function qk(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=rk(c.linePadding,c,a.m);f.paddingRight=rk(c.linePadding,c,a.m);f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat=
346
346
  "no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=sk(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent=
347
347
  "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=rk(c.fontSize,c,a.m);null!=c.line&&1==c.lineInterpretation&&(f.position="absolute",c.writingMode==nb?(f.width="100%",c.lineAlign==pb?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=100-c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==pb?f.left=c.line+
@@ -356,7 +356,7 @@ function yk(a){var b=a.type;if(a.init)return Ok;if("video"==b)return a.codecs.in
356
356
  function Ek(a,b){var c=a.h.jb();if(!c.length)return NaN;var d=c[0];c=t(c);for(var e=c.next();!e.done;e=c.next())e=e.value,"variant"===e.type&&e.bandwidth>d.bandwidth&&(d=e);switch(b){case zk:return d.videoBandwidth||NaN;case Ak:return d.audioBandwidth||NaN;default:return d.bandwidth}}
357
357
  function Jk(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
358
358
  l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Nk(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=Jk(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
359
- function Kk(a,b){if(!b||a.includes("offline:"))return a;var c=new Xb(a);c.g.set("CMCD",b);return c.toString()}var Ik="m",Ak="a",zk="v",Bk="av",Ok="i",Mk="c",Ck="tt",xk="v",wk="l";M("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",Bg:"s",xg:"o"});function Pk(){}
359
+ function Kk(a,b){if(!b||a.includes("offline:"))return a;var c=new Xb(a);c.g.set("CMCD",b);return c.toString()}var Ik="m",Ak="a",zk="v",Bk="av",Ok="i",Mk="c",Ck="tt",xk="v",wk="l";M("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",Ag:"s",wg:"o"});function Pk(){}
360
360
  function Qk(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=Oe(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Oe(l)),k=Qk(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ta("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Ua("Unexpected number of arguments for "+k),a[h]=b[h]):(Ta("Invalid config, unrecognized key "+
361
361
  k),g=!1)}return g}function Rk(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function Sk(a,b){return a&&b}M("shaka.util.ConfigUtils",Pk);Pk.convertToConfigObject=Rk;Pk.mergeConfigObjects=Qk;function Tk(){}
362
362
  function Uk(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:De(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:qg,logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[]},c={retryParameters:De(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,
@@ -370,37 +370,37 @@ function Wk(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":
370
370
  function Vk(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=yd(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return rd(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/
371
371
  2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=t(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=pc&&"image"!=g.type||c.push(g);return c}M("shaka.util.PlayerConfiguration",Tk);Tk.mergeConfigObjects=Wk;function Xk(){this.g=null;this.h=[]}function Yk(a,b){if(null==a.g)a.g={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.g.duration=c-a.g.timestamp;a.g.state!=b&&(a.h.push(a.g),a.g={timestamp:c,state:b,duration:0})}}function Zk(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=t(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
372
372
  function $k(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function al(){this.i=this.h=null;this.g=[]}function bl(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function cl(){this.u=this.C=this.G=this.D=this.s=this.j=this.F=this.m=this.i=this.I=this.L=this.N=this.l=this.o=NaN;this.g=new Xk;this.h=new al};function U(a,b){Ne.call(this);var c=this;this.l=dl;this.Cc=this.g=null;this.ea=!1;this.Kc=new ef;this.Ob=new ef;this.o=new ef;this.vd=this.u=this.Ub=this.i=this.Lc=this.I=this.j=this.xa=this.W=this.ya=this.L=this.Dc=this.G=this.yb=this.C=this.N=this.m=this.F=null;this.Kd=1E9;this.h=el(this);this.Hd={width:Infinity,height:Infinity};this.s=null;this.Ma=new ue(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.wb=this.h.preferredTextLanguage;this.Yb=this.h.preferredTextRole;
373
- this.Xb=this.h.preferForcedSubs;this.Vb=[];this.ac=null;b&&b(this);this.F=fl(this);this.F.Wd(this.h.streaming.forceHTTPS);this.D=null;gl&&(this.D=Sb(gl));this.Kc.A(window,"online",function(){c.Rd()});this.V={name:"detach"};this.ca={name:"attach"};this.ga={name:"unload"};this.Nd={name:"manifest-parser"};this.Dd={name:"manifest"};this.xb={name:"media-source"};this.wd={name:"drm-engine"};this.da={name:"load"};this.Od={name:"src-equals-drm-engine"};this.zb={name:"src-equals"};var d=new Map;d.set(this.ca,
374
- function(e,f){return Je(hl(c,e,f))});d.set(this.V,function(e){e.J&&(c.Ob.Ta(),e.J=null);c.D&&c.D.release();c.g=null;e=Promise.resolve();return Je(e)});d.set(this.ga,function(e){return Je(il(c,e))});d.set(this.xb,function(e){e=jl(c,e);return Je(e)});d.set(this.Nd,function(e,f){var g=kl(c,e,f);return Je(g)});d.set(this.Dd,function(e){return ll(c,e)});d.set(this.wd,function(e){e=ml(c,e);return Je(e)});d.set(this.da,function(e,f){return Je(nl(c,e,f))});d.set(this.Od,function(e,f){var g=ol(c,e,f);return Je(g)});
375
- d.set(this.zb,function(e,f){return pl(c,e,f)});this.Ga=new Zj(this.V,{nf:function(e,f,g,h){var k=null;e==c.V&&(k=g==c.V?c.V:c.ca);e==c.ca&&(k=g==c.V||f.J!=h.J?c.V:g==c.ca?c.ca:g==c.xb||g==c.da?c.xb:g==c.zb?c.Od:null);e==c.xb&&(k=g==c.da&&f.J==h.J?c.Nd:c.ga);e==c.Nd&&(k=ql(c.da,c.Dd,c.ga,g,f,h));e==c.Dd&&(k=ql(c.da,c.wd,c.ga,g,f,h));e==c.wd&&(k=ql(c.da,c.da,c.ga,g,f,h));e==c.Od&&(k=g==c.zb&&f.J==h.J?c.zb:c.ga);if(e==c.da||e==c.zb)k=c.ga;e==c.ga&&(k=h.J&&f.J==h.J?c.ca:c.V);return k},Ze:function(e,f,
376
- g){c.dispatchEvent(rl(sl,(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return L(function(f){return 1==f.g?u(f,il(c,e),2):f["return"](e.J?c.ca:c.V)})},If:function(e){c.dispatchEvent(rl(tl,(new Map).set("state",e.name)))}});a&&this.Wb(a,!0)}qa(U,Ne);function rl(a,b){return new Q(a,b)}r=U.prototype;
373
+ this.Xb=this.h.preferForcedSubs;this.Vb=[];this.ac=null;b&&b(this);this.F=fl(this);this.F.Wd(this.h.streaming.forceHTTPS);this.D=null;gl&&(this.D=Rb(gl));this.Kc.A(window,"online",function(){c.Rd()});this.V={name:"detach"};this.ca={name:"attach"};this.ga={name:"unload"};this.Nd={name:"manifest-parser"};this.Dd={name:"manifest"};this.xb={name:"media-source"};this.wd={name:"drm-engine"};this.da={name:"load"};this.Od={name:"src-equals-drm-engine"};this.zb={name:"src-equals"};var d=new Map;d.set(this.ca,
374
+ function(e,f){return Je(hl(c,e,f))});d.set(this.V,function(e){e.J&&(c.Ob.Sa(),e.J=null);c.D&&c.D.release();c.g=null;e=Promise.resolve();return Je(e)});d.set(this.ga,function(e){return Je(il(c,e))});d.set(this.xb,function(e){e=jl(c,e);return Je(e)});d.set(this.Nd,function(e,f){var g=kl(c,e,f);return Je(g)});d.set(this.Dd,function(e){return ll(c,e)});d.set(this.wd,function(e){e=ml(c,e);return Je(e)});d.set(this.da,function(e,f){return Je(nl(c,e,f))});d.set(this.Od,function(e,f){var g=ol(c,e,f);return Je(g)});
375
+ d.set(this.zb,function(e,f){return pl(c,e,f)});this.Ga=new Zj(this.V,{mf:function(e,f,g,h){var k=null;e==c.V&&(k=g==c.V?c.V:c.ca);e==c.ca&&(k=g==c.V||f.J!=h.J?c.V:g==c.ca?c.ca:g==c.xb||g==c.da?c.xb:g==c.zb?c.Od:null);e==c.xb&&(k=g==c.da&&f.J==h.J?c.Nd:c.ga);e==c.Nd&&(k=ql(c.da,c.Dd,c.ga,g,f,h));e==c.Dd&&(k=ql(c.da,c.wd,c.ga,g,f,h));e==c.wd&&(k=ql(c.da,c.da,c.ga,g,f,h));e==c.Od&&(k=g==c.zb&&f.J==h.J?c.zb:c.ga);if(e==c.da||e==c.zb)k=c.ga;e==c.ga&&(k=h.J&&f.J==h.J?c.ca:c.V);return k},Ye:function(e,f,
376
+ g){c.dispatchEvent(rl(sl,(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return L(function(f){return 1==f.g?u(f,il(c,e),2):f["return"](e.J?c.ca:c.V)})},Hf:function(e){c.dispatchEvent(rl(tl,(new Map).set("state",e.name)))}});a&&this.Wb(a,!0)}qa(U,Ne);function rl(a,b){return new Q(a,b)}r=U.prototype;
377
377
  r.destroy=function(){var a=this,b;return L(function(c){switch(c.g){case 1:if(a.l==ul)return c["return"]();a.l=ul;b=ek(a.Ga,function(){return{node:a.V,payload:ak(),kb:!1}});return u(c,new Promise(function(d){b.Ib=function(){};b.Oc=function(){d()};b.pb=function(){d()};b.onError=function(){d()};b.Qc=function(){d()}}),2);case 2:return u(c,a.Ga.destroy(),3);case 3:a.Kc&&(a.Kc.release(),a.Kc=null);a.Ob&&(a.Ob.release(),a.Ob=null);a.o&&(a.o.release(),a.o=null);a.vd=null;a.u=null;a.h=null;a.s=null;a.Cc=null;
378
378
  a.W=null;if(!a.F){c.B(4);break}return u(c,a.F.destroy(),5);case 5:a.F=null;case 4:Ne.prototype.release.call(a),A(c)}})};r.Wb=function(a,b){b=void 0===b?!0:b;if(this.l==ul)return Promise.reject(vl());var c=ak();c.J=a;uc()||(b=!1);var d=b?this.xb:this.ca,e=ek(this.Ga,function(){return{node:d,payload:c,kb:!1}});e.Ib=function(){};return wl(e)};r.detach=function(){var a=this;if(this.l==ul)return Promise.reject(vl());var b=ek(this.Ga,function(){return{node:a.V,payload:ak(),kb:!1}});b.Ib=function(){};return wl(b)};
379
- r.ce=function(a){var b=this;a=void 0===a?!0:a;if(this.l==ul)return Promise.reject(vl());uc()||(a=!1);var c=ak(),d=ek(this.Ga,function(e){var f=e.J&&a?b.xb:e.J?b.ca:b.V;c.J=e.J;return{node:f,payload:c,kb:!1}});d.Ib=function(){};return wl(d)};r.hg=function(a){this.ac=a};
379
+ r.ce=function(a){var b=this;a=void 0===a?!0:a;if(this.l==ul)return Promise.reject(vl());uc()||(a=!1);var c=ak(),d=ek(this.Ga,function(e){var f=e.J&&a?b.xb:e.J?b.ca:b.V;c.J=e.J;return{node:f,payload:c,kb:!1}});d.Ib=function(){};return wl(d)};r.gg=function(a){this.ac=a};
380
380
  r.load=function(a,b,c){var d=this;this.ac=null;if(this.l==ul)return Promise.reject(vl());this.dispatchEvent(rl(xl));var e=ak();e.uri=a;e.$d=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=yl(this,e)?this.zb:this.da,g=ek(this.Ga,function(h){if(null==h.J)return null;e.J=h.J;return{node:f,payload:e,kb:!0}});this.s=new cl;this.W=zl(this);g.Ib=function(){};return new Promise(function(h,k){g.Qc=function(){return k(new N(2,7,7002))};g.Oc=function(){h();d.dispatchEvent(rl(Al))};g.pb=function(){return k(vl())};
381
- g.onError=function(l){return k(l)}})};function yl(a,b){if(!uc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=Cg(d),c=Bl[c]);if(c){if(""==(b.J||wc()).canPlayType(c))return!1;if(!uc()||!(c in Bg||Cg(d)in Dg)||a.h.streaming.preferNativeHls)return!0;if(Cc())return a.h.streaming.useNativeHlsOnSafari}return!1}function hl(a,b,c){null==b.J&&(b.J=c.J,a.Ob.A(b.J,"error",function(){var d=Cl(a);d&&Dl(a,d)}));a.g=b.J;return Promise.resolve()}
382
- function il(a,b){var c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return a.l!=ul&&(a.l=dl),c=a.Vb.map(function(p){return p()}),a.Vb=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(rl(El));b.mimeType=null;b.startTime=null;b.uri=null;a.ya&&(a.ya.release(),a.ya=null);b.J&&a.o.Ta();a.yb&&(a.yb.release(),a.yb=null);a.Dc&&(a.Dc.stop(),a.Dc=null);if(!a.I){n.B(3);break}return u(n,a.I.stop(),4);case 4:a.I=null,a.Lc=null;case 3:if(!a.u){n.B(5);break}return u(n,a.u.stop(),5);case 5:if(!a.j){n.B(7);
381
+ g.onError=function(l){return k(l)}})};function yl(a,b){if(!uc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=Cg(d),c=Bl[c]);if(c){if(""==(b.J||wc()).canPlayType(c))return!1;if(!uc()||!(c in Bg||Cg(d)in Dg)||("application/x-mpegurl"===c||"application/vnd.apple.mpegurl"===c)&&a.h.streaming.preferNativeHls)return!0;if(Cc())return a.h.streaming.useNativeHlsOnSafari}return!1}function hl(a,b,c){null==b.J&&(b.J=c.J,a.Ob.A(b.J,"error",function(){var d=Cl(a);d&&Dl(a,d)}));a.g=b.J;return Promise.resolve()}
382
+ function il(a,b){var c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return a.l!=ul&&(a.l=dl),c=a.Vb.map(function(p){return p()}),a.Vb=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(rl(El));b.mimeType=null;b.startTime=null;b.uri=null;a.ya&&(a.ya.release(),a.ya=null);b.J&&a.o.Sa();a.yb&&(a.yb.release(),a.yb=null);a.Dc&&(a.Dc.stop(),a.Dc=null);if(!a.I){n.B(3);break}return u(n,a.I.stop(),4);case 4:a.I=null,a.Lc=null;case 3:if(!a.u){n.B(5);break}return u(n,a.u.stop(),5);case 5:if(!a.j){n.B(7);
383
383
  break}return u(n,a.j.destroy(),8);case 8:a.j=null;case 7:a.G&&(a.G.release(),a.G=null);a.C&&(a.C.release(),a.C=null);if(!a.N){n.B(9);break}return u(n,a.N.destroy(),10);case 10:a.N=null;case 9:if(a.D)a.D.onAssetUnload();if(!b.J||!b.J.src){n.B(11);break}return u(n,new Promise(function(p){return(new O(p)).S(.1)}),12);case 12:for(b.J.removeAttribute("src"),b.J.load();b.J.lastChild;)b.J.removeChild(b.J.firstChild);case 11:if(!a.m){n.B(13);break}return u(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.Ub=
384
384
  null;a.L=null;if(a.i){d=t(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=t([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=t(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.s=new cl;a.xd=null;Fl(a);A(n)}})}
385
- function jl(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=new bi,d=a.h.textDisplayFactory,e=Sb(d),a.xd=d,f=Gl(b.J,c,e,function(h,k,l){h=t(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,p=l,q=t(m.frames),v=q.next();!v.done;v=q.next())Hl(a,n,p,"ID3",v.value);if(a.D)a.D.onHlsTimedMetadata(m,n)}}),u(g,f.D,2);a.N=f;A(g)})}
386
- function kl(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.F,a.Ub=d,f=a,u(h,Ag(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.Lc=h.h;a.I=Sb(a.Lc);g=Oe(a.h.manifest);c.J&&"AUDIO"===c.J.nodeName&&(g.disableVideo=!0);a.I.configure(g);A(h)})}
385
+ function jl(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=new bi,d=a.h.textDisplayFactory,e=Rb(d),a.xd=d,f=Gl(b.J,c,e,function(h,k,l){h=t(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,p=l,q=t(m.frames),v=q.next();!v.done;v=q.next())Hl(a,n,p,"ID3",v.value);if(a.D)a.D.onHlsTimedMetadata(m,n)}}),u(g,f.D,2);a.N=f;A(g)})}
386
+ function kl(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.F,a.Ub=d,f=a,u(h,Ag(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.Lc=h.h;a.I=Rb(a.Lc);g=Oe(a.h.manifest);c.J&&"AUDIO"===c.J.nodeName&&(g.disableVideo=!0);a.I.configure(g);A(h)})}
387
387
  function ll(a,b){var c=b.uri,d=a.F;a.ya=new pj(function(){return a.mc()});a.ya.addEventListener("regionadd",function(g){g=g.region;Il(a,Jl,g);if(a.D)a.D.onDashTimedMetadata(g)});a.xa=null;a.h.streaming.observeQualityChanges&&(a.xa=new lj(function(){return a.Ya()}),a.xa.addEventListener("qualitychange",function(g){var h=g.quality;g=g.position;h=(new Map).set("mediaQuality",{bandwidth:h.bandwidth,audioSamplingRate:h.audioSamplingRate,codecs:h.codecs,contentType:h.contentType,frameRate:h.frameRate,height:h.height,
388
388
  mimeType:h.mimeType,channelsCount:h.channelsCount,pixelAspectRatio:h.pixelAspectRatio,width:h.width}).set("position",g);a.dispatchEvent(rl(Kl,h))}));var e={networkingEngine:d,modifyManifestRequest:function(g,h){var k=a.W;try{k.g.enabled&&(k.o=h.format,Fk(k,g,{ot:Ik,su:!k.i}))}catch(l){Va("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",l)}},modifySegmentRequest:function(g,h){vk(a.W,g,h)},filter:function(g){return Ll(a,g)},makeTextStreamsForClosedCaptions:function(g){return Ml(a,g)},
389
389
  onTimelineRegionAdded:function(g){var h=a.ya;a:{var k=t(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=l;break a}k=null}null==k&&(h.g.add(g),g=new Q("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return Dl(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
390
390
  enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Fe(function(){var g,h,k,l;return L(function(m){if(1==m.g)return g=a,u(m,a.I.start(c,e),2);g.i=m.h;h=rl(Nl);a.dispatchEvent(h);if(0==a.i.variants.length)throw new N(2,4,4036);Ol(a.i);k=Date.now()/1E3;l=k-f;a.s.F=l;A(m)})}(),function(){return a.I.stop()})}
391
391
  function ml(a,b){var c,d;return L(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Pl(a,{nb:a.F,onError:function(f){Dl(a,f)},Pc:function(f){Ql(a,f)},onExpirationUpdated:function(f,g){Rl(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==Sl&&d&&(d=!1,a.s.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),u(e,Wf(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.Wb(b.J),3):u(e,Ll(a,a.i),0)})}
392
- function nl(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v;return L(function(w){switch(w.g){case 1:b.startTime=c.startTime;null!=a.ac&&(b.startTime=a.ac,a.ac=null);d=b.J;e=b.uri;a.Ub=e;a.G=new hj({Jc:function(){return d.playbackRate},Fc:function(){return d.defaultPlaybackRate},Yd:function(x){d.playbackRate=x},te:function(x){d.currentTime+=x}});f=function(){return Tl(a)};g=function(){return Ul(a)};a.o.A(d,"playing",f);a.o.A(d,"pause",f);a.o.A(d,"ended",f);a.o.A(d,"ratechange",g);h=a.h.abrFactory;a.u&&a.vd==h||
393
- (a.vd=h,a.u=Sb(h),"function"!=typeof a.u.playbackRateChanged&&(Kb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.u.playbackRateChanged=function(){}),a.u.configure(a.h.abr));a.Ma=new ue(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.wb=a.h.preferredTextLanguage;a.Yb=a.h.preferredTextRole;a.Xb=a.h.preferForcedSubs;Vl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.u.init(function(x,y,D){a.j&&x!=a.j.l&&Wl(a,x,!0,void 0===
394
- y?!1:y,void 0===D?0:D)});a.C=Xl(a,b.startTime);a.yb=Yl(a);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Zl(a,k);Bd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=$l(a);a.j.configure(a.h.streaming);a.l=am;d.textTracks&&a.o.A(d.textTracks,"addtrack",function(x){if(x.track)switch(x=x.track,x.kind){case "chapters":bm(a,x)}});a.dispatchEvent(rl(cm));l=null;if(m=a.jb().find(function(x){return x.active})){w.B(2);break}l=
395
- dm(a)?a.u.chooseVariant():null;Wl(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){w.B(3);break}n=a.C.xc();return u(w,em(l,n),4);case 4:p=w.h,a.C.od(p);case 3:fm(a,null,$d(l));case 2:return a.C.nd(),q=a.ib().find(function(x){return x.active}),q||((v=je(a.i.textStreams,a.wb,a.Yb,a.Xb)[0]||null)&&bl(a.s.h,v,!0),l&&(v?(l.audio&&gm(a,l.audio,v)&&(a.ea=!0),a.ea&&a.N.l.setTextVisibility(!0),hm(a)):a.ea=!1),v&&(a.h.streaming.alwaysStreamText||a.ud())&&Ij(a.j,v)),u(w,a.j.start(),5);case 5:a.h.abr.enabled&&
396
- (a.u.enable(),im(a)),Rd(a.j?a.j.l:null,a.i),jm(a.i),km(a),dm(a),a.i.variants.some(function(x){return x.primary}),a.o.oa(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-c.$d}),A(w)}})}
392
+ function nl(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v;return L(function(w){switch(w.g){case 1:b.startTime=c.startTime;null!=a.ac&&(b.startTime=a.ac,a.ac=null);d=b.J;e=b.uri;a.Ub=e;a.G=new hj({Jc:function(){return d.playbackRate},Fc:function(){return d.defaultPlaybackRate},Yd:function(y){d.playbackRate=y},te:function(y){d.currentTime+=y}});f=function(){return Tl(a)};g=function(){return Ul(a)};a.o.A(d,"playing",f);a.o.A(d,"pause",f);a.o.A(d,"ended",f);a.o.A(d,"ratechange",g);h=a.h.abrFactory;a.u&&a.vd==h||
393
+ (a.vd=h,a.u=Rb(h),"function"!=typeof a.u.playbackRateChanged&&(Kb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.u.playbackRateChanged=function(){}),a.u.configure(a.h.abr));a.Ma=new ue(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.wb=a.h.preferredTextLanguage;a.Yb=a.h.preferredTextRole;a.Xb=a.h.preferForcedSubs;Vl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.u.init(function(y,x,D){a.j&&y!=a.j.l&&Wl(a,y,!0,void 0===
394
+ x?!1:x,void 0===D?0:D)});a.C=Xl(a,b.startTime);a.yb=Yl(a);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Zl(a,k);Bd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=$l(a);a.j.configure(a.h.streaming);a.l=am;d.textTracks&&a.o.A(d.textTracks,"addtrack",function(y){if(y.track)switch(y=y.track,y.kind){case "chapters":bm(a,y)}});a.dispatchEvent(rl(cm));l=null;if(m=a.jb().find(function(y){return y.active})){w.B(2);break}l=
395
+ dm(a)?a.u.chooseVariant():null;Wl(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){w.B(3);break}n=a.C.xc();return u(w,em(l,n),4);case 4:p=w.h,a.C.od(p);case 3:fm(a,null,$d(l));case 2:return a.C.nd(),q=a.ib().find(function(y){return y.active}),q||((v=je(a.i.textStreams,a.wb,a.Yb,a.Xb)[0]||null)&&bl(a.s.h,v,!0),l&&(v?(l.audio&&gm(a,l.audio,v)&&(a.ea=!0),a.ea&&a.N.m.setTextVisibility(!0),hm(a)):a.ea=!1),v&&(a.h.streaming.alwaysStreamText||a.ud())&&Ij(a.j,v)),u(w,a.j.start(),5);case 5:a.h.abr.enabled&&
396
+ (a.u.enable(),im(a)),Rd(a.j?a.j.l:null,a.i),jm(a.i),km(a),dm(a),a.i.variants.some(function(y){return y.primary}),a.o.ka(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-c.$d}),A(w)}})}
397
397
  function ol(a,b,c){var d,e,f,g,h,k,l;return L(function(m){return 1==m.g?(d=qc,e=Date.now()/1E3,f=!0,a.m=Pl(a,{nb:a.F,onError:function(n){Dl(a,n)},Pc:function(n){Ql(a,n)},onExpirationUpdated:function(n,p){Rl(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==Sl&&f&&(f=!1,a.s.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=Cg(g),k=Bl[h],"application/x-mpegurl"==k&&Cc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
398
398
  createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?ed(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Na,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.W=!0,u(m,Wf(a.m,[l],[]),2)):u(m,a.m.Wb(b.J),
399
399
  0)})}
400
400
  function pl(a,b,c){function d(){return Tl(a)}b.uri=c.uri;b.startTime=c.startTime;a.Ub=b.uri;var e=b.J;a.C=new Yi(e);var f=!1;a.Vb.push(function(){f=!0});null!=b.startTime&&a.C.od(b.startTime);a.G=new hj({Jc:function(){return e.playbackRate},Fc:function(){return e.defaultPlaybackRate},Yd:function(k){e.playbackRate=k},te:function(k){e.currentTime+=k}});Zl(a,a.h.streaming.rebufferingGoal);a.o.A(e,"playing",d);a.o.A(e,"pause",d);a.o.A(e,"ended",d);a.o.A(e,"ratechange",function(){return Ul(a)});"none"!=e.preload&&
401
- a.o.oa(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-c.$d});e.audioTracks&&(a.o.A(e.audioTracks,"addtrack",function(){return km(a)}),a.o.A(e.audioTracks,"removetrack",function(){return km(a)}),a.o.A(e.audioTracks,"change",function(){return km(a)}));e.textTracks&&(a.o.A(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":lm(a,k);break;case "chapters":bm(a,k);break;default:km(a)}}),a.o.A(e.textTracks,"removetrack",function(){return km(a)}),a.o.A(e.textTracks,
402
- "change",function(){return km(a)}));var g=Cg(b.uri);e.src=Gk(a.W,b.uri,Bl[g]);(zc()||Ac())&&e.load();a.l=mm;a.dispatchEvent(rl(cm));var h=new rc;Pi(e,HTMLMediaElement.HAVE_METADATA,a.o,function(){a.C.nd();h.resolve()});Pi(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.o,function(){var k;return L(function(l){if(1==l.g)return nm(a),k=om(a),k.find(function(m){return"disabled"!=m.mode})?(0<k.length&&(a.ea=!0),l.B(2)):u(l,new Promise(function(m){a.o.oa(e.textTracks,"change",m);(new O(m)).S(1)}),2);if(f)return l["return"]();
403
- pm(a);A(l)})});e.error?h.reject(Cl(a)):"none"==e.preload&&(Ua('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.o.oa(e,"error",function(){h.reject(Cl(a))});return new Fe(h,function(){h.reject(new N(2,7,7001));return Promise.resolve()})}
401
+ a.o.ka(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-c.$d});e.audioTracks&&(a.o.A(e.audioTracks,"addtrack",function(){return km(a)}),a.o.A(e.audioTracks,"removetrack",function(){return km(a)}),a.o.A(e.audioTracks,"change",function(){return km(a)}));e.textTracks&&(a.o.A(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":lm(a,k);break;case "chapters":bm(a,k);break;default:km(a)}}),a.o.A(e.textTracks,"removetrack",function(){return km(a)}),a.o.A(e.textTracks,
402
+ "change",function(){return km(a)}));var g=Cg(b.uri);e.src=Gk(a.W,b.uri,Bl[g]);(zc()||Ac())&&e.load();a.l=mm;a.dispatchEvent(rl(cm));var h=new rc;Pi(e,HTMLMediaElement.HAVE_METADATA,a.o,function(){a.C.nd();h.resolve()});Pi(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.o,function(){var k;return L(function(l){if(1==l.g)return nm(a),k=om(a),k.find(function(m){return"disabled"!=m.mode})?(0<k.length&&(a.ea=!0),l.B(2)):u(l,new Promise(function(m){a.o.ka(e.textTracks,"change",m);(new O(m)).S(1)}),2);if(f)return l["return"]();
403
+ pm(a);A(l)})});e.error?h.reject(Cl(a)):"none"==e.preload&&(Ua('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.o.ka(e,"error",function(){h.reject(Cl(a))});return new Fe(h,function(){h.reject(new N(2,7,7001));return Promise.resolve()})}
404
404
  function nm(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Td(b);var c=a.h.preferredVariantRole;""!=c&&a.Td(b,c)}}function pm(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.Ud(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.Ud(b,d,c)}}
405
405
  function lm(a,b){if("metadata"==b.kind){b.mode="hidden";a.o.A(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Hl(a,e.startTime,e.endTime,e.type,e.value),a.D)a.D.onCueMetadataChange(e.value)});var c=(new O(function(){var d=qm(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Nb().S(.5);a.Vb.push(function(){c.stop()})}}
406
406
  function Hl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(rl(rm,b))}function bm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new O(function(){b.mode="hidden"})).Nb().S(.5);a.Vb.push(function(){c.stop()})}}function Ol(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}function Pl(a,b){return new Pf(b,a.h.drm.updateExpirationTime)}
@@ -409,48 +409,49 @@ function Xl(a,b){return new Zi(a.g,a.i,a.h.streaming,b,function(){a.yb&&kj(a.yb,
409
409
  g.next())Nh(h.value)}}a.L&&um(a)},function(c){return a.dispatchEvent(c)})}function Yl(a){var b=new qj(a.ya);b.addEventListener("enter",function(d){Il(a,vm,d.region)});b.addEventListener("exit",function(d){Il(a,wm,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Il(a,vm,e),Il(a,wm,e))});var c=new jj(a.g);c.g.add(b);a.xa&&c.g.add(a.xa);return c}function Zl(a,b){a.L=new ye;a.L.g=Ae;Be(a.L,b,Math.min(.5,b/2));Fl(a);a.Dc=(new O(function(){um(a)})).Da(.25)}
410
410
  function um(a){switch(a.l){case mm:if(a.g.ended)var b=!0;else{var c=di(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case am:a:if(a.g.ended||ri(a.N))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.hb();var d=di(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=fi(a.g.buffered,a.g.currentTime);c=a.L;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?ze:Ae;c.g=d;b!=d&&Fl(a)}function Gl(a,b,c,d){return new ii(a,b,c,d)}
411
411
  function zl(a){return new uk({getBandwidthEstimate:function(){return a.u?a.u.getBandwidthEstimate():NaN},Ya:function(){return a.Ya()},getCurrentTime:function(){return a.g?a.g.currentTime:0},jb:function(){return a.jb()},Hc:function(){return a.Hc()},U:function(){return a.U()}},a.h.cmcd)}
412
- function $l(a){return new wj(a.i,{Ic:function(){return a.C.xc()},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},modifySegmentRequest:function(b,c){vk(a.W,b,c)},R:a.N,nb:a.F,onError:function(b){return Dl(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Kf:function(){a.I&&a.I.update&&a.I.update()},Md:function(){a.C&&a.C.ue();um(a)},Jf:function(b,c){var d=c.Ed;d&&a.xa&&nj(a.xa,d,b)}})}
412
+ function $l(a){return new wj(a.i,{Ic:function(){return a.C.xc()},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},modifySegmentRequest:function(b,c){vk(a.W,b,c)},R:a.N,nb:a.F,onError:function(b){return Dl(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Jf:function(){a.I&&a.I.update&&a.I.update()},Md:function(){a.C&&a.C.ue();um(a)},If:function(b,c){var d=c.Ed;d&&a.xa&&nj(a.xa,d,b)}})}
413
413
  r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Rk(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Kb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=
414
414
  0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=Wk(this.h,a,el(this));xm(this);return c};
415
- function xm(a){if(a.I){var b=Oe(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.I.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{ym(a,a.i)}catch(f){Dl(a,f)}a.u&&dm(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||zm(a)}a.F&&a.F.Wd(a.h.streaming.forceHTTPS);if(a.N&&(b=a.h.textDisplayFactory,a.xd!=b)){var c=Sb(b),d=a.N,e=d.l;d.l=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=c);a.xd=b;a.j&&(b=a.j,(c=b.j.get(pc))&&
415
+ function xm(a){if(a.I){var b=Oe(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.I.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{ym(a,a.i)}catch(f){Dl(a,f)}a.u&&dm(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||zm(a)}a.F&&a.F.Wd(a.h.streaming.forceHTTPS);if(a.N&&(b=a.h.textDisplayFactory,a.xd!=b)){var c=Rb(b),d=a.N,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=c);a.xd=b;a.j&&(b=a.j,(c=b.j.get(pc))&&
416
416
  Gj(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.h.abr),a.h.abr.enabled?a.u.enable():a.u.disable(),im(a));a.L&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Be(a.L,b,Math.min(.5,b/2)));a.i&&Vl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}r.getConfiguration=function(){var a=el(this);Wk(a,this.h,el(this));return a};
417
- r.bf=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.mc().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};r.Uf=function(){for(var a in this.h)delete this.h[a];Wk(this.h,el(this),el(this));xm(this)};r.hf=function(){return this.l};r.mf=function(){return this.g};r.dc=function(){return this.F};r.rd=function(){return this.Ub};
418
- r.me=function(){return this.D?this.D:null};r.U=function(){return this.i?this.i.presentationTimeline.U():this.g&&this.g.src?Infinity==this.g.duration:!1};r.mb=function(){return this.i?this.i.presentationTimeline.mb():!1};r.Cf=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
419
- r.mc=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.Db(),end:a.Qa()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};r.Af=function(){this.U()&&(this.g.currentTime=this.mc().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.m?this.m.g:null};r.cc=function(){return this.m?this.m.cc():Infinity};r.Gc=function(){return this.m?this.m.Gc():{}};
420
- r.sd=function(){return this.L?this.L.g==Ae:!1};r.Hc=function(){return this.g?this.G?this.G.i:1:0};r.cg=function(a){0==a?Ua("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.G.set(a),this.l==am&&(this.u.playbackRateChanged(a),Fj(this.j,1<Math.abs(a))))};r.Se=function(){var a=this.G.Fc();this.l==mm&&this.G.set(a);this.l==am&&(this.G.set(a),this.u.playbackRateChanged(a),Fj(this.j,!1))};
417
+ r.af=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.mc().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};r.Tf=function(){for(var a in this.h)delete this.h[a];Wk(this.h,el(this),el(this));xm(this)};r.gf=function(){return this.l};r.lf=function(){return this.g};r.dc=function(){return this.F};r.rd=function(){return this.Ub};
418
+ r.me=function(){return this.D?this.D:null};r.U=function(){return this.i?this.i.presentationTimeline.U():this.g&&this.g.src?Infinity==this.g.duration:!1};r.mb=function(){return this.i?this.i.presentationTimeline.mb():!1};r.Bf=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
419
+ r.mc=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.Db(),end:a.Pa()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};r.zf=function(){this.U()&&(this.g.currentTime=this.mc().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.m?this.m.g:null};r.cc=function(){return this.m?this.m.cc():Infinity};r.Gc=function(){return this.m?this.m.Gc():{}};
420
+ r.sd=function(){return this.L?this.L.g==Ae:!1};r.Hc=function(){return this.g?this.G?this.G.i:1:0};r.bg=function(a){0==a?Ua("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.G.set(a),this.l==am&&(this.u.playbackRateChanged(a),Fj(this.j,1<Math.abs(a))))};r.Re=function(){var a=this.G.Fc();this.l==mm&&this.G.set(a);this.l==am&&(this.G.set(a),this.u.playbackRateChanged(a),Fj(this.j,!1))};
421
421
  r.jb=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,he(e)){var f=$d(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return ge(g)}):[]};
422
- r.ib=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=ae(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?om(this).map(function(f){return ee(f)}):[]};r.ff=function(){return this.i?this.i.imageStreams.map(function(a){return be(a)}):[]};
423
- r.wf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,D,z,B;return L(function(F){if(1==F.g)return c.i?(d=c.i.imageStreams.find(function(G){return G.id==a}))?d.segmentIndex?F.B(3):u(F,d.createSegmentIndex(),3):F["return"](null):F.B(2);if(2!=F.g){e=d.segmentIndex.find(b);if(null==e)return F["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return F["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;q=l/n;
424
- v=m*n;w=f.l-f.startTime;x=f.i||w/v;y=f.startTime;z=D=0;1<v&&(B=Math.floor((b-f.startTime)/x),y=f.startTime+B*x,D=B%m*p,z=Math.floor(B/m)*q);return F["return"]({imageHeight:l,imageWidth:k,height:q,positionX:D,positionY:z,startTime:y,duration:x,uris:f.sa(),width:p})}return F["return"](null)})};
425
- r.Be=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(bl(this.s.h,b,!1),Ij(this.j,b),Am(this),this.wb=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=om(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,ce(c)==a.id?c.mode=this.ea?"showing":"hidden":c.mode="disabled";Am(this)}};
426
- r.Ce=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Ua("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&he(d)&&(Wl(this,d,!1,b,c),this.Ma=new te(d),dm(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,
427
- ce(c)==a.id){Bm(this,c);break}};r.af=function(){return Cm(this.jb())};r.vf=function(){return Cm(this.ib())};r.$e=function(){return Array.from(Dm(this.jb()))};r.uf=function(){return Array.from(Dm(this.ib()))};
428
- r.Td=function(a,b){if(this.i&&this.C){this.Ma=new ue(a,b||"",0,"");var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.j.l,e=this.Ma.create(this.i.variants),f=null;e=t(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;f?(c=$d(f),this.Ce(c,!0)):zm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=rd(a);f=d=null;e=
422
+ r.ib=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=ae(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?om(this).map(function(f){return ee(f)}):[]};r.ef=function(){return this.i?this.i.imageStreams.map(function(a){return be(a)}):[]};
423
+ r.vf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,v,w,y,x,D,z,B;return L(function(E){if(1==E.g)return c.i?(d=c.i.imageStreams.find(function(G){return G.id==a}))?d.segmentIndex?E.B(3):u(E,d.createSegmentIndex(),3):E["return"](null):E.B(2);if(2!=E.g){e=d.segmentIndex.find(b);if(null==e)return E["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return E["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;q=l/n;
424
+ v=m*n;w=f.l-f.startTime;y=f.i||w/v;x=f.startTime;z=D=0;1<v&&(B=Math.floor((b-f.startTime)/y),x=f.startTime+B*y,D=B%m*p,z=Math.floor(B/m)*q);return E["return"]({imageHeight:l,imageWidth:k,height:q,positionX:D,positionY:z,startTime:x,duration:y,uris:f.sa(),width:p})}return E["return"](null)})};
425
+ r.Ae=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(bl(this.s.h,b,!1),Ij(this.j,b),Am(this),this.wb=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=om(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,ce(c)==a.id?c.mode=this.ea?"showing":"hidden":c.mode="disabled";Am(this)}};
426
+ r.Be=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Ua("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&he(d)&&(Wl(this,d,!1,b,c),this.Ma=new te(d),dm(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,
427
+ ce(c)==a.id){Bm(this,c);break}};r.$e=function(){return Cm(this.jb())};r.uf=function(){return Cm(this.ib())};r.Ze=function(){return Array.from(Dm(this.jb()))};r.tf=function(){return Array.from(Dm(this.ib()))};
428
+ r.Td=function(a,b){if(this.i&&this.C){this.Ma=new ue(a,b||"",0,"");var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.j.l,e=this.Ma.create(this.i.variants),f=null;e=t(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;f?(c=$d(f),this.Be(c,!0)):zm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=rd(a);f=d=null;e=
429
429
  t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=ge(g);rd(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?Bm(this,f):d&&Bm(this,d)}};
430
- r.Ud=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.wb=a,this.Yb=b||"",this.Xb=c,(a=je(this.i.textStreams,this.wb,this.Yb,this.Xb)[0]||null)&&a!=this.j.o&&(bl(this.s.h,a,!1),this.h.streaming.alwaysStreamText||this.ud()))Ij(this.j,a),Am(this)}else{var d=rd(a);(a=this.ib().find(function(e){return rd(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Be(a)}};
431
- r.Vf=function(a){if(this.i&&this.C){for(var b=null,c=t(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.Ma=new ue(b.language,"",0,a),zm(this))}};r.ud=function(){var a=this.ea;return this.N?this.N.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?om(this).some(function(b){return"showing"==b.mode}):a};r.ne=function(){return this.g&&this.g.src&&this.g.textTracks?Em(this).map(function(a){return ee(a)}):[]};
432
- r.cf=function(a){var b=rd(a),c=Em(this).filter(function(h){return rd(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
430
+ r.Ud=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.wb=a,this.Yb=b||"",this.Xb=c,(a=je(this.i.textStreams,this.wb,this.Yb,this.Xb)[0]||null)&&a!=this.j.o&&(bl(this.s.h,a,!1),this.h.streaming.alwaysStreamText||this.ud()))Ij(this.j,a),Am(this)}else{var d=rd(a);(a=this.ib().find(function(e){return rd(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Ae(a)}};
431
+ r.Uf=function(a){if(this.i&&this.C){for(var b=null,c=t(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.Ma=new ue(b.language,"",0,a),zm(this))}else if(this.g&&this.g.audioTracks){c=Array.from(this.g.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&Bm(this,b)}};
432
+ r.ud=function(){var a=this.ea;return this.N?this.N.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?om(this).some(function(b){return"showing"==b.mode}):a};r.ne=function(){return this.g&&this.g.src&&this.g.textTracks?Em(this).map(function(a){return ee(a)}):[]};
433
+ r.bf=function(a){var b=rd(a),c=Em(this).filter(function(h){return rd(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
433
434
  function om(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function qm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Em(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
434
- r.ag=function(a){a=!!a;if(this.ea!=a){this.ea=a;if(this.l==am)this.N.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=je(this.i.textStreams,this.wb,this.Yb,this.Xb),0<a.length&&(Ij(this.j,a[0]),Am(this))):Ej(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=om(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}hm(this)}};
435
- r.qf=function(){if(!this.U())return null;var a=this.Ga.l,b=0;if(this.C)b=this.C.xc();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
435
+ r.$f=function(a){a=!!a;if(this.ea!=a){this.ea=a;if(this.l==am)this.N.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=je(this.i.textStreams,this.wb,this.Yb,this.Xb),0<a.length&&(Ij(this.j,a[0]),Am(this))):Ej(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=om(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}hm(this)}};
436
+ r.pf=function(){if(!this.U())return null;var a=this.Ga.l,b=0;if(this.C)b=this.C.xc();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
436
437
  r.oe=function(){if(!this.U())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};r.Ya=function(){if(this.l==am)return this.N.Ya();var a={total:[],audio:[],video:[],text:[]};this.l==mm&&(a.total=gi(this.g.buffered));return a};
437
438
  r.getStats=function(){if(this.l!=am&&this.l!=mm)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Tl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.s;b=Math.round(100*b);c.i=isNaN(c.i)?
438
439
  b:Math.max(c.i,b)}if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.N=Number(c.droppedVideoFrames);b.L=d;this.s.I=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.G?c.G:NaN):c=NaN;this.s.s=c;if(this.l==am){if(c=this.j.l)this.s.C=(this.G?this.G.i:1)*c.bandwidth;c&&c.video&&(b=this.s,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.U()&&(c=this.oe().valueOf()+1E3*this.mc().end,this.s.D=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&
439
- (this.s.G=this.i.presentationTimeline.g);c=this.u.getBandwidthEstimate();this.s.u=c}this.l==mm&&(c=this.s,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var e=this.s;a=e.o;c=e.l;b=e.C;d=e.L;var f=e.N,g=e.I,h=e.u,k=e.i,l=e.m,m=e.F,n=e.j,p=Zk(e.g,"playing"),q=Zk(e.g,"paused"),v=Zk(e.g,"buffering"),w=e.s,x=e.D,y=e.G,D=$k(e.g),z=[];e=t(e.h.g);for(var B=e.next();!B.done;B=e.next())B=B.value,z.push({timestamp:B.timestamp,id:B.id,type:B.type,fromAdaptation:B.fromAdaptation,bandwidth:B.bandwidth});return{width:a,
440
- height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:q,bufferingTime:v,licenseTime:w,liveLatency:x,maxSegmentDuration:y,stateHistory:D,switchHistory:z}};
440
+ (this.s.G=this.i.presentationTimeline.g);c=this.u.getBandwidthEstimate();this.s.u=c}this.l==mm&&(c=this.s,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var e=this.s;a=e.o;c=e.l;b=e.C;d=e.L;var f=e.N,g=e.I,h=e.u,k=e.i,l=e.m,m=e.F,n=e.j,p=Zk(e.g,"playing"),q=Zk(e.g,"paused"),v=Zk(e.g,"buffering"),w=e.s,y=e.D,x=e.G,D=$k(e.g),z=[];e=t(e.h.g);for(var B=e.next();!B.done;B=e.next())B=B.value,z.push({timestamp:B.timestamp,id:B.id,type:B.type,fromAdaptation:B.fromAdaptation,bandwidth:B.bandwidth});return{width:a,
441
+ height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:q,bufferingTime:v,licenseTime:w,liveLatency:y,maxSegmentDuration:x,stateHistory:D,switchHistory:z}};
441
442
  r.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;Kb("addTextTrack","Please use an addTextTrackAsync.");if(this.l!=am&&this.l!=mm)throw new N(1,7,7004);if(!d){var h=Cg(a);d=Fm[h];if(!d)throw new N(1,2,2011,h);}if(this.l==mm){if("text/vtt"!=d)throw new N(1,2,2013,d);g&&(c="forced");d=document.createElement("track");d.src=Lk(this.W,a);d.label=f||"";d.kind=c;d.srclang=b;this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous");this.g.appendChild(d);if(a=this.ib().find(function(k){return k.language==
442
443
  b&&k.label==(f||"")&&k.kind==c}))return km(this),a;throw new N(1,2,2012);}h=this.i.presentationTimeline.getDuration();if(Infinity==h)throw new N(1,4,4033);a={id:this.Kd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:fj(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:pc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
443
444
  closedCaptions:null};if(!gd(ad(a.mimeType,a.codecs)))throw new N(2,2,2014,d);this.i.textStreams.push(a);km(this);return ae(a)};
444
- r.Oe=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,q,v,w,x,y,D;return L(function(z){switch(z.g){case 1:if(h.l!=am&&h.l!=mm)throw new N(1,7,7004);if(d){z.B(2);break}return u(z,Gm(h,a),3);case 3:d=z.h;case 2:k=[];if(h.D)try{k=h.D.getServerSideCuePoints()}catch(B){}if(h.l!=mm){z.B(4);break}g&&(c="forced");return u(z,Hm(h,a,b,c,d,f||"",k),5);case 5:l=h.ib();if(m=l.find(function(B){return B.language==b&&B.label==(f||"")&&B.kind==c}))return km(h),z["return"](m);throw new N(1,2,2012);case 4:n=
445
- qc;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new N(1,4,4033);if(!k.length){z.B(6);break}return u(z,Im(h,a,h.F,h.h.streaming.retryParameters),7);case 7:q=z.h,v=Jm(h,q,d,k),w=new Blob([v],{type:"text/vtt"}),a=oi(w),d="text/vtt";case 6:x={id:h.Kd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:fj(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.Z,primary:!1,trickModeVideo:null,
446
- emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};y=ad(x.mimeType,x.codecs);D=gd(y);if(!D)throw new N(2,2,2014,d);h.i.textStreams.push(x);km(h);return z["return"](ae(x))}})};
447
- r.Ne=function(a,b,c){var d=this,e,f,g,h;return L(function(k){switch(k.g){case 1:if(d.l!=am&&d.l!=mm)throw new N(1,7,7004);if(c){k.B(2);break}return u(k,Gm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.D)try{e=d.D.getServerSideCuePoints()}catch(l){}return u(k,Hm(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.ne();h=g.find(function(l){return l.language==b});if(!h){k.B(5);break}return u(k,new Promise(function(l,m){d.o.oa(f,"load",l);d.o.oa(f,"error",function(){m(new N(1,2,2015))})}),6);case 6:return k["return"](h);
448
- case 5:throw new N(1,2,2012);}})};function Gm(a,b){var c,d;return L(function(e){switch(e.g){case 1:c=Cg(b);if(d=Fm[c])return e["return"](d);C(e,2);return u(e,Eg(b,a.F,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:E(e);case 3:if(d)return e["return"](d);throw new N(1,2,2011,c);}})}
445
+ r.Ne=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,q,v,w,y,x,D;return L(function(z){switch(z.g){case 1:if(h.l!=am&&h.l!=mm)throw new N(1,7,7004);if(d){z.B(2);break}return u(z,Gm(h,a),3);case 3:d=z.h;case 2:k=[];if(h.D)try{k=h.D.getServerSideCuePoints()}catch(B){}if(h.l!=mm){z.B(4);break}g&&(c="forced");return u(z,Hm(h,a,b,c,d,f||"",k),5);case 5:l=h.ib();if(m=l.find(function(B){return B.language==b&&B.label==(f||"")&&B.kind==c}))return km(h),z["return"](m);throw new N(1,2,2012);case 4:n=
446
+ qc;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new N(1,4,4033);if(!k.length){z.B(6);break}return u(z,Im(h,a,h.F,h.h.streaming.retryParameters),7);case 7:q=z.h,v=Jm(h,q,d,k),w=new Blob([v],{type:"text/vtt"}),a=oi(w),d="text/vtt";case 6:y={id:h.Kd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:fj(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.Z,primary:!1,trickModeVideo:null,
447
+ emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};x=ad(y.mimeType,y.codecs);D=gd(x);if(!D)throw new N(2,2,2014,d);h.i.textStreams.push(y);km(h);return z["return"](ae(y))}})};
448
+ r.Me=function(a,b,c){var d=this,e,f,g,h;return L(function(k){switch(k.g){case 1:if(d.l!=am&&d.l!=mm)throw new N(1,7,7004);if(c){k.B(2);break}return u(k,Gm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.D)try{e=d.D.getServerSideCuePoints()}catch(l){}return u(k,Hm(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.ne();h=g.find(function(l){return l.language==b});if(!h){k.B(5);break}return u(k,new Promise(function(l,m){d.o.ka(f,"load",l);d.o.ka(f,"error",function(){m(new N(1,2,2015))})}),6);case 6:return k["return"](h);
449
+ case 5:throw new N(1,2,2012);}})};function Gm(a,b){var c,d;return L(function(e){switch(e.g){case 1:c=Cg(b);if(d=Fm[c])return e["return"](d);C(e,2);return u(e,Eg(b,a.F,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:F(e);case 3:if(d)return e["return"](d);throw new N(1,2,2011,c);}})}
449
450
  function Hm(a,b,c,d,e,f,g){var h,k,l,m;return L(function(n){if(1==n.g)return"text/vtt"!=e||g.length?u(n,Im(a,b,a.F,a.h.streaming.retryParameters),3):n.B(2);2!=n.g&&(h=n.h,k=Jm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=oi(l),e="text/vtt");m=document.createElement("track");m.src=Lk(a.W,b);m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n["return"](m)})}
450
451
  function Im(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){e=bf;f=We([b],d);f.method="GET";var k=a.W;try{k.g.enabled&&Fk(k,f,{ot:Mk,su:!0})}catch(l){Va("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return u(h,c.request(e,f).promise,2)}g=h.h;return h["return"](g.data)})}function Jm(a,b,c,d){var e=hd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration},b=Fb(b),b=c.parseMedia(b,a),tk(b,d);throw new N(2,2,2014,c);}
451
452
  r.Xd=function(a,b){this.Hd.width=a;this.Hd.height=b};r.Rd=function(a){if(this.l==am){var b=this.j;a=void 0===a?.1:a;if(b.i.g)b=!1;else if(b.s)b=!1;else{for(var c=t(b.j.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.hc||d.ta||d.La||(d.hc=!1,Dj(b,d,a));b=!0}}else b=!1;return b};
452
- r.jf=function(){Ua("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};r.kf=function(){return this.Lc};
453
- function el(a){var b=Uk();b.streaming.failureCallback=function(c){if(a.U()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Rd(d))}};b.textDisplayFactory=function(){return a.Cc?new lk(a.g,a.Cc):new gk(a.g)};return b}r.Ge=function(a){this.Cc=a};
453
+ r.hf=function(){Ua("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};r.jf=function(){return this.Lc};
454
+ function el(a){var b=Uk();b.streaming.failureCallback=function(c){if(a.U()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Rd(d))}};b.textDisplayFactory=function(){return a.Cc?new lk(a.g,a.Cc):new gk(a.g)};return b}r.Fe=function(a){this.Cc=a};
454
455
  function Ml(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new gj;h={id:a.Kd++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
455
456
  segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:pc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}function Ll(a,b){return L(function(c){if(1==c.g)return u(c,Km(a,b),2);ym(a,b);A(c)})}
456
457
  function Km(a,b){var c;return L(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,Pd(c,b),2);jm(b);A(d)})}
@@ -464,38 +465,38 @@ function gm(a,b,c){a=rd(a.h.preferredTextLanguage);b=rd(b.language);c=rd(c.langu
464
465
  function Dl(a,b){if(a.l!=ul){var c=rl(Wm,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Il(a,b,c){c=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement});a.dispatchEvent(rl(b,c))}
465
466
  function Cl(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new N(2,3,3016,b,c,a.g.error.message)}
466
467
  function Ql(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=t(a.i.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=t(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!Xm.includes(l)}h!=f.allowedByKeySystem&&
467
- (e=!0)}}}if(!e||dm(a))(d=a.j.l)&&!d.allowedByKeySystem&&zm(a),e&&km(a)}}function Rl(a,b,c){if(a.I&&a.I.onExpirationUpdated)a.I.onExpirationUpdated(b,c);b=rl(Ym);a.dispatchEvent(b)}function Vl(a,b,c){0<b&&(a.U()||a.Fe(b));b=a.getDuration();c<b&&(a.U()||a.Ja(c))}
468
+ (e=!0)}}}if(!e||dm(a))(d=a.j.l)&&!d.allowedByKeySystem&&zm(a),e&&km(a)}}function Rl(a,b,c){if(a.I&&a.I.onExpirationUpdated)a.I.onExpirationUpdated(b,c);b=rl(Ym);a.dispatchEvent(b)}function Vl(a,b,c){0<b&&(a.U()||a.Ee(b));b=a.getDuration();c<b&&(a.U()||a.Ja(c))}
468
469
  function Lm(a,b){var c=a.m?a.m.Gc():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=t(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=t(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=t(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var q=c[d?"00":p];q?Xm.includes(q)&&h.add(q):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
469
470
  missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new N(2,4,4012,c);}function jm(a){if(!a.variants.some(he))throw new N(2,4,4032);}function Qm(a,b){L(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=ul&&a.dispatchEvent(b);A(c)})}function Dm(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(rd(c.language)):b.add("und");return b}
470
471
  function Cm(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=rd(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){for(var m=t(k),n=m.next();!n.done;n=m.next()){n=n.value;var p=null;c.has(l)&&c.get(l).has(n)&&(p=c.get(l).get(n));
471
- h.push({language:l,role:n,label:p})}});return h}function vl(){return new N(2,7,7E3)}function ql(a,b,c,d,e,f){return d==a&&e.J==f.J&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function ak(){return{J:null,mimeType:null,startTime:null,$d:NaN,uri:null}}function wl(a){return new Promise(function(b,c){a.pb=function(){return c(vl())};a.Oc=function(){return b()};a.onError=function(d){return c(d)};a.Qc=function(){return c(vl())}})}M("shaka.Player",U);U.prototype.setVideoContainer=U.prototype.Ge;
472
- U.prototype.getManifestParserFactory=U.prototype.kf;U.prototype.getManifest=U.prototype.jf;U.prototype.retryStreaming=U.prototype.Rd;U.prototype.setMaxHardwareResolution=U.prototype.Xd;U.prototype.addChaptersTrack=U.prototype.Ne;U.prototype.addTextTrackAsync=U.prototype.Oe;U.prototype.addTextTrack=U.prototype.addTextTrack;U.prototype.getStats=U.prototype.getStats;U.prototype.getBufferedInfo=U.prototype.Ya;U.prototype.getPresentationStartTimeAsDate=U.prototype.oe;
473
- U.prototype.getPlayheadTimeAsDate=U.prototype.qf;U.prototype.setTextTrackVisibility=U.prototype.ag;U.prototype.getChapters=U.prototype.cf;U.prototype.getChaptersTracks=U.prototype.ne;U.prototype.isTextTrackVisible=U.prototype.ud;U.prototype.selectVariantsByLabel=U.prototype.Vf;U.prototype.selectTextLanguage=U.prototype.Ud;U.prototype.selectAudioLanguage=U.prototype.Td;U.prototype.getTextLanguages=U.prototype.uf;U.prototype.getAudioLanguages=U.prototype.$e;U.prototype.getTextLanguagesAndRoles=U.prototype.vf;
474
- U.prototype.getAudioLanguagesAndRoles=U.prototype.af;U.prototype.selectVariantTrack=U.prototype.Ce;U.prototype.selectTextTrack=U.prototype.Be;U.prototype.getThumbnails=U.prototype.wf;U.prototype.getImageTracks=U.prototype.ff;U.prototype.getTextTracks=U.prototype.ib;U.prototype.getVariantTracks=U.prototype.jb;U.prototype.cancelTrickPlay=U.prototype.Se;U.prototype.trickPlay=U.prototype.cg;U.prototype.getPlaybackRate=U.prototype.Hc;U.prototype.isBuffering=U.prototype.sd;U.prototype.getKeyStatuses=U.prototype.Gc;
475
- U.prototype.getExpiration=U.prototype.cc;U.prototype.drmInfo=U.prototype.drmInfo;U.prototype.keySystem=U.prototype.keySystem;U.prototype.goToLive=U.prototype.Af;U.prototype.seekRange=U.prototype.mc;U.prototype.isAudioOnly=U.prototype.Cf;U.prototype.isInProgress=U.prototype.mb;U.prototype.isLive=U.prototype.U;U.prototype.getAdManager=U.prototype.me;U.prototype.getAssetUri=U.prototype.rd;U.prototype.getNetworkingEngine=U.prototype.dc;U.prototype.getMediaElement=U.prototype.mf;
476
- U.prototype.getLoadMode=U.prototype.hf;U.prototype.resetConfiguration=U.prototype.Uf;U.prototype.getBufferFullness=U.prototype.bf;U.prototype.getConfiguration=U.prototype.getConfiguration;U.prototype.configure=U.prototype.configure;U.prototype.load=U.prototype.load;U.prototype.updateStartTime=U.prototype.hg;U.prototype.unload=U.prototype.ce;U.prototype.detach=U.prototype.detach;U.prototype.attach=U.prototype.Wb;
472
+ h.push({language:l,role:n,label:p})}});return h}function vl(){return new N(2,7,7E3)}function ql(a,b,c,d,e,f){return d==a&&e.J==f.J&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function ak(){return{J:null,mimeType:null,startTime:null,$d:NaN,uri:null}}function wl(a){return new Promise(function(b,c){a.pb=function(){return c(vl())};a.Oc=function(){return b()};a.onError=function(d){return c(d)};a.Qc=function(){return c(vl())}})}M("shaka.Player",U);U.prototype.setVideoContainer=U.prototype.Fe;
473
+ U.prototype.getManifestParserFactory=U.prototype.jf;U.prototype.getManifest=U.prototype.hf;U.prototype.retryStreaming=U.prototype.Rd;U.prototype.setMaxHardwareResolution=U.prototype.Xd;U.prototype.addChaptersTrack=U.prototype.Me;U.prototype.addTextTrackAsync=U.prototype.Ne;U.prototype.addTextTrack=U.prototype.addTextTrack;U.prototype.getStats=U.prototype.getStats;U.prototype.getBufferedInfo=U.prototype.Ya;U.prototype.getPresentationStartTimeAsDate=U.prototype.oe;
474
+ U.prototype.getPlayheadTimeAsDate=U.prototype.pf;U.prototype.setTextTrackVisibility=U.prototype.$f;U.prototype.getChapters=U.prototype.bf;U.prototype.getChaptersTracks=U.prototype.ne;U.prototype.isTextTrackVisible=U.prototype.ud;U.prototype.selectVariantsByLabel=U.prototype.Uf;U.prototype.selectTextLanguage=U.prototype.Ud;U.prototype.selectAudioLanguage=U.prototype.Td;U.prototype.getTextLanguages=U.prototype.tf;U.prototype.getAudioLanguages=U.prototype.Ze;U.prototype.getTextLanguagesAndRoles=U.prototype.uf;
475
+ U.prototype.getAudioLanguagesAndRoles=U.prototype.$e;U.prototype.selectVariantTrack=U.prototype.Be;U.prototype.selectTextTrack=U.prototype.Ae;U.prototype.getThumbnails=U.prototype.vf;U.prototype.getImageTracks=U.prototype.ef;U.prototype.getTextTracks=U.prototype.ib;U.prototype.getVariantTracks=U.prototype.jb;U.prototype.cancelTrickPlay=U.prototype.Re;U.prototype.trickPlay=U.prototype.bg;U.prototype.getPlaybackRate=U.prototype.Hc;U.prototype.isBuffering=U.prototype.sd;U.prototype.getKeyStatuses=U.prototype.Gc;
476
+ U.prototype.getExpiration=U.prototype.cc;U.prototype.drmInfo=U.prototype.drmInfo;U.prototype.keySystem=U.prototype.keySystem;U.prototype.goToLive=U.prototype.zf;U.prototype.seekRange=U.prototype.mc;U.prototype.isAudioOnly=U.prototype.Bf;U.prototype.isInProgress=U.prototype.mb;U.prototype.isLive=U.prototype.U;U.prototype.getAdManager=U.prototype.me;U.prototype.getAssetUri=U.prototype.rd;U.prototype.getNetworkingEngine=U.prototype.dc;U.prototype.getMediaElement=U.prototype.lf;
477
+ U.prototype.getLoadMode=U.prototype.gf;U.prototype.resetConfiguration=U.prototype.Tf;U.prototype.getBufferFullness=U.prototype.af;U.prototype.getConfiguration=U.prototype.getConfiguration;U.prototype.configure=U.prototype.configure;U.prototype.load=U.prototype.load;U.prototype.updateStartTime=U.prototype.gg;U.prototype.unload=U.prototype.ce;U.prototype.detach=U.prototype.detach;U.prototype.attach=U.prototype.Wb;
477
478
  U.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return L(function(h){if(1==h.g)return b={},a?u(h,ug(),3):h.B(2);2!=h.g&&(b=h.h);var k={};if(uc()){for(var l in Bg)k[l]=!0;for(var m in Dg)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};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,k[n]=uc()?!!Bg[n]:vc(n);for(var p in l)k[p]=
478
- uc()?!!Dg[p]:vc(l[p]);c=k;k={};p=t('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",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",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(","));
479
+ uc()?!!Dg[p]:vc(l[p]);c=k;k={};p=t('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",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",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(","));
479
480
  for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=uc()?gd(l)?!0:MediaSource.isTypeSupported(l)||Xc(l):vc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Zm;for(g in f)e[g]=f[g]();return h["return"](e)})};
480
481
  U.isBrowserSupported=function(){window.Promise||Ua("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||yc("Trident/"))return!1;var a=Fc();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:uc()?!0:vc("application/x-mpegurl")};U.setAdManagerFactory=function(a){gl=a};
481
482
  U.registerSupportPlugin=function(a,b){Zm[a]=b};U.prototype.destroy=U.prototype.destroy;
482
- var Vm="abrstatuschanged",Pm="adaptation",Mm="buffering",tm="downloadfailed",sm="downloadheadersreceived",Sl="drmsessionupdate",Xj="emsg",Wm="error",Ym="expirationupdated",Al="loaded",xl="loading",Nl="manifestparsed",Kl="mediaqualitychanged",rm="metadata",sl="onstatechange",tl="onstateidle",Nm="ratechange",cm="streaming",Tm="textchanged",Um="texttrackvisibility",Jl="timelineregionadded",vm="timelineregionenter",wm="timelineregionexit",Rm="trackschanged",El="unloading",Sm="variantchanged",$m={jg:Vm,
483
- kg:Pm,lg:Mm,mg:tm,ng:sm,og:Sl,qg:Xj,Error:Wm,rg:Ym,sg:"largegap",tg:Al,ug:xl,vg:Nl,wg:Kl,Metadata:rm,yg:sl,zg:tl,Ag:Nm,Cg:"sessiondata",Dg:cm,Eg:Tm,Fg:Um,Gg:Jl,Hg:vm,Ig:wm,Jg:Rm,Kg:El,Lg:Sm},ul=0,dl=1,am=2,mm=3;U.LoadMode={DESTROYED:ul,NOT_LOADED:dl,MEDIA_SOURCE:am,SRC_EQUALS:mm};U.version="v3.3.18";var an=["3","3"];Lb=new function(a){this.g=a;this.i=Mb;this.h=Nb}(new Jb(Number(an[0]),Number(an[1])));
483
+ var Vm="abrstatuschanged",Pm="adaptation",Mm="buffering",tm="downloadfailed",sm="downloadheadersreceived",Sl="drmsessionupdate",Xj="emsg",Wm="error",Ym="expirationupdated",Al="loaded",xl="loading",Nl="manifestparsed",Kl="mediaqualitychanged",rm="metadata",sl="onstatechange",tl="onstateidle",Nm="ratechange",cm="streaming",Tm="textchanged",Um="texttrackvisibility",Jl="timelineregionadded",vm="timelineregionenter",wm="timelineregionexit",Rm="trackschanged",El="unloading",Sm="variantchanged",$m={ig:Vm,
484
+ jg:Pm,kg:Mm,lg:tm,mg:sm,ng:Sl,pg:Xj,Error:Wm,qg:Ym,rg:"largegap",sg:Al,tg:xl,ug:Nl,vg:Kl,Metadata:rm,xg:sl,yg:tl,zg:Nm,Bg:"sessiondata",Cg:cm,Dg:Tm,Eg:Um,Fg:Jl,Gg:vm,Hg:wm,Ig:Rm,Jg:El,Kg:Sm},ul=0,dl=1,am=2,mm=3;U.LoadMode={DESTROYED:ul,NOT_LOADED:dl,MEDIA_SOURCE:am,SRC_EQUALS:mm};U.version="v3.3.19";var an=["3","3"];Lb=new function(a){this.g=a;this.i=Mb;this.h=Nb}(new Jb(Number(an[0]),Number(an[1])));
484
485
  var Xm=["output-restricted","internal-error"],Zm={},gl=null,Bl={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},Fm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
485
486
  ssa:"text/x-ssa",ass:"text/x-ssa"};function bn(){this.h=[];this.j=this.i=this.g=0};function V(a,b){var c=this;this.h=a;this.g=b;this.i=!1;this.l=this.g.getVolume();this.j=new ef;this.j.A(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.i=!0});this.j.A(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.i=!1})}r=V.prototype;r.getDuration=function(){return this.h.getDuration()};r.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.g.getRemainingTime()};r.isPaused=function(){return this.i};
486
487
  r.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};r.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return this.g.getAdSkippableState()};r.skip=function(){return this.g.skip()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.resume()};r.getVolume=function(){return this.g.getVolume()};r.setVolume=function(a){return this.g.setVolume(a)};r.isMuted=function(){return 0==this.g.getVolume()};
487
488
  r.isLinear=function(){return this.h.isLinear()};r.resize=function(a,b){this.g.resize(a,b,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};r.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};r.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};r.release=function(){this.g=this.h=null};
488
489
  M("shaka.ads.ClientSideAd",V);V.prototype.release=V.prototype.release;V.prototype.getPositionInSequence=V.prototype.getPositionInSequence;V.prototype.getSequenceLength=V.prototype.getSequenceLength;V.prototype.setMuted=V.prototype.setMuted;V.prototype.resize=V.prototype.resize;V.prototype.isLinear=V.prototype.isLinear;V.prototype.isMuted=V.prototype.isMuted;V.prototype.setVolume=V.prototype.setVolume;V.prototype.getVolume=V.prototype.getVolume;V.prototype.play=V.prototype.play;V.prototype.pause=V.prototype.pause;
489
- V.prototype.skip=V.prototype.skip;V.prototype.canSkipNow=V.prototype.canSkipNow;V.prototype.getTimeUntilSkippable=V.prototype.getTimeUntilSkippable;V.prototype.isSkippable=V.prototype.isSkippable;V.prototype.isPaused=V.prototype.isPaused;V.prototype.getRemainingTime=V.prototype.getRemainingTime;V.prototype.getMinSuggestedDuration=V.prototype.getMinSuggestedDuration;V.prototype.getDuration=V.prototype.getDuration;function cn(a,b,c,d){var e=this;this.o=a;this.i=b;this.s=null;this.u=NaN;this.l=d;this.j=null;this.h=new ef;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v3.3.18");this.g=null;this.h.oa(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){dn(e,f)});this.h.A(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
490
+ V.prototype.skip=V.prototype.skip;V.prototype.canSkipNow=V.prototype.canSkipNow;V.prototype.getTimeUntilSkippable=V.prototype.getTimeUntilSkippable;V.prototype.isSkippable=V.prototype.isSkippable;V.prototype.isPaused=V.prototype.isPaused;V.prototype.getRemainingTime=V.prototype.getRemainingTime;V.prototype.getMinSuggestedDuration=V.prototype.getMinSuggestedDuration;V.prototype.getDuration=V.prototype.getDuration;function cn(a,b,c,d){var e=this;this.o=a;this.i=b;this.s=null;this.u=NaN;this.l=d;this.j=null;this.h=new ef;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v3.3.19");this.g=null;this.h.ka(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){dn(e,f)});this.h.A(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
490
491
  function(f){en(e,f)});this.h.A(this.i,"ended",function(){e.m.contentComplete()})}cn.prototype.stop=function(){this.g&&this.g.stop();this.o&&kk(this.o)};cn.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function en(a,b){b.getError();fn(a,null);a.l(new Q("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
491
492
  function dn(a,b){a.l(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.u)));a.g=b.getAdsManager(a.i);a.l(new Q("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){var d=[];c=t(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.l(new Q("ad-cue-points-changed",(new Map).set("cuepoints",d)))}gn(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
492
- a.h.A(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)),a.i.addEventListener("play",function(){a.g.start()},{once:!0})}catch(f){fn(a,null)}}
493
+ a.h.A(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)),a.h.ka(a.i,"play",function(){a.g.start()})}catch(f){fn(a,null)}}
493
494
  function gn(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.l(new Q(d,e))}a.h.A(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){en(a,c)});a.h.A(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){hn(a,c)});a.h.A(a.g,google.ima.AdEvent.Type.STARTED,function(c){hn(a,c)});a.h.A(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.A(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.A(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
494
495
  function(c){b(c,"ad-third-quartile")});a.h.A(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.A(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){fn(a,c)});a.h.A(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){fn(a,c)});a.h.A(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.A(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.A(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
495
496
  a.h.A(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j.i=!0;b(c,"ad-paused")});a.h.A(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j.i=!1;b(c,"ad-resumed")});a.h.A(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.A(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.A(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.A(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.A(a.g,
496
497
  google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.A(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.A(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.A(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.A(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.A(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.A(a.g,google.ima.AdEvent.Type.AD_METADATA,
497
498
  function(c){b(c,"ad-metadata")});a.h.A(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.A(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.A(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
498
- function hn(a,b){var c=b.getAd();a.j=new V(c,a.g);c=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b);a.l(new Q("ad-started",c));a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause(),a.j.setVolume(a.i.muted?0:a.i.volume))}function fn(a,b){a.l(new Q("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.i.ended||a.i.play())};function W(a,b){this.i=a;this.h=null;this.g=b}r=W.prototype;r.getDuration=function(){return this.h?this.h.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return this.i.isSkippable()};r.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
499
+ function hn(a,b){var c=b.getAd();a.j=new V(c,a.g);c=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b);a.l(new Q("ad-started",c));a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause(),a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))}function fn(a,b){a.l(new Q("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.i.ended||a.i.play())};function W(a,b){this.i=a;this.h=null;this.g=b}r=W.prototype;r.getDuration=function(){return this.h?this.h.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return this.i.isSkippable()};r.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
499
500
  r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.g.currentTime+=this.getRemainingTime()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.play()};r.getVolume=function(){return this.g.volume};r.setVolume=function(a){this.g.volume=a};r.isMuted=function(){return this.g.muted};r.isLinear=function(){return!0};r.resize=function(){};r.setMuted=function(a){this.g.muted=a};
500
501
  r.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};r.release=function(){this.g=this.h=this.i=null};M("shaka.ads.ServerSideAd",W);W.prototype.release=W.prototype.release;W.prototype.getPositionInSequence=W.prototype.getPositionInSequence;W.prototype.getSequenceLength=W.prototype.getSequenceLength;W.prototype.setMuted=W.prototype.setMuted;W.prototype.resize=W.prototype.resize;
501
502
  W.prototype.isLinear=W.prototype.isLinear;W.prototype.isMuted=W.prototype.isMuted;W.prototype.setVolume=W.prototype.setVolume;W.prototype.getVolume=W.prototype.getVolume;W.prototype.play=W.prototype.play;W.prototype.pause=W.prototype.pause;W.prototype.skip=W.prototype.skip;W.prototype.canSkipNow=W.prototype.canSkipNow;W.prototype.getTimeUntilSkippable=W.prototype.getTimeUntilSkippable;W.prototype.isSkippable=W.prototype.isSkippable;W.prototype.isPaused=W.prototype.isPaused;
@@ -507,8 +508,8 @@ f;e.i(new Q("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}jn.prototyp
507
508
  function kn(a,b){a.i(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.F||a.h.A(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.o=d,a.l.currentTime=e.start)}})};function X(){Ne.call(this);this.g=this.i=null;this.h=new bn;this.j=navigator.language}qa(X,Ne);r=X.prototype;r.setLocale=function(a){this.j=a};r.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new N(2,10,1E4);this.i&&this.i.release();this.i=new cn(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
508
509
  r.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);Ne.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new Q("ad-stopped"));this.h=new bn};r.requestClientSideAds=function(a){if(!this.i)throw new N(1,10,10001);var b=this.i;b.u=Date.now()/1E3;b.m.requestAds(a)};
509
510
  r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new N(2,10,10002);this.g&&this.g.release();this.g=new jn(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
510
- r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ua('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="v3.3.18";c=this.g;var d=b;c.j?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
511
- (c.F=!0),c.j=new rc,c.g.requestStream(a),c.C=d||"",c.G=Date.now()/1E3,c=c.j);return c};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Ua('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="v3.3.18";this.g.g.replaceAdTagParameters(a)};r.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.D};
511
+ r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ua('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="v3.3.19";c=this.g;var d=b;c.j?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
512
+ (c.F=!0),c.j=new rc,c.g.requestStream(a),c.C=d||"",c.G=Date.now()/1E3,c=c.j);return c};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Ua('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="v3.3.19";this.g.g.replaceAdTagParameters(a)};r.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.D};
512
513
  r.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};r.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};r.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};M("shaka.ads.AdManager",X);
513
514
  X.prototype.onCueMetadataChange=X.prototype.onCueMetadataChange;X.prototype.onHlsTimedMetadata=X.prototype.onHlsTimedMetadata;X.prototype.onDashTimedMetadata=X.prototype.onDashTimedMetadata;X.prototype.getStats=X.prototype.getStats;X.prototype.getServerSideCuePoints=X.prototype.getServerSideCuePoints;X.prototype.replaceServerSideAdTagParameters=X.prototype.replaceServerSideAdTagParameters;X.prototype.requestServerSideStream=X.prototype.requestServerSideStream;X.prototype.initServerSide=X.prototype.initServerSide;
514
515
  X.prototype.requestClientSideAds=X.prototype.requestClientSideAds;X.prototype.onAssetUnload=X.prototype.onAssetUnload;X.prototype.release=X.prototype.release;X.prototype.initClientSide=X.prototype.initClientSide;X.prototype.setLocale=X.prototype.setLocale;X.ADS_LOADED="ads-loaded";X.AD_STARTED="ad-started";X.AD_FIRST_QUARTILE="ad-first-quartile";X.AD_MIDPOINT="ad-midpoint";X.AD_THIRD_QUARTILE="ad-third-quartile";X.AD_COMPLETE="ad-complete";X.AD_STOPPED="ad-stopped";X.AD_SKIPPED="ad-skipped";
@@ -524,14 +525,14 @@ for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};
524
525
  r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Nb();var a=new chrome.cast.SessionRequest(this.G);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Bn),d=c.next();!d.done;d=c.next())Nn(d.value,b)},function(b){for(var c=t(Bn),d=c.next();!d.done;d=c.next())d=d.value,On="available"==b,d.j.Nb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});On&&this.j.S(Pn);(a=Dn)&&a.status!=chrome.cast.SessionStatus.STOPPED?Nn(this,
525
526
  a):Dn=null}else window.__onGCastApiAvailable!==Qn&&(Rn=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Qn)};r.Vd=function(a){this.o=a;this.h&&Sn(this,{type:"appData",appData:this.o})};r.cast=function(a){var b=this;return L(function(c){if(!b.m)throw new N(1,8,8E3);if(!On)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new rc;chrome.cast.requestSession(function(d){return Tn(b,a,d)},function(d){return Un(b,d)});return u(c,b.l,0)})};
526
527
  function Vn(a){if(a.h){var b=a.L();chrome.cast.requestSession(function(c){return Tn(a,b,c)},function(c){return Un(a,c)})}}r.Bb=function(){if(this.h){Cn(this);if(Dn){Mn(this);try{Dn.stop(function(){},function(){})}catch(a){}Dn=null}An(this)}};
527
- r.get=function(a,b){var c=this;if("video"==a){if(rn.includes(b))return function(){return c.xe.apply(c,[a,b].concat(ja(Ha.apply(0,arguments))))}}else if("player"==a){if(un[b]&&!this.get("player","isLive")())return function(){};if(xn.includes(b))return function(){return c.xe.apply(c,[a,b].concat(ja(Ha.apply(0,arguments))))};if(yn.includes(b))return function(){return c.Rf.apply(c,[a,b].concat(ja(Ha.apply(0,arguments))))};if(sn[b]||tn[b])return function(){return c.g[a][b]}}return this.g[a][b]};
528
+ r.get=function(a,b){var c=this;if("video"==a){if(rn.includes(b))return function(){return c.we.apply(c,[a,b].concat(ja(Ha.apply(0,arguments))))}}else if("player"==a){if(un[b]&&!this.get("player","isLive")())return function(){};if(xn.includes(b))return function(){return c.we.apply(c,[a,b].concat(ja(Ha.apply(0,arguments))))};if(yn.includes(b))return function(){return c.Qf.apply(c,[a,b].concat(ja(Ha.apply(0,arguments))))};if(sn[b]||tn[b])return function(){return c.g[a][b]}}return this.g[a][b]};
528
529
  r.set=function(a,b,c){this.g[a][b]=c;Sn(this,{type:"set",targetName:a,property:b,value:c})};function Tn(a,b,c){Dn=c;c.addUpdateListener(a.C);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.D);An(a);Sn(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function Un(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new N(2,8,c,b))}
529
- r.xe=function(a,b){Sn(this,{type:"call",targetName:a,methodName:b,args:Ha.apply(2,arguments)})};r.Rf=function(a,b){var c=Ha.apply(2,arguments),d=new rc,e=this.I.toString();this.I++;this.i[e]=d;try{Sn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Nn(a,b){var c=a.L();a.l=new rc;a.u=!0;Tn(a,c,b)}function Mn(a){var b=Dn;b.removeUpdateListener(a.C);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.D)}
530
+ r.we=function(a,b){Sn(this,{type:"call",targetName:a,methodName:b,args:Ha.apply(2,arguments)})};r.Qf=function(a,b){var c=Ha.apply(2,arguments),d=new rc,e=this.I.toString();this.I++;this.i[e]=d;try{Sn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Nn(a,b){var c=a.L();a.l=new rc;a.u=!0;Tn(a,c,b)}function Mn(a){var b=Dn;b.removeUpdateListener(a.C);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.D)}
530
531
  function An(a){var b=Dn?"connected"==Dn.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};Cn(a)}a.h=b;a.N=b?Dn.receiver.friendlyName:"";a.j.Nb()}function Cn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}function Sn(a,b){var c=ln(b),d=Dn;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Xa)}catch(e){throw c=new N(2,8,8005,e),d=new Q("error",(new Map).set("detail",c)),a.s("player",d),a.Bb(),c;}}var Pn=.02,On=!1,Dn=null,Rn=null,Bn=new Set;
531
532
  function Qn(a){Rn?window.__onGCastApiAvailable=Rn:delete window.__onGCastApiAvailable;Rn=null;if(a)for(var b=t(Bn),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Wn(a,b,c){Ne.call(this);var d=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.u=new Map;this.g=new zn(c,function(){return Xn(d)},function(){return Yn(d)},function(e,f){return Zn(d,e,f)},function(){return $n(d)},function(){return ao(d)});bo(this)}qa(Wn,Ne);r=Wn.prototype;
532
- r.destroy=function(a){a&&this.g.Bb();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;Ne.prototype.release.call(this);return Promise.all(a)};r.zf=function(){return this.l};r.pf=function(){return this.s};r.Qe=function(){return this.g.m&&On};r.ua=function(){return this.g.ua()};r.Pd=function(){return this.g.Pd()};
533
- r.cast=function(){var a=this,b;return L(function(c){return 1==c.g?(b=ao(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.ce(),0):c["return"]()})};r.Vd=function(a){this.g.Vd(a)};r.bg=function(){Vn(this.g)};r.Bb=function(){this.g.Bb()};
534
- r.Te=function(a){var b=this;return L(function(c){if(1==c.g){if(a==b.C)return c["return"]();b.C=a;b.g.Bb();return u(c,b.g.destroy(),2)}b.g=null;b.g=new zn(a,function(){return Xn(b)},function(){return Yn(b)},function(d,e){return Zn(b,d,e)},function(){return $n(b)},function(){return ao(b)});b.g.init();A(c)})};
533
+ r.destroy=function(a){a&&this.g.Bb();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;Ne.prototype.release.call(this);return Promise.all(a)};r.yf=function(){return this.l};r.nf=function(){return this.s};r.Pe=function(){return this.g.m&&On};r.ua=function(){return this.g.ua()};r.Pd=function(){return this.g.Pd()};
534
+ r.cast=function(){var a=this,b;return L(function(c){return 1==c.g?(b=ao(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.ce(),0):c["return"]()})};r.Vd=function(a){this.g.Vd(a)};r.ag=function(){Vn(this.g)};r.Bb=function(){this.g.Bb()};
535
+ r.Se=function(a){var b=this;return L(function(c){if(1==c.g){if(a==b.C)return c["return"]();b.C=a;b.g.Bb();return u(c,b.g.destroy(),2)}b.g=null;b.g=new zn(a,function(){return Xn(b)},function(){return Yn(b)},function(d,e){return Zn(b,d,e)},function(){return $n(b)},function(){return ao(b)});b.g.init();A(c)})};
535
536
  function bo(a){a.g.init();a.m=new ef;for(var b=t(on),c=b.next();!c.done;c=b.next())a.m.A(a.i,c.value,function(f){a.g.ua()||(f=Me(f),a.j.dispatchEvent(f))});for(var d in $m)a.m.A(a.h,$m[d],function(f){a.g.ua()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Pb=e,Object.defineProperty(a.l,b.Pb,{configurable:!1,enumerable:!0,get:function(f){return function(){return co(a,f.Pb)}}(b),set:function(f){return function(g){var h=f.Pb;a.g.ua()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Pb:b.Pb};a.s={};eo(a,
536
537
  function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return fo(a,f)}})});go(a);a.j=new Ne;a.j.Ec=a.l;a.o=new Ne;a.o.Ec=a.s}function go(a){var b=new Map;eo(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.u.set(c,e):a.u.set(e,c)}else b.set(d,c)})}
537
538
  function eo(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.h,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=t(Object.getOwnPropertyNames(f)),k=h.next();!k.done;k=h.next())k=k.value,c(k)&&(e.add(k),b(k,d[k]));f=Object.getPrototypeOf(f)}}
@@ -541,16 +542,16 @@ function $n(a){for(var b=t(vn),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[
541
542
  h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.h[k](l)}a.i.autoplay=f;e&&a.i.play()}},function(h){h=(new Map).set("detail",h);h=new Q(Wm,h);a.h.dispatchEvent(h)})}
542
543
  function co(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.ua()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.ua()?a.g.get("video",b):(c=a.i[b],"function"==typeof c&&(c=c.bind(a.i)),c)}
543
544
  function fo(a,b){a.u.has(b)&&(b=a.u.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.dc()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.me()};
544
- if("setVideoContainer"==b)return function(c){return a.h.Ge(c)};if(a.g.ua()){if("getManifest"==b||"drmInfo"==b)return function(){Ua(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ua(b+"() does not work while casting!");return Promise.resolve()}}return a.g.ua()&&0==Object.keys(a.g.g.video).length&&(sn[b]||tn[b])||!a.g.ua()?a.h[b].bind(a.h):a.g.get("player",b)}
545
- function Zn(a,b,c){a.g.ua()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}M("shaka.cast.CastProxy",Wn);Wn.prototype.changeReceiverId=Wn.prototype.Te;Wn.prototype.forceDisconnect=Wn.prototype.Bb;Wn.prototype.suggestDisconnect=Wn.prototype.bg;Wn.prototype.setAppData=Wn.prototype.Vd;Wn.prototype.cast=Wn.prototype.cast;Wn.prototype.receiverName=Wn.prototype.Pd;Wn.prototype.isCasting=Wn.prototype.ua;Wn.prototype.canCast=Wn.prototype.Qe;Wn.prototype.getPlayer=Wn.prototype.pf;
546
- Wn.prototype.getVideo=Wn.prototype.zf;Wn.prototype.destroy=Wn.prototype.destroy;function ho(a,b,c,d){Ne.call(this);var e=this;this.g=a;this.h=b;this.j=new ef;this.I={video:a,player:b};this.D=c||function(){};this.L=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.C=!1;this.u=!0;this.s=this.l=null;this.G=new O(function(){io(e)});jo(this)}qa(ho,Ne);r=ho.prototype;r.isConnected=function(){return this.F};r.Df=function(){return this.o};r.Yf=function(a){this.i=a};r.We=function(){this.i=null};
547
- r.Zf=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.Xf=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.Wf=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
545
+ if("setVideoContainer"==b)return function(c){return a.h.Fe(c)};if(a.g.ua()){if("getManifest"==b||"drmInfo"==b)return function(){Ua(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ua(b+"() does not work while casting!");return Promise.resolve()}}return a.g.ua()&&0==Object.keys(a.g.g.video).length&&(sn[b]||tn[b])||!a.g.ua()?a.h[b].bind(a.h):a.g.get("player",b)}
546
+ function Zn(a,b,c){a.g.ua()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}M("shaka.cast.CastProxy",Wn);Wn.prototype.changeReceiverId=Wn.prototype.Se;Wn.prototype.forceDisconnect=Wn.prototype.Bb;Wn.prototype.suggestDisconnect=Wn.prototype.ag;Wn.prototype.setAppData=Wn.prototype.Vd;Wn.prototype.cast=Wn.prototype.cast;Wn.prototype.receiverName=Wn.prototype.Pd;Wn.prototype.isCasting=Wn.prototype.ua;Wn.prototype.canCast=Wn.prototype.Pe;Wn.prototype.getPlayer=Wn.prototype.nf;
547
+ Wn.prototype.getVideo=Wn.prototype.yf;Wn.prototype.destroy=Wn.prototype.destroy;function ho(a,b,c,d){Ne.call(this);var e=this;this.g=a;this.h=b;this.j=new ef;this.I={video:a,player:b};this.D=c||function(){};this.L=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.C=!1;this.u=!0;this.s=this.l=null;this.G=new O(function(){io(e)});jo(this)}qa(ho,Ne);r=ho.prototype;r.isConnected=function(){return this.F};r.Cf=function(){return this.o};r.Xf=function(a){this.i=a};r.Ve=function(){this.i=null};
548
+ r.Yf=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.Wf=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.Vf=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
548
549
  r.destroy=function(){var a=this,b,c;return L(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.G&&(a.G.stop(),a.G=null),a.g=null,a.I=null,a.D=null,a.F=!1,a.o=!0,a.l=null,a.s=null,Ne.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();A(d)})};
549
550
  function jo(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return ko(a)};b.onSenderDisconnected=function(){return ko(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&lo(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);lo(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return mo(a,
550
551
  e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return no(a,e)};b.start();b=t(on);for(var c=b.next();!c.done;c=b.next())a.j.A(a.g,c.value,function(e){return oo(a,"video",e)});for(var d in $m)a.j.A(a.h,$m[d],function(e){return oo(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.Xd(3840,2160):a.h.Xd(1920,1080);a.j.A(a.g,"loadeddata",function(){a.C=!0});a.j.A(a.h,"loading",function(){a.o=
551
552
  !1;po(a)});a.j.A(a.g,"playing",function(){a.o=!1;po(a)});a.j.A(a.g,"pause",function(){po(a)});a.j.A(a.h,"unloading",function(){a.o=!0;po(a)});a.j.A(a.g,"ended",function(){(new O(function(){a.g&&a.g.ended&&(a.o=!0,po(a))})).S(qo)})}function ko(a){a.m=0;a.u=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;po(a)}
552
553
  function po(a){var b;L(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c["return"]();b=new Q("caststatuschanged");a.dispatchEvent(b);ro(a)||so(a);A(c)})}
553
- function to(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;L(function(v){switch(v.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.D(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,C(v,5),u(v,a.h.load(b.manifest,b.startTime),7)):u(v,Promise.resolve(),3);case 7:va(v,3);break;case 5:return g=E(v),h=Wm,k=(new Map).set("detail",g),l=new Q(h,k),a.h&&a.h.dispatchEvent(l),v["return"]();case 3:if(!a.h)return v["return"]();for(m in b.video)n=b.video[m],a.g[m]=n;for(p in b.playerAfterLoad)q=b.playerAfterLoad[p],
554
+ function to(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;L(function(v){switch(v.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.D(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,C(v,5),u(v,a.h.load(b.manifest,b.startTime),7)):u(v,Promise.resolve(),3);case 7:va(v,3);break;case 5:return g=F(v),h=Wm,k=(new Map).set("detail",g),l=new Q(h,k),a.h&&a.h.dispatchEvent(l),v["return"]();case 3:if(!a.h)return v["return"]();for(m in b.video)n=b.video[m],a.g[m]=n;for(p in b.playerAfterLoad)q=b.playerAfterLoad[p],
554
555
  a.h[p](q);a.g.autoplay=f;b.manifest&&(a.g.play(),so(a));A(v)}})}function oo(a,b,c){a.h&&(io(a),lo(a,{type:"event",targetName:b,event:c},a.l))}
555
556
  function io(a){a.G.S(uo);for(var b={video:{},player:{}},c=t(pn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.U())for(var e in un)0==a.m%un[e]&&(b.player[e]=a.h[e]());for(var f in sn)0==a.m%sn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;lo(a,{type:"update",update:b},a.l);for(var g in tn)0==a.m%tn[g]&&(b={player:{}},b.player[g]=a.h[g](),lo(a,{type:"update",update:b},a.l));a.C&&(a.m+=
556
557
  1);ro(a)}function ro(a){return a.u&&(a.g.duration||a.h.U())?(vo(a),a.u=!1,!0):!1}function vo(a,b){var c={contentId:a.h.rd(),streamType:a.h.U()?"LIVE":"BUFFERED",contentType:""};a.h.U()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);so(a,void 0===b?0:b,c)}
@@ -559,56 +560,56 @@ c.methodName;"player"==d&&"load"==e&&(a.m=0,a.C=!1);var g=c.id,h=b.senderId;f=a.
559
560
  function mo(a,b){var c=mn(b.data);switch(c.type){case "PLAY":a.g.play();so(a);break;case "PAUSE":a.g.pause();so(a);break;case "SEEK":var d=c.currentTime,e=c.resumeState;null!=d&&(a.g.currentTime=Number(d));e&&"PLAYBACK_START"==e?(a.g.play(),so(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),so(a));break;case "STOP":a.h.ce().then(function(){a.h&&so(a)});break;case "GET_STATUS":vo(a,Number(c.requestId));break;case "VOLUME":e=c.volume;d=e.level;e=e.muted;var f=a.g.volume,g=a.g.muted;null!=d&&(a.g.volume=Number(d));
560
561
  null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||so(a);break;case "LOAD":a.m=0;a.C=!1;a.u=!1;d=c.media;e=c.currentTime;f=a.L(d.contentId);g=c.autoplay||!0;a.D(d.customData);g&&(a.g.autoplay=!0);a.h.load(f,e).then(function(){a.h&&vo(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");lo(a,{requestId:Number(c.requestId),type:k},a.s)});break;default:lo(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
561
562
  function wo(a,b,c,d){a.h&&lo(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function lo(a,b,c,d){a.F&&(a=ln(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function so(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?xo:a.h.sd()?yo:a.g.paused?zo:Ao,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);lo(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
562
- M("shaka.cast.CastReceiver",ho);ho.prototype.destroy=ho.prototype.destroy;ho.prototype.setContentArtist=ho.prototype.Wf;ho.prototype.setContentImage=ho.prototype.Xf;ho.prototype.setContentTitle=ho.prototype.Zf;ho.prototype.clearContentMetadata=ho.prototype.We;ho.prototype.setContentMetadata=ho.prototype.Yf;ho.prototype.isIdle=ho.prototype.Df;ho.prototype.isConnected=ho.prototype.isConnected;var uo=.5,qo=5,xo="IDLE",Ao="PLAYING",yo="BUFFERING",zo="PAUSED";function Bo(a){var b=this;this.g=[];this.h=[];this.data=[];(new Ig).box("moov",Mg).P("pssh",function(c){if(!(1<c.version)){var d=Fb(c.reader.O,-12,c.size);b.data.push(d);b.g.push(Uc(c.reader.Za(16)));if(0<c.version){d=c.reader.M();for(var e=0;e<d;e++){var f=Uc(c.reader.Za(16));b.h.push(f)}}}}).parse(a)}
563
- function Co(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=Ib(e),g=0;f.setUint32(g,d);g+=4;f.setUint32(g,1886614376);g+=4;f.setUint32(g,0);g+=4;e.set(b,g);g+=b.length;f.setUint32(g,c);e.set(a,g+4);return e}function Do(a){if(!a)return a;var b=new Bo(a);if(1>=b.data.length)return a;a=[];var c={};b=t(b.data);for(var d=b.next();!d.done;c={sc:c.sc},d=b.next())c.sc=d.value,a.some(function(e){return function(f){return Db(f,e.sc)}}(c))||a.push(c.sc);return Vc.apply(Pc,ja(a))};function Eo(a,b,c){var d=Fo(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g["delete"](null);if(1<g.size)throw new N(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.Ae?(e=h.init||e,!1):!0}),f.length&&(a=Go(e,f,c),0==a.length&&(a=[lc("",e)])));if(d.length&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(lc(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
564
- t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{he:g,Mg:e,drmInfos:a,le:!0}}function Ho(a,b,c,d){var e=Eo(a,c,d);if(b.le){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.le=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new N(2,4,4008);return e.he||b.he}
563
+ M("shaka.cast.CastReceiver",ho);ho.prototype.destroy=ho.prototype.destroy;ho.prototype.setContentArtist=ho.prototype.Vf;ho.prototype.setContentImage=ho.prototype.Wf;ho.prototype.setContentTitle=ho.prototype.Yf;ho.prototype.clearContentMetadata=ho.prototype.Ve;ho.prototype.setContentMetadata=ho.prototype.Xf;ho.prototype.isIdle=ho.prototype.Cf;ho.prototype.isConnected=ho.prototype.isConnected;var uo=.5,qo=5,xo="IDLE",Ao="PLAYING",yo="BUFFERING",zo="PAUSED";function Bo(a){var b=this;this.g=[];this.h=[];this.data=[];(new Ig).box("moov",Mg).P("pssh",function(c){if(!(1<c.version)){var d=Fb(c.reader.O,-12,c.size);b.data.push(d);b.g.push(Uc(c.reader.Za(16)));if(0<c.version){d=c.reader.M();for(var e=0;e<d;e++){var f=Uc(c.reader.Za(16));b.h.push(f)}}}}).parse(a)}
564
+ function Co(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=Ib(e),g=0;f.setUint32(g,d);g+=4;f.setUint32(g,1886614376);g+=4;f.setUint32(g,0);g+=4;e.set(b,g);g+=b.length;f.setUint32(g,c);e.set(a,g+4);return e}function Do(a){if(!a)return a;var b=new Bo(a);if(1>=b.data.length)return a;a=[];var c={};b=t(b.data);for(var d=b.next();!d.done;c={sc:c.sc},d=b.next())c.sc=d.value,a.some(function(e){return function(f){return Db(f,e.sc)}}(c))||a.push(c.sc);return Vc.apply(Pc,ja(a))};function Eo(a,b,c){var d=Fo(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g["delete"](null);if(1<g.size)throw new N(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.ze?(e=h.init||e,!1):!0}),f.length&&(a=Go(e,f,c),0==a.length&&(a=[lc("",e)])));if(d.length&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(lc(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
565
+ t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{he:g,Lg:e,drmInfos:a,le:!0}}function Ho(a,b,c,d){var e=Eo(a,c,d);if(b.le){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.le=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new N(2,4,4008);return e.he||b.he}
565
566
  function Io(a){var b=0,c=Ib(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Fb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
566
567
  function Jo(a){a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=t(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function Ko(a){a=uf(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Sc(a.textContent);a=Io(a).filter(function(b){return b.type===Lo})[0];if(!a)return"";a=Kc(a.value,!0);return(a=Mf(a,"WRMHEADER"))?Jo(a):""}
567
- function Go(a,b,c){var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=c[e.Ae];if(f){var g;if(g=uf(e.node,"urn:microsoft:playready","pro")){g=Sc(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);g=[{initData:Co(g,h),initDataType:"cenc",keyId:e.keyId}]}else g=null;g=lc(f,e.init||a||g);if(f=Mo.get(f))g.licenseServerUri=f(e);d.push(g)}}return d}
568
+ function Go(a,b,c){var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=c[e.ze];if(f){var g;if(g=uf(e.node,"urn:microsoft:playready","pro")){g=Sc(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);g=[{initData:Co(g,h),initDataType:"cenc",keyId:e.keyId}]}else g=null;g=lc(f,e.init||a||g);if(f=Mo.get(f))g.licenseServerUri=f(e);d.push(g)}}return d}
568
569
  function Fo(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=No(c.value))&&b.push(c);return b}
569
- function No(a){var b=a.getAttribute("schemeIdUri"),c=xf(a,"urn:mpeg:cenc:2013","default_KID"),d=vf(a,"urn:mpeg:cenc:2013","pssh").map(zf);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new N(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:Sc(f),keyId:null}})}catch(f){throw new N(2,4,4007);}return{node:a,Ae:b,keyId:c,init:0<e.length?e:null}}
570
+ function No(a){var b=a.getAttribute("schemeIdUri"),c=xf(a,"urn:mpeg:cenc:2013","default_KID"),d=vf(a,"urn:mpeg:cenc:2013","pssh").map(zf);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new N(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:Sc(f),keyId:null}})}catch(f){throw new N(2,4,4007);}return{node:a,ze:b,keyId:c,init:0<e.length?e:null}}
570
571
  var Lo=1,Mo=(new Map).set("com.widevine.alpha",function(a){return(a=uf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Ko).set("com.microsoft.playready.recommendation",Ko).set("com.microsoft.playready.software",Ko).set("com.microsoft.playready.hardware",Ko);function Oo(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(g,h,k,l){if("$$"==g)return"$";var m=f[h];if(null==m)return g;"RepresentationID"==h&&k&&(k=void 0);"Time"==h&&(m=Math.round(m));switch(l){case void 0:case "d":case "i":case "u":g=m.toString();break;case "o":g=m.toString(8);break;case "x":g=m.toString(16);break;case "X":g=m.toString(16).toUpperCase();break;default:g=m.toString()}k=
571
572
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
572
- function Po(a,b){var c=Qo(a,b,"timescale"),d=1;c&&(d=If(c)||1);var e=Qo(a,b,"duration");c=If(e||"");"image"==a.H.contentType&&(c=Kf(e||""));c&&(c/=d);var f=Qo(a,b,"startNumber");e=Number(Qo(a,b,"presentationTimeOffset"))||0;var g=Jf(f||"");if(null==f||null==g)g=1;var h=Ro(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.T.duration||Infinity;h=tf(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],q=h[n+1],v=Bf(p,"t",Jf),w=Bf(p,"d",Jf);p=Bf(p,"r",Ff);null!=v&&(v-=e);if(!w)break;v=null!=v?v:m;p=
573
- p||0;if(0>p)if(q){q=Bf(q,"t",Jf);if(null==q)break;else if(v>=q)break;p=Math.ceil((q-v)/w)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/w)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(q=0;q<=p;++q)m=v+w,l.push({start:v/f,end:m/f,fg:v}),v=m}f=l}return{timescale:d,ka:c,Mb:g,Ua:e/d||0,de:e,timeline:f}}function Qo(a,b,c){return[b(a.H),b(a.ha),b(a.aa)].filter(Qb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
573
+ function Po(a,b){var c=Qo(a,b,"timescale"),d=1;c&&(d=Gf(c)||1);var e=Qo(a,b,"duration");c=Gf(e||"");"image"==a.H.contentType&&(c=Kf(e||""));c&&(c/=d);var f=Qo(a,b,"startNumber");e=Number(Qo(a,b,"presentationTimeOffset"))||0;var g=Jf(f||"");if(null==f||null==g)g=1;var h=Ro(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.T.duration||Infinity;h=tf(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],q=h[n+1],v=Bf(p,"t",Jf),w=Bf(p,"d",Jf);p=Bf(p,"r",Ff);null!=v&&(v-=e);if(!w)break;v=null!=v?v:m;p=
574
+ p||0;if(0>p)if(q){q=Bf(q,"t",Jf);if(null==q)break;else if(v>=q)break;p=Math.ceil((q-v)/w)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/w)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(q=0;q<=p;++q)m=v+w,l.push({start:v/f,end:m/f,eg:v}),v=m}f=l}return{timescale:d,la:c,Mb:g,Ta:e/d||0,de:e,timeline:f}}function Qo(a,b,c){return[b(a.H),b(a.ha),b(a.aa)].filter(Qb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
574
575
  function Ro(a,b,c){return[b(a.H),b(a.ha),b(a.aa)].filter(Qb).map(function(d){return sf(d,c)}).reduce(function(d,e){return d||e})}
575
576
  function So(a,b,c,d,e,f){for(var g=xf(a,"http://www.w3.org/1999/xlink","href"),h=xf(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return Ge(new N(2,4,4028));if("onLoad"!=h)return Ge(new N(2,4,4027));var m=kc([d],[g]);return e.request(0,We(m,b)).$(function(n){n=Of(n.data,a.tagName);if(!n)return Ge(new N(2,4,4001,g));
576
577
  for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=t(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return To(a,b,c,m[0],e,f+1)})}
577
578
  function To(a,b,c,d,e,f){f=void 0===f?0:f;if(xf(a,"http://www.w3.org/1999/xlink","href")){var g=So(a,b,c,d,e,f);c&&(g=g.$(void 0,function(){return To(a,b,c,d,e,f)}));return g}g=[];for(var h=t(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==xf(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(To(k,b,c,d,e,f)));return Ke(g).$(function(){return a})};function Uo(a,b,c,d,e,f,g){var h,k=(new Ig).P("sidx",function(l){h=Vo(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new N(2,3,3004);}
578
- function Vo(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.M();if(0==k)throw new N(2,3,3005);if(0==g.version){var l=g.reader.M();var m=g.reader.M()}else l=g.reader.Lb(),m=g.reader.Lb();g.reader.skip(2);var n=g.reader.Kb();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.M(),q=(p&2147483648)>>>31;p&=2147483647;var v=g.reader.M();g.reader.skip(4);if(1==q)throw new N(2,3,3006);h.push(new Ii(l/k+c,(l+v)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=v;a+=p}g.parser.stop();return h};function Wo(a){this.h=Ib(a);this.g=new Fg(this.h,0)}Wo.prototype.ma=function(){return this.g.ma()};
579
+ function Vo(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.M();if(0==k)throw new N(2,3,3005);if(0==g.version){var l=g.reader.M();var m=g.reader.M()}else l=g.reader.Lb(),m=g.reader.Lb();g.reader.skip(2);var n=g.reader.Kb();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.M(),q=(p&2147483648)>>>31;p&=2147483647;var v=g.reader.M();g.reader.skip(4);if(1==q)throw new N(2,3,3006);h.push(new Ii(l/k+c,(l+v)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=v;a+=p}g.parser.stop();return h};function Wo(a){this.h=Ib(a);this.g=new Fg(this.h,0)}Wo.prototype.na=function(){return this.g.na()};
579
580
  function Xo(a){var b=Yo(a);if(7<b.length)throw new N(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Yo(a);a:{d=t(Zo);for(var e=d.next();!e.done;e=d.next())if(Db(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.X();else{if(8==b.length&&b[1]&224)throw new N(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.X()+b<=a.h.byteLength?b:a.h.byteLength-a.g.X();d=Ib(a.h,a.g.X(),b);a.g.skip(b);return new $o(c,d)}
580
581
  function Yo(a){var b=a.g.X(),c=a.g.Y();if(0==c)throw new N(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Fb(a.h,b,c)}var Zo=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function $o(a,b){this.id=a;this.g=b}
581
- function ap(a){if(8<a.g.byteLength)throw new N(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new N(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function bp(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Wo(a.g);for(var n=null,p=null;a.ma();){var q=Xo(a);if(187==q.id){var v=cp(q);v&&(q=c*v.gg,v=b+v.Qf,null!=n&&m.push(new Ii(n+g,q+g,l,p,v-1,f,g,h,k)),n=q,p=v)}}null!=n&&m.push(new Ii(n+g,d+g,l,p,null,f,g,h,k));return m}
582
- function cp(a){var b=new Wo(a.g);a=Xo(b);if(179!=a.id)throw new N(2,3,3013);a=ap(a);b=Xo(b);if(183!=b.id)throw new N(2,3,3012);b=new Wo(b.g);for(var c=0;b.ma();){var d=Xo(b);if(241==d.id){c=ap(d);break}}return{gg:a,Qf:c}};function dp(a,b){var c=Ro(a,b,"Initialization");if(!c)return null;var d=a.H.za,e=c.getAttribute("sourceURL");e&&(d=kc(a.H.za,[e]));e=0;var f=null;if(c=Bf(c,"range",Ef))e=c.start,f=c.end;return new Gi(function(){return d},e,f,ep(a))}
583
- function fp(a,b){var c=Number(Qo(a,gp,"presentationTimeOffset"))||0,d=Qo(a,gp,"timescale"),e=1;d&&(e=If(d)||1);var f=c/e||0,g=dp(a,gp);hp(a,g);var h=Pe(a);return{Cb:function(){var k=Ro(h,gp,"RepresentationIndex"),l=h.H.za;k&&(k=k.getAttribute("sourceURL"))&&(l=kc(h.H.za,[k]));k=ip(h);return jp(h,b,g,l,k.start,k.end,f)}}}
584
- function jp(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,w,x,y,D,z,B,F;return L(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.Pa||!a.T.td,l=a.T.start,m=a.T.duration,n=a.H.mimeType.split("/")[1],p=b,q=null,v=[p(d,e,f),"webm"==n?p(c.sa(),c.pa,c.ia):null],p=null,u(G,Promise.all(v),2);w=G.h;x=w[0];y=w[1]||null;D=null;z=l-g;B=l;F=m?l+m:Infinity;if("mp4"==n)var H=Uo(x,e,d,c,z,B,F);else{H=new Wo(y);if(440786851!=Xo(H).id)throw new N(2,3,3008);var I=Xo(H);if(408125543!=I.id)throw new N(2,3,3009);H=I.g.byteOffset;
585
- I=new Wo(I.g);for(var J=null;I.ma();){var K=Xo(I);if(357149030==K.id){J=K;break}}if(!J)throw new N(2,3,3010);J=new Wo(J.g);K=1E6;for(I=null;J.ma();){var P=Xo(J);if(2807729==P.id)K=ap(P);else if(17545==P.id)if(4==P.g.byteLength)I=P.g.getFloat32(0);else if(8==P.g.byteLength)I=P.g.getFloat64(0);else throw new N(2,3,3003);}if(null==I)throw new N(2,3,3011);J=K/1E9;I*=J;K=Xo(new Wo(x));if(475249515!=K.id)throw new N(2,3,3007);H=bp(K,H,J,I,d,c,z,B,F)}D=H;h.Hb(D);q=new T(D);k&&q.Xa(B,F,!0);return G["return"](q)})}
582
+ function ap(a){if(8<a.g.byteLength)throw new N(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new N(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function bp(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Wo(a.g);for(var n=null,p=null;a.na();){var q=Xo(a);if(187==q.id){var v=cp(q);v&&(q=c*v.fg,v=b+v.Pf,null!=n&&m.push(new Ii(n+g,q+g,l,p,v-1,f,g,h,k)),n=q,p=v)}}null!=n&&m.push(new Ii(n+g,d+g,l,p,null,f,g,h,k));return m}
583
+ function cp(a){var b=new Wo(a.g);a=Xo(b);if(179!=a.id)throw new N(2,3,3013);a=ap(a);b=Xo(b);if(183!=b.id)throw new N(2,3,3012);b=new Wo(b.g);for(var c=0;b.na();){var d=Xo(b);if(241==d.id){c=ap(d);break}}return{fg:a,Pf:c}};function dp(a,b){var c=Ro(a,b,"Initialization");if(!c)return null;var d=a.H.za,e=c.getAttribute("sourceURL");e&&(d=kc(a.H.za,[e]));e=0;var f=null;if(c=Bf(c,"range",Ef))e=c.start,f=c.end;return new Gi(function(){return d},e,f,ep(a))}
584
+ function fp(a,b){var c=Number(Qo(a,gp,"presentationTimeOffset"))||0,d=Qo(a,gp,"timescale"),e=1;d&&(e=Gf(d)||1);var f=c/e||0,g=dp(a,gp);hp(a,g);var h=Pe(a);return{Cb:function(){var k=Ro(h,gp,"RepresentationIndex"),l=h.H.za;k&&(k=k.getAttribute("sourceURL"))&&(l=kc(h.H.za,[k]));k=ip(h);return jp(h,b,g,l,k.start,k.end,f)}}}
585
+ function jp(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,w,y,x,D,z,B,E;return L(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.Wa||!a.T.td,l=a.T.start,m=a.T.duration,n=a.H.mimeType.split("/")[1],p=b,q=null,v=[p(d,e,f),"webm"==n?p(c.sa(),c.pa,c.ia):null],p=null,u(G,Promise.all(v),2);w=G.h;y=w[0];x=w[1]||null;D=null;z=l-g;B=l;E=m?l+m:Infinity;if("mp4"==n)var H=Uo(y,e,d,c,z,B,E);else{H=new Wo(x);if(440786851!=Xo(H).id)throw new N(2,3,3008);var I=Xo(H);if(408125543!=I.id)throw new N(2,3,3009);H=I.g.byteOffset;
586
+ I=new Wo(I.g);for(var J=null;I.na();){var K=Xo(I);if(357149030==K.id){J=K;break}}if(!J)throw new N(2,3,3010);J=new Wo(J.g);K=1E6;for(I=null;J.na();){var P=Xo(J);if(2807729==P.id)K=ap(P);else if(17545==P.id)if(4==P.g.byteLength)I=P.g.getFloat32(0);else if(8==P.g.byteLength)I=P.g.getFloat64(0);else throw new N(2,3,3003);}if(null==I)throw new N(2,3,3011);J=K/1E9;I*=J;K=Xo(new Wo(y));if(475249515!=K.id)throw new N(2,3,3007);H=bp(K,H,J,I,d,c,z,B,E)}D=H;h.Hb(D);q=new T(D);k&&q.Xa(B,E,!0);return G["return"](q)})}
586
587
  function gp(a){return a.nc}function ip(a){var b=Ro(a,gp,"RepresentationIndex");a=Qo(a,gp,"indexRange");a=Ef(a||"");b&&(a=Bf(b,"range",Ef,a));return a}function hp(a,b){kp(a,b);if(!ip(a))throw new N(2,4,4002);}function kp(a,b){var c=a.H.mimeType.split("/")[1];if(a.H.contentType!=pc&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);}
587
- function ep(a){var b=a.H;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Nc,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function lp(a,b){var c=dp(a,mp),d=np(a);if(!d.ka&&!d.timeline&&1<d.Eb.length)throw new N(2,4,4002);if(!d.ka&&!a.T.duration&&!d.timeline&&1==d.Eb.length)throw new N(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new N(2,4,4002);var e=null,f=null;a.aa.id&&a.H.id&&(f=b[a.aa.id+","+a.H.id])&&(e=f.segmentIndex);var g=op(a.T.start,a.T.duration,a.H.za,d,c);c=!e;e?e.Gb(g,a.presentationTimeline.Ra()):e=new T(g);a.presentationTimeline.Hb(g);a.Pa&&a.T.td||e.Xa(a.T.start,a.T.duration?a.T.start+a.T.duration:
588
- Infinity,c);f&&(f.segmentIndex=e);return{Cb:function(){e&&0!=e.K.length||e.Fb(g);return Promise.resolve(e)}}}function mp(a){return a.$a}function np(a){var b=pp(a);a=Po(a,mp);var c=a.Mb;0==c&&(c=1);var d=0;a.ka?d=a.ka*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ka:a.ka,startTime:d,Mb:c,Ua:a.Ua,timeline:a.timeline,Eb:b}}
589
- function op(a,b,c,d,e){var f=d.Eb.length;d.timeline&&d.timeline.length!=d.Eb.length&&(f=Math.min(d.timeline.length,d.Eb.length));for(var g=a-d.Ua,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={cd:m.cd},n++){var p=d.Eb[n];m.cd=kc(c,[p.Hf]);var q=void 0;q=null!=d.ka?l+d.ka:d.timeline?d.timeline[n].end:l+b;k.push(new Ii(a+l,a+q,function(v){return function(){return v.cd}}(m),p.start,p.end,e,g,a,h));l=q}return k}
590
- function pp(a){return[a.H.$a,a.ha.$a,a.aa.$a].filter(Qb).map(function(b){return tf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.qe&&(a.qe=!0);var c=b.getAttribute("media");b=Bf(b,"mediaRange",Ef,{start:0,end:null});return{Hf:c,start:b.start,end:b.end}})};function qp(a,b,c,d,e,f){var g=rp(a),h=sp(a);tp(h);var k=Pe(a);if(h.ic)return kp(a,g),{Cb:function(){var q=Oo(h.ic,k.H.id,null,k.bandwidth||null,null);q=kc(k.H.za,[q]);return jp(k,b,g,q,0,null,h.Ua)}};if(h.ka)return d||"image"===a.ha.contentType||(a.presentationTimeline.Id(h.ka),a.presentationTimeline.Jd(a.T.start)),{Cb:function(){return up(k,h,e,g,f)}};var l=null;d=d=null;a.aa.id&&a.H.id&&(d=a.aa.id+","+a.H.id,d=c[d])&&(l=d.segmentIndex);var m=vp(k,h,g);c=a.T.start;var n=a.T.duration?a.T.start+a.T.duration:
591
- Infinity,p=!(a.Pa&&a.T.td);l?(p&&(new T(m)).Xa(c,n,!0),l.Gb(m,a.presentationTimeline.Ra())):l=new T(m);a.presentationTimeline.Hb(m);p&&l.Xa(c,n);d&&a.Pa&&(d.segmentIndex=l);return{Cb:function(){l&&0!=l.K.length||l.Fb(m);return Promise.resolve(l)}}}function wp(a){return a.oc}function sp(a){var b=Po(a,wp),c=Qo(a,wp,"media");a=Qo(a,wp,"index");return{ka:b.ka,timescale:b.timescale,Mb:b.Mb,Ua:b.Ua,de:b.de,timeline:b.timeline,Gd:c,ic:a}}
592
- function tp(a){var b=a.ic?1:0;b+=a.timeline?1:0;b+=a.ka?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.ic&&(a.timeline=null),a.ka=null);if(!a.ic&&!a.Gd)throw new N(2,4,4002);}
593
- function up(a,b,c,d,e){function f(J){var K=(J-q)*p,P=K+b.Ua,R=K+l;K=R+p;var ba=Math.min(K,h());R=new Ii(R,ba,function(){var aa=Oo(w,y,J,x,P*v);return kc(D,[aa])},0,null,d,z,l,h());R.l=K;return R}function g(){var J=[Math.max(k.Ra(),l),Math.min(k.hb(),h())].map(function(K){return K-l});return[Math.ceil(J[0]/p),Math.ceil(J[1]/p)-1].map(function(K){return K+q})}function h(){var J=null!=m&&e[m]||n;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.T.start,m=a.aa.id,n=a.T.duration,p=b.ka,q=b.Mb,v=b.timescale,
594
- w=b.Gd,x=a.bandwidth||null,y=a.H.id,D=a.H.za,z=l-b.Ua,B=g();a=a.Pa?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var F=a;F<=B;++F){var G=f(F);c.push(G)}var H=new T(c);c=k.hb()<h();F=k.U();if(c||F){var I=Math.max(a,B+1);H.Uc(p,function(){var J=k.Ra();H.eb(J);var K=t(g());K.next();K=K.next().value;for(var P=[];I<=K;){var R=f(I);P.push(R);I++}return J>h()&&!P.length?null:P})}return Promise.resolve(H)}
595
- function vp(a,b,c){var d=a.T.start,e=a.T.duration,f=d-b.Ua;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={bd:h.bd,fd:h.fd,jd:h.jd,Zc:h.Zc,ld:h.ld,$c:h.$c},k++){var l=b.timeline[k],m=l.start,n=l.fg;l=l.end;h.jd=k+b.Mb;h.ld=n+b.de;h.fd=a.H.id;h.Zc=a.bandwidth||null;h.bd=b.Gd;h.$c=a.H.za;g.push(new Ii(d+m,d+l,function(p){return function(){var q=Oo(p.bd,p.fd,p.jd,p.Zc||null,p.ld);return kc(p.$c,[q]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
588
+ function ep(a){var b=a.H;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Nc,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function lp(a,b){var c=dp(a,mp),d=np(a);if(!d.la&&!d.timeline&&1<d.Eb.length)throw new N(2,4,4002);if(!d.la&&!a.T.duration&&!d.timeline&&1==d.Eb.length)throw new N(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new N(2,4,4002);var e=null,f=null;a.aa.id&&a.H.id&&(f=b[a.aa.id+","+a.H.id])&&(e=f.segmentIndex);var g=op(a.T.start,a.T.duration,a.H.za,d,c);c=!e;e?e.Gb(g,a.presentationTimeline.Qa()):e=new T(g);a.presentationTimeline.Hb(g);a.Wa&&a.T.td||e.Xa(a.T.start,a.T.duration?a.T.start+a.T.duration:
589
+ Infinity,c);f&&(f.segmentIndex=e);return{Cb:function(){e&&0!=e.K.length||e.Fb(g);return Promise.resolve(e)}}}function mp(a){return a.$a}function np(a){var b=pp(a);a=Po(a,mp);var c=a.Mb;0==c&&(c=1);var d=0;a.la?d=a.la*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{la:a.la,startTime:d,Mb:c,Ta:a.Ta,timeline:a.timeline,Eb:b}}
590
+ function op(a,b,c,d,e){var f=d.Eb.length;d.timeline&&d.timeline.length!=d.Eb.length&&(f=Math.min(d.timeline.length,d.Eb.length));for(var g=a-d.Ta,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={cd:m.cd},n++){var p=d.Eb[n];m.cd=kc(c,[p.Gf]);var q=void 0;q=null!=d.la?l+d.la:d.timeline?d.timeline[n].end:l+b;k.push(new Ii(a+l,a+q,function(v){return function(){return v.cd}}(m),p.start,p.end,e,g,a,h));l=q}return k}
591
+ function pp(a){return[a.H.$a,a.ha.$a,a.aa.$a].filter(Qb).map(function(b){return tf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.qe&&(a.qe=!0);var c=b.getAttribute("media");b=Bf(b,"mediaRange",Ef,{start:0,end:null});return{Gf:c,start:b.start,end:b.end}})};function qp(a,b,c,d,e,f){var g=rp(a),h=sp(a);tp(h);var k=Pe(a);if(h.ic)return kp(a,g),{Cb:function(){var q=Oo(h.ic,k.H.id,null,k.bandwidth||null,null);q=kc(k.H.za,[q]);return jp(k,b,g,q,0,null,h.Ta)}};if(h.la)return d||"image"===a.ha.contentType||(a.presentationTimeline.Id(h.la),a.presentationTimeline.Jd(a.T.start)),{Cb:function(){return up(k,h,e,g,f)}};var l=null;d=d=null;a.aa.id&&a.H.id&&(d=a.aa.id+","+a.H.id,d=c[d])&&(l=d.segmentIndex);var m=vp(k,h,g);c=a.T.start;var n=a.T.duration?a.T.start+a.T.duration:
592
+ Infinity,p=!(a.Wa&&a.T.td);l?(p&&(new T(m)).Xa(c,n,!0),l.Gb(m,a.presentationTimeline.Qa())):l=new T(m);a.presentationTimeline.Hb(m);p&&l.Xa(c,n);d&&a.Wa&&(d.segmentIndex=l);return{Cb:function(){l&&0!=l.K.length||l.Fb(m);return Promise.resolve(l)}}}function wp(a){return a.oc}function sp(a){var b=Po(a,wp),c=Qo(a,wp,"media");a=Qo(a,wp,"index");return{la:b.la,timescale:b.timescale,Mb:b.Mb,Ta:b.Ta,de:b.de,timeline:b.timeline,Gd:c,ic:a}}
593
+ function tp(a){var b=a.ic?1:0;b+=a.timeline?1:0;b+=a.la?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.ic&&(a.timeline=null),a.la=null);if(!a.ic&&!a.Gd)throw new N(2,4,4002);}
594
+ function up(a,b,c,d,e){function f(J){var K=(J-q)*p,P=K+b.Ta,R=K+l;K=R+p;var ba=Math.min(K,h());R=new Ii(R,ba,function(){var aa=Oo(w,x,J,y,P*v);return kc(D,[aa])},0,null,d,z,l,h());R.l=K;return R}function g(){var J=[Math.max(k.Qa(),l),Math.min(k.hb(),h())].map(function(K){return K-l});return[Math.ceil(J[0]/p),Math.ceil(J[1]/p)-1].map(function(K){return K+q})}function h(){var J=null!=m&&e[m]||n;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.T.start,m=a.aa.id,n=a.T.duration,p=b.la,q=b.Mb,v=b.timescale,
595
+ w=b.Gd,y=a.bandwidth||null,x=a.H.id,D=a.H.za,z=l-b.Ta,B=g();a=a.Wa?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var E=a;E<=B;++E){var G=f(E);c.push(G)}var H=new T(c);c=k.hb()<h();E=k.U();if(c||E){var I=Math.max(a,B+1);H.Uc(p,function(){var J=k.Qa();H.eb(J);var K=t(g());K.next();K=K.next().value;for(var P=[];I<=K;){var R=f(I);P.push(R);I++}return J>h()&&!P.length?null:P})}return Promise.resolve(H)}
596
+ function vp(a,b,c){var d=a.T.start,e=a.T.duration,f=d-b.Ta;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={bd:h.bd,fd:h.fd,jd:h.jd,Zc:h.Zc,ld:h.ld,$c:h.$c},k++){var l=b.timeline[k],m=l.start,n=l.eg;l=l.end;h.jd=k+b.Mb;h.ld=n+b.de;h.fd=a.H.id;h.Zc=a.bandwidth||null;h.bd=b.Gd;h.$c=a.H.za;g.push(new Ii(d+m,d+l,function(p){return function(){var q=Oo(p.bd,p.fd,p.jd,p.Zc||null,p.ld);return kc(p.$c,[q]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
596
597
  function rp(a){var b=Qo(a,wp,"initialization");if(!b)return null;var c=a.H.id,d=a.bandwidth||null,e=a.H.za;return new Gi(function(){var f=Oo(b,c,null,d,null);return kc(e,[f])},0,null,ep(a))};function xp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}xp.prototype.release=function(){for(var a=t(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
597
- function yp(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,D,z,B,F,G,H,I,J,K,P,R,ba,aa,Y,Da;return L(function(Fa){switch(Fa.g){case 1:d=qc;zp(b);Ap(b);Bp(b);Cp(b);if(!c&&1==b.length){e=b[0];a.g=e.yc;a.h=e.Wc;a.j=e.textStreams;a.i=e.imageStreams;Fa.B(2);break}f=-1;for(g=0;g<b.length;g++)h=b[g],a.m.has(h.id)||(a.m.add(h.id),-1==f&&(f=g));if(-1==f)return Fa["return"]();k=b.map(function(xa){return xa.yc});l=b.map(function(xa){return xa.Wc});m=b.map(function(xa){return xa.textStreams});n=b.map(function(xa){return xa.imageStreams});
598
- p=t(m);for(q=p.next();!q.done;q=p.next())v=q.value,v.push(Dp(d.Z));w=t(n);for(x=w.next();!x.done;x=w.next())y=x.value,y.push(Dp(d.Tb));return u(Fa,Ep(a.g,k,f,Fp,Gp),3);case 3:return u(Fa,Ep(a.h,l,f,Fp,Gp),4);case 4:return u(Fa,Ep(a.j,m,f,Fp,Gp),5);case 5:return u(Fa,Ep(a.i,n,f,Fp,Gp),2);case 2:D=0;z=[];if(a.h.length&&a.g.length)for(J=t(a.g),K=J.next();!K.done;K=J.next())for(P=K.value,R=t(a.h),ba=R.next();!ba.done;ba=R.next())aa=ba.value,Y=xg(P.drmInfos,aa.drmInfos),P.drmInfos.length&&aa.drmInfos.length&&
599
- !Y.length||(Da=D++,z.push({id:Da,language:P.language,primary:P.primary,audio:P,video:aa,bandwidth:(P.bandwidth||0)+(aa.bandwidth||0),drmInfos:Y,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(B=a.h.concat(a.g),F=t(B),G=F.next();!G.done;G=F.next())H=G.value,I=D++,z.push({id:I,language:H.language,primary:H.primary,audio:H.type==d.cb?H:null,video:H.type==d.Na?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
598
+ function yp(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,w,y,x,D,z,B,E,G,H,I,J,K,P,R,ba,aa,Y,Da;return L(function(Fa){switch(Fa.g){case 1:d=qc;zp(b);Ap(b);Bp(b);Cp(b);if(!c&&1==b.length){e=b[0];a.g=e.yc;a.h=e.Wc;a.j=e.textStreams;a.i=e.imageStreams;Fa.B(2);break}f=-1;for(g=0;g<b.length;g++)h=b[g],a.m.has(h.id)||(a.m.add(h.id),-1==f&&(f=g));if(-1==f)return Fa["return"]();k=b.map(function(xa){return xa.yc});l=b.map(function(xa){return xa.Wc});m=b.map(function(xa){return xa.textStreams});n=b.map(function(xa){return xa.imageStreams});
599
+ p=t(m);for(q=p.next();!q.done;q=p.next())v=q.value,v.push(Dp(d.Z));w=t(n);for(y=w.next();!y.done;y=w.next())x=y.value,x.push(Dp(d.Tb));return u(Fa,Ep(a.g,k,f,Fp,Gp),3);case 3:return u(Fa,Ep(a.h,l,f,Fp,Gp),4);case 4:return u(Fa,Ep(a.j,m,f,Fp,Gp),5);case 5:return u(Fa,Ep(a.i,n,f,Fp,Gp),2);case 2:D=0;z=[];if(a.h.length&&a.g.length)for(J=t(a.g),K=J.next();!K.done;K=J.next())for(P=K.value,R=t(a.h),ba=R.next();!ba.done;ba=R.next())aa=ba.value,Y=xg(P.drmInfos,aa.drmInfos),P.drmInfos.length&&aa.drmInfos.length&&
600
+ !Y.length||(Da=D++,z.push({id:Da,language:P.language,primary:P.primary,audio:P,video:aa,bandwidth:(P.bandwidth||0)+(aa.bandwidth||0),drmInfos:Y,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(B=a.h.concat(a.g),E=t(B),G=E.next();!G.done;G=E.next())H=G.value,I=D++,z.push({id:I,language:H.language,primary:H.primary,audio:H.type==d.cb?H:null,video:H.type==d.Na?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
600
601
  a.l=z;A(Fa)}})}function zp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.yc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&gb(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.yc=c}}
601
602
  function Bp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.bandwidth==h.bandwidth&&gb(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
602
603
  function Ap(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.Wc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&gb(e.roles,h.roles)&&rf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Wc=c}}
603
604
  function Cp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
604
- function Hp(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,D,z,B,F,G,H,I,J,K,P;return L(function(R){switch(R.g){case 1:b=qc;if(1==a.length)return R["return"](a[0]);c=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.cb})});d=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.Na})});e=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.Z})});f=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.Tb})});g=t(e);for(h=g.next();!h.done;h=g.next())k=
605
- h.value,k.push(Ip(b.Z));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Ip(b.Tb));return u(R,Ep([],c,0,Jp,Kp),2);case 2:return p=R.h,u(R,Ep([],d,0,Jp,Kp),3);case 3:return q=R.h,u(R,Ep([],e,0,Jp,Kp),4);case 4:return v=R.h,u(R,Ep([],f,0,Jp,Kp),5);case 5:w=R.h;x=0;if(q.length&&p.length)for(F=t(p),G=F.next();!G.done;G=F.next())for(H=G.value,I=t(q),J=I.next();!J.done;J=I.next())K=J.value,P=x++,K.variantIds.push(P),H.variantIds.push(P);else for(y=q.concat(p),D=t(y),z=D.next();!z.done;z=D.next())B=
606
- z.value,B.variantIds=[x++];return R["return"](q.concat(p).concat(v).concat(w))}})}
607
- function Ep(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,w,x,y,D,z,B,F,G,H,I,J;return L(function(K){switch(K.g){case 1:f=qc;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=t(a);l=k.next();case 2:if(l.done){K.B(4);break}m=l.value;return u(K,Lp(m,b,c,e,g),5);case 5:n=K.h;if(!n)throw new N(2,4,4037);l=k.next();K.B(2);break;case 4:p=t(g);for(q=p.next();!q.done;q=p.next())for(v=q.value,w=t(v),x=w.next();!x.done;x=w.next())y=x.value,(D=Mp(y,b,d,e,g))&&a.push(D);z=t(g);for(q=z.next();!q.done;q=
608
- z.next())for(B=q.value,F={},G=t(B),x=G.next();!x.done;F={Wa:F.Wa},x=G.next())if(F.Wa=x.value,H=F.Wa.type==f.Z&&!F.Wa.language,I=F.Wa.type==f.Tb&&!F.Wa.tilesLayout,!H&&!I&&(J=a.some(function(P){return function(R){return R.mimeType==P.Wa.mimeType&&cd(R.codecs)==cd(P.Wa.codecs)}}(F))))throw new N(2,4,4037);return K["return"](a)}})}
605
+ function Hp(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,w,y,x,D,z,B,E,G,H,I,J,K,P;return L(function(R){switch(R.g){case 1:b=qc;if(1==a.length)return R["return"](a[0]);c=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.cb})});d=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.Na})});e=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.Z})});f=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.Tb})});g=t(e);for(h=g.next();!h.done;h=g.next())k=
606
+ h.value,k.push(Ip(b.Z));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Ip(b.Tb));return u(R,Ep([],c,0,Jp,Kp),2);case 2:return p=R.h,u(R,Ep([],d,0,Jp,Kp),3);case 3:return q=R.h,u(R,Ep([],e,0,Jp,Kp),4);case 4:return v=R.h,u(R,Ep([],f,0,Jp,Kp),5);case 5:w=R.h;y=0;if(q.length&&p.length)for(E=t(p),G=E.next();!G.done;G=E.next())for(H=G.value,I=t(q),J=I.next();!J.done;J=I.next())K=J.value,P=y++,K.variantIds.push(P),H.variantIds.push(P);else for(x=q.concat(p),D=t(x),z=D.next();!z.done;z=D.next())B=
607
+ z.value,B.variantIds=[y++];return R["return"](q.concat(p).concat(v).concat(w))}})}
608
+ function Ep(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,w,y,x,D,z,B,E,G,H,I,J;return L(function(K){switch(K.g){case 1:f=qc;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=t(a);l=k.next();case 2:if(l.done){K.B(4);break}m=l.value;return u(K,Lp(m,b,c,e,g),5);case 5:n=K.h;if(!n)throw new N(2,4,4037);l=k.next();K.B(2);break;case 4:p=t(g);for(q=p.next();!q.done;q=p.next())for(v=q.value,w=t(v),y=w.next();!y.done;y=w.next())x=y.value,(D=Mp(x,b,d,e,g))&&a.push(D);z=t(g);for(q=z.next();!q.done;q=
609
+ z.next())for(B=q.value,E={},G=t(B),y=G.next();!y.done;E={Va:E.Va},y=G.next())if(E.Va=y.value,H=E.Va.type==f.Z&&!E.Va.language,I=E.Va.type==f.Tb&&!E.Va.tilesLayout,!H&&!I&&(J=a.some(function(P){return function(R){return R.mimeType==P.Va.mimeType&&cd(R.codecs)==cd(P.Va.codecs)}}(E))))throw new N(2,4,4037);return K["return"](a)}})}
609
610
  function Lp(a,b,c,d,e){return L(function(f){if(1==f.g)return Np(b,a),a.matchedStreams?a.segmentIndex?u(f,Op(a,c),2):f.B(2):f["return"](!1);Pp(a,c,d,e);return f["return"](!0)})}
610
- function Op(a,b){var c,d,e,f,g,h,k;return L(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return u(l,Promise.all(c),2)}if(a.segmentIndex instanceof gj)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.j.push(k.segmentIndex);A(l)})}
611
- function Mp(a,b,c,d,e){var f=c(a);Np(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return L(function(g){if(f.segmentIndex)return g.B(0);f.segmentIndex=new gj;return u(g,Op(f,0),0)})});if(!f.matchedStreams)return null;Pp(f,0,d,e);return f}function Pp(a,b,c,d){for(var e=a.matchedStreams,f=0;f<e.length;f++)if(f>=b){var g=e[f];c(a,g);var h=!0;"audio"==a.type&&0==vd(a.language,g.language)&&(h=!1);h&&d[f]["delete"](g)}}
611
+ function Op(a,b){var c,d,e,f,g,h,k;return L(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return u(l,Promise.all(c),2)}if(a.segmentIndex instanceof gj)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.j.push(k.segmentIndex);A(l)})}
612
+ function Mp(a,b,c,d,e){var f=c(a);Np(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return L(function(g){if(f.segmentIndex)return g.B(0);f.segmentIndex=new gj;return u(g,Op(f,0),0)})});if(!f.matchedStreams||!f.matchedStreams.length)return null;Pp(f,0,d,e);return f}function Pp(a,b,c,d){for(var e=a.matchedStreams,f=0;f<e.length;f++)if(f>=b){var g=e[f];c(a,g);var h=!0;"audio"==a.type&&0==vd(a.language,g.language)&&(h=!1);h&&d[f]["delete"](g)}}
612
613
  function Fp(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=t(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
613
614
  function Jp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
614
615
  function Gp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));a.keyIds=function(f,g){return new Set([].concat(ja(f),ja(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=xg(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new N(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
@@ -623,106 +624,107 @@ function Vp(a,b,c){if(a.id==c.id)return!0;var d=vd(a.language,b.language),e=vd(a
623
624
  a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Wp(a,b,c){return a.id==c.id?!0:Xp(a.width*a.height,b.width*b.height,c.width*c.height)==Yp?!0:!1}function Ip(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
624
625
  function Dp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new T([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
625
626
  function Xp(a,b,c){if(b==a&&a!=c)return Zp;if(c==a&&a!=b)return Yp;if(b>a){if(c<=a||c-a<b-a)return Yp;if(c-a>b-a)return Zp}else{if(c>a)return Zp;if(a-c<a-b)return Yp;if(a-c>a-b)return Zp}return aq}function $p(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Yp:b<a?Zp:aq}var Yp=1,aq=0,Zp=-1;function bq(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.G=1;this.l={};this.N={};this.j=new xp;this.F=0;this.I=new Pa(5);this.D=new O(function(){cq(a)});this.o=new Qe;this.s=null;this.L=[];this.u=Infinity;this.C=!1}r=bq.prototype;r.configure=function(a){this.g=a};r.start=function(a,b){var c=this,d;return L(function(e){if(1==e.g)return c.C=b.isLowLatencyMode(),c.m=[a],c.h=b,u(e,dq(c),2);d=e.h;c.h&&eq(c,d);if(!c.h)throw new N(2,7,7001);return e["return"](c.i)})};
626
- r.stop=function(){for(var a=t(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.D&&(this.D.stop(),this.D=null);return this.o.destroy()};r.update=function(){var a=this,b;return L(function(c){if(1==c.g)return C(c,2),u(c,dq(a),4);if(2!=c.g)return va(c,0);b=E(c);if(!a.h||!b)return c["return"]();a.h.onError(b);A(c)})};r.onExpirationUpdated=function(){};
627
+ r.stop=function(){for(var a=t(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.D&&(this.D.stop(),this.D=null);return this.o.destroy()};r.update=function(){var a=this,b;return L(function(c){if(1==c.g)return C(c,2),u(c,dq(a),4);if(2!=c.g)return va(c,0);b=F(c);if(!a.h||!b)return c["return"]();a.h.onError(b);A(c)})};r.onExpirationUpdated=function(){};
627
628
  function dq(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=We(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),Re(a.o,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k["return"](0);f.uri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return u(k,fq(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.I.sample(1,h);return k["return"](h)})}
628
629
  function fq(a,b,c){var d,e,f,g,h;return L(function(k){if(1==k.g){d=Of(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](gq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=To(d,a.g.retryParameters,f,c,a.h.networkingEngine);Re(a.o,g);return u(k,g.promise,2)}h=k.h;return k["return"](gq(a,h,c))})}
629
- function gq(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,D,z,B,F,G,H,I,J,K,P,R,ba,aa,Y,Da,Fa,xa;return L(function(Ja){switch(Ja.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=tf(b,"Location").map(zf).filter(Qb);0<f.length&&(g=kc(e,f),e=a.m=g);h=tf(b,"BaseURL");k=h.map(zf);l=kc(e,k);m=0;h&&h.length&&(m=Bf(h[0],"availabilityTimeOffset",Kf)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=Bf(b,"minBufferTime",Df)||0);a.F=Bf(b,"minimumUpdatePeriod",Df,-1);q=Bf(b,"availabilityStartTime",Cf);v=Bf(b,
630
- "timeShiftBufferDepth",Df);w=a.g.dash.ignoreSuggestedPresentationDelay;x=null;w||(x=Bf(b,"suggestedPresentationDelay",Df));y=a.g.dash.ignoreMaxSegmentDuration;D=null;y||(D=Bf(b,"maxSegmentDuration",Df));z=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,F=t(Object.values(a.l)),G=F.next();!G.done;G=F.next())H=G.value,H.segmentIndex&&H.segmentIndex.eb(B.Ra());else I=a.g.defaultPresentationDelay||1.5*p,J=null!=x?x:I,B=new S(q,J,a.g.dash.autoCorrectDrift);B.pc("static"==z);(K=B.U())&&
631
- !isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);B.Zd(v);P=b.getAttribute("profiles")||"";R={Pa:"static"!=z,presentationTimeline:B,aa:null,T:null,ha:null,H:null,bandwidth:0,qe:!1,Ab:m,profiles:P.split(",")};ba=hq(a,R,l,b);aa=ba.duration;Y=ba.periods;"static"!=z&&ba.je||B.Ja(aa||Infinity);a.u&&!a.C&&(Da=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.C=a.h.isLowLatencyMode());a.C?B.De(a.u):a.u&&Ua("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.");
632
- B.Id(D||1);return u(Ja,yp(a.j,Y,R.Pa),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Ja.B(3);break}a.i={presentationTimeline:B,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0};if(!B.Ie()){Ja.B(4);break}Fa=tf(b,"UTCTiming");return u(Ja,iq(a,l,Fa),5);case 5:xa=Ja.h;if(!a.h)return Ja["return"]();B.Ee(xa);case 4:B.Cd();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),A(Ja)}})}
630
+ function gq(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,w,y,x,D,z,B,E,G,H,I,J,K,P,R,ba,aa,Y,Da,Fa,xa;return L(function(Ja){switch(Ja.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=tf(b,"Location").map(zf).filter(Qb);0<f.length&&(g=kc(e,f),e=a.m=g);h=tf(b,"BaseURL");k=h.map(zf);l=kc(e,k);m=0;h&&h.length&&(m=Bf(h[0],"availabilityTimeOffset",Kf)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=Bf(b,"minBufferTime",Df)||0);a.F=Bf(b,"minimumUpdatePeriod",Df,-1);q=Bf(b,"availabilityStartTime",Cf);v=Bf(b,
631
+ "timeShiftBufferDepth",Df);w=a.g.dash.ignoreSuggestedPresentationDelay;y=null;w||(y=Bf(b,"suggestedPresentationDelay",Df));x=a.g.dash.ignoreMaxSegmentDuration;D=null;x||(D=Bf(b,"maxSegmentDuration",Df));z=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,E=t(Object.values(a.l)),G=E.next();!G.done;G=E.next())H=G.value,H.segmentIndex&&H.segmentIndex.eb(B.Qa());else I=a.g.defaultPresentationDelay||1.5*p,J=null!=y?y:I,B=new S(q,J,a.g.dash.autoCorrectDrift);B.pc("static"==z);(K=B.U())&&
632
+ !isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);B.Zd(v);P=b.getAttribute("profiles")||"";R={Wa:"static"!=z,presentationTimeline:B,aa:null,T:null,ha:null,H:null,bandwidth:0,qe:!1,Ab:m,profiles:P.split(",")};ba=hq(a,R,l,b);aa=ba.duration;Y=ba.periods;"static"!=z&&ba.je||B.Ja(aa||Infinity);a.u&&!a.C&&(Da=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.C=a.h.isLowLatencyMode());a.C?B.Ce(a.u):a.u&&Ua("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.");
633
+ B.Id(D||1);return u(Ja,yp(a.j,Y,R.Wa),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Ja.B(3);break}a.i={presentationTimeline:B,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0};if(!B.He()){Ja.B(4);break}Fa=tf(b,"UTCTiming");return u(Ja,iq(a,l,Fa),5);case 5:xa=Ja.h;if(!a.h)return Ja["return"]();B.De(xa);case 4:B.Cd();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),A(Ja)}})}
633
634
  function hq(a,b,c,d){var e=Bf(d,"mediaPresentationDuration",Df),f=[],g=0;d=tf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Bf(k,"start",Df,g),n=k.id,p=Bf(k,"duration",Df),q=null;if(l){var v=Bf(l,"start",Df);null!=v&&(q=v-m)}else null!=e&&(q=e-m);null==q&&(q=p);if(!(null!==a.s&&null!==n&&null!==m&&m<a.s)||a.L.includes(n)||h+1==d.length){null!==m&&(null===a.s||m>a.s)&&(a.s=m);g=jq(a,b,c,{start:m,duration:q,node:k,td:null==q||!l});f.push(g);b.aa.id&&q&&(a.N[b.aa.id]=q);if(null==q){g=
634
635
  null;break}g=m+q}}a.L=f.map(function(w){return w.id});return null!=e?{periods:f,duration:e,je:!1}:{periods:f,duration:g,je:!0}}
635
- function jq(a,b,c,d){b.aa=kq(d.node,null,c);b.T=d;b.aa.Ab=b.Ab;b.aa.id||(b.aa.id="__shaka_period_"+d.start);var e=tf(d.node,"EventStream");c=b.presentationTimeline.Ra();e=t(e);for(var f=e.next();!f.done;f=e.next())lq(a,d.start,d.duration,f.value,c);c=tf(d.node,"AdaptationSet").map(function(m){return mq(a,b,m)}).filter(Qb);if(b.Pa){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Tf);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new N(2,4,4018);
636
+ function jq(a,b,c,d){b.aa=kq(d.node,null,c);b.T=d;b.aa.Ab=b.Ab;b.aa.id||(b.aa.id="__shaka_period_"+d.start);var e=tf(d.node,"EventStream");c=b.presentationTimeline.Qa();e=t(e);for(var f=e.next();!f.done;f=e.next())lq(a,d.start,d.duration,f.value,c);c=tf(d.node,"AdaptationSet").map(function(m){return mq(a,b,m)}).filter(Qb);if(b.Wa){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Sf);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new N(2,4,4018);
636
637
  }d=c.filter(function(m){return!m.be});c=c.filter(function(m){return m.be});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.be.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={wc:h.wc},l=k.next())h.wc=l.value,h.wc.trickModeVideo=e.streams.find(function(m){return function(n){return cd(m.wc.codecs)==cd(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:nq(d,"audio");g=a.g.disableVideo?[]:nq(d,"video");f=a.g.disableText?
637
638
  []:nq(d,pc);c=a.g.disableThumbnails?[]:nq(d,"image");if(!g.length&&!e.length)throw new N(2,4,4004);d=[];e=t(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ja(h.value.streams));e=[];g=t(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ja(h.value.streams));g=[];f=t(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ja(h.value.streams));f=[];c=t(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ja(h.value.streams));return{id:b.aa.id,yc:d,Wc:e,textStreams:g,imageStreams:f}}
638
639
  function nq(a,b){return a.filter(function(c){return c.contentType==b})}
639
640
  function mq(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ha=kq(c,b.aa,null);var e=!1,f=tf(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Qb),h=void 0,k=b.ha.contentType==pc;k&&(h="subtitle");f=t(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
640
641
  l}}var n;m=tf(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var q=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==q?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==q?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=tf(c,"SupplementalProperty");m=t(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),
641
- 10)));m=tf(c,"Accessibility");var v=new Map;m=t(m);for(p=m.next();!p.done;p=m.next())if(q=p.value,p=q.getAttribute("schemeIdUri"),q=q.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=q){q=q.split(";");for(var w=t(q),x=w.next();!x.done;x=w.next()){var y=x.value,D=x=void 0;y.includes("=")?(y=y.split("="),x=y[0].startsWith("CC")?y[0]:"CC"+y[0],D=y[1]||"und"):(x="CC"+p,2==q.length?p+=2:p++,D=y);v.set(x,rd(D))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
642
- 1,null!=q)for(q=t(q.split(";")),x=q.next();!x.done;x=q.next())x=x.value,y=w=void 0,x.includes("=")?(x=x.split("="),w="svc"+x[0],y=x[1].split(",")[0].split(":").pop()):(w="svc"+p,p++,y=x),v.set(w,rd(y));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=q&&(g.push(q),"captions"==q&&(h="caption"));if(l)return null;l=tf(c,"ContentProtection");var z=Eo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),B=rd(c.getAttribute("lang")||"und"),F=c.getAttribute("label");(l=tf(c,"Label"))&&l.length&&
643
- (l=l[0],l.textContent&&(F=l.textContent));l=tf(c,"Representation");c=l.map(function(G){if(G=oq(a,b,z,h,B,F,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.ha.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.ha.contentType||"application"==b.ha.contentType)for(b.ha.contentType=pq(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.ha.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=
644
- m.value,p=t(z.drmInfos),q=p.next();!q.done;q=p.next())q=q.value,q.keyIds=q.keyIds&&m.keyIds?new Set([].concat(ja(q.keyIds),ja(m.keyIds))):q.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Qb);return{id:b.ha.id||"__fake__"+a.G++,contentType:b.ha.contentType,language:B,Ng:e,streams:c,drmInfos:z.drmInfos,be:f,Tf:k}}
645
- function oq(a,b,c,d,e,f,g,h,k,l){b.H=kq(l,b.ha,null);a.u=Math.min(a.u,b.H.Ab);if(!qq(b.H))return null;var m=b.T.start;b.bandwidth=Bf(l,"bandwidth",If)||0;var n=b.H.contentType,p=n==pc||"application"==n;n="image"==n;try{var q=function(H,I,J){return rq(a,H,I,J)};if(b.H.nc)var v=fp(b,q);else if(b.H.$a)v=lp(b,a.l);else if(b.H.oc)v=qp(b,q,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.N);else{var w=b.H.za,x=b.T.duration||0;v={Cb:function(){return Promise.resolve(fj(m,x,w))}}}}catch(H){if((p||n)&&4002==H.code)return null;
646
- throw H;}q=tf(l,"ContentProtection");q=Ho(q,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);q=new Set(q?[q]:[]);var y=!1;tf(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(y=!0);var D=!1;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(n&&((l=tf(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
647
- (z=l.getAttribute("value")),!z))return null;var B;l=b.H.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(B="PQ");var F=b.H.id?b.aa.id+","+b.H.id:"",G={id:a.G++,originalId:b.H.id,createSegmentIndex:function(){var H,I,J;return L(function(K){if(1==K.g){I=(H=F&&b.Pa&&a.l[F])?a.l[F]:G;if(I.segmentIndex)return K.B(0);J=I;return u(K,v.Cb(),3)}J.segmentIndex=K.h;A(K)})},closeSegmentIndex:function(){G.segmentIndex&&
648
- (G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.H.mimeType,codecs:b.H.codecs,frameRate:b.H.frameRate,pixelAspectRatio:b.H.pixelAspectRatio,bandwidth:b.bandwidth,width:b.H.width,height:b.H.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:q,language:e,label:f,type:b.ha.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.H.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.H.Nc,audioSamplingRate:b.H.audioSamplingRate,spatialAudio:y,closedCaptions:k,
649
- hdr:B,tilesLayout:z,matchedStreams:[]};F&&b.Pa&&!a.l[F]&&(a.l[F]=G);return G}function cq(a){var b,c;L(function(d){switch(d.g){case 1:return b=0,C(d,2),u(d,dq(a),4);case 4:b=d.h;va(d,3);break;case 2:c=E(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();eq(a,b);A(d)}})}function eq(a,b){0>a.F||a.D.S(Math.max(3,a.F-b,Qa(a.I)))}
642
+ 10)));m=tf(c,"Accessibility");var v=new Map;m=t(m);for(p=m.next();!p.done;p=m.next())if(q=p.value,p=q.getAttribute("schemeIdUri"),q=q.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=q){q=q.split(";");for(var w=t(q),y=w.next();!y.done;y=w.next()){var x=y.value,D=y=void 0;x.includes("=")?(x=x.split("="),y=x[0].startsWith("CC")?x[0]:"CC"+x[0],D=x[1]||"und"):(y="CC"+p,2==q.length?p+=2:p++,D=x);v.set(y,rd(D))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
643
+ 1,null!=q)for(q=t(q.split(";")),y=q.next();!y.done;y=q.next())y=y.value,x=w=void 0,y.includes("=")?(y=y.split("="),w="svc"+y[0],x=y[1].split(",")[0].split(":").pop()):(w="svc"+p,p++,x=y),v.set(w,rd(x));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=q&&(g.push(q),"captions"==q&&(h="caption"));if(l)return null;l=tf(c,"ContentProtection");var z=Eo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),B=rd(c.getAttribute("lang")||"und"),E=c.getAttribute("label");(l=tf(c,"Label"))&&l.length&&
644
+ (l=l[0],l.textContent&&(E=l.textContent));l=tf(c,"Representation");c=l.map(function(G){if(G=oq(a,b,z,h,B,E,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.ha.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.ha.contentType||"application"==b.ha.contentType)for(b.ha.contentType=pq(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.ha.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=
645
+ m.value,p=t(z.drmInfos),q=p.next();!q.done;q=p.next())q=q.value,q.keyIds=q.keyIds&&m.keyIds?new Set([].concat(ja(q.keyIds),ja(m.keyIds))):q.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Qb);return{id:b.ha.id||"__fake__"+a.G++,contentType:b.ha.contentType,language:B,Mg:e,streams:c,drmInfos:z.drmInfos,be:f,Sf:k}}
646
+ function oq(a,b,c,d,e,f,g,h,k,l){b.H=kq(l,b.ha,null);a.u=Math.min(a.u,b.H.Ab);if(!qq(b.H))return null;var m=b.T.start;b.bandwidth=Bf(l,"bandwidth",Gf)||0;var n=b.H.contentType,p=n==pc||"application"==n;n="image"==n;try{var q=function(G,H,I){return rq(a,G,H,I)};if(b.H.nc)var v=fp(b,q);else if(b.H.$a)v=lp(b,a.l);else if(b.H.oc)v=qp(b,q,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.N);else{var w=b.H.za,y=b.T.duration||0;v={Cb:function(){return Promise.resolve(fj(m,y,w))}}}}catch(G){if((p||n)&&4002==G.code)return null;
647
+ throw G;}q=tf(l,"ContentProtection");q=Ho(q,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);q=new Set(q?[q]:[]);var x=!1;tf(l,"SupplementalProperty").some(function(G){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==G.getAttribute("schemeIdUri")&&"JOC"==G.getAttribute("value")})&&(x=!0);var D=!1;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(n&&((l=tf(l,"EssentialProperty").find(function(G){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(G.getAttribute("schemeIdUri"))}))&&
648
+ (z=l.getAttribute("value")),!z))return null;var B;l=b.H.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(B="PQ");l=b.H.id?b.aa.id+","+b.H.id:"";var E=l&&a.l[l]?a.l[l]:{id:a.G++,originalId:b.H.id,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){E.segmentIndex&&(E.segmentIndex.release(),E.segmentIndex=null)},segmentIndex:null,mimeType:b.H.mimeType,codecs:b.H.codecs,
649
+ frameRate:b.H.frameRate,pixelAspectRatio:b.H.pixelAspectRatio,bandwidth:b.bandwidth,width:b.H.width,height:b.H.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:q,language:e,label:f,type:b.ha.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.H.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.H.Nc,audioSamplingRate:b.H.audioSamplingRate,spatialAudio:x,closedCaptions:k,hdr:B,tilesLayout:z,matchedStreams:[]};E.createSegmentIndex=function(){var G;return L(function(H){if(1==
650
+ H.g){if(E.segmentIndex)return H.B(0);G=E;return u(H,v.Cb(),3)}G.segmentIndex=H.h;A(H)})};l&&b.Wa&&!a.l[l]&&(a.l[l]=E);return E}function cq(a){var b,c;L(function(d){switch(d.g){case 1:return b=0,C(d,2),u(d,dq(a),4);case 4:b=d.h;va(d,3);break;case 2:c=F(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();eq(a,b);A(d)}})}function eq(a,b){0>a.F||a.D.S(Math.max(3,a.F-b,Qa(a.I)))}
650
651
  function kq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Nc:null,audioSamplingRate:null,Ab:0};c=c||b.za;var d=tf(a,"BaseURL"),e=d.map(zf),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Bf(a,"frameRate",Lf)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=tf(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
651
- m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=tf(a,"AudioChannelConfiguration");m=sq(m)||b.Nc;p=Bf(a,"audioSamplingRate",Jf)||b.audioSamplingRate;f||(f=pq(g,h));var q=sf(a,"SegmentBase"),v=sf(a,"SegmentTemplate"),w=q?Bf(q,"availabilityTimeOffset",Kf)||0:0,x=v?Bf(v,"availabilityTimeOffset",Kf)||0:0;d=d&&d.length?Bf(d[0],"availabilityTimeOffset",Kf)||0:0;d=b.Ab+d+w+x;return{za:kc(c,e),nc:q||b.nc,$a:sf(a,"SegmentList")||b.$a,oc:v||b.oc,width:Bf(a,"width",Jf)||b.width,height:Bf(a,
652
+ m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=tf(a,"AudioChannelConfiguration");m=sq(m)||b.Nc;p=Bf(a,"audioSamplingRate",Jf)||b.audioSamplingRate;f||(f=pq(g,h));var q=sf(a,"SegmentBase"),v=sf(a,"SegmentTemplate"),w=q?Bf(q,"availabilityTimeOffset",Kf)||0:0,y=v?Bf(v,"availabilityTimeOffset",Kf)||0:0;d=d&&d.length?Bf(d[0],"availabilityTimeOffset",Kf)||0:0;d=b.Ab+d+w+y;return{za:kc(c,e),nc:q||b.nc,$a:sf(a,"SegmentList")||b.$a,oc:v||b.oc,width:Bf(a,"width",Jf)||b.width,height:Bf(a,
652
653
  "height",Jf)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),Nc:m,audioSamplingRate:p,Ab:d}}
653
654
  function sq(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
654
655
  parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function qq(a){var b=a.nc?1:0;b+=a.$a?1:0;b+=a.oc?1:0;if(0==b)return a.contentType==pc||"application"==a.contentType?!0:!1;1!=b&&(a.nc&&(a.$a=null),a.oc=null);return!0}
655
656
  function tq(a,b,c,d){var e,f,g,h,k,l;return L(function(m){if(1==m.g)return e=kc(b,[c]),f=We(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),Re(a.o,g),u(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m["return"](0);k=h.headers.date}else k=Jc(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
656
657
  function iq(a,b,c){var d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.B(4);break}h=g.value;C(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.B(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.B(8);
657
658
  case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n["return"](isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Ua("NTP UTCTiming scheme is not supported");break;default:Ua("Unrecognized scheme in UTCTiming element",k)}n.B(9);break;case 7:return u(n,tq(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return u(n,tq(a,b,l,"GET"),11);case 11:return n["return"](n.h);
658
- case 9:va(n,3);break;case 5:E(n);case 3:g=f.next();n.B(2);break;case 4:return Ua("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n["return"](0)}})}
659
+ case 9:va(n,3);break;case 5:F(n);case 3:g=f.next();n.B(2);break;case 4:return Ua("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n["return"](0)}})}
659
660
  function lq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=Bf(d,"timescale",Jf)||1;d=t(tf(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=Bf(k,"presentationTime",Jf)||0,m=Bf(k,"duration",Jf)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.h.onTimelineRegionAdded(k))}}
660
661
  function rq(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=bf,f=vj(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),Re(a.o,h),u(l,h.promise,2);k=l.h;return l["return"](k.data)})}function pq(a,b){return gd(ad(a,b))?pc:a.split("/")[0]}M("shaka.dash.DashParser",bq);Dg.mpd=function(){return new bq};Bg["application/dash+xml"]=function(){return new bq};Bg["video/vnd.mpeg.dash.mpd"]=function(){return new bq};function uq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function vq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}vq.prototype.toString=function(){function a(d){return d.name+"="+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}var b="#"+this.name,c=this.g?this.g.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b};
661
662
  vq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Z(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function wq(a,b){var c=a.getAttribute(b);if(!c)throw new N(2,4,4023,b);return c.value}function xq(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.i=c}function yq(a,b){this.name=a;this.value=b};function zq(a,b){return a.filter(function(c){return c.name==b})}function Aq(a,b){return a.filter(function(c){return wq(c,"TYPE")==b})}function Bq(a,b){var c=zq(a,b);return c.length?c[0]:null}function Cq(a,b,c){c=void 0===c?0:c;return(a=Bq(a,b))?Number(a.value):c};function Dq(a){this.h=a;this.g=0}function Eq(a){Fq(a,/[ \t]+/gm)}function Fq(a,b){b.lastIndex=a.g;var c=b.exec(a.h);c=null==c?null:{position:c.index,length:c[0].length,results:c};if(a.g==a.h.length||null==c||c.position!=a.g)return null;a.g+=c.length;return c.results}function Gq(a){return a.g==a.h.length?null:(a=Fq(a,/[^ \t\n]*/gm))?a[0]:null};function Hq(){this.g=0}
662
663
  function Iq(a,b,c){b=Jc(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new N(2,4,4015);b=0;for(var e=!0,f=t(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=Jq(a,g),--a.g,Kq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;for(g=0;g<d.length;g++){var h=d[g],k=d[g+1];if(/^#(?!EXT)/m.test(h)||e)e=!1;else{h=Jq(a,h);if(Lq.includes(h.name)){if(1!=b)throw new N(2,4,4017);
663
664
  var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=t(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=Jq(a,m),Kq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Z(m,"TYPE")?k.push(m):"MAP"==Z(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=kc([d],[m.trim()])[0],h&&g.push(h),e.push(new xq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new xq("",g,k)));return new uq(c,b,f,e)}f.push(h);
664
665
  "EXT-X-STREAM-INF"==h.name&&(h.g.push(new yq("URI",k)),e=!0)}}return new uq(c,b,f)}function Jq(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new N(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new Dq(f);var h;(h=Fq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=Fq(f,k);)d.push(new yq(h[1],h[2]||h[3])),Eq(f)}return new vq(c,e,d,g)}
665
- var Kq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),Lq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Mq(){}function Nq(a){try{var b=Oq(a);return Ie({uri:a,ve:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Ge(c)}}function Oq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new N(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new N(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Sc(a):e=Nc(a);return{data:e,contentType:c}}
666
- M("shaka.net.DataUriPlugin",Mq);Mq.parse=Nq;Te("data",Nq);function Pq(){var a=this;this.g=this.i=null;this.Ga=1;this.o=new Map;this.u=new Map;this.ya=new Set;this.h=new Map;this.j=null;this.N="";this.da=new Hq;this.xa=0;this.C=new O(function(){Qq(a)});this.m=Rq;this.D=null;this.fa=0;this.G=Infinity;this.ca=this.ga=0;this.F=new Qe;this.W=[];this.L=new Map;this.Ma=!1;this.s=new Map;this.V=null;this.ea=new Map;this.I=new Map;this.l=!1}r=Pq.prototype;r.configure=function(a){this.g=a};
666
+ var Kq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),Lq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Mq(){}function Nq(a){try{var b=Oq(a);return Ie({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Ge(c)}}
667
+ function Oq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new N(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new N(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Sc(a):e=Nc(a);return{data:e,contentType:c}}M("shaka.net.DataUriPlugin",Mq);Mq.parse=Nq;Te("data",Nq);function Pq(){var a=this;this.g=this.i=null;this.Ga=1;this.o=new Map;this.u=new Map;this.ya=new Set;this.h=new Map;this.j=null;this.N="";this.da=new Hq;this.xa=0;this.C=new O(function(){Qq(a)});this.m=Rq;this.D=null;this.fa=0;this.G=Infinity;this.ca=this.ga=0;this.F=new Qe;this.W=[];this.L=new Map;this.Ma=!1;this.s=new Map;this.V=null;this.ea=new Map;this.I=new Map;this.l=!1}r=Pq.prototype;r.configure=function(a){this.g=a};
667
668
  r.start=function(a,b){var c=this,d,e;return L(function(f){if(1==f.g)return c.i=b,c.l=b.isLowLatencyMode(),u(f,Sq(c,a),2);if(3!=f.g)return d=f.h,c.N=d.uri,u(f,Tq(c,d.data),3);e=c.xa;0<e&&c.C.S(e);return f["return"](c.D)})};r.stop=function(){this.C&&(this.C.stop(),this.C=null);var a=[];this.F&&(a.push(this.F.destroy()),this.F=null);this.g=this.i=null;this.ya.clear();this.D=null;this.h.clear();this.u.clear();this.s.clear();this.o.clear();return Promise.all(a)};
668
669
  r.update=function(){var a=this,b,c,d;return L(function(e){if(1==e.g){if(a.m==Rq)return e["return"]();b=[];a.V=null;c=Array.from(a.h.values());return c.length?u(e,Uq(a,c[0]),2):e.B(2)}for(d=1;d<c.length;d++)b.push(Uq(a,c[d]));return u(e,Promise.all(b),0)})};
669
- function Uq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v;return L(function(w){if(1==w.g)return c=Vq,d=b.Me,e=new Xb(d),a.l&&b.Re&&$b(e,new bc("_HLS_skip=YES")),u(w,Sq(a,e.toString()),2);if(3!=w.g){f=w.h;g=Iq(a.da,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=zq(g.g,"EXT-X-DEFINE");k=Wq(a,h);l=b.stream;return u(w,Xq(a,b.Vc,g,l.type,l.mimeType,b.Fd,k,b.Ye,l.codecs,l.bandwidth),3)}m=w.h;l.segmentIndex.Gb(m,a.j.Ra());m.length&&(n=Cq(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.Fd.get(n),l.segmentIndex.eb(p));q=m[m.length-
670
- 1];if(v=Bq(g.g,"EXT-X-ENDLIST"))Yq(a,c.Le),a.j.Ja(q.endTime);A(w)})}r.onExpirationUpdated=function(){};
671
- function Tq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,D,z,B,F,G,H,I,J,K,P,R,ba,aa,Y,Da,Fa,xa,Ja,Rb,nd;return L(function(Ya){switch(Ya.g){case 1:c=Iq(a.da,b,a.N);if(0!=c.type)throw new N(2,4,4022);d=zq(c.g,"EXT-X-DEFINE");Zq(a,d);e=zq(c.g,"EXT-X-MEDIA");f=zq(c.g,"EXT-X-STREAM-INF");g=zq(c.g,"EXT-X-IMAGE-STREAM-INF");$q(a,f);h=zq(c.g,"EXT-X-SESSION-DATA");k=t(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=Z(m,"DATA-ID"),p=Z(m,"URI"),q=Z(m,"LANGUAGE"),v=Z(m,"VALUE"),w=(new Map).set("id",n),p&&w.set("uri",
672
- kc([a.N],[p])[0]),q&&w.set("language",q),v&&w.set("value",v),x=new Q("sessiondata",w),a.i)a.i.onEvent(x);return u(Ya,ar(a,e),2);case 2:return br(a,e),u(Ya,cr(a,f),3);case 3:return y=Ya.h,u(Ya,dr(a,e),4);case 4:return D=Ya.h,u(Ya,er(a,g),5);case 5:z=Ya.h;if(!a.i)throw new N(2,7,7001);if(a.Ma&&0==y.length)throw new N(2,4,4034);F=B=Infinity;G=t(a.h.values());for(H=G.next();!H.done;H=G.next())I=H.value,B=Math.min(B,I.se),"text"!=I.stream.type&&(F=Math.min(F,I.Gf-I.se));a.m!=Rq?(a.j=new S(0,a.g.defaultPresentationDelay?
673
- a.g.defaultPresentationDelay:a.ca?a.ca:3*a.fa),a.j.pc(!1)):(a.j=new S(null,0),a.j.pc(!0));if(a.m!=Rq)a.xa=a.G,J=Vq,a.m==J.Ke&&(K=a.j.Sc,isNaN(a.g.availabilityWindowOverride)||(K=a.g.availabilityWindowOverride),a.j.Zd(K));else for(a.j.Ja(F),a.j.offset(-B),P=t(a.h.values()),H=P.next();!H.done;H=P.next())R=H.value,R.stream.segmentIndex.offset(-B),R.stream.segmentIndex.Xa(0,F);a.W=[];ba=[];aa=t(y);for(Y=aa.next();!Y.done;Y=aa.next())for(Da=Y.value,Fa=t([Da.video,Da.audio]),xa=Fa.next();!xa.done;xa=Fa.next())(Ja=
674
- xa.value)&&ba.push(Ja);return u(Ya,Promise.all(ba.map(function(Gf){return L(function(Ec){return u(Ec,Gf.createSegmentIndex(),0)})})),6);case 6:Rb=t(ba);for(xa=Rb.next();!xa.done;xa=Rb.next())nd=xa.value,a.W.push(nd.segmentIndex.K);fr(a);a.j.Cd();a.D={presentationTimeline:a.j,variants:y,textStreams:D,imageStreams:z,offlineSessionIds:[],minBufferTime:0};a.i.makeTextStreamsForClosedCaptions(a.D);A(Ya)}})}
670
+ function Uq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v;return L(function(w){if(1==w.g)return c=Vq,d=b.Le,e=new Xb(d),a.l&&b.Qe&&$b(e,new bc("_HLS_skip=YES")),u(w,Sq(a,e.toString()),2);if(3!=w.g){f=w.h;g=Iq(a.da,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=zq(g.g,"EXT-X-DEFINE");k=Wq(a,h);l=b.stream;return u(w,Xq(a,b.Vc,g,l.type,l.mimeType,b.Fd,k,b.Xe,l.codecs,l.bandwidth),3)}m=w.h;l.segmentIndex.Gb(m,a.j.Qa());m.length&&(n=Cq(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.Fd.get(n),l.segmentIndex.eb(p));q=m[m.length-
671
+ 1];if(v=Bq(g.g,"EXT-X-ENDLIST"))Yq(a,c.Ke),a.j.Ja(q.endTime);A(w)})}r.onExpirationUpdated=function(){};
672
+ function Tq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,w,y,x,D,z,B,E,G,H,I,J,K,P,R,ba,aa,Y,Da,Fa,xa,Ja,Sb,nd;return L(function(Ya){switch(Ya.g){case 1:c=Iq(a.da,b,a.N);if(0!=c.type)throw new N(2,4,4022);d=zq(c.g,"EXT-X-DEFINE");Zq(a,d);e=zq(c.g,"EXT-X-MEDIA");f=zq(c.g,"EXT-X-STREAM-INF");g=zq(c.g,"EXT-X-IMAGE-STREAM-INF");$q(a,f);h=zq(c.g,"EXT-X-SESSION-DATA");k=t(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=Z(m,"DATA-ID"),p=Z(m,"URI"),q=Z(m,"LANGUAGE"),v=Z(m,"VALUE"),w=(new Map).set("id",n),p&&w.set("uri",
673
+ kc([a.N],[p])[0]),q&&w.set("language",q),v&&w.set("value",v),y=new Q("sessiondata",w),a.i)a.i.onEvent(y);return u(Ya,ar(a,e),2);case 2:return br(a,e),u(Ya,cr(a,f),3);case 3:return x=Ya.h,u(Ya,dr(a,e),4);case 4:return D=Ya.h,u(Ya,er(a,g),5);case 5:z=Ya.h;if(!a.i)throw new N(2,7,7001);if(a.Ma&&0==x.length)throw new N(2,4,4034);E=B=Infinity;G=t(a.h.values());for(H=G.next();!H.done;H=G.next())I=H.value,B=Math.min(B,I.se),"text"!=I.stream.type&&(E=Math.min(E,I.Ff-I.se));a.m!=Rq?(a.j=new S(0,a.g.defaultPresentationDelay?
674
+ a.g.defaultPresentationDelay:a.ca?a.ca:3*a.fa),a.j.pc(!1)):(a.j=new S(null,0),a.j.pc(!0));if(a.m!=Rq)a.xa=a.G,J=Vq,a.m==J.Je&&(K=a.j.Sc,isNaN(a.g.availabilityWindowOverride)||(K=a.g.availabilityWindowOverride),a.j.Zd(K));else for(a.j.Ja(E),a.j.offset(-B),P=t(a.h.values()),H=P.next();!H.done;H=P.next())R=H.value,R.stream.segmentIndex.offset(-B),R.stream.segmentIndex.Xa(0,E);a.W=[];ba=[];aa=t(x);for(Y=aa.next();!Y.done;Y=aa.next())for(Da=Y.value,Fa=t([Da.video,Da.audio]),xa=Fa.next();!xa.done;xa=Fa.next())(Ja=
675
+ xa.value)&&ba.push(Ja);return u(Ya,Promise.all(ba.map(function(Hf){return L(function(Ec){return u(Ec,Hf.createSegmentIndex(),0)})})),6);case 6:Sb=t(ba);for(xa=Sb.next();!xa.done;xa=Sb.next())nd=xa.value,a.W.push(nd.segmentIndex.K);fr(a);a.j.Cd();a.D={presentationTimeline:a.j,variants:x,textStreams:D,imageStreams:z,offlineSessionIds:[],minBufferTime:0};a.i.makeTextStreamsForClosedCaptions(a.D);A(Ya)}})}
675
676
  function Zq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=Z(e,"NAME");e=Z(e,"VALUE");d&&e&&(a.o.has(d)||a.o.set(d,e))}}function Wq(a,b){for(var c=new Map,d=t(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Z(f,"NAME");var g=Z(f,"VALUE");f=Z(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.o.get(f))&&c.set(f,e)}return c}
676
677
  function $q(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=Z(e,"AUDIO");d=Z(e,"VIDEO");var g=Z(e,"SUBTITLES");e=gr(a,e);if(g){var h=nc(pc,e);a.s.set(g,h);fb(e,h)}f&&(g=nc("audio",e),g||(g=a.g.hls.defaultAudioCodec),a.s.set(f,g));d&&(f=nc("video",e),f||(f=a.g.hls.defaultVideoCodec),a.s.set(d,f))}}
677
- function dr(a,b){var c,d,e,f,g,h,k,l,m,n,p,q;return L(function(v){if(1==v.g)return c=Aq(b,"SUBTITLES"),d=c.map(function(w){var x,y,D;return L(function(z){if(1==z.g){if(x=a.g.disableText)return z["return"](null);C(z,2);return u(z,hr(a,w),4)}if(2!=z.g)return y=z.h,z["return"](y.stream);D=E(z);if(a.g.hls.ignoreTextStreamFailures)return z["return"](null);throw D;})}),u(v,Promise.all(d),2);e=v.h;f=t(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=wq(h,"GROUP-ID"),l=a.s.get(k))if(m=a.u.get(k))for(n=
678
+ function dr(a,b){var c,d,e,f,g,h,k,l,m,n,p,q;return L(function(v){if(1==v.g)return c=Aq(b,"SUBTITLES"),d=c.map(function(w){var y,x,D;return L(function(z){if(1==z.g){if(y=a.g.disableText)return z["return"](null);C(z,2);return u(z,hr(a,w),4)}if(2!=z.g)return x=z.h,z["return"](x.stream);D=F(z);if(a.g.hls.ignoreTextStreamFailures)return z["return"](null);throw D;})}),u(v,Promise.all(d),2);e=v.h;f=t(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=wq(h,"GROUP-ID"),l=a.s.get(k))if(m=a.u.get(k))for(n=
678
679
  t(m),p=n.next();!p.done;p=n.next())q=p.value,q.stream.codecs=l;return v["return"](e.filter(function(w){return w}))})}
679
- function er(a,b){var c,d;return L(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return L(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l["return"](null);C(l,2);return u(l,ir(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=E(l);if(a.g.hls.ignoreImageStreamFailures)return l["return"](null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e["return"](d.filter(function(f){return f}))})}
680
+ function er(a,b){var c,d;return L(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return L(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l["return"](null);C(l,2);return u(l,ir(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=F(l);if(a.g.hls.ignoreImageStreamFailures)return l["return"](null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e["return"](d.filter(function(f){return f}))})}
680
681
  function ar(a,b){var c;return L(function(d){if(1==d.g)return b=b.filter(function(e){var f=Z(e,"URI")||"";return"SUBTITLES"!=Z(e,"TYPE")&&""!=f}),b.length?u(d,hr(a,b[0]),2):d.B(2);c=b.slice(1).map(function(e){return hr(a,e)});return u(d,Promise.all(c),0)})}
681
- function cr(a,b){var c,d,e;return L(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,q,v;return L(function(w){if(1==w.g)return h=Z(g,"FRAME-RATE"),k=Number(Z(g,"AVERAGE-BANDWIDTH"))||Number(wq(g,"BANDWIDTH")),l=Z(g,"RESOLUTION"),m=t(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,q=Z(g,"VIDEO-RANGE"),u(w,jr(a,g,k),2);if(v=w.h){for(var x=w["return"],y=v.audio,D=v.video,z=t(D),B=z.next();!B.done;B=z.next())if(B=B.value.stream)B.width=Number(n)||void 0,B.height=Number(p)||
682
- void 0,B.frameRate=Number(h)||void 0,B.hdr=q||void 0;z=a.g.disableAudio;if(!y.length||z)y=[null];z=a.g.disableVideo;if(!D.length||z)D=[null];z=[];y=t(y);for(B=y.next();!B.done;B=y.next()){B=B.value;for(var F=t(D),G=F.next();!G.done;G=F.next()){var H=G.value;G=B?B.stream:null;var I=H?H.stream:null,J=B?B.stream.drmInfos:null,K=H?H.stream.drmInfos:null;H=(H?H.Vc:"")+" - "+(B?B.Vc:"");G&&I&&J.length&&K.length&&!(0<xg(J,K).length)||a.ya.has(H)||(G={id:a.Ga++,language:G?G.language:"und",primary:!!G&&G.primary||
683
- !!I&&I.primary,audio:G,video:I,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},z.push(G),a.ya.add(H))}}w=x.call(w,z)}else w=w["return"]([]);return w})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce(Ob,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
684
- function jr(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,w,x;return L(function(y){if(1==y.g)return d=qc,e=gr(a,b),f=Z(b,"AUDIO"),g=Z(b,"VIDEO"),k=(h=f||g)&&a.u.has(h)?a.u.get(h):[],l={audio:f?k:[],video:g?k:[]},n=!1,p=wq(b,"URI"),q=l.audio.find(function(D){return D&&D.Vc==p}),v=nc(d.Na,e),(w=nc(d.cb,e))&&!v?m=d.cb:!k.length&&w&&v?(m=d.Na,e=[[v,w].join()]):l.audio.length&&q?(m=d.cb,n=!0):m=l.video.length&&!l.audio.length?d.cb:d.Na,n?y.B(2):u(y,kr(a,b,e,m,c),3);2!=y.g&&(x=y.h);if(x)l[x.stream.type]=[x];else if(null===
685
- x)return y["return"](null);lr(l);return y["return"](l)})}function gr(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);var d=Z(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=t(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=dd(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function mr(a){a=Z(a,"LANGUAGE")||"und";return rd(a)}
682
+ function cr(a,b){var c,d,e;return L(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,q,v;return L(function(w){if(1==w.g)return h=Z(g,"FRAME-RATE"),k=Number(Z(g,"AVERAGE-BANDWIDTH"))||Number(wq(g,"BANDWIDTH")),l=Z(g,"RESOLUTION"),m=t(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,q=Z(g,"VIDEO-RANGE"),u(w,jr(a,g,k),2);if(v=w.h){for(var y=w["return"],x=v.audio,D=v.video,z=t(D),B=z.next();!B.done;B=z.next())if(B=B.value.stream)B.width=Number(n)||void 0,B.height=Number(p)||
683
+ void 0,B.frameRate=Number(h)||void 0,B.hdr=q||void 0;z=a.g.disableAudio;if(!x.length||z)x=[null];z=a.g.disableVideo;if(!D.length||z)D=[null];z=[];x=t(x);for(B=x.next();!B.done;B=x.next()){B=B.value;for(var E=t(D),G=E.next();!G.done;G=E.next()){var H=G.value;G=B?B.stream:null;var I=H?H.stream:null,J=B?B.stream.drmInfos:null,K=H?H.stream.drmInfos:null;H=(H?H.Vc:"")+" - "+(B?B.Vc:"");G&&I&&J.length&&K.length&&!(0<xg(J,K).length)||a.ya.has(H)||(G={id:a.Ga++,language:G?G.language:"und",primary:!!G&&G.primary||
684
+ !!I&&I.primary,audio:G,video:I,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},z.push(G),a.ya.add(H))}}w=y.call(w,z)}else w=w["return"]([]);return w})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce(Ob,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
685
+ function jr(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,w,y;return L(function(x){if(1==x.g)return d=qc,e=gr(a,b),f=Z(b,"AUDIO"),g=Z(b,"VIDEO"),k=(h=f||g)&&a.u.has(h)?a.u.get(h):[],l={audio:f?k:[],video:g?k:[]},n=!1,p=wq(b,"URI"),q=l.audio.find(function(D){return D&&D.Vc==p}),v=nc(d.Na,e),(w=nc(d.cb,e))&&!v?m=d.cb:!k.length&&w&&v?(m=d.Na,e=[[v,w].join()]):l.audio.length&&q?(m=d.cb,n=!0):m=l.video.length&&!l.audio.length?d.cb:d.Na,n?x.B(2):u(x,kr(a,b,e,m,c),3);2!=x.g&&(y=x.h);if(y)l[y.stream.type]=[y];else if(null===
686
+ y)return x["return"](null);lr(l);return x["return"](l)})}function gr(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);var d=Z(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=t(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=dd(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function mr(a){a=Z(a,"LANGUAGE")||"und";return rd(a)}
686
687
  function lr(a){a=t(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function br(a,b){var c=Aq(b,"CLOSED-CAPTIONS");c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=mr(e);var f=wq(e,"GROUP-ID");e=wq(e,"INSTREAM-ID");a.L.get(f)||a.L.set(f,new Map);a.L.get(f).set(e,d)}}
687
- function hr(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,w;return L(function(x){if(1==x.g){c=wq(b,"GROUP-ID");d="";var y=wq(b,"TYPE").toLowerCase();"subtitles"==y&&(y=pc);e=y;e!=pc&&c&&a.s.has(c)&&(d=a.s.get(c));f=nr(wq(b,"URI"),a.o);if(a.h.has(f))return x["return"](a.h.get(f));g=mr(b);h=Z(b,"NAME");k=Z(b,"DEFAULT");l="YES"==k;"audio"==e?y=(y=Z(b,"CHANNELS"))?parseInt(y.split("/")[0],10):null:y=null;m=y;"audio"==e?y=(y=Z(b,"CHANNELS"))?y.includes("/JOC"):!1:y=!1;n=y;p=Z(b,"CHARACTERISTICS");q=Z(b,"FORCED");
688
- v="YES"==q;return u(x,or(a,f,d,e,g,l,h,m,null,p,v,n),2)}w=x.h;a.u.has(c)?a.u.get(c).push(w):a.u.set(c,[w]);if(null==w)return x["return"](null);if(a.h.has(f))return x["return"](a.h.get(f));a.h.set(f,w);return x["return"](w)})}
688
+ function hr(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,w;return L(function(y){if(1==y.g){c=wq(b,"GROUP-ID");d="";var x=wq(b,"TYPE").toLowerCase();"subtitles"==x&&(x=pc);e=x;e!=pc&&c&&a.s.has(c)&&(d=a.s.get(c));f=nr(wq(b,"URI"),a.o);if(a.h.has(f))return y["return"](a.h.get(f));g=mr(b);h=Z(b,"NAME");k=Z(b,"DEFAULT");l="YES"==k;"audio"==e?x=(x=Z(b,"CHANNELS"))?parseInt(x.split("/")[0],10):null:x=null;m=x;"audio"==e?x=(x=Z(b,"CHANNELS"))?x.includes("/JOC"):!1:x=!1;n=x;p=Z(b,"CHARACTERISTICS");q=Z(b,"FORCED");
689
+ v="YES"==q;return u(y,or(a,f,d,e,g,l,h,m,null,p,v,n),2)}w=y.h;a.u.has(c)?a.u.get(c).push(w):a.u.set(c,[w]);if(null==w)return y["return"](null);if(a.h.has(f))return y["return"](a.h.get(f));a.h.set(f,w);return y["return"](w)})}
689
690
  function ir(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(p){if(1==p.g){c=nr(wq(b,"URI"),a.o);d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return p["return"](a.h.get(c));e=mr(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");return u(p,or(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(null==h)return p["return"](null);if(a.h.has(c))return p["return"](a.h.get(c));if(k=Z(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=
690
691
  Number(k.split("x")[1])*Number(m.split("x")[1]);if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p["return"](h)})}
691
692
  function kr(a,b,c,d,e){var f,g,h,k;return L(function(l){if(1==l.g){f=nr(wq(b,"URI"),a.o);if(a.h.has(f))return l["return"](a.h.get(f));var m=Z(b,"CLOSED-CAPTIONS");g="video"==d&&m&&"NONE"!=m?a.L.get(m):null;h=mc(d,c);return u(l,or(a,f,h,d,"und",!1,null,null,g,null,!1,!1,e),2)}k=l.h;if(null==k)return l["return"](null);if(a.h.has(f))return l["return"](a.h.get(f));a.h.set(f,k);return l["return"](k)})}
692
- function or(a,b,c,d,e,f,g,h,k,l,m,n,p){var q,v,w,x,y,D,z,B,F,G,H,I,J,K,P,R,ba,aa,Y,Da,Fa,xa,Ja,Rb,nd,Ya,Gf,Ec,ji,En,Fn,Gn,Hn,ki,li,Hf,In,Jn,Kn,Ln;return L(function(cb){switch(cb.g){case 1:return q=kc([a.N],[b])[0],u(cb,Sq(a,q),2);case 2:v=cb.h;q=v.uri;w=Iq(a.da,v.data,q);if(1!=w.type)throw new N(2,4,4017);x=[];if(w.segments)for(y=t(w.segments),D=y.next();!D.done;D=y.next())z=D.value,B=zq(z.g,"EXT-X-KEY"),x.push.apply(x,ja(B));F=!1;G=[];H=new Set;I=t(x);for(J=I.next();!J.done;J=I.next())if(K=J.value,
693
- P=wq(K,"METHOD"),"NONE"!=P){F=!0;if("AES-128"==P)return a.Ma=!0,cb["return"](null);R=wq(K,"KEYFORMAT");if(aa=(ba=pr[R])?ba(K):null){if(aa.keyIds)for(Y=t(aa.keyIds),Da=Y.next();!Da.done;Da=Y.next())Fa=Da.value,H.add(Fa);G.push(aa)}}if(F&&!G.length)throw new N(2,4,4026);xa=zq(w.g,"EXT-X-DEFINE");Ja=Wq(a,xa);qr(a,w);return u(cb,rr(a,d,c,w,Ja),3);case 3:return Rb=cb.h,sr.includes(Rb)&&(c=""),nd=new Map,Ya=new Map,Gf=a.l,C(cb,4),u(cb,Xq(a,b,w,d,Rb,nd,Ja,Ya,c,p),6);case 6:Ec=cb.h;va(cb,5);break;case 4:ji=
694
- E(cb);if(4035==ji.code)return Ua("Skipping unsupported HLS stream",Rb,b),cb["return"](null);throw ji;case 5:Gf!=a.l&&qr(a,w);En=Ec[0].startTime;Fn=Ec[Ec.length-1].endTime;Gn=new T(Ec);Hn=d==pc?"subtitle":void 0;ki=[];if(l)for(li=t(l.split(",")),Hf=li.next();!Hf.done;Hf=li.next())In=Hf.value,ki.push(In);Kn=(Jn=Bq(w.g,"EXT-X-SERVER-CONTROL"))?null!=Jn.getAttribute("CAN-SKIP-UNTIL"):!1;Ln={id:a.Ga++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Gn,mimeType:Rb,codecs:c,
695
- kind:Hn,encrypted:F,drmInfos:G,keyIds:H,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:ki,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return cb["return"]({stream:Ln,Vc:b,Me:q,se:En,Gf:Fn,Fd:nd,Ye:Ya,Re:Kn})}})}
693
+ function or(a,b,c,d,e,f,g,h,k,l,m,n,p){var q,v,w,y,x,D,z,B,E,G,H,I,J,K,P,R,ba,aa,Y,Da,Fa,xa,Ja,Sb,nd,Ya,Hf,Ec,ji,En,Fn,Gn,Hn,ki,li,If,In,Jn,Kn,Ln;return L(function(cb){switch(cb.g){case 1:return q=kc([a.N],[b])[0],u(cb,Sq(a,q),2);case 2:v=cb.h;q=v.uri;w=Iq(a.da,v.data,q);if(1!=w.type)throw new N(2,4,4017);y=[];if(w.segments)for(x=t(w.segments),D=x.next();!D.done;D=x.next())z=D.value,B=zq(z.g,"EXT-X-KEY"),y.push.apply(y,ja(B));E=!1;G=[];H=new Set;I=t(y);for(J=I.next();!J.done;J=I.next())if(K=J.value,
694
+ P=wq(K,"METHOD"),"NONE"!=P){E=!0;if("AES-128"==P)return a.Ma=!0,cb["return"](null);R=wq(K,"KEYFORMAT");if(aa=(ba=pr[R])?ba(K):null){if(aa.keyIds)for(Y=t(aa.keyIds),Da=Y.next();!Da.done;Da=Y.next())Fa=Da.value,H.add(Fa);G.push(aa)}}if(E&&!G.length)throw new N(2,4,4026);xa=zq(w.g,"EXT-X-DEFINE");Ja=Wq(a,xa);qr(a,w);return u(cb,rr(a,d,c,w,Ja),3);case 3:return Sb=cb.h,sr.includes(Sb)&&(c=""),nd=new Map,Ya=new Map,Hf=a.l,C(cb,4),u(cb,Xq(a,b,w,d,Sb,nd,Ja,Ya,c,p),6);case 6:Ec=cb.h;va(cb,5);break;case 4:ji=
695
+ F(cb);if(4035==ji.code)return Ua("Skipping unsupported HLS stream",Sb,b),cb["return"](null);throw ji;case 5:Hf!=a.l&&qr(a,w);En=Ec[0].startTime;Fn=Ec[Ec.length-1].endTime;Gn=new T(Ec);Hn=d==pc?"subtitle":void 0;ki=[];if(l)for(li=t(l.split(",")),If=li.next();!If.done;If=li.next())In=If.value,ki.push(In);Kn=(Jn=Bq(w.g,"EXT-X-SERVER-CONTROL"))?null!=Jn.getAttribute("CAN-SKIP-UNTIL"):!1;Ln={id:a.Ga++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Gn,mimeType:Sb,codecs:c,
696
+ kind:Hn,encrypted:E,drmInfos:G,keyIds:H,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:ki,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return cb["return"]({stream:Ln,Vc:b,Le:q,se:En,Ff:Fn,Fd:nd,Xe:Ya,Qe:Kn})}})}
696
697
  function qr(a,b){var c=Bq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Bq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Yq(a,Rq);else{c?Yq(a,tr):Yq(a,ur);d=Bq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Bq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ga=Number(wq(c,"PART-TARGET")),a.G=Math.min(a.ga,a.G),c=Bq(b.g,"EXT-X-SERVER-CONTROL"),a.ca=c?Number(wq(c,"PART-HOLD-BACK")):0):a.G=Math.min(d,a.G);a.fa=Math.max(d,a.fa)}}
697
698
  function vr(a,b,c,d){c=Bq(c,"EXT-X-MAP");if(!c)return null;var e=wq(c,"URI");d=nr(kc([b],[e])[0],d);b=[d,Z(c,"BYTERANGE","")].join("-");a.ea.has(b)||(c=wr(d,c),a.ea.set(b,c));return a.ea.get(b)}function wr(a,b){var c=0,d=null,e=Z(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new Gi(function(){return[a]},c,d)}
698
- function xr(a,b,c,d,e,f,g,h,k){var l=d.g,m=nr(d.h,g),n=Bq(l,"EXTINF"),p=g=0,q=null;if(!n){if(0==d.i.length)throw new N(2,4,4024,"EXTINF");if(!a.l)return null}var v=[];if(a.l)for(var w={},x=0;x<d.i.length;w={dd:w.dd},x++){var y=d.i[x],D=0==x?c:v[v.length-1],z=0==x?e:D.endTime,B=Number(Z(y,"DURATION"))||a.ga;if(B){B=z+B;var F=0,G=null;"EXT-X-PRELOAD-HINT"==y.name?F=(D=Z(y,"BYTERANGE-START"))?Number(D):0:(F=Z(y,"BYTERANGE"),D=t(yr(D,F)),F=D.next().value,G=D.next().value);if(y=Z(y,"URI"))w.dd=kc([h],
699
- [y])[0],v.push(new Ii(z,B,function(H){return function(){return[H.dd]}}(w),F,G,b,f,0,Infinity))}}n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(a=Bq(l,"EXT-X-BYTERANGE"))?(q=t(yr(c,a.value)),p=q.next().value,q=q.next().value):v.length&&(p=v[0].pa,q=v[v.length-1].ia);c="";a=null;"image"==k&&(c="1x1",k=Bq(l,"EXT-X-TILES"))&&(c=wq(k,"LAYOUT"),(k=Z(k,"DURATION"))&&(a=Number(k)));return new Ii(e,g,function(){return m.length?[m]:[]},p,q,b,f,0,Infinity,v,c,a)}
699
+ function xr(a,b,c,d,e,f,g,h,k){var l=d.g,m=nr(d.h,g),n=Bq(l,"EXTINF"),p=g=0,q=null;if(!n){if(0==d.i.length)throw new N(2,4,4024,"EXTINF");if(!a.l)return null}var v=[];if(a.l)for(var w={},y=0;y<d.i.length;w={dd:w.dd},y++){var x=d.i[y],D=0==y?c:v[v.length-1],z=0==y?e:D.endTime,B=Number(Z(x,"DURATION"))||a.ga;if(B){B=z+B;var E=0,G=null;"EXT-X-PRELOAD-HINT"==x.name?E=(D=Z(x,"BYTERANGE-START"))?Number(D):0:(E=Z(x,"BYTERANGE"),D=t(yr(D,E)),E=D.next().value,G=D.next().value);if(x=Z(x,"URI"))w.dd=kc([h],
700
+ [x])[0],v.push(new Ii(z,B,function(H){return function(){return[H.dd]}}(w),E,G,b,f,0,Infinity))}}n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(a=Bq(l,"EXT-X-BYTERANGE"))?(q=t(yr(c,a.value)),p=q.next().value,q=q.next().value):v.length&&(p=v[0].pa,q=v[v.length-1].ia);c="";a=null;"image"==k&&(c="1x1",k=Bq(l,"EXT-X-TILES"))&&(c=wq(k,"LAYOUT"),(k=Z(k,"DURATION"))&&(a=Number(k)));return new Ii(e,g,function(){return m.length?[m]:[]},p,q,b,f,0,Infinity,v,c,a)}
700
701
  function yr(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.ia+1,d=c+d-1);return[c,d]}function fr(a){if(a.j){for(var b=t(a.W),c=b.next();!c.done;c=b.next())a.j.Hb(c.value);a.W=[]}}
701
- function Xq(a,b,c,d,e,f,g,h,k,l){var m,n,p,q,v,w,x,y,D,z,B,F,G,H,I,J,K,P,R,ba,aa;return L(function(Y){switch(Y.g){case 1:m=c.segments;p=Cq(c.g,"EXT-X-MEDIA-SEQUENCE",0);v=(q=Bq(c.g,"EXT-X-SKIP"))?Number(Z(q,"SKIPPED-SEGMENTS")):0;w=p+v;if(a.m!=Rq&&f.has(w)){x=f.get(w);Y.B(2);break}if(null!=a.V){Y.B(3);break}n=vr(a,c.h,m[0].g,g);y=a;return u(Y,zr(a,b,n,e,w,!1,m[0],g,d,k,l),4);case 4:y.V=Y.h;case 3:x=a.V;case 2:D=m[0].h;D.split("/").pop();z=Cq(c.g,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.l&&(h.has(z)||
702
- h.set(z,w),v))for(B=h;B.has(z+1)&&B.get(z+1)<w;)z++;F=a.I.get(z)||0;G=[];H=0;case 5:if(!(H<m.length)){Y.B(7);break}I=m[H];J=G[G.length-1];K=0==H?x:J.endTime;w=p+v+H;f.set(w,K);n=vr(a,c.h,I.g,g);P=Bq(I.g,"EXT-X-DISCONTINUITY");if(!P){Y.B(8);break}z++;h.set(z,w);return u(Y,Ar(a,z,b,n,e,w,I,g,K,d,k,l),9);case 9:F=Y.h;case 8:!a.l&&(R=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());ba=Bq(I.g,"EXTINF");a.l||ba?(aa=xr(a,n,J,I,K,F,g,c.h,d))&&G.push(aa):a.l||Ua("Low-latency HLS 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.");
702
+ function Xq(a,b,c,d,e,f,g,h,k,l){var m,n,p,q,v,w,y,x,D,z,B,E,G,H,I,J,K,P,R,ba,aa;return L(function(Y){switch(Y.g){case 1:m=c.segments;p=Cq(c.g,"EXT-X-MEDIA-SEQUENCE",0);v=(q=Bq(c.g,"EXT-X-SKIP"))?Number(Z(q,"SKIPPED-SEGMENTS")):0;w=p+v;if(a.m!=Rq&&f.has(w)){y=f.get(w);Y.B(2);break}if(null!=a.V){Y.B(3);break}n=vr(a,c.h,m[0].g,g);x=a;return u(Y,zr(a,b,n,e,w,!1,m[0],g,d,k,l),4);case 4:x.V=Y.h;case 3:y=a.V;case 2:D=m[0].h;D.split("/").pop();z=Cq(c.g,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.l&&(h.has(z)||
703
+ h.set(z,w),v))for(B=h;B.has(z+1)&&B.get(z+1)<w;)z++;E=a.I.get(z)||0;G=[];H=0;case 5:if(!(H<m.length)){Y.B(7);break}I=m[H];J=G[G.length-1];K=0==H?y:J.endTime;w=p+v+H;f.set(w,K);n=vr(a,c.h,I.g,g);P=Bq(I.g,"EXT-X-DISCONTINUITY");if(!P){Y.B(8);break}z++;h.set(z,w);return u(Y,Ar(a,z,b,n,e,w,I,g,K,d,k,l),9);case 9:E=Y.h;case 8:!a.l&&(R=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());ba=Bq(I.g,"EXTINF");a.l||ba?(aa=xr(a,n,J,I,K,E,g,c.h,d))&&G.push(aa):a.l||Ua("Low-latency HLS 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.");
703
704
  H++;Y.B(5);break;case 7:return Y["return"](G)}})}function Ar(a,b,c,d,e,f,g,h,k,l,m,n){var p,q;return L(function(v){if(1==v.g)return p=0,a.I.has(b)?(p=a.I.get(b),v.B(2)):u(v,zr(a,c,d,e,f,!0,g,h,l,m,n),3);2!=v.g&&(q=v.h,p=k-q,a.I.set(b,p));return v["return"](p)})}
704
705
  function Br(a,b,c,d,e,f){var g,h,k,l,m,n;return L(function(p){switch(p.g){case 1:g=bf;h=vj(b.sa(),b.pa,b.ia,a.g.retryParameters);a.i.modifySegmentRequest(h,{type:c,init:b instanceof Gi,duration:b.endTime-b.startTime,mimeType:d,codecs:e,bandwidth:f});if(a.g.hls.useFullSegmentsForStartTime)return p["return"](Cr(a,h,g));k=vj(b.sa(),b.pa,b.pa+2048-1,a.g.retryParameters);a.i.modifySegmentRequest(k,{type:c,init:b instanceof Gi,duration:b.endTime-b.startTime,mimeType:d,codecs:e,bandwidth:f});C(p,2);return u(p,
705
- Cr(a,k,g),4);case 4:return l=p.h,p["return"](l);case 2:m=E(p);if(7001==m.code)throw m;Ua("Unable to fetch the starting part of HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",k.uris[0]);return u(p,Cr(a,h,g),5);case 5:return n=p.h,p["return"](n)}})}
706
- function zr(a,b,c,d,e,f,g,h,k,l,m){var n,p,q,v,w,x,y,D;return L(function(z){switch(z.g){case 1:n=xr(a,c,null,g,0,0,h,"",k);if(a.D&&!f&&(p=a.h.get(b),q=p.Fd.get(e),void 0!=q))return z["return"](q);d=d.toLowerCase();if(sr.includes(d))throw Ua("Raw formats are not yet supported. Skipping "+d),new N(1,4,4035);if("video/webm"==d)throw Ua("WebM in HLS is not yet supported. Skipping."),new N(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){z.B(2);break}v=[Br(a,n,k,d,l,m)];c&&v.push(Br(a,c,k,d,l,m));return u(z,
707
- Promise.all(v),3);case 3:return w=z.h,x=w[0],y=w[1]||w[0],z["return"](Dr(b,x.uri,x.data,y.data));case 2:if("video/mp2t"!=d){z.B(4);break}return u(z,Br(a,n,k,d,l,m),5);case 5:return D=z.h,z["return"](Er(b,D.uri,D.data));case 4:throw new N(2,4,4030,b);}})}
706
+ Cr(a,k,g),4);case 4:return l=p.h,p["return"](l);case 2:m=F(p);if(7001==m.code)throw m;Ua("Unable to fetch the starting part of HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",k.uris[0]);return u(p,Cr(a,h,g),5);case 5:return n=p.h,p["return"](n)}})}
707
+ function zr(a,b,c,d,e,f,g,h,k,l,m){var n,p,q,v,w,y,x,D;return L(function(z){switch(z.g){case 1:n=xr(a,c,null,g,0,0,h,"",k);if(a.D&&!f&&(p=a.h.get(b),q=p.Fd.get(e),void 0!=q))return z["return"](q);d=d.toLowerCase();if(sr.includes(d))throw Ua("Raw formats are not yet supported. Skipping "+d),new N(1,4,4035);if("video/webm"==d)throw Ua("WebM in HLS is not yet supported. Skipping."),new N(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){z.B(2);break}v=[Br(a,n,k,d,l,m)];c&&v.push(Br(a,c,k,d,l,m));return u(z,
708
+ Promise.all(v),3);case 3:return w=z.h,y=w[0],x=w[1]||w[0],z["return"](Dr(b,y.uri,y.data,x.data));case 2:if("video/mp2t"!=d){z.B(4);break}return u(z,Br(a,n,k,d,l,m),5);case 5:return D=z.h,z["return"](Er(b,D.uri,D.data));case 4:throw new N(2,4,4030,b);}})}
708
709
  function Dr(a,b,c,d){var e=0;(new Ig).box("moov",Mg).box("trak",Mg).box("mdia",Mg).P("mdhd",function(h){e=Zh(h.reader,h.version).timescale;h.parser.stop()}).parse(d,!0);if(!e)throw new N(2,4,4030,a,b);var f=0,g=!1;(new Ig).box("moof",Mg).box("traf",Mg).P("tfdt",function(h){f=Yh(h.reader,h.version).pd/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new N(2,4,4030,a,b);return f}
709
- function Er(a,b,c){function d(){f.seek(g+188);h=f.Y();71!=h&&(f.seek(g+192),h=f.Y());71!=h&&(f.seek(g+204),h=f.Y());71!=h&&e();f.ye(1)}function e(){throw new N(2,4,4030,a,b);}var f=new Fg(c,0),g=0,h=0;for(c=Math.min(f.O.byteLength-188,940);;){g=f.X();h=f.Y();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.Kb();if(8191==(k&8191))d();else if(k&16384)if(k=(f.Y()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.Y(),f.skip(k)),1!=f.M()>>8)d();else{f.skip(3);c=f.Y()>>6;0!=c&&1!=c||e();0==f.Y()&&e();c=f.Y();k=f.Kb();var l=
710
+ function Er(a,b,c){function d(){f.seek(g+188);h=f.Y();71!=h&&(f.seek(g+192),h=f.Y());71!=h&&(f.seek(g+204),h=f.Y());71!=h&&e();f.xe(1)}function e(){throw new N(2,4,4030,a,b);}var f=new Fg(c,0),g=0,h=0;for(c=Math.min(f.O.byteLength-188,940);;){g=f.X();h=f.Y();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.Kb();if(8191==(k&8191))d();else if(k&16384)if(k=(f.Y()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.Y(),f.skip(k)),1!=f.M()>>8)d();else{f.skip(3);c=f.Y()>>6;0!=c&&1!=c||e();0==f.Y()&&e();c=f.Y();k=f.Kb();var l=
710
711
  f.Kb();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function nr(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=t(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new N(2,4,4039,f);}}return c}
711
- function rr(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,w;return L(function(x){if(1==x.g){f=qc;g=bf;h=nr(d.segments[0].h,e);k=new Xb(h);l=k.wa.split(".").pop();m=Fr[b];if(n=m[l])return x["return"](n);if(b==f.Z)return c&&"vtt"!=c&&"wvtt"!=c?x["return"]("application/mp4"):x["return"]("text/vtt");if(b==f.Tb&&(!c||"jpeg"==c))return x["return"]("image/jpeg");p=We([h],a.g.retryParameters);p.method="HEAD";return u(x,Cr(a,p,g),2)}q=x.h;v=q.headers["content-type"];return v?x["return"](v.split(";")[0]):(w=m.mp4,x["return"](w))})}
712
- function Sq(a,b){var c=We([b],a.g.retryParameters);a.i.modifyManifestRequest(c,{format:"h"});return Cr(a,c,0)}function Qq(a){var b,c;L(function(d){if(1==d.g){if(!a.i)return d["return"]();C(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.xa,a.C.S(b),va(d,0);c=E(d);if(!a.i)return d["return"]();c.severity=1;a.i.onError(c);a.C.S(.1);A(d)})}function Yq(a,b){a.m=b;a.j&&a.j.pc(a.m==Rq);a.m!=Rq||a.C.stop()}
712
+ function rr(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,w;return L(function(y){if(1==y.g){f=qc;g=bf;h=nr(d.segments[0].h,e);k=new Xb(h);l=k.wa.split(".").pop();m=Fr[b];if(n=m[l])return y["return"](n);if(b==f.Z)return c&&"vtt"!=c&&"wvtt"!=c?y["return"]("application/mp4"):y["return"]("text/vtt");if(b==f.Tb&&(!c||"jpeg"==c))return y["return"]("image/jpeg");p=We([h],a.g.retryParameters);p.method="HEAD";return u(y,Cr(a,p,g),2)}q=y.h;v=q.headers["content-type"];return v?y["return"](v.split(";")[0]):(w=m.mp4,y["return"](w))})}
713
+ function Sq(a,b){var c=We([b],a.g.retryParameters);a.i.modifyManifestRequest(c,{format:"h"});return Cr(a,c,0)}function Qq(a){var b,c;L(function(d){if(1==d.g){if(!a.i)return d["return"]();C(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.xa,a.C.S(b),va(d,0);c=F(d);if(!a.i)return d["return"]();c.severity=1;a.i.onError(c);a.C.S(.1);A(d)})}function Yq(a,b){a.m=b;a.j&&a.j.pc(a.m==Rq);a.m!=Rq||a.C.stop()}
713
714
  function Cr(a,b,c){if(!a.F)throw new N(2,7,7001);b=a.i.networkingEngine.request(c,b);Re(a.F,b);return b.promise}M("shaka.hls.HlsParser",Pq);
714
715
  var sr=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],Fr={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",
715
716
  m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},pr={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=wq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=wq(a,"URI");b=Oq(b);b=Fb(b.data);b=lc("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);
716
- return b},"com.microsoft.playready":function(a){var b=wq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=wq(a,"URI");a=Oq(a);a=Fb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Co(a,b);return lc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},Rq="VOD",ur="EVENT",tr="LIVE",Vq={Le:Rq,pg:ur,Ke:tr};Dg.m3u8=function(){return new Pq};Bg["application/x-mpegurl"]=function(){return new Pq};
717
- Bg["application/vnd.apple.mpegurl"]=function(){return new Pq};function Gr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,ve:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Mc(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Hr(){}function Ir(a,b,c,d,e){var f=new Jr;pf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Kr,h={ee:!1,He:!1};a=Lr(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new Fe(a,function(){h.ee=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new O(function(){h.He=!0;g.abort()});k.S(b/1E3);a["finally"](function(){k.stop()})}return a}
718
- function Lr(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,w,x,y,D,z;return L(function(B){switch(B.g){case 1:return h=Mr,k=Nr,p=n=0,q=Date.now(),C(B,2),u(B,h(a,c),4);case 4:return l=B.h,f(Or(l.headers)),v=l.clone().body.getReader(),x=(w=l.headers.get("Content-Length"))?parseInt(w,10):0,y=function(F){function G(){var H,I;return L(function(J){switch(J.g){case 1:return C(J,2),u(J,v.read(),4);case 4:H=J.h;va(J,3);break;case 2:return E(J),J["return"]();case 3:if(H.done){J.B(5);break}n+=H.value.byteLength;if(!g){J.B(5);
719
- break}return u(J,g(H.value),5);case 5:I=Date.now();if(100<I-q||H.done)e(I-q,n-p,x-n),p=n,q=I;H.done?F.close():(F.enqueue(H.value),G());A(J)}})}G()},new k({start:y}),u(B,l.arrayBuffer(),5);case 5:m=B.h;va(B,3);break;case 2:D=E(B);if(d.ee)throw new N(1,1,7001,a,b);if(d.He)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,D,b);case 3:return z=Or(l.headers),B["return"](Gr(z,m,l.status,a,l.url,b))}})}function Or(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
720
- function Pr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}M("shaka.net.HttpFetchPlugin",Hr);Hr.isSupported=Pr;Hr.parse=Ir;var Mr=window.fetch,Kr=window.AbortController,Nr=window.ReadableStream,Jr=window.Headers;Pr()&&(Te("http",Ir,2,!0),Te("https",Ir,2,!0),Te("blob",Ir,2,!0));function Qr(){}
721
- function Rr(a,b,c,d,e){var f=new Sr,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new N(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var q=Tr(f);e(q);n=!0}};f.onload=function(){var q=Tr(f),v=f.response;try{var w=Gr(q,v,f.status,a,f.responseURL,c);l(w)}catch(x){m(x)}};f.onerror=function(q){m(new N(1,1,1002,a,q,
717
+ return b},"com.microsoft.playready":function(a){var b=wq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=wq(a,"URI");a=Oq(a);a=Fb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Co(a,b);return lc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},Rq="VOD",ur="EVENT",tr="LIVE",Vq={Ke:Rq,og:ur,Je:tr};Dg.m3u8=function(){return new Pq};Bg["application/x-mpegurl"]=function(){return new Pq};
718
+ Bg["application/vnd.apple.mpegurl"]=function(){return new Pq};function Gr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Mc(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Hr(){}function Ir(a,b,c,d,e){var f=new Jr;pf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Kr,h={ee:!1,Ge:!1};a=Lr(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new Fe(a,function(){h.ee=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new O(function(){h.Ge=!0;g.abort()});k.S(b/1E3);a["finally"](function(){k.stop()})}return a}
719
+ function Lr(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,w,y,x,D,z;return L(function(B){switch(B.g){case 1:return h=Mr,k=Nr,p=n=0,q=Date.now(),C(B,2),u(B,h(a,c),4);case 4:l=B.h;f(Or(l.headers));if("HEAD"==c.method){B.B(5);break}v=l.clone().body.getReader();y=(w=l.headers.get("Content-Length"))?parseInt(w,10):0;x=function(E){function G(){var H,I;return L(function(J){switch(J.g){case 1:return C(J,2),u(J,v.read(),4);case 4:H=J.h;va(J,3);break;case 2:return F(J),J["return"]();case 3:if(H.done){J.B(5);break}n+=
720
+ H.value.byteLength;if(!g){J.B(5);break}return u(J,g(H.value),5);case 5:I=Date.now();if(100<I-q||H.done)e(I-q,n-p,y-n),p=n,q=I;H.done?E.close():(E.enqueue(H.value),G());A(J)}})}G()};new k({start:x});return u(B,l.arrayBuffer(),6);case 6:m=B.h;case 5:va(B,3);break;case 2:D=F(B);if(d.ee)throw new N(1,1,7001,a,b);if(d.Ge)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,D,b);case 3:return z=Or(l.headers),B["return"](Gr(z,m,l.status,a,l.url,b))}})}
721
+ function Or(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function Pr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||!window.AbortController)}M("shaka.net.HttpFetchPlugin",Hr);Hr.isSupported=Pr;Hr.parse=Ir;var Mr=window.fetch,Kr=window.AbortController,Nr=window.ReadableStream,Jr=window.Headers;
722
+ Pr()&&(Te("http",Ir,2,!0),Te("https",Ir,2,!0),Te("blob",Ir,2,!0));function Qr(){}
723
+ function Rr(a,b,c,d,e){var f=new Sr,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new N(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var q=Tr(f);e(q);n=!0}};f.onload=function(){var q=Tr(f),v=f.response;try{var w=Gr(q,v,f.status,a,f.responseURL,c);l(w)}catch(y){m(y)}};f.onerror=function(q){m(new N(1,1,1002,a,q,
722
724
  c))};f.ontimeout=function(){m(new N(1,1,1003,a,c))};f.onprogress=function(q){var v=Date.now();if(100<v-g||q.lengthComputable&&q.loaded==q.total)d(v-g,q.loaded-h,q.total-q.loaded),h=q.loaded,g=v};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new Fe(k,function(){f.abort();return Promise.resolve()})}
723
725
  function Tr(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}M("shaka.net.HttpXHRPlugin",Qr);Qr.parse=Rr;var Sr=window.XMLHttpRequest;Te("http",Rr,1,!0);Te("https",Rr,1,!0);Te("blob",Rr,1,!0);function Ur(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Vr(a){return a.sa().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.pa+":"+a.ia}function Wr(a,b){return vj(a.g.sa(),a.g.pa,a.g.ia,b.streaming.retryParameters)};function Xr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Yr(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Xr.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g["delete"](a);this.j+=c;this.h+=b}};function Zr(a){var b=this;this.o=a;this.j=new Map;this.i=new cf(function(){return $r(b)["catch"](function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Xr}Zr.prototype.destroy=function(){return this.i.destroy()};function as(a,b,c){a.m=b;a.l=c}function $r(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
724
726
  function bs(a,b,c,d,e,f){df(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,q;return L(function(v){if(1==v.g)return u(v,cs(a,c),2);h=v.h;if(a.i.g)throw new N(2,9,7001);if(e)for(m in k=Fb(h),l=new Bo(k),l.data)n=Number(m),p=l.data[n],q=l.g[n],a.l(p,q);a.g.close(d,h.byteLength);var w=a.g;a.m(0==w.i?0:w.j/w.i,a.g.h);return v["return"](f(h))})});a.j.set(b,g)}function ds(a){return L(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b["return"](a.g.h)})}
725
- function cs(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=bf,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;fb(a.h,e);return g["return"](f.data)})};function es(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new rc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}es.prototype.abort=function(){var a=this;return L(function(b){if(1==b.g){try{a.i.abort()}catch(c){}C(b,2);return u(b,a.g,4)}if(2!=b.g)return va(b,0);E(b);A(b)})};
727
+ function cs(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=bf,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;fb(a.h,e);return g["return"](f.data)})};function es(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new rc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}es.prototype.abort=function(){var a=this;return L(function(b){if(1==b.g){try{a.i.abort()}catch(c){}C(b,2);return u(b,a.g,4)}if(2!=b.g)return va(b,0);F(b);A(b)})};
726
728
  function fs(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return L(function(g){if(1==g.g){if(null==e.result)return c(),g["return"]();f=e.result;return u(g,b(f.key,f.value,f),2)}f["continue"]();A(g)})}})}es.prototype.store=function(){return this.h};es.prototype.promise=function(){return this.g};function gs(a){this.h=a;this.g=[]}gs.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function hs(a,b){return is(a,b,"readwrite")}function is(a,b,c){c=a.h.transaction([b],c);var d=new es(c,b);a.g.push(d);d.promise().then(function(){fb(a.g,d)},function(){fb(a.g,d)});return d};function js(a,b,c){this.h=new gs(a);this.i=b;this.g=c}r=js.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return ks(this.i)};r.removeSegments=function(a,b){return ls(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return L(function(d){if(1==d.g)return u(d,ms(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.fe(e)}))})};r.addManifests=function(){return ks(this.g)};
727
729
  r.updateManifest=function(){return Promise.reject(new N(2,9,9016,"Cannot modify values in "+this.g))};function ns(a,b,c){a=hs(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}r.updateManifestExpiration=function(a,b){var c=hs(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};r.removeManifests=function(a,b){return ls(this,this.g,a,b)};
728
730
  r.getManifests=function(a){var b=this,c;return L(function(d){if(1==d.g)return u(d,ms(b,b.g,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.$b(e)})))})};r.getAllManifests=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=is(a.h,a.g,"readonly"),c=new Map,u(d,fs(b,function(e,f){var g;return L(function(h){if(1==h.g)return u(h,a.$b(f),2);g=h.h;c.set(e,g);A(h)})}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};r.fe=function(a){return a};r.$b=function(a){return Promise.resolve(a)};
@@ -730,7 +732,7 @@ function ks(a){return Promise.reject(new N(2,9,9011,"Cannot add new value to "+a
730
732
  function ls(a,b,c,d){a=hs(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={uc:e.uc},f=c.next())e.uc=f.value,b["delete"](e.uc).onsuccess=function(g){return function(){return d(g.uc)}}(e);return a.promise()}
731
733
  function ms(a,b,c){var d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=is(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Sb:h.Sb,Qb:h.Qb},l=k.next())h.Qb=l.value,h.Sb=e.get(h.Qb),h.Sb.onsuccess=function(n){return function(){void 0==n.Sb.result&&g.push(n.Qb);f[n.Qb]=n.Sb.result}}(h);return u(m,d.promise(),2)}if(g.length)throw new N(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function os(a){this.g=new gs(a)}os.prototype.destroy=function(){return this.g.destroy()};os.prototype.getAll=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=is(a.g,"session-ids","readonly"),c=[],u(d,fs(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};os.prototype.add=function(a){var b=hs(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
732
734
  os.prototype.remove=function(a){var b=this,c;return L(function(d){return 1==d.g?(c=hs(b.g,"session-ids"),u(d,fs(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function ps(){this.g=new Map}ps.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};ps.prototype.init=function(){var a=this;qs.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
733
- function rs(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ca:d,la:f},la:e})})});if(b)return b;throw new N(2,9,9013,"Could not find a cell that supports add-operations");}function ss(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ca:d,la:f},e)})})}
735
+ function rs(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ca:d,ma:f},ma:e})})});if(b)return b;throw new N(2,9,9013,"Could not find a cell that supports add-operations");}function ss(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ca:d,ma:f},e)})})}
734
736
  function ts(a,b,c){a=a.g.get(b);if(!a)throw new N(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new N(2,9,9013,"Could not find cell with name "+c);return b}function us(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function vs(a){var b=Array.from(a.g.keys());if(!b.length)throw new N(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
735
737
  function ws(a){var b,c,d;return L(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=qs,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.B(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function xs(a,b){qs.set(a,b)}M("shaka.offline.StorageMuxer",ps);ps.unregister=function(a){qs["delete"](a)};ps.register=xs;ps.prototype.destroy=ps.prototype.destroy;var qs=new Map;function ys(){js.apply(this,arguments)}qa(ys,js);ys.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return L(function(g){d=hs(c.h,c.g);e=d.store();f=new rc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new N(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
736
738
  ys.prototype.$b=function(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=zs(a.periods[c],e),b.push(f);return u(h,Hp(b),2)}g=h.h;return h["return"]({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata})})};
@@ -748,7 +750,7 @@ new Ds(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contain
748
750
  9,9001,e.error)),d.stop(),f.preventDefault())};return b};r.destroy=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.B(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),A(b)}})};
749
751
  r.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};r.getEmeSessionCell=function(){return this.m};
750
752
  r.erase=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,Hs(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
751
- function Hs(){var a=new rc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new N(2,9,9001,b.error));c.preventDefault()};return a}xs("idb",function(){return Bc()||xc()||!window.indexedDB?null:new Gs});function Is(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Is.prototype.Ca=function(){return this.i};Is.prototype.la=function(){return this.h};Is.prototype.key=function(){return this.l};Is.prototype.toString=function(){return this.j};
753
+ function Hs(){var a=new rc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new N(2,9,9001,b.error));c.preventDefault()};return a}xs("idb",function(){return Bc()||xc()||!window.indexedDB?null:new Gs});function Is(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Is.prototype.Ca=function(){return this.i};Is.prototype.ma=function(){return this.h};Is.prototype.key=function(){return this.l};Is.prototype.toString=function(){return this.j};
752
754
  function Js(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new Is(b,c,d,Number(a[4])):null};function Ks(a,b){this.h=a;this.g=b}
753
755
  function Ls(a,b){var c=new S(null,0);c.Ja(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Ms(a,d,e,c);e=b.streams.filter(function(l){return l.type==pc}).map(function(l){return Ns(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Ns(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
754
756
  g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f}}
@@ -757,56 +759,56 @@ e.value,g=Ns(a,e,d),h=t(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.va
757
759
  function Ns(a,b,c){var d=b.segments.map(function(e){return Os(a,e)});c.Hb(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new T(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
758
760
  roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Os(a,b){var c=new Is("segment",a.h,a.g,b.dataKey);return new Ii(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Ps(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
759
761
  function Ps(a,b){var c=new Is("segment",a.h,a.g,b);return new Gi(function(){return[c.toString()]},0,null)};function Qs(){this.g=null}r=Qs.prototype;r.configure=function(){};
760
- r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:d=Js(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new ps;ua(m);return u(m,e.init(),4);case 4:return u(m,ts(e,d.Ca(),d.la()),5);case 5:return f=m.h,u(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Ks(d.Ca(),d.la()),l=Ls(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return wa(m),u(m,e.destroy(),7);case 7:ya(m,0)}})};r.stop=function(){return Promise.resolve()};
761
- r.update=function(){};r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return d=c.g,e=new ps,C(m,2,3),u(m,e.init(),5);case 5:return u(m,ts(e,d.Ca(),d.la()),6);case 6:return f=m.h,u(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.B(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),u(m,e.destroy(),10);case 10:ya(m,0);break;case 2:E(m),m.B(3)}})};
762
- Bg["application/x-offline-manifest"]=function(){return new Qs};function Rs(){}function Ss(a){var b=Js(a);b&&"manifest"==b.g?(a={uri:a,ve:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Ie(a)):a=b&&"segment"==b.g?Ts(b.key(),b):Ge(new N(2,1,9004,a));return a}
763
- function Ts(a,b){var c=new ps;return Ie(void 0).$(function(){return c.init()}).$(function(){return ts(c,b.Ca(),b.la())}).$(function(d){return d.getSegments([b.key()])}).$(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}M("shaka.offline.OfflineScheme",Rs);Rs.plugin=Ss;Te("offline",Ss);function Us(a,b,c){var d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var q=!1,v=t(m),w=v.next();!w.done;w=v.next())if(w=w.value,Vs(w.info,p)){w.sessionIds.push(p.sessionId);q=!0;break}q||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.B(4);break}g=f.value;h=Ws(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.B(2);break;case 4:return l["return"](d)}})}
764
- function Ws(a,b,c){var d,e;return L(function(f){switch(f.g){case 1:return d=new Pf({nb:b,onError:function(){},Pc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),C(f,2),d.configure(a),u(f,Xf(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return E(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return C(f,6),u(f,fg(d),8);case 8:va(f,7);break;case 6:return E(f),u(f,d.destroy(),
765
- 9);case 9:return f["return"]([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return L(function(h){if(1==h.g)return C(h,2),u(h,gg(d,g),4);if(2!=h.g)return e.push(g),va(h,0);E(h);A(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
766
- function Vs(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&gb(a.audioCapabilities,b.audioCapabilities,c)&&gb(a.videoCapabilities,b.videoCapabilities,c)};function Xs(a,b,c){var d=b.presentationTimeline.getDuration();b=Ys(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Zs(a,b){var c=Ls(new Ks(a.Ca(),a.la()),b),d=b.appMetadata||{};c=Ys(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
762
+ r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:d=Js(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new ps;ua(m);return u(m,e.init(),4);case 4:return u(m,ts(e,d.Ca(),d.ma()),5);case 5:return f=m.h,u(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Ks(d.Ca(),d.ma()),l=Ls(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return wa(m),u(m,e.destroy(),7);case 7:ya(m,0)}})};r.stop=function(){return Promise.resolve()};
763
+ r.update=function(){};r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return d=c.g,e=new ps,C(m,2,3),u(m,e.init(),5);case 5:return u(m,ts(e,d.Ca(),d.ma()),6);case 6:return f=m.h,u(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.B(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),u(m,e.destroy(),10);case 10:ya(m,0);break;case 2:F(m),m.B(3)}})};
764
+ Bg["application/x-offline-manifest"]=function(){return new Qs};function Rs(){}function Ss(a){var b=Js(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Ie(a)):a=b&&"segment"==b.g?Ts(b.key(),b):Ge(new N(2,1,9004,a));return a}
765
+ function Ts(a,b){var c=new ps;return Ie(void 0).$(function(){return c.init()}).$(function(){return ts(c,b.Ca(),b.ma())}).$(function(d){return d.getSegments([b.key()])}).$(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}M("shaka.offline.OfflineScheme",Rs);Rs.plugin=Ss;Te("offline",Ss);function Us(a,b,c){var d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var q=!1,v=t(m),w=v.next();!w.done;w=v.next())if(w=w.value,Vs(w.info,p)){w.sessionIds.push(p.sessionId);q=!0;break}q||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.B(4);break}g=f.value;h=Ws(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.B(2);break;case 4:return l["return"](d)}})}
766
+ function Ws(a,b,c){var d,e;return L(function(f){switch(f.g){case 1:return d=new Pf({nb:b,onError:function(){},Pc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),C(f,2),d.configure(a),u(f,Xf(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return F(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return C(f,6),u(f,fg(d),8);case 8:va(f,7);break;case 6:return F(f),u(f,d.destroy(),
767
+ 9);case 9:return f["return"]([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return L(function(h){if(1==h.g)return C(h,2),u(h,gg(d,g),4);if(2!=h.g)return e.push(g),va(h,0);F(h);A(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
768
+ function Vs(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&gb(a.audioCapabilities,b.audioCapabilities,c)&&gb(a.videoCapabilities,b.videoCapabilities,c)};function Xs(a,b,c){var d=b.presentationTimeline.getDuration();b=Ys(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Zs(a,b){var c=Ls(new Ks(a.Ca(),a.ma()),b),d=b.appMetadata||{};c=Ys(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
767
769
  function Ys(a){var b=[],c=ie(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push($d(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(ae(c.value));return b};function $s(){this.g={}}function at(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function bt(a,b){a.g[b.id]=b.bandwidth||2048}function ct(a,b){var c=a.g[b];null==c&&(c=0);return c};function dt(a){var b=this;if(a&&a.constructor!=U)throw new N(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.dc()):(this.h=Uk(),this.g=new Se);this.i=[];this.j=[];var c=!a;this.l=new cf(function(){var d,e,f,g,h;return L(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return $r(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return u(k,Promise.all(e),3);case 3:if(!c){k.B(4);break}return u(k,b.g.destroy(),4);
768
770
  case 4:b.h=null,b.g=null,A(k)}})})}function et(){if(uc())a:{var a=t(qs.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}r=dt.prototype;r.destroy=function(){return this.l.destroy()};
769
771
  r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Rk(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Kb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return Wk(this.h,a)};r.getConfiguration=function(){var a=Uk();Wk(a,this.h,Uk());return a};r.dc=function(){return this.g};
770
- r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Zr(this.g);this.j.push(f);b=ft(this,a,b||{},function(){var h;return L(function(k){if(1==k.g)return u(k,Ag(a,d.g,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"](Sb(h))})},e,f);var g=new Fe(b,function(){return $r(f)});g["finally"](function(){fb(d.j,f)});g.then=function(h){Kb("shaka.offline.Storage.store.then","Storage operations now return a shaka.util.AbortableOperation, rather than a promise. Please update to conform to this new API; you can use the |chain| method instead.");
771
- return g.promise.then(h)};return gt(this,g)};r.tf=function(){Kb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
772
- function ft(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,w,x,y,D,z;return L(function(B){switch(B.g){case 1:return ht(),h=g=null,k=new ps,n=m=l=null,C(B,2,3),u(B,d(),5);case 5:return g=B.h,u(B,it(a,b,g,e),6);case 6:p=B.h;jt(a);q=!p.presentationTimeline.U()&&!p.presentationTimeline.mb();if(!q)throw new N(2,9,9005,b);return u(B,kt(a,p,function(F){n=n||F},e),7);case 7:h=B.h;jt(a);if(n)throw n;return u(B,lt(p,e),8);case 8:return u(B,k.init(),9);case 9:return jt(a),u(B,rs(k),10);case 10:return l=B.h,jt(a),v=mt(h,
773
- p,b,c,e,f),w=v.Ef,x=v.ae,u(B,l.la.addManifests([w]),11);case 11:y=B.h;jt(a);m=y[0];jt(a);if(n)throw n;return u(B,nt(a,x,m,w,f,e,l.la,p,h),12);case 12:return jt(a),D=new Is("manifest",l.path.Ca,l.path.la,m),B["return"](Zs(D,w));case 3:return wa(B),u(B,k.destroy(),13);case 13:if(!g){B.B(14);break}return u(B,g.stop(),14);case 14:if(!h){B.B(16);break}return u(B,h.destroy(),16);case 16:ya(B,0);break;case 2:z=E(B);if(null==m){B.B(18);break}return u(B,ot(m),18);case 18:throw n||z;}})}
774
- function nt(a,b,c,d,e,f,g,h,k){var l,m,n,p,q,v,w,x,y,D;return L(function(z){switch(z.g){case 1:l={};m=0;n=function(B,F){var G,H,I,J,K,P,R;return L(function(ba){if(1==ba.g){G={};H=t(B);for(I=H.next();!I.done;G={bb:G.bb},I=H.next())G.bb=I.value,J=Wr(G.bb,f),K=G.bb.i,P=G.bb.h,R=function(aa){return function(Y){var Da,Fa,xa;return L(function(Ja){if(1==Ja.g)return u(Ja,g.addSegments([{data:Y}]),2);Da=Ja.h;jt(a);Fa=aa.bb.g;xa=Vr(Fa);l[xa]=Da[0];m+=Y.byteLength;A(Ja)})}}(G),bs(e,G.bb.groupId,J,K,P,R);return u(ba,
775
- ds(e),2)}if(!F)return ba.B(0);jt(a);pt(h,d,k,f);return u(ba,g.updateManifest(c,d),0)})};p=!1;C(z,2);if(!qt(h)||!p||rt(h)){z.B(4);break}return u(z,n(b.filter(function(B){return B.h}),!0),5);case 5:return jt(a),b=b.filter(function(B){return!B.h}),q=l,v=m,l={},m=0,u(z,st(g,c,d,q,v,function(){return jt(a)}),6);case 6:jt(a);case 4:if(p){z.B(7);break}return u(z,n(b,!1),8);case 8:return jt(a),w=l,x=m,l={},m=0,u(z,st(g,c,d,w,x,function(){return jt(a)}),9);case 9:jt(a);case 7:va(z,0);break;case 2:return y=
776
- E(z),D=Object.values(l),u(z,g.removeSegments(D,function(){}),10);case 10:throw y;}})}function ot(a){var b,c,d,e;return L(function(f){switch(f.g){case 1:return b=new ps,u(f,b.init(),2);case 2:return u(f,rs(b),3);case 3:return c=f.h,d=new Is("manifest",c.path.Ca,c.path.la,a),u(f,b.destroy(),4);case 4:return e=new dt,u(f,e.remove(d.toString()),0)}})}
777
- function st(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,w,x;return L(function(y){switch(y.g){case 1:g=!1;C(y,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())q=p.value,v=q.pendingSegmentRefId?d[q.pendingSegmentRefId]:null,null!=v&&(q.dataKey=v,q.pendingSegmentRefId=void 0),v=q.pendingInitSegmentRefId?d[q.pendingInitSegmentRefId]:null,null!=v&&(q.initSegmentKey=v,q.pendingInitSegmentRefId=void 0),q.pendingSegmentRefId&&(h=!1),q.pendingInitSegmentRefId&&
778
- (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(y,a.updateManifest(b,c),4);case 4:g=!0;f();va(y,0);break;case 2:return w=E(y),u(y,ot(b),5);case 5:if(g){y.B(6);break}x=Object.values(d);return u(y,a.removeSegments(x,function(){}),6);case 6:throw w;}})}
779
- function lt(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,D,z,B,F,G,H,I,J,K,P,R,ba,aa;return L(function(Y){switch(Y.g){case 1:return c={width:Infinity,height:Infinity},Nd(a,b.restrictions,c),u(Y,Qd(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Bd(a,g,h,e,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push($d(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())q=p.value,
780
- d.push(ae(q));v=t(a.imageStreams);for(w=v.next();!w.done;w=v.next())x=w.value,d.push(be(x));return u(Y,b.offline.trackSelectionCallback(d),3);case 3:y=Y.h;D=a.presentationTimeline.getDuration();z=0;B=t(y);for(F=B.next();!F.done;F=B.next())G=F.value,H=G.bandwidth*D/8,z+=H;C(Y,4);return u(Y,b.offline.downloadSizeCallback(z),6);case 6:I=Y.h;if(!I)throw new N(2,9,9014);va(Y,5);break;case 4:J=E(Y);if(J instanceof N)throw J;throw new N(2,9,9015);case 5:K=new Set;P=new Set;R=new Set;ba=t(y);for(F=ba.next();!F.done;F=
781
- ba.next())aa=F.value,"variant"==aa.type&&K.add(aa.id),"text"==aa.type&&P.add(aa.id),"image"==aa.type&&R.add(aa.id);a.variants=a.variants.filter(function(Da){return K.has(Da.id)});a.textStreams=a.textStreams.filter(function(Da){return P.has(Da.id)});a.imageStreams=a.imageStreams.filter(function(Da){return R.has(Da.id)});tt(a);A(Y)}})}
772
+ r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Zr(this.g);this.j.push(f);b=ft(this,a,b||{},function(){var h;return L(function(k){if(1==k.g)return u(k,Ag(a,d.g,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"](Rb(h))})},e,f);var g=new Fe(b,function(){return $r(f)});g["finally"](function(){fb(d.j,f)});g.then=function(h){Kb("shaka.offline.Storage.store.then","Storage operations now return a shaka.util.AbortableOperation, rather than a promise. Please update to conform to this new API; you can use the |chain| method instead.");
773
+ return g.promise.then(h)};return gt(this,g)};r.rf=function(){Kb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
774
+ function ft(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,w,y,x,D,z;return L(function(B){switch(B.g){case 1:return ht(),h=g=null,k=new ps,n=m=l=null,C(B,2,3),u(B,d(),5);case 5:return g=B.h,u(B,it(a,b,g,e),6);case 6:p=B.h;jt(a);q=!p.presentationTimeline.U()&&!p.presentationTimeline.mb();if(!q)throw new N(2,9,9005,b);return u(B,kt(a,p,function(E){n=n||E},e),7);case 7:h=B.h;jt(a);if(n)throw n;return u(B,lt(p,e),8);case 8:return u(B,k.init(),9);case 9:return jt(a),u(B,rs(k),10);case 10:return l=B.h,jt(a),v=mt(h,
775
+ p,b,c,e,f),w=v.Df,y=v.ae,u(B,l.ma.addManifests([w]),11);case 11:x=B.h;jt(a);m=x[0];jt(a);if(n)throw n;return u(B,nt(a,y,m,w,f,e,l.ma,p,h),12);case 12:return jt(a),D=new Is("manifest",l.path.Ca,l.path.ma,m),B["return"](Zs(D,w));case 3:return wa(B),u(B,k.destroy(),13);case 13:if(!g){B.B(14);break}return u(B,g.stop(),14);case 14:if(!h){B.B(16);break}return u(B,h.destroy(),16);case 16:ya(B,0);break;case 2:z=F(B);if(null==m){B.B(18);break}return u(B,ot(m),18);case 18:throw n||z;}})}
776
+ function nt(a,b,c,d,e,f,g,h,k){var l,m,n,p,q,v,w,y,x,D;return L(function(z){switch(z.g){case 1:l={};m=0;n=function(B,E){var G,H,I,J,K,P,R;return L(function(ba){if(1==ba.g){G={};H=t(B);for(I=H.next();!I.done;G={bb:G.bb},I=H.next())G.bb=I.value,J=Wr(G.bb,f),K=G.bb.i,P=G.bb.h,R=function(aa){return function(Y){var Da,Fa,xa;return L(function(Ja){if(1==Ja.g)return u(Ja,g.addSegments([{data:Y}]),2);Da=Ja.h;jt(a);Fa=aa.bb.g;xa=Vr(Fa);l[xa]=Da[0];m+=Y.byteLength;A(Ja)})}}(G),bs(e,G.bb.groupId,J,K,P,R);return u(ba,
777
+ ds(e),2)}if(!E)return ba.B(0);jt(a);pt(h,d,k,f);return u(ba,g.updateManifest(c,d),0)})};p=!1;C(z,2);if(!qt(h)||!p||rt(h)){z.B(4);break}return u(z,n(b.filter(function(B){return B.h}),!0),5);case 5:return jt(a),b=b.filter(function(B){return!B.h}),q=l,v=m,l={},m=0,u(z,st(g,c,d,q,v,function(){return jt(a)}),6);case 6:jt(a);case 4:if(p){z.B(7);break}return u(z,n(b,!1),8);case 8:return jt(a),w=l,y=m,l={},m=0,u(z,st(g,c,d,w,y,function(){return jt(a)}),9);case 9:jt(a);case 7:va(z,0);break;case 2:return x=
778
+ F(z),D=Object.values(l),u(z,g.removeSegments(D,function(){}),10);case 10:throw x;}})}function ot(a){var b,c,d,e;return L(function(f){switch(f.g){case 1:return b=new ps,u(f,b.init(),2);case 2:return u(f,rs(b),3);case 3:return c=f.h,d=new Is("manifest",c.path.Ca,c.path.ma,a),u(f,b.destroy(),4);case 4:return e=new dt,u(f,e.remove(d.toString()),0)}})}
779
+ function st(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,w,y;return L(function(x){switch(x.g){case 1:g=!1;C(x,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())q=p.value,v=q.pendingSegmentRefId?d[q.pendingSegmentRefId]:null,null!=v&&(q.dataKey=v,q.pendingSegmentRefId=void 0),v=q.pendingInitSegmentRefId?d[q.pendingInitSegmentRefId]:null,null!=v&&(q.initSegmentKey=v,q.pendingInitSegmentRefId=void 0),q.pendingSegmentRefId&&(h=!1),q.pendingInitSegmentRefId&&
780
+ (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(x,a.updateManifest(b,c),4);case 4:g=!0;f();va(x,0);break;case 2:return w=F(x),u(x,ot(b),5);case 5:if(g){x.B(6);break}y=Object.values(d);return u(x,a.removeSegments(y,function(){}),6);case 6:throw w;}})}
781
+ function lt(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,w,y,x,D,z,B,E,G,H,I,J,K,P,R,ba,aa;return L(function(Y){switch(Y.g){case 1:return c={width:Infinity,height:Infinity},Nd(a,b.restrictions,c),u(Y,Qd(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Bd(a,g,h,e,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push($d(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())q=p.value,
782
+ d.push(ae(q));v=t(a.imageStreams);for(w=v.next();!w.done;w=v.next())y=w.value,d.push(be(y));return u(Y,b.offline.trackSelectionCallback(d),3);case 3:x=Y.h;D=a.presentationTimeline.getDuration();z=0;B=t(x);for(E=B.next();!E.done;E=B.next())G=E.value,H=G.bandwidth*D/8,z+=H;C(Y,4);return u(Y,b.offline.downloadSizeCallback(z),6);case 6:I=Y.h;if(!I)throw new N(2,9,9014);va(Y,5);break;case 4:J=F(Y);if(J instanceof N)throw J;throw new N(2,9,9015);case 5:K=new Set;P=new Set;R=new Set;ba=t(x);for(E=ba.next();!E.done;E=
783
+ ba.next())aa=E.value,"variant"==aa.type&&K.add(aa.id),"text"==aa.type&&P.add(aa.id),"image"==aa.type&&R.add(aa.id);a.variants=a.variants.filter(function(Da){return K.has(Da.id)});a.textStreams=a.textStreams.filter(function(Da){return P.has(Da.id)});a.imageStreams=a.imageStreams.filter(function(Da){return R.has(Da.id)});tt(a);A(Y)}})}
782
784
  function mt(a,b,c,d,e,f){var g=Xs(c,b,d),h=e.offline.progressCallback;as(f,function(q,v){g.size=v;h(g,q)},function(q,v){k&&e.offline.usePersistentLicense&&l==v&&eg(a,"cenc",q)});var k=qt(b)&&!rt(b),l=null;k&&(l=ut.get(a.g.keySystem));for(var m=new $s,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())bt(m,p.value);p=t(b.variants);for(n=p.next();!n.done;n=p.next())at(m,n.value);m=vt(f,m,b);f=m.streams;m=m.ae;p=a.g;n=e.offline.usePersistentLicense;
783
- p&&n&&(p.initData=[]);return{Ef:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.cc(),streams:f,sessionIds:n?kg(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0},ae:m}}function qt(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
785
+ p&&n&&(p.initData=[]);return{Df:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.cc(),streams:f,sessionIds:n?kg(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0},ae:m}}function qt(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
784
786
  function rt(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function pt(a,b,c,d){b.expiration=c.cc();c=kg(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(qt(a)&&d.offline.usePersistentLicense&&!c.length)throw new N(2,9,9007);}r.remove=function(a){return wt(this,xt(this,a))};
785
- function xt(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:ht();c=Js(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new ps;ua(k);return u(k,e.init(),4);case 4:return u(k,ts(e,d.Ca(),d.la()),5);case 5:return f=k.h,u(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],u(k,Promise.all([yt(a,h,e),zt(f,d,h)]),2);case 2:return wa(k),u(k,e.destroy(),8);case 8:ya(k,0)}})}
787
+ function xt(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:ht();c=Js(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new ps;ua(k);return u(k,e.init(),4);case 4:return u(k,ts(e,d.Ca(),d.ma()),5);case 5:return f=k.h,u(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],u(k,Promise.all([yt(a,h,e),zt(f,d,h)]),2);case 2:return wa(k),u(k,e.destroy(),8);case 8:ya(k,0)}})}
786
788
  function At(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:ad(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:ad(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function yt(a,b,c){return L(function(d){return u(d,Bt(a.g,a.h.drm,c,b),0)})}
787
- function zt(a,b,c){function d(){}var e=Ct(c);Zs(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.Sf=function(){return wt(this,Dt(this))};
789
+ function zt(a,b,c){function d(){}var e=Ct(c);Zs(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.Rf=function(){return wt(this,Dt(this))};
788
790
  function Dt(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return ht(),b=a.g,c=a.h.drm,d=new ps,e=!1,ua(n),u(n,d.init(),4);case 4:f=[],us(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.B(2);break}k=h.value;return u(n,k.getAll(),8);case 8:return l=n.h,u(n,Us(c,b,l),9);case 9:return m=n.h,u(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.B(5);break;case 2:return wa(n),u(n,d.destroy(),11);case 11:ya(n,3);break;case 3:return n["return"](!e)}})}
789
- r.list=function(){return wt(this,Et())};function Et(){var a,b,c;return L(function(d){switch(d.g){case 1:return ht(),a=[],b=new ps,ua(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),ss(b,function(e,f){c=c.then(function(){var g;return L(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=Zs(new Is("manifest",e.Ca,e.la,l),k);a.push(m)});A(h)})})}),u(d,c,2);case 2:return wa(d),u(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d["return"](a)}})}
791
+ r.list=function(){return wt(this,Et())};function Et(){var a,b,c;return L(function(d){switch(d.g){case 1:return ht(),a=[],b=new ps,ua(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),ss(b,function(e,f){c=c.then(function(){var g;return L(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=Zs(new Is("manifest",e.Ca,e.ma,l),k);a.push(m)});A(h)})})}),u(d,c,2);case 2:return wa(d),u(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d["return"](a)}})}
790
792
  function it(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),jt(a),u(l,c.start(b,
791
793
  g),2);if(3!=l.g)return h=l.h,jt(a),k=Ft(h),u(l,Promise.all(nf(k,function(m){return m.createSegmentIndex()})),3);jt(a);if(e)throw e;return l["return"](h)})}function kt(a,b,c,d){var e;return L(function(f){switch(f.g){case 1:return e=new Pf({nb:a.g,onError:c,Pc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,Uf(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,fg(e),3);case 3:return u(f,dg(e),4);case 4:return f["return"](e)}})}
792
794
  function vt(a,b,c){var d=new Map,e=Ft(c),f=new Map;e=t(e);for(var g=e.next();!g.done;g=e.next()){g=g.value;var h=Gt(a,b,c,g,d);f.set(g.id,h)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&f.get(b.audio.id).variantIds.push(b.id),b.video&&f.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(f.values()),ae:Array.from(d.values())}}
793
795
  function Gt(a,b,c,d,e){var f={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
794
- tilesLayout:d.tilesLayout};Ht(d,c.presentationTimeline.Ra(),function(g){var h=Vr(g),k=void 0;if(!e.has(h)){var l=g.endTime-g.startTime;l=ct(b,d.id)*l;l=Yr(a.g,l);e.set(h,new Ur(g,l,d.id,!1))}g.g&&(k=Vr(g.g),e.has(k)||(l=.5*ct(b,d.id),l=Yr(a.g,l),e.set(k,new Ur(g.g,l,d.id,!0))));f.segments.push({pendingInitSegmentRefId:k,initSegmentKey:k?0:null,startTime:g.startTime,endTime:g.endTime,appendWindowStart:g.appendWindowStart,appendWindowEnd:g.appendWindowEnd,timestampOffset:g.timestampOffset,tilesLayout:g.tilesLayout,
796
+ tilesLayout:d.tilesLayout};Ht(d,c.presentationTimeline.Qa(),function(g){var h=Vr(g),k=void 0;if(!e.has(h)){var l=g.endTime-g.startTime;l=ct(b,d.id)*l;l=Yr(a.g,l);e.set(h,new Ur(g,l,d.id,!1))}g.g&&(k=Vr(g.g),e.has(k)||(l=.5*ct(b,d.id),l=Yr(a.g,l),e.set(k,new Ur(g.g,l,d.id,!0))));f.segments.push({pendingInitSegmentRefId:k,initSegmentKey:k?0:null,startTime:g.startTime,endTime:g.endTime,appendWindowStart:g.appendWindowStart,appendWindowEnd:g.appendWindowEnd,timestampOffset:g.timestampOffset,tilesLayout:g.tilesLayout,
795
797
  pendingSegmentRefId:h,dataKey:0})});return f}function Ht(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function jt(a){if(a.l.g)throw new N(2,9,7001);}function ht(){if(!et())throw new N(2,9,9E3);}function wt(a,b){return L(function(c){if(1==c.g)return a.i.push(b),ua(c),u(c,b,4);if(2!=c.g)return c["return"](c.h);wa(c);fb(a.i,b);return ya(c,0)})}function gt(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){fb(a.i,c)})}
796
798
  function Ct(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
797
799
  function Bt(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=vs(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:At(d,!1),videoCapabilities:At(d,!0)}});return u(h,Us(b,a,f),2)}return 3!=h.g?(g=h.h,u(h,e.remove(g),3)):u(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
798
800
  function Ft(a){for(var b=new Set,c=t(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=t(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
799
801
  function tt(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}M("shaka.offline.Storage",dt);dt.deleteAll=function(){var a;return L(function(b){return 1==b.g?(a=new ps,ua(b),u(b,ws(a),2)):5!=b.g?(wa(b),u(b,a.destroy(),5)):ya(b,0)})};dt.prototype.list=dt.prototype.list;
800
- dt.prototype.removeEmeSessions=dt.prototype.Sf;dt.prototype.remove=dt.prototype.remove;dt.prototype.getStoreInProgress=dt.prototype.tf;dt.prototype.store=dt.prototype.store;dt.prototype.getNetworkingEngine=dt.prototype.dc;dt.prototype.getConfiguration=dt.prototype.getConfiguration;dt.prototype.configure=dt.prototype.configure;dt.prototype.destroy=dt.prototype.destroy;dt.support=et;
802
+ dt.prototype.removeEmeSessions=dt.prototype.Rf;dt.prototype.remove=dt.prototype.remove;dt.prototype.getStoreInProgress=dt.prototype.rf;dt.prototype.store=dt.prototype.store;dt.prototype.getNetworkingEngine=dt.prototype.dc;dt.prototype.getConfiguration=dt.prototype.getConfiguration;dt.prototype.configure=dt.prototype.configure;dt.prototype.destroy=dt.prototype.destroy;dt.support=et;
801
803
  var ut=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");
802
- Zm.offline=et;function It(){}function Jt(a,b){for(var c={priority:b||0,Pe:a},d=0;d<Kt.length;d++)if(Kt[d].priority<c.priority){Kt.splice(d,0,c);return}Kt.push(c)}M("shaka.polyfill",It);It.register=Jt;It.installAll=function(){for(var a=t(Kt),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Pe()}catch(c){Ua("Error installing polyfill!",c)}}};var Kt=[];function Lt(){}function Mt(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Nt(b.value)}function Nt(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}It.Aria=Lt;Lt.install=Mt;Jt(Mt);function Ot(){}function Pt(){Qt()}It.EncryptionScheme=Ot;Ot.install=Pt;Jt(Pt,-2);function Rt(){}
804
+ Zm.offline=et;function It(){}function Jt(a,b){for(var c={priority:b||0,Oe:a},d=0;d<Kt.length;d++)if(Kt[d].priority<c.priority){Kt.splice(d,0,c);return}Kt.push(c)}M("shaka.polyfill",It);It.register=Jt;It.installAll=function(){for(var a=t(Kt),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Oe()}catch(c){Ua("Error installing polyfill!",c)}}};var Kt=[];function Lt(){}function Mt(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Nt(b.value)}function Nt(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}It.Aria=Lt;Lt.install=Mt;Jt(Mt);function Ot(){}function Pt(){Qt()}It.EncryptionScheme=Ot;Ot.install=Pt;Jt(Pt,-2);function Rt(){}
803
805
  function St(){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.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
804
806
  Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Tt);document.addEventListener("webkitfullscreenerror",Tt);document.addEventListener("mozfullscreenchange",Tt);document.addEventListener("mozfullscreenerror",Tt);document.addEventListener("MSFullscreenChange",Tt);document.addEventListener("MSFullscreenError",Tt)}}
805
807
  function Tt(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}It.Fullscreen=Rt;Rt.install=St;Jt(St);function Ut(){}function Vt(){}It.MathRound=Ut;Ut.install=Vt;Jt(Vt);function Wt(){}function Xt(){if(Bc()||Cc()||Dc()||yc("PlayStation 5")||Ac()||zc()||yc("PC=EOS")||yc("Hisense")||yc("VIDAA")||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Yt=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Zt}
806
- function Zt(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,w,x,y;return L(function(D){switch(D.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return D["return"](b);c=a.video;d=a.audio;if("media-source"==a.type){if(!uc())return D["return"](b);if(c){if(Bc())if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType){var z=c.contentType;c.width&&c.height&&(z+="; width="+c.width+"; height="+c.height);c.framerate&&(z+="; framerate="+c.framerate);"pq"===c.transferFunction&&
807
- (z+="; eotf=smpte2084");z=cast.__platform__.canDisplayType(z)}else z=MediaSource.isTypeSupported(c.contentType);else z=MediaSource.isTypeSupported(c.contentType);e=z;if(!e)return D["return"](b)}if(d&&(f=d.contentType,g=MediaSource.isTypeSupported(f),!g))return D["return"](b)}else if("file"==a.type){if(c&&(h=c.contentType,k=vc(h),!k)||d&&(l=d.contentType,m=vc(l),!m))return D["return"](b)}else return D["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,D["return"](Promise.resolve(b));n=
808
- a.keySystemConfiguration;p=[];q=[];n.audio&&(v={robustness:n.audio.robustness||"",contentType:a.audio.contentType},p.push(v));n.video&&(w={robustness:n.video.robustness||"",contentType:a.video.contentType},q.push(w));x={initDataTypes:[n.initDataType],distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,sessionTypes:n.sessionTypes};p.length&&(x.audioCapabilities=p);q.length&&(x.videoCapabilities=q);C(D,3);return u(D,navigator.requestMediaKeySystemAccess(n.keySystem,[x]),
809
- 5);case 5:y=D.h;va(D,4);break;case 3:E(D);case 4:y&&(b.supported=!0,b.keySystemAccess=y);case 2:return D["return"](b)}})}It.MediaCapabilities=Wt;Wt.install=Xt;var Yt=null;Wt.originalMcap=Yt;Jt(Xt,-1);function $t(){}function au(){var a=Fc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?bu():a?(cu(),12>=a?(du(),eu()):15>=a&&du()):navigator.userAgent.match(/Edge?\//)?cu():(yc("Tizen 2")||yc("Tizen 3")||yc("Tizen 4"))&&fu());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&gu()}
808
+ function Zt(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,w,y,x,D;return L(function(z){switch(z.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return z["return"](b);c=a.video;d=a.audio;if("media-source"==a.type){if(!uc())return z["return"](b);if(c){if(Bc())if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType){var B=c.contentType;c.width&&c.height&&(B+="; width="+c.width+"; height="+c.height);c.framerate&&(B+="; framerate="+c.framerate);"pq"===
809
+ c.transferFunction&&(B+="; eotf=smpte2084");e=cast.__platform__.canDisplayType(B)}else e=MediaSource.isTypeSupported(c.contentType);else zc()?(f=c.contentType,c.width&&c.height&&(f+="; width="+c.width,f+="; height="+c.height),c.framerate&&(f+="; framerate="+c.framerate),c.bitrate&&(f+="; bitrate="+c.bitrate),e=MediaSource.isTypeSupported(f)):e=MediaSource.isTypeSupported(c.contentType);if(!e)return z["return"](b)}if(d&&(g=d.contentType,h=MediaSource.isTypeSupported(g),!h))return z["return"](b)}else if("file"==
810
+ a.type){if(c&&(k=c.contentType,l=vc(k),!l)||d&&(m=d.contentType,n=vc(m),!n))return z["return"](b)}else return z["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,z["return"](Promise.resolve(b));p=a.keySystemConfiguration;q=[];v=[];p.audio&&(w={robustness:p.audio.robustness||"",contentType:a.audio.contentType},q.push(w));p.video&&(y={robustness:p.video.robustness||"",contentType:a.video.contentType},v.push(y));x={initDataTypes:[p.initDataType],distinctiveIdentifier:p.distinctiveIdentifier,
811
+ persistentState:p.persistentState,sessionTypes:p.sessionTypes};q.length&&(x.audioCapabilities=q);v.length&&(x.videoCapabilities=v);C(z,3);return u(z,navigator.requestMediaKeySystemAccess(p.keySystem,[x]),5);case 5:D=z.h;va(z,4);break;case 3:F(z);case 4:D&&(b.supported=!0,b.keySystemAccess=D);case 2:return z["return"](b)}})}It.MediaCapabilities=Wt;Wt.install=Xt;var Yt=null;Wt.originalMcap=Yt;Jt(Xt,-1);function $t(){}function au(){var a=Fc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?bu():a?(cu(),12>=a?(du(),eu()):15>=a&&du()):navigator.userAgent.match(/Edge?\//)?cu():(yc("Tizen 2")||yc("Tizen 3")||yc("Tizen 4"))&&fu());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&gu()}
810
812
  function du(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ha.apply(0,arguments));b.abort=function(){};return b}}function eu(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function cu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
811
813
  function fu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=dd(b)[0]&&a(b)}}function bu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}}
812
814
  function gu(){var a=MediaSource.isTypeSupported;Ac()||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}It.MediaSource=$t;$t.install=au;Jt(au);function hu(){}function iu(){screen.orientation||void 0!=window.orientation&&ju()}function ju(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new ku;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new Q("change");b.dispatchEvent(c)})}It.Orientation=hu;
@@ -817,27 +819,27 @@ function nu(a){var b=this.mediaKeys;b&&b!=a&&ru(b,null);delete this.mediaKeys;re
817
819
  function pu(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;if("required"==e.persistentState)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=t(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
818
820
  k.contentType.split(";")[0])&&(d.audioCapabilities.push(k),g=!0));if(e.videoCapabilities)for(e=t(e.videoCapabilities),k=e.next();!k.done;k=e.next())h=k.value,h.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,h.contentType.split(";")[0])&&(d.videoCapabilities.push(h),g=!0));f||(g=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));d=g?d:null}if(d){this.g=d;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
819
821
  pu.prototype.createMediaKeys=function(){var a=new ou(this.keySystem);return Promise.resolve(a)};pu.prototype.getConfiguration=function(){return this.g};function ou(a){this.h=new WebKitMediaKeys(a);this.g=new ef}ou.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new tu(this.h,a)};ou.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
820
- function ru(a,b){a.g.Ta();if(!b)return Promise.resolve();a.g.A(b,"webkitneedkey",su);try{return Pi(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function tu(a){Ne.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new ef;this.sessionId="";this.expiration=NaN;this.closed=new rc;this.keyStatuses=new uu}qa(tu,Ne);r=tu.prototype;
822
+ function ru(a,b){a.g.Sa();if(!b)return Promise.resolve();a.g.A(b,"webkitneedkey",su);try{return Pi(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function tu(a){Ne.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new ef;this.sessionId="";this.expiration=NaN;this.closed=new rc;this.keyStatuses=new uu}qa(tu,Ne);r=tu.prototype;
821
823
  r.generateRequest=function(a,b){var c=this;this.g=new rc;try{var d=this.l.createSession("video/mp4",Fb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.A(this.i,"webkitkeymessage",function(e){c.g&&(c.g.resolve(),c.g=null);e=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Gb(e.message));e=new Q("message",e);c.dispatchEvent(e)});this.j.A(d,"webkitkeyadded",function(){c.h&&(vu(c,"usable"),c.h.resolve(),c.h=null)});this.j.A(d,"webkitkeyerror",function(){var e=
822
824
  Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.g)c.g.reject(e),c.g=null;else if(null!=c.h)c.h.reject(e),c.h=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:vu(c,"output-not-allowed");break;default:vu(c,"internal-error")}});vu(this,"status-pending")}catch(e){this.g.reject(e)}return this.g};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
823
- r.update=function(a){this.h=new rc;try{this.i.update(Fb(a))}catch(b){this.h.reject(b)}return this.h};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Ta()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function vu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new Q("keystatuseschange");a.dispatchEvent(c)}
825
+ r.update=function(a){this.h=new rc;try{this.i.update(Fb(a))}catch(b){this.h.reject(b)}return this.h};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Sa()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function vu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new Q("keystatuseschange");a.dispatchEvent(c)}
824
826
  function uu(){this.size=0;this.g=void 0}r=uu.prototype;r.forEach=function(a){this.g&&a(this.g,yg.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=yg.value();return this.g&&Db(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};Jt(mu);function wu(){}function xu(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=yu,window.MediaKeySystemAccess=zu,navigator.requestMediaKeySystemAccess=Au,HTMLMediaElement.prototype.setMediaKeys=Bu)}function Au(a,b){try{var c=new zu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
825
827
  function Cu(a){if(a.initData){var b=new CustomEvent("encrypted");b.initDataType="cenc";b.initData=Gb(Do(a.initData));this.dispatchEvent(b)}}It.PatchedMediaKeysMs=wu;wu.install=xu;
826
828
  function zu(a,b){this.keySystem=a;for(var c=!1,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},g=!1;if(e.audioCapabilities)for(var h=t(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.audioCapabilities.push(k),c=
827
829
  !0));if(e.videoCapabilities)for(h=t(e.videoCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.videoCapabilities.push(k),c=!0));g||(c=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==e.persistentState&&(c=!1);if(c){this.g=f;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
828
830
  zu.prototype.createMediaKeys=function(){var a=new yu(this.keySystem);return Promise.resolve(a)};zu.prototype.getConfiguration=function(){return this.g};function Bu(a){var b=this.mediaKeys;b&&b!=a&&Du(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Du(a,this):Promise.resolve()}function yu(a){this.h=new MSMediaKeys(a);this.g=new ef}
829
- yu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Eu(this.h,a)};yu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function Du(a,b){a.g.Ta();if(!b)return Promise.resolve();a.g.A(b,"msneedkey",Cu);try{return Pi(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.msSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
831
+ yu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Eu(this.h,a)};yu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function Du(a,b){a.g.Sa();if(!b)return Promise.resolve();a.g.A(b,"msneedkey",Cu);try{return Pi(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.msSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
830
832
  function Eu(a){Ne.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new ef;this.sessionId="";this.expiration=NaN;this.closed=new rc;this.keyStatuses=new Fu}qa(Eu,Ne);r=Eu.prototype;
831
833
  r.generateRequest=function(a,b){var c=this;this.g=new rc;try{this.i=this.l.createSession("video/mp4",Fb(b),null),this.j.A(this.i,"mskeymessage",function(d){c.g&&(c.g.resolve(),c.g=null);d=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Gb(d.message));d=new Q("message",d);c.dispatchEvent(d)}),this.j.A(this.i,"mskeyadded",function(){c.g?(Gu(c,"usable"),c.g.resolve(),c.g=null):c.h&&(Gu(c,"usable"),c.h.resolve(),c.h=null)}),this.j.A(this.i,"mskeyerror",
832
834
  function(){var d=Error("EME PatchedMediaKeysMs key error");d.errorCode=c.i.error;if(null!=c.g)c.g.reject(d),c.g=null;else if(null!=c.h)c.h.reject(d),c.h=null;else switch(c.i.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Gu(c,"output-not-allowed");break;default:Gu(c,"internal-error")}}),Gu(this,"status-pending")}catch(d){this.g.reject(d)}return this.g};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
833
- r.update=function(a){this.h=new rc;try{this.i.update(Fb(a))}catch(b){this.h.reject(b)}return this.h};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Ta()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Gu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new Q("keystatuseschange");a.dispatchEvent(c)}
835
+ r.update=function(a){this.h=new rc;try{this.i.update(Fb(a))}catch(b){this.h.reject(b)}return this.h};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Sa()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Gu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new Q("keystatuseschange");a.dispatchEvent(c)}
834
836
  function Fu(){this.size=0;this.g=void 0}r=Fu.prototype;r.forEach=function(a){this.g&&a(this.g,yg.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=yg.value();return this.g&&Db(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};Jt(xu);function Hu(){}function Iu(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Ju,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Ku,window.MediaKeys=Lu,window.MediaKeySystemAccess=Mu)}function Ju(){return Promise.reject(Error("The key system specified is not supported."))}
835
837
  function Ku(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}It.PatchedMediaKeysNop=Hu;Hu.install=Iu;function Lu(){throw new TypeError("Illegal constructor.");}Lu.prototype.createSession=function(){};Lu.prototype.setServerCertificate=function(){};function Mu(){this.keySystem="";throw new TypeError("Illegal constructor.");}Mu.prototype.getConfiguration=function(){};Mu.prototype.createMediaKeys=function(){};Jt(Iu,-10);function Nu(){}function Ou(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Pu="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Qu;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Ru;window.MediaKeys=Su;window.MediaKeySystemAccess=Tu}}
836
838
  function Uu(a){var b=Pu;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Qu(a,b){try{var c=new Tu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Ru(a){var b=this.mediaKeys;b&&b!=a&&Vu(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Vu(a,this);return Promise.resolve()}It.PatchedMediaKeysWebkit=Nu;Nu.install=Ou;
837
839
  function Tu(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");for(var f=t(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=t(g.audioCapabilities),
838
840
  m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType.split(";")[0],this.g)&&(h.audioCapabilities.push(m),d=!0));if(g.videoCapabilities)for(l=t(g.videoCapabilities),m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType,this.g)&&(h.videoCapabilities.push(m),d=!0));k||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==g.persistentState&&(c?(h.persistentState="required",h.sessionTypes=["persistent-license"]):
839
841
  d=!1);if(d){this.h=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}Tu.prototype.createMediaKeys=function(){var a=new Su(this.g);return Promise.resolve(a)};Tu.prototype.getConfiguration=function(){return this.h};function Su(a){this.l=a;this.h=null;this.g=new ef;this.i=[];this.j=new Map}
840
- function Vu(a,b){a.h=b;a.g.Ta();var c=Pu;b&&(a.g.A(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Gb(d.initData);a.h.dispatchEvent(e)}),a.g.A(b,c+"keymessage",function(d){var e=Wu(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.g?"licenserequest":"licenserenewal").set("message",d.message),d=new Q("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.A(b,c+"keyadded",function(d){if(d=Wu(a,d.sessionId))Xu(d,"usable"),
842
+ function Vu(a,b){a.h=b;a.g.Sa();var c=Pu;b&&(a.g.A(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Gb(d.initData);a.h.dispatchEvent(e)}),a.g.A(b,c+"keymessage",function(d){var e=Wu(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.g?"licenserequest":"licenserenewal").set("message",d.message),d=new Q("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.A(b,c+"keyadded",function(d){if(d=Wu(a,d.sessionId))Xu(d,"usable"),
841
843
  d.g&&d.g.resolve(),d.g=null}),a.g.A(b,c+"keyerror",function(d){var e=Wu(a,d.sessionId);e&&e.handleError(d)}))}Su.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new Yu(b,this.l,a);this.i.push(a);return a};Su.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
842
844
  function Wu(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function Yu(a,b,c){Ne.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new rc;this.keyStatuses=new Zu}qa(Yu,Ne);r=Yu.prototype;
843
845
  r.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Xu(this,"output-restricted"):1==b?Xu(this,"expired"):Xu(this,"internal-error"))};
@@ -851,12 +853,12 @@ function dv(){return this.webkitSupportsPresentationMode("picture-in-picture")?(
851
853
  function ev(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function fv(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}It.PiPWebkit=bv;bv.install=cv;Jt(cv);function iv(){}function jv(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=kv))}function kv(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}It.RandomUUID=iv;iv.install=jv;Jt(jv);function lv(){}function mv(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=nv)}function nv(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}It.StorageEstimate=lv;lv.install=mv;Jt(mv);function ov(){}function pv(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:qv})}function qv(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}It.Symbol=ov;ov.install=pv;Jt(pv);function rv(){}function sv(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}It.VideoPlayPromise=rv;rv.install=sv;Jt(sv);function tv(){}function uv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||yc("Web0S")&&yc("Chrome/38.0.2125.122 Safari/537.36"))&&(a.getVideoPlaybackQuality=vv)}}function vv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}It.VideoPlaybackQuality=tv;tv.install=uv;Jt(uv);function wv(){}function xv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=yv;else if(6==b)a=zv;else{try{var c=!!yv(1,2,"")}catch(d){c=!1}c&&(a=yv)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function yv(a,b,c){return new window.TextTrackCue(a,b,c)}function zv(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}It.VTTCue=wv;wv.install=xv;Jt(xv);function Av(){}Av.prototype.parseInit=function(){};Av.prototype.parseMedia=function(a,b){var c=null,d=[],e=Jc(a).split(/\r?\n/);e=t(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=Bv.exec(f))){var g=Cv.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new ib(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};M("shaka.text.LrcTextParser",Av);Av.prototype.parseMedia=Av.prototype.parseMedia;
852
854
  Av.prototype.parseInit=Av.prototype.parseInit;var Bv=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Cv=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;hd["application/x-subtitle-lrc"]=function(){return new Av};function Dv(){}Dv.prototype.parseInit=function(){};
853
855
  Dv.prototype.parseMedia=function(a,b){var c=Jc(a),d=[];if(""==c)return d;var e=Mf(c,"tt");if(!e)throw new N(2,2,2005,"Failed to parse TTML.");c=e.getElementsByTagName("body")[0];if(!c)return[];var f=yf(e,Ev,"frameRate"),g=yf(e,Ev,"subFrameRate"),h=yf(e,Ev,"frameRateMultiplier"),k=yf(e,Ev,"tickRate"),l=yf(e,Ev,"cellResolution"),m=e.getAttribute("xml:space")||"default",n=yf(e,Fv,"extent");if("default"!=m&&"preserve"!=m)throw new N(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new Gv(f,g,
854
- h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{columns:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?wf(g):[];h=Array.from(e.getElementsByTagName("style"));e=Array.from(e.getElementsByTagName("region"));k=[];for(var p=t(e),q=p.next();!q.done;q=p.next()){var v=q.value;q=new kb;var w=v.getAttribute("xml:id");if(w){q.id=w;var x=null;n&&(x=Hv.exec(n)||Iv.exec(n));w=x?Number(x[1]):null;x=x?Number(x[2]):null;var y,D;if(y=Jv(v,h,"extent"))y=(D=Hv.exec(y))||Iv.exec(y),
855
- null!=y&&(q.width=Number(y[1]),q.height=Number(y[2]),D||(null!=w&&(q.width=100*q.width/w),null!=x&&(q.height=100*q.height/x)),q.widthUnits=D||null!=w?Ab:0,q.heightUnits=D||null!=x?Ab:0);if(v=Jv(v,h,"origin"))y=(D=Hv.exec(v))||Iv.exec(v),null!=y&&(q.viewportAnchorX=Number(y[1]),q.viewportAnchorY=Number(y[2]),D||(null!=x&&(q.viewportAnchorY=100*q.viewportAnchorY/x),null!=w&&(q.viewportAnchorX=100*q.viewportAnchorX/w)),q.viewportAnchorUnits=D||null!=w?Ab:0)}else q=null;q&&k.push(q)}if(tf(c,"p").length)throw new N(2,
856
+ h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{columns:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?wf(g):[];h=Array.from(e.getElementsByTagName("style"));e=Array.from(e.getElementsByTagName("region"));k=[];for(var p=t(e),q=p.next();!q.done;q=p.next()){var v=q.value;q=new kb;var w=v.getAttribute("xml:id");if(w){q.id=w;var y=null;n&&(y=Hv.exec(n)||Iv.exec(n));w=y?Number(y[1]):null;y=y?Number(y[2]):null;var x,D;if(x=Jv(v,h,"extent"))x=(D=Hv.exec(x))||Iv.exec(x),
857
+ null!=x&&(q.width=Number(x[1]),q.height=Number(x[2]),D||(null!=w&&(q.width=100*q.width/w),null!=y&&(q.height=100*q.height/y)),q.widthUnits=D||null!=w?Ab:0,q.heightUnits=D||null!=y?Ab:0);if(v=Jv(v,h,"origin"))x=(D=Hv.exec(v))||Iv.exec(v),null!=x&&(q.viewportAnchorX=Number(x[1]),q.viewportAnchorY=Number(x[2]),D||(null!=y&&(q.viewportAnchorY=100*q.viewportAnchorY/y),null!=w&&(q.viewportAnchorX=100*q.viewportAnchorX/w)),q.viewportAnchorUnits=D||null!=w?Ab:0)}else q=null;q&&k.push(q)}if(tf(c,"p").length)throw new N(2,
856
858
  2,2001,"<p> can only be inside <div> in TTML");n=t(tf(c,"div"));for(p=n.next();!p.done;p=n.next())if(tf(p.value,"span").length)throw new N(2,2,2001,"<span> can only be inside <p> in TTML");if(c=Kv(c,b,f,g,h,e,k,m,l,null,!1))c.backgroundColor||(c.backgroundColor="transparent"),d.push(c);return d};
857
859
  function Kv(a,b,c,d,e,f,g,h,k,l,m){var n=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var p=document.createElement("span");p.textContent=a.textContent}else p=a;for(var q=null,v=t(Lv),w=v.next();!w.done&&!(q=Mv(p,"backgroundImage",d,"#",w.value)[0]);w=v.next());v=m;if("p"==a.nodeName||q)m=!0;h="default"==(p.getAttribute("xml:space")||(h?"default":"preserve"));w=Array.from(p.childNodes).every(function(B){return B.nodeType==Node.TEXT_NODE});
858
- a=[];if(!w)for(var x=t(p.childNodes),y=x.next();!y.done;y=x.next())(y=Kv(y.value,b,c,d,e,f,g,h,k,p,m))&&a.push(y);d=null!=l;x=/\S/.test(p.textContent);var D=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(D||x||"br"==p.tagName||0!=a.length||d&&!h))return null;y=Nv(p,c);x=y.start;for(y=y.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)y=Ov(n,c,x,y),x=y.start,y=y.end,n=n.parentNode;null==x&&(x=0);x+=b.periodStart;y=null==y?Infinity:y+b.periodStart;x=Math.max(x,b.segmentStart);
859
- y=Math.min(y,b.segmentEnd);if(!D&&0<a.length)for(x=Infinity,y=0,b=t(a),c=b.next();!c.done;c=b.next())c=c.value,x=Math.min(x,c.startTime),y=Math.max(y,c.endTime);if("br"==p.tagName)return e=new ib(x,y,""),e.lineBreak=!0,e;b="";w&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new ib(x,y,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Mv(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var z=k.getAttribute("xml:id");b.region=g.filter(function(B){return B.id==
860
+ a=[];if(!w)for(var y=t(p.childNodes),x=y.next();!x.done;x=y.next())(x=Kv(x.value,b,c,d,e,f,g,h,k,p,m))&&a.push(x);d=null!=l;y=/\S/.test(p.textContent);var D=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(D||y||"br"==p.tagName||0!=a.length||d&&!h))return null;x=Nv(p,c);y=x.start;for(x=x.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)x=Ov(n,c,y,x),y=x.start,x=x.end,n=n.parentNode;null==y&&(y=0);y+=b.periodStart;x=null==x?Infinity:x+b.periodStart;y=Math.max(y,b.segmentStart);
861
+ x=Math.min(x,b.segmentEnd);if(!D&&0<a.length)for(y=Infinity,x=0,b=t(a),c=b.next();!c.done;c=b.next())c=c.value,y=Math.min(y,c.startTime),x=Math.max(x,c.endTime);if("br"==p.tagName)return e=new ib(y,x,""),e.lineBreak=!0,e;b="";w&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new ib(y,x,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Mv(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var z=k.getAttribute("xml:id");b.region=g.filter(function(B){return B.id==
860
862
  z})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&(g=Mv(l,"region",f,"")[0]);Pv(b,p,g,q,e,v,0==a.length);return b}
861
863
  function Pv(a,b,c,d,e,f,g){f=f||g;"rtl"==Qv(b,c,e,"direction",f)&&(a.direction="rtl");g=Qv(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=jb);(g=Qv(b,c,e,"textAlign",!0))?(a.positionAlign=Rv[g],a.lineAlign=Sv[g],a.textAlign=ub[g.toUpperCase()]):a.textAlign=mb;if(g=Qv(b,c,e,"displayAlign",!0))a.displayAlign=vb[g.toUpperCase()];if(g=Qv(b,c,e,"color",f))a.color=g;if(g=Qv(b,c,e,"backgroundColor",
862
864
  f))a.backgroundColor=g;if(g=Qv(b,c,e,"border",f))a.border=g;if(g=Qv(b,c,e,"fontFamily",f))switch(g){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=g}(g=Qv(b,c,e,"fontWeight",f))&&
@@ -888,8 +890,8 @@ function kw(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exe
888
890
  b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=ow(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=wb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=ob,a.line=Number(c[1]),c[2]&&(a.lineAlign=wb[c[2].toUpperCase()])}function ow(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
889
891
  function hw(a){a=Fq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}function lw(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}M("shaka.text.VttTextParser",gw);
890
892
  gw.prototype.parseMedia=gw.prototype.parseMedia;gw.prototype.parseInit=gw.prototype.parseInit;hd["text/vtt"]=function(){return new gw};hd['text/vtt; codecs="vtt"']=function(){return new gw};hd['text/vtt; codecs="wvtt"']=function(){return new gw};function pw(){this.g=null}pw.prototype.parseInit=function(a){var b=this,c=!1;(new Ig).box("moov",Mg).box("trak",Mg).box("mdia",Mg).P("mdhd",function(d){d=Zh(d.reader,d.version);b.g=d.timescale}).box("minf",Mg).box("stbl",Mg).P("stsd",Og).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new N(2,2,2008);if(!c)throw new N(2,2,2008);};
891
- pw.prototype.parseMedia=function(a,b){if(!this.g)throw new N(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Ig).box("moof",Mg).box("traf",Mg).P("tfdt",function(B){g=!0;c=Yh(B.reader,B.version).pd}).P("tfhd",function(B){l=Xh(B.reader,B.flags).ie}).P("trun",function(B){h=!0;d=$h(B.reader,B.version,B.flags).ze}).box("mdat",Pg(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new N(2,2,2008);for(var m=c,n=new Fg(e,0),p=t(d),q=p.next();!q.done;q=p.next()){q=q.value;var v=q.Sd||l,w=q.Tc?
892
- c+q.Tc:m;m=w+(v||0);var x=0;do{var y=n.M();x+=y;var D=n.M(),z=null;"vttc"==Qg(D)?8<y&&(z=n.Za(y-8)):n.skip(y-8);v&&z&&(y=qw(z,b.periodStart+w/this.g,b.periodStart+m/this.g),f.push(y))}while(q.sampleSize&&x<q.sampleSize)}return f.filter(Qb)};function qw(a,b,c){var d,e,f;(new Ig).box("payl",Pg(function(g){d=Jc(g)})).box("iden",Pg(function(g){e=Jc(g)})).box("sttg",Pg(function(g){f=Jc(g)})).parse(a);return d?rw(d,e,f,b,c):null}
893
+ pw.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new N(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Ig).box("moof",Mg).box("traf",Mg).P("tfdt",function(B){g=!0;c=Yh(B.reader,B.version).pd}).P("tfhd",function(B){l=Xh(B.reader,B.flags).ie}).P("trun",function(B){h=!0;d=$h(B.reader,B.version,B.flags).ye}).box("mdat",Pg(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new N(2,2,2008);for(var m=c,n=new Fg(e,0),p=t(d),q=p.next();!q.done;q=p.next()){q=q.value;
894
+ var v=q.Sd||l,w=q.Tc?c+q.Tc:m;m=w+(v||0);var y=0;do{var x=n.M();y+=x;var D=n.M(),z=null;"vttc"==Qg(D)?8<x&&(z=n.Za(x-8)):n.skip(x-8);v&&z&&(x=qw(z,b.periodStart+w/this.g,b.periodStart+m/this.g),f.push(x))}while(q.sampleSize&&y<q.sampleSize)}return f.filter(Qb)};function qw(a,b,c){var d,e,f;(new Ig).box("payl",Pg(function(g){d=Jc(g)})).box("iden",Pg(function(g){e=Jc(g)})).box("sttg",Pg(function(g){f=Jc(g)})).parse(a);return d?rw(d,e,f,b,c):null}
893
895
  function rw(a,b,c,d,e){d=new ib(d,e,"");jw(a,d,new Map);b&&(d.id=b);if(c)for(a=new Dq(c),b=Gq(a);b;)kw(d,b,[]),Eq(a),b=Gq(a);return d}M("shaka.text.Mp4VttParser",pw);pw.prototype.parseMedia=pw.prototype.parseMedia;pw.prototype.parseInit=pw.prototype.parseInit;hd['application/mp4; codecs="wvtt"']=function(){return new pw};function sw(){}sw.prototype.parseInit=function(){};sw.prototype.parseMedia=function(a){var b=Jc(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Dq(c[0]),e=tw(d),f=Fq(d,/,/g);d=tw(d);if(null==e||null==f||null==d)throw new N(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new ib(e,d,c.slice(1).join("\n").trim()))}return a};
894
896
  function tw(a){a=Fq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.SbvTextParser",sw);sw.prototype.parseMedia=sw.prototype.parseMedia;sw.prototype.parseInit=sw.prototype.parseInit;hd["text/x-subviewer"]=function(){return new sw};function uw(){this.g=new gw}uw.prototype.parseInit=function(){};uw.prototype.parseMedia=function(a,b){var c=Jc(a);c=vw(c);c=Fb(Nc(c));return this.g.parseMedia(c,b)};function vw(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}M("shaka.text.SrtTextParser",uw);uw.srt2webvtt=vw;uw.prototype.parseMedia=uw.prototype.parseMedia;
895
897
  uw.prototype.parseInit=uw.prototype.parseInit;hd["text/srt"]=function(){return new uw};function ww(){}ww.prototype.parseInit=function(){};