shaka-player 4.3.8 → 4.3.10

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 (77) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.md +11 -0
  2. package/.github/workflows/build-and-test.yaml +15 -14
  3. package/.github/workflows/compute-incremental-coverage.py +3 -0
  4. package/.github/workflows/selenium-lab-tests.yaml +48 -12
  5. package/.github/workflows/update-issues.yaml +1 -0
  6. package/CHANGELOG.md +29 -0
  7. package/demo/common/assets.js +59 -25
  8. package/demo/main.js +5 -0
  9. package/dist/demo.compiled.debug.js +15 -13
  10. package/dist/demo.compiled.debug.map +3 -3
  11. package/dist/demo.compiled.js +15 -13
  12. package/dist/demo.compiled.map +3 -3
  13. package/dist/deps.js +1 -1
  14. package/dist/locales.js +33 -33
  15. package/dist/receiver.compiled.debug.js +13 -11
  16. package/dist/receiver.compiled.debug.map +3 -3
  17. package/dist/receiver.compiled.js +13 -11
  18. package/dist/receiver.compiled.map +3 -3
  19. package/dist/shaka-player.compiled.d.ts +2 -2
  20. package/dist/shaka-player.compiled.debug.d.ts +2 -2
  21. package/dist/shaka-player.compiled.debug.js +56 -53
  22. package/dist/shaka-player.compiled.debug.map +3 -3
  23. package/dist/shaka-player.compiled.js +418 -418
  24. package/dist/shaka-player.compiled.map +2 -2
  25. package/dist/shaka-player.ui.d.ts +2 -2
  26. package/dist/shaka-player.ui.debug.d.ts +2 -2
  27. package/dist/shaka-player.ui.debug.js +66 -62
  28. package/dist/shaka-player.ui.debug.map +3 -3
  29. package/dist/shaka-player.ui.js +442 -441
  30. package/dist/shaka-player.ui.map +3 -3
  31. package/docs/tutorials/selenium-grid-config.md +60 -8
  32. package/externs/shaka/manifest.js +5 -1
  33. package/externs/shaka/offline.js +5 -1
  34. package/karma.conf.js +52 -7
  35. package/lib/abr/simple_abr_manager.js +5 -5
  36. package/lib/ads/client_side_ad_manager.js +14 -2
  37. package/lib/dash/dash_parser.js +1 -0
  38. package/lib/hls/hls_parser.js +1 -0
  39. package/lib/media/media_source_engine.js +6 -5
  40. package/lib/media/streaming_engine.js +2 -2
  41. package/lib/offline/indexeddb/v1_storage_cell.js +1 -0
  42. package/lib/offline/indexeddb/v2_storage_cell.js +1 -0
  43. package/lib/offline/manifest_converter.js +1 -0
  44. package/lib/offline/storage.js +1 -0
  45. package/lib/player.js +9 -5
  46. package/lib/polyfill/orientation.js +34 -7
  47. package/lib/text/vtt_text_parser.js +1 -0
  48. package/lib/util/manifest_parser_utils.js +4 -2
  49. package/lib/util/periods.js +2 -0
  50. package/lib/util/platform.js +22 -0
  51. package/lib/util/stream_utils.js +69 -26
  52. package/package.json +3 -3
  53. package/test/cast/cast_utils_unit.js +4 -1
  54. package/test/hls/hls_parser_unit.js +72 -0
  55. package/test/media/adaptation_set_unit.js +1 -0
  56. package/test/media/drm_engine_integration.js +2 -2
  57. package/test/media/media_source_engine_unit.js +1 -1
  58. package/test/media/segment_index_unit.js +3 -3
  59. package/test/media/streaming_engine_integration.js +14 -11
  60. package/test/offline/manifest_convert_unit.js +5 -0
  61. package/test/offline/offline_integration.js +6 -3
  62. package/test/player_external.js +19 -16
  63. package/test/player_integration.js +39 -49
  64. package/test/player_src_equals_integration.js +9 -5
  65. package/test/test/util/fake_demo_main.js +7 -3
  66. package/test/test/util/layout_tests.js +2 -2
  67. package/test/test/util/manifest_generator.js +2 -0
  68. package/test/test/util/offline_utils.js +1 -0
  69. package/test/test/util/streaming_engine_util.js +3 -0
  70. package/test/test/util/ui_utils.js +14 -3
  71. package/test/test/util/util.js +6 -27
  72. package/test/test/util/waiter.js +73 -3
  73. package/test/ui/ad_ui_unit.js +9 -9
  74. package/test/util/stream_utils_unit.js +46 -0
  75. package/ui/externs/ui.js +2 -2
  76. package/ui/range_element.js +5 -0
  77. package/ui/seek_bar.js +7 -1
@@ -21,7 +21,7 @@ ea("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("
21
21
  ea("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=da[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return fa(aa(this))}})}return a});function fa(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
22
22
  function r(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ha(a){if(!(a instanceof Array)){a=r(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ja="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ka;
23
23
  if("function"==typeof Object.setPrototypeOf)ka=Object.setPrototypeOf;else{var la;a:{var ma={a:!0},na={};try{na.__proto__=ma;la=na.a;break a}catch(a){}la=!1}ka=la?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var oa=ka;
24
- function pa(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(oa)oa(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.wj=b.prototype}function ra(){this.s=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.C=this.i=null}function sa(a){if(a.s)throw new TypeError("Generator is already running");a.s=!0}ra.prototype.B=function(a){this.h=a};
24
+ function pa(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(oa)oa(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.xj=b.prototype}function ra(){this.s=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.C=this.i=null}function sa(a){if(a.s)throw new TypeError("Generator is already running");a.s=!0}ra.prototype.B=function(a){this.h=a};
25
25
  function ta(a,b){a.i={Gf:b,Of:!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.D=function(a){this.g=a};function B(a){a.g=0}function D(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,c){a.g=b;a.m=c||0}function wa(a,b){a.m=b||0;b=a.i.Gf;a.i=null;return b}function xa(a){a.C=[a.i];a.m=0;a.j=0}
26
26
  function ya(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.Of?a.g=a.m||a.j:void 0!=c.D&&a.j<c.D?(a.g=c.D,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 Da(a)}
27
27
  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.s=!1,e;var f=e.value}catch(g){return a.g.l=null,ta(a.g,g),Da(a)}a.g.l=null;d.call(a.g,f);return Da(a)}function Da(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.s=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ta(a.g,c)}a.g.s=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Of)throw b.Gf;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
@@ -37,10 +37,10 @@ while(!k.done)})};return b});function Ha(a,b){return Object.prototype.hasOwnProp
37
37
  ea("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=r(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(!Ha(k,g)){var l=new c;ba(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({}),
38
38
  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(p){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(!Ha(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ha(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ha(k,
39
39
  g)&&Ha(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Ha(k,g)&&Ha(k[g],this.g)?delete k[g][this.g]:!1};return b});
40
- ea("Map",function(a){function b(){var h={};return h.ob=h.next=h.head=h}function c(h,k){var l=h.g;return fa(function(){if(l){for(;l.head!=h.g;)l=l.ob;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&&Ha(h.h,l))for(h=0;h<m.length;h++){var p=m[h];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:h,wa:p}}return{id:l,
41
- list:m,index:-1,wa:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=r(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(r([[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||
42
- "t"!=m.value[1]||!l.next().done?!1:!0}catch(p){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.wa?l.wa.value=k:(l.wa={next:this.g,ob:this.g.ob,head:this.g,key:h,value:k},l.list.push(l.wa),this.g.ob.next=l.wa,this.g.ob=l.wa,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.wa&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.wa.ob.next=h.wa.next,h.wa.next.ob=h.wa.ob,
43
- h.wa.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.ob=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).wa};e.prototype.get=function(h){return(h=d(this,h).wa)&&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(),
40
+ ea("Map",function(a){function b(){var h={};return h.ob=h.next=h.head=h}function c(h,k){var l=h.g;return fa(function(){if(l){for(;l.head!=h.g;)l=l.ob;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&&Ha(h.h,l))for(h=0;h<m.length;h++){var p=m[h];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:h,xa:p}}return{id:l,
41
+ list:m,index:-1,xa:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=r(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(r([[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||
42
+ "t"!=m.value[1]||!l.next().done?!1:!0}catch(p){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.xa?l.xa.value=k:(l.xa={next:this.g,ob:this.g.ob,head:this.g,key:h,value:k},l.list.push(l.xa),this.g.ob.next=l.xa,this.g.ob=l.xa,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.xa&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.xa.ob.next=h.xa.next,h.xa.next.ob=h.xa.ob,
43
+ h.xa.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.ob=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).xa};e.prototype.get=function(h){return(h=d(this,h).xa)&&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(),
44
44
  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});function Ia(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}ea("Array.prototype.keys",function(a){return a?a:function(){return Ia(this,function(b){return b})}});
45
45
  ea("Set",function(a){function b(c){this.g=new Map;if(c){c=r(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(r([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||
46
46
  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;b.prototype[Symbol.iterator]=
@@ -55,8 +55,8 @@ ea("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infi
55
55
  function I(a,b){a=a.split(".");var c=Na;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};function L(a,b){if(b)if(b instanceof Map)for(var c=r(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}
56
56
  function Pa(a){var b=new L(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}L.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};L.prototype.stopImmediatePropagation=function(){this.g=!0};L.prototype.stopPropagation=function(){};I("shaka.util.FakeEvent",L);
57
57
  var Qa={Yh:"abrstatuschanged",Zh:"adaptation",$h:"buffering",ci:"downloadfailed",di:"downloadheadersreceived",ei:"drmsessionupdate",ni:"emsg",Pi:"prft",Error:"error",oi:"expirationupdated",si:"gapjumped",xi:"loaded",zi:"loading",Ei:"manifestparsed",Fi:"mediaqualitychanged",Metadata:"metadata",Ji:"onstatechange",Ki:"onstateidle",Ui:"ratechange",$i:"segmentappended",aj:"sessiondata",bj:"stalldetected",cj:"streaming",dj:"textchanged",ej:"texttrackvisibility",fj:"timelineregionadded",gj:"timelineregionenter",
58
- hj:"timelineregionexit",ij:"trackschanged",nj:"unloading",pj:"variantchanged"};function Ra(){}function Ta(){}function Ua(){}function Wa(a){var b=Ga.apply(1,arguments);Xa.has(a)||(Xa.add(a),Ua.apply(Ra,ha(b)))}function Ya(){}function Za(){}function $a(){}function ab(){}var Xa=new Set;window.console&&(Ua=function(){return console.warn.apply(console,ha(Ga.apply(0,arguments)))},Ta=function(){console.error.apply(console,ha(Ga.apply(0,arguments)))});function bb(){this.g={}}q=bb.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};q.forEach=function(a){for(var b in this.g)a(b,this.g[b])};q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function db(){this.ra=new bb;this.Id=this}db.prototype.addEventListener=function(a,b){this.ra&&this.ra.push(a,b)};db.prototype.removeEventListener=function(a,b){this.ra&&this.ra.remove(a,b)};db.prototype.dispatchEvent=function(a){if(!this.ra)return!0;var b=this.ra.get(a.type)||[],c=this.ra.get("All");c&&(b=b.concat(c));b=r(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Id;a.currentTarget=this.Id;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
59
- db.prototype.release=function(){this.ra=null};function eb(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function fb(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0}function gb(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(b(c.value))return!0;return!1}function hb(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next())d=d.value,b(d)&&c.push(d);return c};/*
58
+ hj:"timelineregionexit",ij:"trackschanged",nj:"unloading",pj:"variantchanged"};function Ra(){}function Ta(){}function Ua(){}function Wa(a){var b=Ga.apply(1,arguments);Xa.has(a)||(Xa.add(a),Ua.apply(Ra,ha(b)))}function Ya(){}function Za(){}function $a(){}function ab(){}var Xa=new Set;window.console&&(Ua=function(){return console.warn.apply(console,ha(Ga.apply(0,arguments)))},Ta=function(){console.error.apply(console,ha(Ga.apply(0,arguments)))});function bb(){this.g={}}q=bb.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};q.forEach=function(a){for(var b in this.g)a(b,this.g[b])};q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function db(){this.sa=new bb;this.Id=this}db.prototype.addEventListener=function(a,b){this.sa&&this.sa.push(a,b)};db.prototype.removeEventListener=function(a,b){this.sa&&this.sa.remove(a,b)};db.prototype.dispatchEvent=function(a){if(!this.sa)return!0;var b=this.sa.get(a.type)||[],c=this.sa.get("All");c&&(b=b.concat(c));b=r(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Id;a.currentTarget=this.Id;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
59
+ db.prototype.release=function(){this.sa=null};function eb(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function fb(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0}function gb(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(b(c.value))return!0;return!1}function hb(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next())d=d.value,b(d)&&c.push(d);return c};/*
60
60
  @license
61
61
  Copyright 2008 The Closure Library Authors
62
62
  SPDX-License-Identifier: Apache-2.0
@@ -82,7 +82,7 @@ NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILE
82
82
  LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,
83
83
  LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};function xb(a,b){return a.concat(b)}function zb(){}function Ab(a){return null!=a};function Bb(a,b){if(0==b.length)return a;var c=b.map(function(d){return new jb(d)});return a.map(function(d){return new jb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(xb,[]).map(function(d){return d.toString()})}function Cb(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
84
84
  function Db(a,b){if(1==b.length)return b[0];a=Eb(a,b);if(null!=a)return a;throw new M(2,4,4025,b);}function Eb(a,b){for(var c=r(Fb[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=r(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Gb?"":null}
85
- var Gb="text",Hb={Ma:"video",kd:"audio",ea:Gb,Bc:"image",Vh:"application"},Fb={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvh/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Ib(){}function Jb(a,b){a=Kb(a);b=Kb(b);return a.split("-")[0]==b.split("-")[0]}function Lb(a,b){a=Kb(a);b=Kb(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function Mb(a,b){a=Kb(a);b=Kb(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}function Kb(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Nb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Ob(a,b){var c=Pb(a),d=Pb(b);return a!=c&&b!=d&&c==d}
85
+ var Gb="text",Hb={Ma:"video",kd:"audio",ea:Gb,Bc:"image",Vh:"application"},Fb={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvh/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Ib(){}function Jb(a,b){a=Kb(a);b=Kb(b);return a.split("-")[0]==b.split("-")[0]}function Lb(a,b){a=Kb(a);b=Kb(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function Mb(a,b){a=Kb(a);b=Kb(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}function Kb(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Nb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Ob(a,b){var c=Pb(a),d=Pb(b);return a!=c&&b!=d&&c==d}
86
86
  function Qb(a,b){a=Kb(a);b=Kb(b);return b==a?4:Lb(b,a)?3:Mb(b,a)?2:Lb(a,b)?1:0}function Pb(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=Nb.get(a)||a}function Rb(a){return a.language?Kb(a.language):a.audio&&a.audio.language?Kb(a.audio.language):a.video&&a.video.language?Kb(a.video.language):"und"}
87
87
  function Sb(a,b){a=Kb(a);var c=new Set,d=r(b);for(b=d.next();!b.done;b=d.next())c.add(Kb(b.value));d=r(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,b==a)return b;d=r(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,Lb(b,a))return b;d=r(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,Mb(b,a))return b;c=r(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,Lb(a,b))return b;return null}I("shaka.util.LanguageUtils",Ib);Ib.findClosestLocale=Sb;Ib.getLocaleForVariant=Rb;
88
88
  Ib.getLocaleForText=function(a){return Kb(a.language||"und")};Ib.getBase=Pb;Ib.relatedness=Qb;Ib.areSiblings=Ob;Ib.normalize=Kb;Ib.isSiblingOf=Mb;Ib.isParentOf=Lb;Ib.areLanguageCompatible=Jb;Ib.areLocaleCompatible=function(a,b){a=Kb(a);b=Kb(b);return a==b};
@@ -96,8 +96,8 @@ q.zf=function(a){var b=this;this.g.clear();a=r(a);for(var c=a.next();!c.done;c=a
96
96
  q.ha=function(a,b,c){a=Kb(a);void 0===c&&(c=Wb);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=Wb||d.set(f,e)});this.h.set(a,d);Ub(this);this.dispatchEvent(new L("locale-updated"));return this};q.Fh=function(a){for(var b=r(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};q.resolve=function(a){var b=this.i.get(a);if(b)return b;a=(new Map).set("locales",Array.from(this.g)).set("missing",a);this.dispatchEvent(new L("unknown-localization",a));return""};
97
97
  function Ub(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f={},g=r(d),h=g.next();!h.done;f={Yb:f.Yb},h=g.next()){f.Yb=h.value;e.add(f.Yb);e.add(Pb(f.Yb));h=hb(b.keys(),function(l){return function(m){return Ob(m,l.Yb)}}(f));h.sort();var k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=hb(b.keys(),function(l){return function(m){return Pb(m)==l.Yb}}(f));h.sort();k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value)}e.add(c);c=[];e=r(e);for(h=e.next();!h.done;h=e.next())(h=b.get(h.value))&&c.push(h);
98
98
  c.reverse();a.i.clear();b=r(c);for(h=b.next();!h.done;h=b.next())h.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=r(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,Xb(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new L("missing-localizations",d)))}function Xb(a,b,c){b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}I("shaka.ui.Localization",Tb);Tb.prototype.resolve=Tb.prototype.resolve;
99
- Tb.prototype.resolveDictionary=Tb.prototype.Fh;Tb.prototype.insert=Tb.prototype.ha;Tb.prototype.changeLocale=Tb.prototype.zf;Tb.prototype.release=Tb.prototype.release;var Wb=1;Tb.ConflictResolution={USE_OLD:0,USE_NEW:Wb};Tb.UNKNOWN_LOCALES="unknown-locales";Tb.UNKNOWN_LOCALIZATION="unknown-localization";Tb.MISSING_LOCALIZATIONS="missing-localizations";Tb.LOCALE_CHANGED="locale-changed";Tb.LOCALE_UPDATED="locale-updated";var Yb={Wi:"SKIP_AD",Ni:"PLAY",ig:"LIVE",kj:"UNDETERMINED_LANGUAGE",oj:"VOLUME",Sh:"AD_DURATION",Di:"MUTE",Vi:"SEEK",Xi:"SKIP_TO_LIVE",Oi:"PLAYBACK_RATE",Uh:"AIRPLAY",Li:"PAUSE",AD_PROGRESS:"AD_PROGRESS",Th:"AD_TIME",ai:"CAPTIONS",Ci:"MULTIPLE_LANGUAGES",pi:"FAST_FORWARD",Si:"RESOLUTION",Mi:"PICTURE_IN_PICTURE",ti:"LANGUAGE",Hi:"OFF",gi:"ENTER_LOOP_MODE",Ti:"REWIND",bi:"CAST",Wh:"AUTO_QUALITY",mj:"UNRECOGNIZED_LANGUAGE",li:"EXIT_LOOP_MODE",mi:"EXIT_PICTURE_IN_PICTURE",Ri:"REPLAY",jg:"SUBTITLE_FORCED",
100
- Gi:"NOT_APPLICABLE",ri:"FULL_SCREEN",Ii:"ON",Qi:"QUALITY",Zi:"STATISTICS",Bi:"MORE_SETTINGS",ii:"ENTER_PICTURE_IN_PICTURE",lj:"UNMUTE",BACK:"BACK",wi:"LOOP",ki:"EXIT_FULL_SCREEN"};function Zb(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Zb.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function $b(a){return a.h/(1-Math.pow(a.g,a.i))};function ac(){this.h=new Zb(2);this.j=new Zb(5);this.g=0;this.i=128E3;this.l=16E3}ac.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};ac.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};ac.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min($b(this.h),$b(this.j))};function bc(a){if(cc.has(a))return cc.get(a);var b=MediaSource.isTypeSupported(a);cc.set(a,b);return b}var cc=new Map;function dc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function ec(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function fc(a,b,c){c||(c=dc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Vd:d.Vd},e=a.next()){d.Vd=e.value;e=b.findIndex(function(f){return function(g){return c(f.Vd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
99
+ Tb.prototype.resolveDictionary=Tb.prototype.Fh;Tb.prototype.insert=Tb.prototype.ha;Tb.prototype.changeLocale=Tb.prototype.zf;Tb.prototype.release=Tb.prototype.release;var Wb=1;Tb.ConflictResolution={USE_OLD:0,USE_NEW:Wb};Tb.UNKNOWN_LOCALES="unknown-locales";Tb.UNKNOWN_LOCALIZATION="unknown-localization";Tb.MISSING_LOCALIZATIONS="missing-localizations";Tb.LOCALE_CHANGED="locale-changed";Tb.LOCALE_UPDATED="locale-updated";var Yb={Hi:"OFF",gi:"ENTER_LOOP_MODE",Uh:"AIRPLAY",Zi:"STATISTICS",Si:"RESOLUTION",Bi:"MORE_SETTINGS",Di:"MUTE",Wh:"AUTO_QUALITY",jg:"SUBTITLE_FORCED",AD_PROGRESS:"AD_PROGRESS",bi:"CAST",BACK:"BACK",li:"EXIT_LOOP_MODE",mj:"UNRECOGNIZED_LANGUAGE",oj:"VOLUME",ig:"LIVE",Oi:"PLAYBACK_RATE",ri:"FULL_SCREEN",Mi:"PICTURE_IN_PICTURE",Th:"AD_TIME",wi:"LOOP",Gi:"NOT_APPLICABLE",ti:"LANGUAGE",ii:"ENTER_PICTURE_IN_PICTURE",mi:"EXIT_PICTURE_IN_PICTURE",kj:"UNDETERMINED_LANGUAGE",Xi:"SKIP_TO_LIVE",Ci:"MULTIPLE_LANGUAGES",
100
+ lj:"UNMUTE",Vi:"SEEK",Sh:"AD_DURATION",ai:"CAPTIONS",Ni:"PLAY",Ri:"REPLAY",ki:"EXIT_FULL_SCREEN",Ii:"ON",Ti:"REWIND",pi:"FAST_FORWARD",Li:"PAUSE",Wi:"SKIP_AD",Qi:"QUALITY"};function Zb(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Zb.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function $b(a){return a.h/(1-Math.pow(a.g,a.i))};function ac(){this.h=new Zb(2);this.j=new Zb(5);this.g=0;this.i=128E3;this.l=16E3}ac.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};ac.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};ac.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min($b(this.h),$b(this.j))};function bc(a){if(cc.has(a))return cc.get(a);var b=MediaSource.isTypeSupported(a);cc.set(a,b);return b}var cc=new Map;function dc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function ec(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function fc(a,b,c){c||(c=dc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Vd:d.Vd},e=a.next()){d.Vd=e.value;e=b.findIndex(function(f){return function(g){return c(f.Vd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
101
101
  function gc(a,b,c){c||(c=dc);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function hc(a,b,c){this.startTime=a;this.direction=ic;this.endTime=b;this.payload=c;this.region=new jc;this.position=null;this.positionAlign=lc;this.size=0;this.textAlign=mc;this.writingMode=nc;this.lineInterpretation=oc;this.line=null;this.lineHeight="";this.lineAlign=pc;this.displayAlign=qc;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.textShadow=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=rc;this.fontStyle=sc;this.linePadding=this.letterSpacing=
102
102
  this.fontFamily="";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}hc.prototype.clone=function(){var a=new hc(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
103
103
  function tc(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!gc(a.nestedCues,b.nestedCues,tc))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!gc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}I("shaka.text.Cue",hc);var lc="auto";
@@ -105,7 +105,7 @@ hc.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:lc};v
105
105
  hc.lineInterpretation={LINE_NUMBER:oc,PERCENTAGE:1};var pc="start",wc={CENTER:"center",START:pc,END:"end"};hc.lineAlign=wc;var xc={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};hc.defaultTextColor=xc;var yc={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};hc.defaultTextBackgroundColor=yc;var rc=400;hc.fontWeight={NORMAL:rc,BOLD:700};
106
106
  var sc="normal",zc={NORMAL:sc,ITALIC:"italic",OBLIQUE:"oblique"};hc.fontStyle=zc;hc.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function jc(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Ac;this.scroll=Bc}I("shaka.text.CueRegion",jc);var Ac=1;jc.units={PX:0,PERCENTAGE:Ac,LINES:2};var Bc="";jc.scrollMode={NONE:Bc,UP:"up"};function Cc(){}function Dc(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Ec(a)==Ec(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=Fc(a);b=Fc(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function Ec(a){return a instanceof ArrayBuffer?a:a.buffer}function Gc(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
107
107
  function Fc(a,b,c){c=void 0===c?Infinity:c;return Hc(a,void 0===b?0:b,c,Uint8Array)}function Ic(a,b,c){c=void 0===c?Infinity:c;return Hc(a,void 0===b?0:b,c,DataView)}function Hc(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(Ec(a),b,Math.min(b+Math.max(c,0),e)-b)}I("shaka.util.BufferUtils",Cc);Cc.toDataView=Ic;Cc.toUint8=Fc;Cc.toArrayBuffer=Gc;Cc.equal=Dc;function Jc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Jc.prototype.resolve=function(){};Jc.prototype.reject=function(){};function Kc(a){this.h=a;this.g=void 0}Kc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Lc(a){this.h=a;this.g=null}Lc.prototype.R=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};Lc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function N(a){this.h=a;this.g=null}N.prototype.Aa=function(){this.stop();this.h();return this};N.prototype.R=function(a){var b=this;this.stop();this.g=(new Lc(function(){b.h()})).R(a);return this};N.prototype.ka=function(a){var b=this;this.stop();this.g=(new Lc(function(){b.g.R(a);b.h()})).R(a);return this};N.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};I("shaka.util.Timer",N);N.prototype.stop=N.prototype.stop;N.prototype.tickEvery=N.prototype.ka;N.prototype.tickAfter=N.prototype.R;
108
- N.prototype.tickNow=N.prototype.Aa;function Mc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function Nc(a){return""!=Oc().canPlayType(a)}function Pc(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function Qc(){return Rc("Xbox One")}function Sc(){return Rc("Tizen")}function Tc(){return Rc("Web0S")&&Rc("Chrome/38.0.2125.122 Safari/537.36")}function Uc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Sc()&&!Rc("PC=EOS")&&!Rc("VirginMedia")&&!Vc()&&!Rc("AFT")}
108
+ N.prototype.tickNow=N.prototype.Aa;function Mc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function Nc(a){return""!=Oc().canPlayType(a)}function Pc(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function Qc(){return Rc("Xbox One")}function Sc(){return Rc("Tizen")}function Tc(){return Rc("Web0S")&&Rc("Chrome/38.0.2125.122 Safari/537.36")}function Uc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Sc()&&!Rc("PC=EOS")&&!Rc("VirginMedia")&&!Rc("SOPOpenBrowser")&&!Vc()&&!Rc("AFT")}
109
109
  function Vc(){return Rc("PlayStation 4")}function Wc(){if(!Uc())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 Rc(a){return(navigator.userAgent||"").includes(a)}function Oc(){if(Xc)return Xc;Yc||(Yc=new N(function(){Xc=null}));(Xc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Xc=document.createElement("video"));Yc.R(1);return Xc}
110
110
  var Yc=null,Xc=null;function Zc(){}
111
111
  function $c(a){if(!a)return"";a=Fc(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!Vc())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==
@@ -135,11 +135,11 @@ function $d(a,b){return F(function(c){if(1==c.g)return u(c,de(a.variants,b,!1),2
135
135
  e.height&&1080<e.height)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return Za(ge(d)),!1;(e=d.decodingInfos.some(function(k){return k.supported}))||Za(ge(d));return e});B(c)})}
136
136
  function de(a,b,c){var d,e,f,g,h,k,l,m,p,n,t;return F(function(v){if(d=a.some(function(y){return y.decodingInfos.length}))return v.return();e=navigator.mediaCapabilities;f=[];g=function(y,w){var x;return F(function(C){if(1==C.g)return D(C,2),u(C,e.decodingInfo(w),4);if(2!=C.g)return x=C.h,y.decodingInfos.push(x),va(C,0);wa(C);JSON.stringify(w);B(C)})};h=r(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=he(l,b,c),p=r(m),n=p.next();!n.done;n=p.next())t=n.value,f.push(g(l,t));return u(v,Promise.all(f),
137
137
  0)})}
138
- function he(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=Db("video",g);f=ee(f);g=Db("audio",g);g=xd(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=ee(f);f=xd(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";
138
+ function he(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=Db("video",g);f=ee(f);g=Db("audio",g);g=fe(g);g=xd(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=ee(f);f=xd(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";
139
139
  break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=fe(d.codecs),f=xd(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=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);
140
140
  f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=r(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var p=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};p=r(p);for(h=p.next();!h.done;h=p.next()){h=h.value;if(h.initData&&h.initData.length){for(var n=new Set,t=r(h.initData),v=t.next();!v.done;v=t.next())n.add(v.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
141
141
  (m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(""!=h.audioRobustness?m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness}:m.audio||(m.audio={}));e&&(""!=h.videoRobustness?m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness}:m.video||(m.video={}))}l.keySystemConfiguration=m;a.push(l)}return a}
142
- function fe(a){return Sc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}function ee(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function ae(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!ie(d,a.audio)||c&&a&&a.video&&!ie(c,a.video)?!1:!0})}
142
+ function fe(a){return"fLaC"===a?"flac":"Opus"===a?"opus":Sc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}function ee(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function ae(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!ie(d,a.audio)||c&&a&&a.video&&!ie(c,a.video)?!1:!0})}
143
143
  function be(a){a.textStreams=a.textStreams.filter(function(b){return Cd(wd(b.mimeType,b.codecs))})}function ce(a){var b,c,d,e,f,g,h,k;return F(function(l){switch(l.g){case 1:b=[],c=r(a.imageStreams),d=c.next();case 2:if(d.done){l.D(4);break}e=d.value;f=e.mimeType;if(je.has(f)){l.D(5);break}g=ke.get(f);if(!g){je.set(f,!1);l.D(5);break}return u(l,le(g),7);case 7:h=l.h,je.set(f,h);case 5:(k=je.get(f))&&b.push(e);d=c.next();l.D(2);break;case 4:a.imageStreams=b,B(l)}})}
144
144
  function le(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)}).catch(function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})}function ie(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
145
145
  function me(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=[];g&&h.push(g);f&&h.push(f);var k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var p=r(b.roles),n=p.next();!n.done;n=p.next())m.add(n.value);if(c)for(p=r(c.roles),n=p.next();!n.done;n=p.next())m.add(n.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
@@ -149,16 +149,16 @@ function ne(a){return{id:a.id,active:!1,type:Gb,bandwidth:0,language:a.language,
149
149
  originalAudioId:null,originalTextId:a.originalId,originalImageId:null}}
150
150
  function oe(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.get(0));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],
151
151
  audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId}}function pe(a){a.__shaka_id||(a.__shaka_id=qe++);return a.__shaka_id}
152
- function re(a){var b=se(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="application/cea-608");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function te(a){var b=se(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
153
- function se(a){return{id:pe(a),active:!1,type:"",bandwidth:0,language:Kb(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
154
- originalTextId:null,originalImageId:null}}function ue(a){return a.allowedByApplication&&a.allowedByKeySystem}function ve(a){return a.filter(function(b){return ue(b)})}
152
+ function re(a){var b=se(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="application/cea-608");"subtitles"==a.kind&&(b.mimeType="text/vtt");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function te(a){var b=se(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
153
+ function se(a){var b=a.language;return{id:pe(a),active:!1,type:"",bandwidth:0,language:Kb(b||"und"),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
154
+ originalTextId:null,originalImageId:null,uj:b}}function ue(a){return a.allowedByApplication&&a.allowedByKeySystem}function ve(a){return a.filter(function(b){return ue(b)})}
155
155
  function Md(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=r(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;a=c.filter(function(g){return g<=b});return a.length?d.get(Math.max.apply(Math,ha(a))):d.get(Math.min.apply(Math,ha(c)))}
156
156
  function we(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=Sb(Kb(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Kb(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=xe(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(xb,[]);return a.length?
157
157
  xe(e,a[0]):e}function xe(a,b){return a.filter(function(c){return c.roles.includes(b)})}function ge(a){var b=[];a.audio&&b.push(ye(a.audio));a.video&&b.push(ye(a.video));return b.join(", ")}
158
158
  function ye(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}
159
- var qe=0,Rd="smooth",Sd="powerEfficient",Ud="bandwidth",je=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),ke=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function ze(){var a=this;this.m=null;this.l=!1;this.i=new ac;navigator.connection&&navigator.connection.addEventListener&&(this.C=function(){if(a.l&&a.g.useNetworkInformation){a.i=new ac;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&a.m(b)}},navigator.connection.addEventListener("change",this.C));this.s=[];this.F=1;this.H=!1;this.C=this.h=this.j=this.g=this.B=null;this.G=new N(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();b&&a.m(b)}})}q=ze.prototype;
159
+ var qe=0,Rd="smooth",Sd="powerEfficient",Ud="bandwidth",je=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),ke=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function ze(){var a=this;this.m=null;this.l=!1;this.i=new ac;this.C=null;navigator.connection&&navigator.connection.addEventListener&&(this.C=function(){if(a.l&&a.g.useNetworkInformation){a.i=new ac;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&a.m(b)}},navigator.connection.addEventListener("change",this.C));this.s=[];this.F=1;this.H=!1;this.h=this.j=this.g=this.B=null;this.G=new N(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();b&&a.m(b)}})}q=ze.prototype;
160
160
  q.stop=function(){this.m=null;this.l=!1;this.s=[];this.F=1;this.j=this.B=null;this.h&&(this.h.disconnect(),this.h=null);this.G.stop()};q.release=function(){navigator.connection&&navigator.connection.removeEventListener&&(navigator.connection.removeEventListener("change",this.C),this.C=null);this.G=null};q.init=function(a){this.m=a};
161
- q.chooseVariant=function(){var a=Infinity,b=Infinity;this.g.restrictToScreenSize&&(b=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=window.screen.height*b,b*=window.screen.width);this.h&&this.g.restrictToElementSize&&(b=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=this.j.clientWidth*b,b*=this.j.clientHeight);a=Ae(this.g.restrictions,this.s,a,b);b=this.i.getBandwidthEstimate(Be(this));this.s.length&&!a.length&&(a=Ae(null,this.s,Infinity,Infinity),a=[a[0]]);for(var c=a[0]||null,
161
+ q.chooseVariant=function(){var a=Infinity,b=Infinity;this.g.restrictToScreenSize&&(b=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=window.screen.height*b,b*=window.screen.width);this.h&&this.g.restrictToElementSize&&(b=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=this.j.clientHeight*b,b*=this.j.clientWidth);a=Ae(this.g.restrictions,this.s,a,b);b=this.i.getBandwidthEstimate(Be(this));this.s.length&&!a.length&&(a=Ae(null,this.s,Infinity,Infinity),a=[a[0]]);for(var c=a[0]||null,
162
162
  d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.F)?1:Math.abs(this.F),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.B=Date.now();return c};q.enable=function(){this.l=!0};q.disable=function(){this.l=!1};
163
163
  q.segmentDownloaded=function(a,b){this.i.sample(a,b);if(null!=this.B&&this.l)a:{if(!this.H){a=this.i;if(!(a.g>=a.i))break a;this.H=!0}else if(Date.now()-this.B<1E3*this.g.switchInterval)break a;a=this.chooseVariant();this.i.getBandwidthEstimate(Be(this));a&&this.m(a)}};q.getBandwidthEstimate=function(){return this.i.getBandwidthEstimate(Be(this))};q.setVariants=function(a){this.s=a};q.playbackRateChanged=function(a){this.F=a};
164
164
  q.setMediaElement=function(a){var b=this;this.j=a;this.h&&(this.h.disconnect(),this.h=null);this.j&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.G.R(Ce)}),this.h.observe(this.j))};q.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};function Be(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}
@@ -181,15 +181,15 @@ if(!p)return x;var C=c.retryParameters.connectionTimeout;C&&(n=new N(function(){
181
181
  c.uris[e],b));if(x instanceof M){if(7001==x.code)throw x;if(1010==x.code)throw f;if(1==x.severity)return C=(new Map).set("error",x),C=new L("retry",C),a.dispatchEvent(C),e=(e+1)%c.uris.length,rf(a,b,c,d,e,x,g)}throw x;})}
182
182
  function sf(a,b,c){var d=af(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={be:e.be},f=a.next())e.be=f.value,d=d.ma(function(g){return function(){var h=c.response;h.data&&(h.data=Gc(h.data));return g.be(b,h)}}(e));return d.ma(function(){return c},function(g){var h=2;if(g instanceof M){if(7001==g.code)throw g;h=g.severity}throw new M(h,1,1007,g);})}I("shaka.net.NetworkingEngine",jf);jf.prototype.request=jf.prototype.request;jf.prototype.destroy=jf.prototype.destroy;jf.makeRequest=nf;
183
183
  jf.defaultRetryParameters=function(){return We()};jf.prototype.clearAllResponseFilters=jf.prototype.sg;jf.prototype.unregisterResponseFilter=jf.prototype.Oh;jf.prototype.registerResponseFilter=jf.prototype.yh;jf.prototype.clearAllRequestFilters=jf.prototype.rg;jf.prototype.unregisterRequestFilter=jf.prototype.Nh;jf.prototype.registerRequestFilter=jf.prototype.xh;jf.unregisterScheme=function(a){delete mf[a]};jf.registerScheme=kf;jf.prototype.setForceHTTPS=jf.prototype.Qe;function of(){this.g=0}
184
- jf.NumBytesRemainingClass=of;function pf(a,b,c){Ye.call(this,a,b);this.h=c}pa(pf,Ye);jf.PendingRequest=pf;var tf=1;jf.RequestType={MANIFEST:0,SEGMENT:tf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var lf=3;jf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:lf};var mf={};function uf(a){this.g=!1;this.h=new Jc;this.i=a}uf.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 vf(a,b){if(a.g){if(b instanceof M&&7003==b.code)throw b;throw new M(2,7,7003,b);}};function wf(){this.g=new bb}q=wf.prototype;q.release=function(){this.Sb();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new xf(a,b,c,d),this.g.push(b,a))};q.ya=function(a,b,c,d){function e(g){f.rc(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.rc=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.rc(),this.g.remove(b,e))}};
185
- q.Sb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ha(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.rc();this.g.g={}}};I("shaka.util.EventManager",wf);wf.prototype.removeAll=wf.prototype.Sb;wf.prototype.unlisten=wf.prototype.rc;wf.prototype.listenOnce=wf.prototype.ya;wf.prototype.listen=wf.prototype.o;wf.prototype.release=wf.prototype.release;function xf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=yf(a,d);this.target.addEventListener(b,c,this.g)}
184
+ jf.NumBytesRemainingClass=of;function pf(a,b,c){Ye.call(this,a,b);this.h=c}pa(pf,Ye);jf.PendingRequest=pf;var tf=1;jf.RequestType={MANIFEST:0,SEGMENT:tf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var lf=3;jf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:lf};var mf={};function uf(a){this.g=!1;this.h=new Jc;this.i=a}uf.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 vf(a,b){if(a.g){if(b instanceof M&&7003==b.code)throw b;throw new M(2,7,7003,b);}};function wf(){this.g=new bb}q=wf.prototype;q.release=function(){this.Sb();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new xf(a,b,c,d),this.g.push(b,a))};q.ra=function(a,b,c,d){function e(g){f.rc(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.rc=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.rc(),this.g.remove(b,e))}};
185
+ q.Sb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ha(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.rc();this.g.g={}}};I("shaka.util.EventManager",wf);wf.prototype.removeAll=wf.prototype.Sb;wf.prototype.unlisten=wf.prototype.rc;wf.prototype.listenOnce=wf.prototype.ra;wf.prototype.listen=wf.prototype.o;wf.prototype.release=wf.prototype.release;function xf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=yf(a,d);this.target.addEventListener(b,c,this.g)}
186
186
  xf.prototype.rc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function yf(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 zf(a)?b:b.capture||!1}
187
- function zf(a){var b=Af;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}Af=b}return b||!1}var Af=void 0;function Bf(a){for(var b=new Map,c=r(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function Cf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function Df(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;a=r(a);for(var c=a.next();!c.done;c=a.next()){var d=r(c.value);c=d.next().value;d=d.next().value;if(!b.has(c))return!1;c=b.get(c);if(c!=d||void 0==c)return!1}return!0};function Ef(a,b){this.W=Ic(a);this.h=b==Ff;this.g=0}q=Ef.prototype;q.xa=function(){return this.g<this.W.byteLength};q.na=function(){return this.g};q.Lg=function(){return this.W.byteLength};q.pb=function(){try{var a=this.W.getUint8(this.g);this.g+=1;return a}catch(b){throw Gf();}};q.Ge=function(){try{var a=this.W.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw Gf();}};q.O=function(){try{var a=this.W.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw Gf();}};
187
+ function zf(a){var b=Af;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}Af=b}return b||!1}var Af=void 0;function Bf(a){for(var b=new Map,c=r(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function Cf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function Df(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;a=r(a);for(var c=a.next();!c.done;c=a.next()){var d=r(c.value);c=d.next().value;d=d.next().value;if(!b.has(c))return!1;c=b.get(c);if(c!=d||void 0==c)return!1}return!0};function Ef(a,b){this.W=Ic(a);this.h=b==Ff;this.g=0}q=Ef.prototype;q.ya=function(){return this.g<this.W.byteLength};q.na=function(){return this.g};q.Lg=function(){return this.W.byteLength};q.pb=function(){try{var a=this.W.getUint8(this.g);this.g+=1;return a}catch(b){throw Gf();}};q.Ge=function(){try{var a=this.W.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw Gf();}};q.O=function(){try{var a=this.W.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw Gf();}};
188
188
  q.Sf=function(){try{var a=this.W.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw Gf();}};q.Cb=function(){try{if(this.h){var a=this.W.getUint32(this.g,!0);var b=this.W.getUint32(this.g+4,!0)}else b=this.W.getUint32(this.g,!1),a=this.W.getUint32(this.g+4,!1)}catch(c){throw Gf();}if(2097151<b)throw new M(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.Bb=function(a){if(this.g+a>this.W.byteLength)throw Gf();var b=Fc(this.W,this.g,a);this.g+=a;return b};
189
- q.skip=function(a){if(this.g+a>this.W.byteLength)throw Gf();this.g+=a};q.Gh=function(a){if(this.g<a)throw Gf();this.g-=a};q.seek=function(a){if(0>a||a>this.W.byteLength)throw Gf();this.g=a};q.Wc=function(){for(var a=this.g;this.xa()&&0!=this.W.getUint8(this.g);)this.g+=1;a=Fc(this.W,a,this.g-a);this.g+=1;return $c(a)};function Gf(){return new M(2,3,3E3)}I("shaka.util.DataViewReader",Ef);Ef.prototype.readTerminatedString=Ef.prototype.Wc;Ef.prototype.seek=Ef.prototype.seek;Ef.prototype.rewind=Ef.prototype.Gh;
190
- Ef.prototype.skip=Ef.prototype.skip;Ef.prototype.readBytes=Ef.prototype.Bb;Ef.prototype.readUint64=Ef.prototype.Cb;Ef.prototype.readInt32=Ef.prototype.Sf;Ef.prototype.readUint32=Ef.prototype.O;Ef.prototype.readUint16=Ef.prototype.Ge;Ef.prototype.readUint8=Ef.prototype.pb;Ef.prototype.getLength=Ef.prototype.Lg;Ef.prototype.getPosition=Ef.prototype.na;Ef.prototype.hasMoreData=Ef.prototype.xa;var Ff=1;Ef.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Ff};function Hf(){this.i=[];this.h=[];this.g=!1}q=Hf.prototype;q.box=function(a,b){a=If(a);this.i[a]=Jf;this.h[a]=b;return this};q.U=function(a,b){a=If(a);this.i[a]=Kf;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Ef(a,0);for(this.g=!1;a.xa()&&!this.g;)this.Uc(0,a,b,c)};
189
+ q.skip=function(a){if(this.g+a>this.W.byteLength)throw Gf();this.g+=a};q.Gh=function(a){if(this.g<a)throw Gf();this.g-=a};q.seek=function(a){if(0>a||a>this.W.byteLength)throw Gf();this.g=a};q.Wc=function(){for(var a=this.g;this.ya()&&0!=this.W.getUint8(this.g);)this.g+=1;a=Fc(this.W,a,this.g-a);this.g+=1;return $c(a)};function Gf(){return new M(2,3,3E3)}I("shaka.util.DataViewReader",Ef);Ef.prototype.readTerminatedString=Ef.prototype.Wc;Ef.prototype.seek=Ef.prototype.seek;Ef.prototype.rewind=Ef.prototype.Gh;
190
+ Ef.prototype.skip=Ef.prototype.skip;Ef.prototype.readBytes=Ef.prototype.Bb;Ef.prototype.readUint64=Ef.prototype.Cb;Ef.prototype.readInt32=Ef.prototype.Sf;Ef.prototype.readUint32=Ef.prototype.O;Ef.prototype.readUint16=Ef.prototype.Ge;Ef.prototype.readUint8=Ef.prototype.pb;Ef.prototype.getLength=Ef.prototype.Lg;Ef.prototype.getPosition=Ef.prototype.na;Ef.prototype.hasMoreData=Ef.prototype.ya;var Ff=1;Ef.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Ff};function Hf(){this.i=[];this.h=[];this.g=!1}q=Hf.prototype;q.box=function(a,b){a=If(a);this.i[a]=Jf;this.h[a]=b;return this};q.U=function(a,b){a=If(a);this.i[a]=Kf;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Ef(a,0);for(this.g=!1;a.ya()&&!this.g;)this.Uc(0,a,b,c)};
191
191
  q.Uc=function(a,b,c,d){var e=b.na();if(d&&e+8>b.W.byteLength)this.g=!0;else{var f=b.O(),g=b.O(),h=Lf(g),k=!1;switch(f){case 0:f=b.W.byteLength-e;break;case 1:if(d&&b.na()+8>b.W.byteLength){this.g=!0;return}f=b.Cb();k=!0}var l=this.h[g];if(l){var m=null,p=null;if(this.i[g]==Kf){if(d&&b.na()+4>b.W.byteLength){this.g=!0;return}p=b.O();m=p>>>24;p&=16777215}g=e+f;c&&g>b.W.byteLength&&(g=b.W.byteLength);d&&g>b.W.byteLength?this.g=!0:(d=g-b.na(),b=0<d?b.Bb(d):new Uint8Array(0),b=new Ef(b,0),l({name:h,parser:this,
192
- partialOkay:c||!1,version:m,flags:p,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.na(),b.W.byteLength-b.na()))}};function Mf(a){for(var b=Nf(a);a.reader.xa()&&!a.parser.g;)a.parser.Uc(a.start+b,a.reader,a.partialOkay)}function Of(a){for(var b=Nf(a),c=a.reader.O(),d=0;d<c&&(a.parser.Uc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Pf(a){var b=Nf(a);for(a.reader.skip(78);a.reader.xa()&&!a.parser.g;)a.parser.Uc(a.start+b,a.reader,a.partialOkay)}
192
+ partialOkay:c||!1,version:m,flags:p,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.na(),b.W.byteLength-b.na()))}};function Mf(a){for(var b=Nf(a);a.reader.ya()&&!a.parser.g;)a.parser.Uc(a.start+b,a.reader,a.partialOkay)}function Of(a){for(var b=Nf(a),c=a.reader.O(),d=0;d<c&&(a.parser.Uc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Pf(a){var b=Nf(a);for(a.reader.skip(78);a.reader.ya()&&!a.parser.g;)a.parser.Uc(a.start+b,a.reader,a.partialOkay)}
193
193
  function Qf(a){return function(b){a(b.reader.Bb(b.reader.W.byteLength-b.reader.na()))}}function If(a){var b=0;a=r(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Lf(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Nf(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}I("shaka.util.Mp4Parser",Hf);Hf.headerSize=Nf;Hf.typeToString=Lf;Hf.allData=Qf;Hf.visualSampleEntry=Pf;Hf.sampleDescription=Of;Hf.children=Mf;
194
194
  Hf.prototype.parseNext=Hf.prototype.Uc;Hf.prototype.parse=Hf.prototype.parse;Hf.prototype.stop=Hf.prototype.stop;Hf.prototype.fullBox=Hf.prototype.U;Hf.prototype.box=Hf.prototype.box;var Jf=0,Kf=1;function Rf(a){var b=this;this.g=[];this.h=[];this.data=[];(new Hf).box("moov",Mf).box("moof",Mf).U("pssh",function(c){if(!(1<c.version)){var d=Fc(c.reader.W,-12,c.size);b.data.push(d);b.g.push(kd(c.reader.Bb(16)));if(0<c.version){d=c.reader.O();for(var e=0;e<d;e++){var f=kd(c.reader.Bb(16));b.h.push(f)}}}}).parse(a)}
195
195
  function Sf(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Ic(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=r(c),c=b.next();!c.done;c=b.next())c=jd(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Tf(a,b){a=Uf(a,b);return 1!=a.length?null:a[0]}function Vf(a,b,c){a=Wf(a,b,c);return 1!=a.length?null:a[0]}function Uf(a,b){var c=[];a=r(a.childNodes);for(var d=a.next();!d.done;d=a.next())d=d.value,d instanceof Element&&d.tagName==b&&c.push(d);return c}function Xf(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
@@ -198,14 +198,14 @@ function ag(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION
198
198
  function dg(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}
199
199
  function eg(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 fg(a){a=Number(a);return 0===a%1?a:null}function gg(a){a=Number(a);return 0===a%1&&0<a?a:null}function hg(a){a=Number(a);return 0===a%1&&0<=a?a:null}function ig(a){a=Number(a);return isNaN(a)?null:a}function jg(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
200
200
  function kg(a,b){var c=new DOMParser,d=lg.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function mg(a,b){try{var c=$c(a);return kg(c,b)}catch(d){return null}}
201
- var lg=new Kc(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 ng(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.I=new Set;this.l=this.C=null;this.aa=this.Z=!1;this.J=0;this.g=null;this.B=new wf;this.i=new Map;this.F=[];this.s=new Jc;this.h=null;this.m=function(d){c.s.reject(d);a.onError(d)};this.ba=new Map;this.$=new Map;this.V=new N(function(){return og(c)});this.N=!1;this.M=[];this.P=!1;this.ra=(new N(function(){pg(c)})).ka(b);this.s.catch(function(){});this.j=new uf(function(){return qg(c)});this.X=!1;this.K=this.H=null}q=ng.prototype;
202
- q.destroy=function(){return this.j.destroy()};function qg(a){return F(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.s.reject(),a.ra.stop(),a.ra=null,a.V.stop(),a.V=null,u(b,rg(a),2);case 2:if(!a.l){b.D(3);break}D(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:wa(b);case 5:a.l=null;case 3:a.g=null,a.I.clear(),a.C=null,a.F=[],a.h=null,a.m=function(){},a.G=null,a.X=!1,a.H=null,B(b)}})}q.configure=function(a){this.h=a};
201
+ var lg=new Kc(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 ng(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.I=new Set;this.l=this.C=null;this.aa=this.Z=!1;this.J=0;this.g=null;this.B=new wf;this.i=new Map;this.F=[];this.s=new Jc;this.h=null;this.m=function(d){c.s.reject(d);a.onError(d)};this.ba=new Map;this.$=new Map;this.V=new N(function(){return og(c)});this.N=!1;this.M=[];this.P=!1;this.sa=(new N(function(){pg(c)})).ka(b);this.s.catch(function(){});this.j=new uf(function(){return qg(c)});this.X=!1;this.K=this.H=null}q=ng.prototype;
202
+ q.destroy=function(){return this.j.destroy()};function qg(a){return F(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.s.reject(),a.sa.stop(),a.sa=null,a.V.stop(),a.V=null,u(b,rg(a),2);case 2:if(!a.l){b.D(3);break}D(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:wa(b);case 5:a.l=null;case 3:a.g=null,a.I.clear(),a.C=null,a.F=[],a.h=null,a.m=function(){},a.G=null,a.X=!1,a.H=null,B(b)}})}q.configure=function(a){this.h=a};
203
203
  function sg(a,b,c){a.aa=!0;a.F=[];a.N=c;return tg(a,b)}function ug(a,b,c){a.F=c;a.N=0<c.length;return tg(a,b)}
204
204
  function vg(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 wg(a,g,[])}
205
205
  function tg(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C;return F(function(z){if(1==z.g){if(c=xg(a))for(d=r(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(A){return A.video&&A.video.drmInfos.length||A.audio&&A.audio.drmInfos.length?!0:!1});g||(h=Bf(a.h.servers),yg(b,h));k=new Set;l=r(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,p=zg(m),n=r(p),t=n.next();!t.done;t=n.next())v=t.value,k.add(v);y=r(k);for(t=y.next();!t.done;t=
206
206
  y.next())w=t.value,Ag(w,Bf(a.h.servers),Bf(a.h.advanced||{}),a.h.keySystemsMapping);return u(z,de(b,a.N,a.X),2)}x=g||Object.keys(a.h.servers).length;if(!x)return a.Z=!0,z.return(Promise.resolve());C=wg(a,void 0,b);return z.return(g?C:C.catch(function(){}))})}
207
207
  function Bg(a){var b;return F(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c.return();if(!a.H){c.D(2);break}return u(c,a.H,3);case 3:return vf(a.j),c.return();case 2:return D(c,4),a.H=a.l.setMediaKeys(a.C),u(c,a.H,6);case 6:va(c,5);break;case 4:b=wa(c),a.m(new M(2,6,6003,b.message));case 5:vf(a.j),B(c)}})}function Cg(a,b){return F(function(c){if(1==c.g)return u(c,Bg(a),2);Dg(a,b.initDataType,Fc(b.initData));B(c)})}
208
- q.Cc=function(a){var b=this;return F(function(c){if(1==c.g){if(!b.C)return b.B.ya(a,"encrypted",function(){b.m(new M(2,6,6010))}),c.return();b.l=a;b.B.ya(b.l,"play",function(){for(var d=r(b.M),e=d.next();!e.done;e=d.next())Eg(b,e.value);b.P=!0;b.M=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.B.o(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return rg(b)});b.K=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.K||"com.apple.fps"!==b.g.keySystem||
208
+ q.Cc=function(a){var b=this;return F(function(c){if(1==c.g){if(!b.C)return b.B.ra(a,"encrypted",function(){b.m(new M(2,6,6010))}),c.return();b.l=a;b.B.ra(b.l,"play",function(){for(var d=r(b.M),e=d.next();!e.done;e=d.next())Eg(b,e.value);b.P=!0;b.M=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.B.o(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return rg(b)});b.K=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.K||"com.apple.fps"!==b.g.keySystem||
209
209
  b.F.length?u(c,Bg(b),2):c.D(2)}Fg(b);b.K||b.F.length||b.h.parseInbandPsshEnabled||b.B.o(b.l,"encrypted",function(d){return Cg(b,d)});B(c)})};
210
210
  function Gg(a){var b,c,d,e,f;return F(function(g){switch(g.g){case 1:if(!a.C||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.D(2);break}b=nf([a.g.serverCertificateUri],a.h.retryParameters);D(g,3);c=a.G.Pb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Fc(d.data);va(g,4);break;case 3:throw e=wa(g),new M(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();
211
211
  D(g,6);return u(g,a.C.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=wa(g),new M(2,6,6004,f.message);}})}function Hg(a,b){var c,d,e;return F(function(f){if(1==f.g)return u(f,Ig(a,b),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.cb=new Jc,d.push(e.cb);d.push(c.remove());return u(f,Promise.all(d),3)}a.i.delete(c);B(f)})}
@@ -254,7 +254,7 @@ var rh=0,th=1,vh=2,xh=3,sh=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[9
254
254
  [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"]]),yh=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
255
255
  [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 Ah(a,b){this.h=Bh;this.s=new mh(a,b);this.i=new mh(a,b);this.l=new mh(a,b);this.g=this.i;this.j=0;this.m=null}function Ch(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==Dh&&a.h!==Eh&&(e=oh(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,ph(c,0,15),c=a.l,c.g=0<c.h?c.h:0,ph(c,0,15),d.g=15);a.h=Dh;d.h=b;return e}function Fh(a){a.h=Gh;a.g=a.l;a.g.h=0}function Hh(a){Wa("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.s;a.h=Eh}
256
256
  var Bh=0,Gh=1,Dh=3,Eh=4,Ih="black green blue cyan red yellow magenta black".split(" "),Jh="white green blue cyan red yellow magenta white_italics".split(" ");function Kh(){this.l=!1;this.F=this.H=0;this.G=Lh;this.i=[];this.g=this.h=this.j=0;this.C=this.s=!1;this.B="white";this.m="black";Mh(this)}function Mh(a){a.i=[];for(var b=0;16>b;b++)a.i.push(Nh())}function Nh(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Oh(a,b){Ph(a)&&(a.i[a.h][a.g]=new lh(b,a.C,a.s,a.m,a.B),a.g++)}function Ph(a){var b=a.g<a.F&&0<=a.g;return a.h<a.H&&0<=a.h&&b}Kh.prototype.isVisible=function(){return this.l};
257
- function Qh(a,b,c){var d=new hc(a.j,b,"");d.textAlign=a.G===Rh?"left":a.G===Sh?"right":mc;if(c=ih(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Rh=0,Sh=1,Lh=2;function Th(){this.i=[];this.h=null;this.g=0}function Uh(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 Vh(a.h)),a.h=null,a.g=0))}function Vh(a){this.g=0;this.h=a}Vh.prototype.xa=function(){return this.g<this.h.length};Vh.prototype.na=function(){return this.g};function Wh(a){if(!a.xa())throw new M(2,2,3E3);return a.h[a.g++]}Vh.prototype.skip=function(a){if(this.g+a>this.h.length)throw new M(2,2,3E3);this.g+=a};function Xh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
257
+ function Qh(a,b,c){var d=new hc(a.j,b,"");d.textAlign=a.G===Rh?"left":a.G===Sh?"right":mc;if(c=ih(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Rh=0,Sh=1,Lh=2;function Th(){this.i=[];this.h=null;this.g=0}function Uh(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 Vh(a.h)),a.h=null,a.g=0))}function Vh(a){this.g=0;this.h=a}Vh.prototype.ya=function(){return this.g<this.h.length};Vh.prototype.na=function(){return this.g};function Wh(a){if(!a.ya())throw new M(2,2,3E3);return a.h[a.g++]}Vh.prototype.skip=function(a){if(this.g+a>this.h.length)throw new M(2,2,3E3);this.g+=a};function Xh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
258
258
  function Yh(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=Wh(b).value;b=null;c=r(Zh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Qh(e,d,a.i)),Mh(e);return b}if(137===c)for(b=Wh(b).value,b=r(Zh(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=Wh(b).value;b=null;c=r(Zh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Qh(e,d,a.i)),e.l=!1;return b}if(139===c){c=Wh(b).value;
259
259
  b=null;c=r(Zh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Qh(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Wh(b).value,$h(a,b,d);if(143===c)return d=$h(a,255,d),ai(a),d;if(144===c)b.skip(1),d=Wh(b).value,a.g&&(a.g.s=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=Wh(b).value,c=Wh(b).value,b.skip(1),a.g&&(b=bi((c&48)>>4,(c&12)>>2,c&3),a.g.B=bi((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=Wh(b).value,b=Wh(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
260
260
  b.skip(1),d=Wh(b).value,b.skip(1),a.g&&(a.g.G=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Kh;f.j=d;a.h[c]=f}d=Wh(b).value;Wh(b);Wh(b);f=Wh(b).value;var g=Wh(b).value;b=Wh(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.s=!1,b.B="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.H=(f&15)+1;b.F=(g&63)+1;a.g=a.h[c]}}}return null}function Zh(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
@@ -265,15 +265,15 @@ function hi(a,b){var c=b.type;if(16===(b.Oa&112)){var d=b.Oa>>3&1;0===c?a.m=d:a.
265
265
  a=1===(a&1);if(c.h!==Eh){e=c.g;if(c.h===Dh&&b!==e.g){var g=1+b-e.h;zh(e,g,1+e.g-e.h,e.h);ph(e,0,g-1);ph(e,b+1,15-b)}e.g=b;c.g.m=a;c.g.j=f;c.g.l=d;c.g.s="black"}}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",qh(c.g,rh,32),d=!1,b=Jh[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=Ih[(a&14)>>1]),c.g.s=b;else if(17===(d&247)&&48===(a&240))qh(c.g,th,a);else if(18===
266
266
  (d&246)&&32===(a&224))qh(c.g,d&1?xh:vh,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.hb){case 32:Fh(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=Ch(c,2,a);break;case 38:d=Ch(c,3,a);break;case 39:d=Ch(c,4,a);break;case 40:qh(c.g,rh,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=a;break;case 42:nh(c.s);Hh(c);break;case 43:Hh(c);break;case 44:b=c.i;d=null;c.h!==Eh&&(d=oh(b,c.j,a));ph(b,0,15);break;case 45:b=c.g;c.h!==Dh?d=null:(d=oh(b,c.j,a),f=b.g-b.h+1,zh(b,f-1,f,b.h),ph(b,0,
267
267
  f-1),ph(b,b.g,15-b.g),c.j=a);break;case 46:ph(c.l,0,15);break;case 47:b=null,c.h!==Eh&&(b=oh(c.i,c.j,a)),d=c.l,c.l=c.i,c.i=d,Fh(c),c.j=a,d=b}a=d;break a}a=null}else d=b.hb,qh(c.g,rh,b.Oa),qh(c.g,rh,d);return a}
268
- function ii(a,b){var c=[];try{for(;b.xa();){var d=Wh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Wh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Xh(e));for(var g=a.j.get(e),h=b.na();b.na()-h<f;){e=b;var k=Wh(e),l=k.value,m=k.pts;if(16===l){var p=Wh(e);l=l<<16|p.value}if(0<=l&&31>=l){var n=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!Ph(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.F-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=Qh(t,n,g.i));if(t.h+1>=t.H){n=t;for(var v=0,y=1;16>y;y++,
268
+ function ii(a,b){var c=[];try{for(;b.ya();){var d=Wh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Wh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Xh(e));for(var g=a.j.get(e),h=b.na();b.na()-h<f;){e=b;var k=Wh(e),l=k.value,m=k.pts;if(16===l){var p=Wh(e);l=l<<16|p.value}if(0<=l&&31>=l){var n=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!Ph(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.F-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=Qh(t,n,g.i));if(t.h+1>=t.H){n=t;for(var v=0,y=1;16>y;y++,
269
269
  v++)n.i[v]=n.i[y];for(y=0;1>y;y++,v++)n.i[v]=Nh()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=Qh(t,n,g.i));t.i[t.h]=Nh();t.g=0;break;case 12:t.isVisible()&&(e=Qh(t,n,g.i)),Mh(t),n=t,n.h=0,n.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=Yh(g,e,l,m);else{if(4096<=l&&4127>=l)n=l&255,8<=n&&15>=n?e.skip(1):16<=n&&23>=n?e.skip(2):24<=n&&31>=n&&e.skip(3);else if(4224<=l&&4255>=l)n=l&255,128<=n&&135>=n?e.skip(4):136<=n&&143>=n&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Oh(g.g,"\u266a"):Oh(g.g,
270
270
  String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Oh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(di.has(e)){var x=di.get(e);Oh(g.g,x)}else Oh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Oh(g.g,"_"):Oh(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(C){if(C instanceof M&&3E3===C.code)Wa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C;}return c}function ji(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function ki(){}ki.prototype.init=function(){};ki.prototype.parse=function(){return[]};function li(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(ha(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function mi(a,b){var c=null,d=null,e=null,f=a.O();b&1&&(e=a.Cb());b&2&&a.skip(4);b&8&&(c=a.O());b&16&&(d=a.O());return{trackId:f,Ef:c,xg:d,qj:e}}function ni(a,b){return{uf:1==b?a.Cb():a.O()}}function oi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.O()}}
271
- function pi(a,b,c){var d=a.O(),e=[],f=null;c&1&&(f=a.O());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={Je:null,sampleSize:null,Md:null};c&256&&(h.Je=a.O());c&512&&(h.sampleSize=a.O());c&1024&&a.skip(4);c&2048&&(h.Md=0==b?a.O():a.Sf());e.push(h)}return{vj:d,Uf:e,wg:f}};function qi(){this.j=new Map;this.i=this.h=0;this.g=ri}
271
+ function pi(a,b,c){var d=a.O(),e=[],f=null;c&1&&(f=a.O());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={Je:null,sampleSize:null,Md:null};c&256&&(h.Je=a.O());c&512&&(h.sampleSize=a.O());c&1024&&a.skip(4);c&2048&&(h.Md=0==b?a.O():a.Sf());e.push(h)}return{wj:d,Uf:e,wg:f}};function qi(){this.j=new Map;this.i=this.h=0;this.g=ri}
272
272
  qi.prototype.init=function(a){function b(f){f=f.name;f in si&&(c.g=si[f])}var c=this,d=[],e=[];(new Hf).box("moov",Mf).box("mvex",Mf).U("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.O();g=g.O();c.h=f;c.i=g}).box("trak",Mf).U("tkhd",function(f){var g=f.reader;1==f.version?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));f=g.O();d.push(f)}).box("mdia",Mf).U("mdhd",function(f){f=oi(f.reader,f.version);e.push(f.timescale)}).box("minf",Mf).box("stbl",Mf).U("stsd",Of).box("avc1",b).box("avc3",b).box("hev1",
273
273
  b).box("hvc1",b).box("dvh1",b).box("dvhe",b).box("encv",Pf).box("sinf",Mf).box("frma",function(f){f=f.reader.O();f=Lf(f);f in si&&(c.g=si[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new M(2,2,2010);this.g==ri&&Ua("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
274
274
  qi.prototype.parse=function(a){var b=this;if(this.g==ri)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new Hf).box("moof",function(l){f=l.start;g=[];Mf(l)}).box("traf",Mf).U("trun",function(l){l=pi(l.reader,l.version,l.flags);g.push(l)}).U("tfhd",function(l){l=mi(l.reader,l.flags);d=l.Ef||b.h;e=l.xg||b.i;l=l.trackId;b.j.has(l)&&(k=b.j.get(l))}).U("tfdt",function(l){h=ni(l.reader,l.version).uf}).box("mdat",function(l){if(null===h)throw Ua("Unable to find base media decode time for CEA captions!"),
275
275
  new M(2,2,2010);ti(b,l.reader,h,k,d,e,f-l.start-8,g,c)}).parse(a,!1);return c};
276
- function ti(a,b,c,d,e,f,g,h,k){var l=0,m=f,p=h.map(function(v){return v.Uf});p=[].concat.apply([],ha(p));p.length&&(m=p[0].sampleSize||f);for(b.skip(g+h[0].wg);b.xa();){g=b.O();var n=b.pb(),t=null;t=!1;h=1;switch(a.g){case ui:t=n&31;t=6==t;break;case vi:h=2;b.skip(1);t=n>>1&63;t=39==t||40==t;break;default:return}if(t)for(n=0,l<p.length&&(n=p[l].Md||0),n=(c+n)/d,h=r(li(b.Bb(g-h))),t=h.next();!t.done;t=h.next())k.push({uh:t.value,pts:n});else try{b.skip(g-h)}catch(v){break}m-=g+4;0==m&&(c=l<p.length?
276
+ function ti(a,b,c,d,e,f,g,h,k){var l=0,m=f,p=h.map(function(v){return v.Uf});p=[].concat.apply([],ha(p));p.length&&(m=p[0].sampleSize||f);for(b.skip(g+h[0].wg);b.ya();){g=b.O();var n=b.pb(),t=null;t=!1;h=1;switch(a.g){case ui:t=n&31;t=6==t;break;case vi:h=2;b.skip(1);t=n>>1&63;t=39==t||40==t;break;default:return}if(t)for(n=0,l<p.length&&(n=p[l].Md||0),n=(c+n)/d,h=r(li(b.Bb(g-h))),t=h.next();!t.done;t=h.next())k.push({uh:t.value,pts:n});else try{b.skip(g-h)}catch(v){break}m-=g+4;0==m&&(c=l<p.length?
277
277
  c+(p[l].Je||e):c+e,l++,l<p.length?m=p[l].sampleSize||f:m=f)}}var ri=0,ui=1,vi=2,si={avc1:ui,avc3:ui,hev1:vi,hvc1:vi,dvh1:vi,dvhe:vi};function wi(a){this.h=new ki;a.includes("video/mp4")&&(this.h=new qi);this.g=new ei}wi.prototype.init=function(a){this.h.init(a)};
278
278
  function xi(a,b){b=a.h.parse(b);b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Fc(d.uh);if(0<e.length&&(c=a.g,d=d.pts,e=new Ef(e,0),181===e.pb()&&49===e.Ge()&&1195456820===e.O()&&3===e.pb())){var f=e.pb();if(0!==(f&64)){f&=31;e.skip(1);for(var g=0;g<f;g++){var h=e.pb(),k=(h&4)>>2,l=e.pb(),m=e.pb();k&&(h&=3,0===h||1===h?c.h.push({pts:d,type:h,Oa:l,hb:m,order:c.h.length}):(c.g.push({pts:d,type:h,value:l,order:c.g.length}),c.g.push({pts:d,type:2,value:m,order:c.g.length})))}}}}return gi(a.g)}
279
279
  ;function yi(a,b,c,d,e){this.Pa=a;this.Ta=b;this.Ca=c;this.ze=void 0===d?null:d;this.timescale=e}yi.prototype.Kc=function(){return this.Ta};yi.prototype.Gc=function(){return this.Ca};function zi(a,b){return a&&b?a.Kc()==b.Kc()&&a.Gc()==b.Gc()&&gc(a.Pa(),b.Pa()):a==b}I("shaka.media.InitSegmentReference",yi);yi.prototype.getEndByte=yi.prototype.Gc;yi.prototype.getStartByte=yi.prototype.Kc;
@@ -296,17 +296,17 @@ I("shaka.util.Id3Utils",Ji);Ji.getID3Frames=Mi;function Ni(){this.s=null;this.B=
296
296
  Ni.prototype.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,Oi(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71===a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h===e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.s=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.s:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,qe:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&
297
297
  15)<<8|f[h+11]);h<k;){var l=(f[h+1]&31)<<8|f[h+2];switch(f[h]){case 15:-1===g.audio&&(g.audio=l,g.audioCodec="aac");break;case 21:-1===g.qe&&(g.qe=l);break;case 27:-1===g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1===g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1===g.video&&(g.video=l,g.videoCodec="hvc")}h+=((f[h+3]&15)<<8|f[h+4])+5}f=g;null==this.l&&(this.l=f.video);null==this.g&&(this.g=f.audio);null==this.j&&(this.j=f.qe);d&&!this.B&&(d=!1,e=b-188);this.B=!0;break;case this.l:f=
298
298
  a.subarray(h,e+188);null==this.m&&(h=Pi(f))&&null!=h.pts&&(this.m=h.pts/9E4);this.F.push(f);break;case this.g:f=a.subarray(h,e+188);null==this.h&&(h=Pi(f))&&null!=h.pts&&(this.h=h.pts/9E4);this.C.push(f);break;case this.j:this.i.push(a.subarray(h,e+188));break;default:d=!0}}return this};
299
- function Pi(a){if(1!==(a[0]<<16|a[1]<<8|a[2]))return null;var b={data:new Uint8Array(0),uj:6+(a[4]<<8|a[5]),pts:null,dts:null},c=a[7];c&192&&(b.pts=536870912*(a[9]&14)+4194304*(a[10]&255)+16384*(a[11]&254)+128*(a[12]&255)+(a[13]&254)/2,b.dts=b.pts,c&64&&(b.dts=536870912*(a[14]&14)+4194304*(a[15]&255)+16384*(a[16]&254)+128*(a[17]&255)+(a[18]&254)/2));b.data=a.subarray(9+a[8]);return b}
299
+ function Pi(a){if(1!==(a[0]<<16|a[1]<<8|a[2]))return null;var b={data:new Uint8Array(0),vj:6+(a[4]<<8|a[5]),pts:null,dts:null},c=a[7];c&192&&(b.pts=536870912*(a[9]&14)+4194304*(a[10]&255)+16384*(a[11]&254)+128*(a[12]&255)+(a[13]&254)/2,b.dts=b.pts,c&64&&(b.dts=536870912*(a[14]&14)+4194304*(a[15]&255)+16384*(a[16]&254)+128*(a[17]&255)+(a[18]&254)/2));b.data=a.subarray(9+a[8]);return b}
300
300
  function Qi(a){for(var b=[],c=new Uint8Array(0),d=a.i.length-1;0<=d;d--){c=ld(a.i[d],c);var e=Pi(c);e&&(b.unshift({cueTime:e.pts?e.pts/9E4:null,data:e.data,frames:Mi(e.data),dts:e.dts,pts:e.pts}),c=new Uint8Array(0))}return b}Ni.prototype.getStartTime=function(){return{audio:this.h,video:this.m}};function Oi(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71===a[c]&&71===a[c+188]&&71===a[c+376])return c;c++}return-1}I("shaka.util.TsParser",Ni);function Ri(a,b,c){this.g=null;this.i=-1;this.j=a;this.h=b;this.l=c;"undefined"===typeof libDPIModule&&Ua("Could not Find LCEVC Library dependencies on this page");"undefined"===typeof LcevcDil?Ua("Could not Find LCEVC Library on this page"):LcevcDil.SupportObject.SupportStatus||Ua(LcevcDil.SupportObject.SupportError);"undefined"!==typeof LcevcDil&&"undefined"!==typeof libDPIModule&&this.h instanceof HTMLCanvasElement&&LcevcDil.SupportObject.SupportStatus&&!this.g&&LcevcDil.SupportObject.webGLSupport(this.h)&&
301
- (this.h.classList.remove("shaka-hidden"),this.g=new LcevcDil.LcevcDil(this.j,this.h,this.l))}Ri.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Si(a,b){var c=Ti;switch(b.mimeType){case "video/webm":c=Ui;break;case "video/mp4":c=Vi}a.g&&(a.i=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(c))}I("shaka.lcevc.Dil",Ri);Ri.prototype.release=Ri.prototype.release;var Ti=0,Ui=1,Vi=2;function Wi(a,b,c,d){var e=this;this.l=a;this.I=null;this.m=b;this.h={};this.M={};this.P={};this.g=null;this.J=!1;this.V=c||function(){};this.H=d||null;this.i={};this.C=new wf;this.s={};this.B=null;this.K=new Jc;this.N="";this.j=Xi(this,this.K);this.G=new uf(function(){return Yi(e)});this.F=!1;this.X=new Jc}function Xi(a,b){var c=new MediaSource;a.C.ya(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.N=Zi(c);a.l.src=a.N;return c}q=Wi.prototype;q.destroy=function(){return this.G.destroy()};
301
+ (this.h.classList.remove("shaka-hidden"),this.g=new LcevcDil.LcevcDil(this.j,this.h,this.l))}Ri.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Si(a,b){var c=Ti;switch(b.mimeType){case "video/webm":c=Ui;break;case "video/mp4":c=Vi}a.g&&(a.i=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(c))}I("shaka.lcevc.Dil",Ri);Ri.prototype.release=Ri.prototype.release;var Ti=0,Ui=1,Vi=2;function Wi(a,b,c,d){var e=this;this.l=a;this.I=null;this.m=b;this.h={};this.M={};this.P={};this.g=null;this.J=!1;this.V=c||function(){};this.H=d||null;this.i={};this.C=new wf;this.s={};this.B=null;this.K=new Jc;this.N="";this.j=Xi(this,this.K);this.G=new uf(function(){return Yi(e)});this.F=!1;this.X=new Jc}function Xi(a,b){var c=new MediaSource;a.C.ra(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.N=Zi(c);a.l.src=a.N;return c}q=Wi.prototype;q.destroy=function(){return this.G.destroy()};
302
302
  function Yi(a){var b,c,d,e,f,g,h,k;return F(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(zb)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new M(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.C&&(a.C.release(),a.C=null);a.l&&(a.l.removeAttribute("src"),a.l.load(),a.l=null);a.I=null;a.j=null;a.g=null;a.m=null;a.h={};a.s={};a.B=null;
303
303
  a.i={};a.H=null;B(l)})}
304
- q.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,p;return F(function(n){if(1==n.g)return e=Hb,u(n,d.K,2);d.F=c;f={};g=r(a.keys());for(h=g.next();!h.done;f={Ea:f.Ea},h=g.next())if(f.Ea=h.value,k=a.get(f.Ea),l=wd(k.mimeType,k.codecs),f.Ea==e.ea)$i(d,l,c);else{!b&&bc(l)||!qd(l,f.Ea)||(d.s[f.Ea]=new pd(l),l=td(f.Ea,l));m=l+d.I.sourceBufferExtraFeatures;vf(d.G);p=void 0;try{p=d.j.addSourceBuffer(m)}catch(t){throw new M(2,3,3015,t,"The mediaSource_ status was"+d.j.readyState+"expected 'open'");
305
- }d.C.o(p,"error",function(t){return function(){d.i[t.Ea][0].p.reject(new M(2,3,3014,d.l.error?d.l.error.code:0))}}(f));d.C.o(p,"updateend",function(t){return function(){return aj(d,t.Ea)}}(f));d.h[f.Ea]=p;d.M[f.Ea]=l;d.i[f.Ea]=[];d.P[f.Ea]=!!k.drmInfos.length}B(n)})};q.configure=function(a){this.I=a};
306
- function $i(a,b,c){a.g||(a.g=new Bd(a.m));var d=a.g;a=a.J;"application/cea-608"==b||"application/cea-708"==b?d.i=null:(d.i=(0,Dd[b])(),d.i.setSequenceMode?d.i.setSequenceMode(c):Ua('Text parsers should have a "setSequenceMode" method!'),d.C=a)}function bj(a){return a.j?"ended"==a.j.readyState:!0}function cj(a,b){return b==Gb?a.g.g:Di(dj(a,b))}function ej(a,b){return b==Gb?a.g.h:Ei(dj(a,b))}function fj(a,b,c){if(b==Gb)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=dj(a,b);return Gi(a,c)}
307
- q.ib=function(){var a={total:Hi(this.l.buffered),audio:Hi(dj(this,"audio")),video:Hi(dj(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 dj(a,b){try{return a.h[b].buffered}catch(c){return null}}
304
+ q.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,p;return F(function(n){if(1==n.g)return e=Hb,u(n,d.K,2);d.F=c;f={};g=r(a.keys());for(h=g.next();!h.done;f={Ea:f.Ea},h=g.next())if(f.Ea=h.value,k=a.get(f.Ea),l=wd(k.mimeType,k.codecs),f.Ea==e.ea)$i(d,l,c,k.external);else{!b&&bc(l)||!qd(l,f.Ea)||(d.s[f.Ea]=new pd(l),l=td(f.Ea,l));m=l+d.I.sourceBufferExtraFeatures;vf(d.G);p=void 0;try{p=d.j.addSourceBuffer(m)}catch(t){throw new M(2,3,3015,t,"The mediaSource_ status was"+d.j.readyState+
305
+ "expected 'open'");}d.C.o(p,"error",function(t){return function(){d.i[t.Ea][0].p.reject(new M(2,3,3014,d.l.error?d.l.error.code:0))}}(f));d.C.o(p,"updateend",function(t){return function(){return aj(d,t.Ea)}}(f));d.h[f.Ea]=p;d.M[f.Ea]=l;d.i[f.Ea]=[];d.P[f.Ea]=!!k.drmInfos.length}B(n)})};q.configure=function(a){this.I=a};
306
+ function $i(a,b,c,d){a.g||(a.g=new Bd(a.m));var e=a.g;a=d||a.J;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,Dd[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):Ua('Text parsers should have a "setSequenceMode" method!'),e.C=a)}function bj(a){return a.j?"ended"==a.j.readyState:!0}function cj(a,b){return b==Gb?a.g.g:Di(dj(a,b))}function ej(a,b){return b==Gb?a.g.h:Ei(dj(a,b))}
307
+ function fj(a,b,c){if(b==Gb)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=dj(a,b);return Gi(a,c)}q.ib=function(){var a={total:Hi(this.l.buffered),audio:Hi(dj(this,"audio")),video:Hi(dj(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 dj(a,b){try{return a.h[b].buffered}catch(c){return null}}
308
308
  function gj(a,b,c,d,e,f,g){f=void 0===f?!1:f;g=void 0===g?!1:g;var h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,G,H,J,K,Q,V,U,ia;return F(function(O){switch(O.g){case 1:h=Hb;if(b!=h.ea){O.D(2);break}if(!a.F){O.D(3);break}return u(O,a.X,4);case 4:k=O.h,a.g.B=k;case 3:return u(O,Ed(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return O.return();case 2:l=Fc(c);m=a.M[b];a.s[b]&&(m=a.s[b].s);0>Oi(l)?hj.includes(m)&&(v=Mi(l),v.length&&d&&(y={cueTime:d.startTime,data:l,frames:v,dts:d.startTime,pts:d.startTime},
309
- a.V([y],0,d.endTime))):(p=(new Ni).parse(l),n=d.startTime-(p.getStartTime()[b]||0),t=Qi(p),t.length&&a.V(t,n,d?d.endTime:null));if(!a.s[b]){e&&b==h.Ma&&(a.g||$i(a,"application/cea-608",a.F),a.B||(a.B=new wi(m)),d?(w=xi(a.B,c),w.length&&(x=a.h[h.Ma].timestampOffset,Jd(a.g,w,d.startTime,d.endTime,x))):a.B.init(c));O.D(6);break}f&&a.s[b].g.resetCaptions();return u(O,ud(a.s[b],c),7);case 7:C=O.h,a.g||$i(a,"application/cea-608",a.F),C.captions&&C.captions.length&&(z=a.h[h.Ma].timestampOffset,A=Hd(C.captions),
309
+ a.V([y],0,d.endTime))):(p=(new Ni).parse(l),n=d.startTime-(p.getStartTime()[b]||0),t=Qi(p),t.length&&a.V(t,n,d?d.endTime:null));if(!a.s[b]){e&&b==h.Ma&&(a.g||$i(a,"application/cea-608",a.F,!1),a.B||(a.B=new wi(m)),d?(w=xi(a.B,c),w.length&&(x=a.h[h.Ma].timestampOffset,Jd(a.g,w,d.startTime,d.endTime,x))):a.B.init(c));O.D(6);break}f&&a.s[b].g.resetCaptions();return u(O,ud(a.s[b],c),7);case 7:C=O.h,a.g||$i(a,"application/cea-608",a.F,!1),C.captions&&C.captions.length&&(z=a.h[h.Ma].timestampOffset,A=Hd(C.captions),
310
310
  Jd(a.g,A,d?d.startTime:null,d?d.endTime:null,z)),c=C.data;case 6:c=ij(a,c,d?d.startTime:null,b);E=a.h[b];G=jj;if(!a.F||E.mode==G||!d){O.D(8);break}H=a.j.duration;J=b==h.Ma||!(h.Ma in a.h);if(!J){O.D(9);break}K=[E.appendWindowStart,E.appendWindowEnd];E.appendWindowStart=0;E.appendWindowEnd=Infinity;Q=E.timestampOffset;E.timestampOffset=0;return u(O,kj(a,b,function(){return lj(a,b,c)}),10);case 10:return u(O,kj(a,b,function(){return mj(a,b)}),11);case 11:return E.timestampOffset=Q,E.appendWindowStart=
311
311
  K[0],E.appendWindowEnd=K[1],V=Di(dj(a,b)),U=(d.startTime||0)-(V||0),a.X.resolve(U),u(O,kj(a,b,function(){return nj(a,b,0,H)}),12);case 12:if(b!=h.Ma){O.D(9);break}return u(O,kj(a,b,function(){a.l.currentTime-=.001;aj(a,b)}),9);case 9:return E.mode=G,u(O,a.Sa(H),8);case 8:return d&&a.F&&b!=h.ea&&(f||g)&&(ia=d.startTime,kj(a,b,function(){return mj(a,b)}),kj(a,b,function(){return oj(a,b,ia)})),u(O,kj(a,b,function(){lj(a,b,c)}),16);case 16:B(O)}})}function pj(a,b){var c=ej(a,"video")||0;Gd(a.g,b,c)}
312
312
  function qj(a){a.g&&Gd(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return F(function(f){e=Hb;return a==e.ea?u(f,d.g.remove(b,c),0):u(f,kj(d,a,function(){return nj(d,a,b,c)}),0)})};function rj(a,b){var c;return F(function(d){c=Hb;return b==c.ea?a.g?u(d,a.g.remove(0,Infinity),0):d.return():u(d,kj(a,b,function(){return nj(a,b,0,a.j.duration)}),0)})}q.flush=function(a){var b=this,c;return F(function(d){c=Hb;return a==c.ea?d.return():u(d,kj(b,a,function(){b.l.currentTime-=.001;aj(b,a)}),0)})};
@@ -323,9 +323,9 @@ P.prototype.getSeekRangeEnd=P.prototype.jb;P.prototype.getSeekRangeStart=P.proto
323
323
  P.prototype.lockStartTime=P.prototype.ye;P.prototype.notifySegments=P.prototype.mc;P.prototype.getDelay=P.prototype.Ig;P.prototype.setDelay=P.prototype.Xf;P.prototype.setSegmentAvailabilityDuration=P.prototype.Ue;P.prototype.setStatic=P.prototype.bd;P.prototype.setClockOffset=P.prototype.Wf;P.prototype.getPresentationStartTime=P.prototype.Vg;P.prototype.setDuration=P.prototype.Sa;P.prototype.setPresentationStartTime=P.prototype.$f;P.prototype.getMaxSegmentDuration=P.prototype.Rg;
324
324
  P.prototype.getDuration=P.prototype.getDuration;function xj(a,b,c){this.l=c;this.j=a;this.B=yj(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.s=0;this.C=b;this.i=function(){}}xj.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function zj(a,b){a.i=b}function Aj(a){this.g=a}function yj(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=r(Hi(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 Bj(a,b,c,d,e){var f=this;this.B=e;this.g=a;this.C=b;this.H=c;this.l=new wf;this.j=!1;this.G=a.readyState;this.F=this.i=0;this.h=d;this.s=!1;this.l.o(a,"waiting",function(){return Cj(f)});this.m=(new N(function(){Cj(f)})).ka(.25)}Bj.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.C=this.B=null};Bj.prototype.Fe=function(){this.s=!0;Cj(this)};
325
325
  function Cj(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.G&&(a.G=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=yj(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.B!=d)b.m=f,b.g=e,b.B=d,b.h=!1;e=f-b.m;if(d=e>=b.C&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.s++,b.l(new L("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Ii(c,b,a.H.gapDetectionThreshold),null==
326
- d||0==d&&!a.s||(e=c.start(d),e>=a.C.jb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.F++,a.B(new L("gapjumped")))))}}};function Dj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Ej.value().get(b),c.ya(a,b,d))}var Ej=new Kc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Fj(a,b,c,d){var e=this;this.g=a;this.l=b;this.s=c;this.j=d;this.m=!1;this.h=new wf;this.i=new Gj(a);Dj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Hj(e,e.j)})}Fj.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 Ij(a){return a.m?a.g.currentTime:a.j}function Jj(a,b){0<a.g.readyState?Kj(a.i,b):Dj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Hj(a,a.j)})}
327
- function Hj(a,b){.001>Math.abs(a.g.currentTime-b)?Lj(a):(a.h.ya(a.g,"seeking",function(){Lj(a)}),Kj(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Lj(a){a.m=!0;a.h.o(a.g,"seeking",function(){return a.l()});a.s(a.g.currentTime)}function Gj(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new N(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Gj.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
328
- function Kj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ka(.1)};function Mj(a){this.g=a;this.j=!1;this.h=null;this.i=new wf}q=Mj.prototype;q.je=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.ya(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;Dj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};q.ke=function(a){this.h=this.j?this.h:a};q.ld=function(){return(this.j?this.g.currentTime:this.h)||0};q.qf=function(){return 0};
326
+ d||0==d&&!a.s||(e=c.start(d),e>=a.C.jb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.F++,a.B(new L("gapjumped")))))}}};function Dj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Ej.value().get(b),c.ra(a,b,d))}var Ej=new Kc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Fj(a,b,c,d){var e=this;this.g=a;this.l=b;this.s=c;this.j=d;this.m=!1;this.h=new wf;this.i=new Gj(a);Dj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Hj(e,e.j)})}Fj.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 Ij(a){return a.m?a.g.currentTime:a.j}function Jj(a,b){0<a.g.readyState?Kj(a.i,b):Dj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Hj(a,a.j)})}
327
+ function Hj(a,b){.001>Math.abs(a.g.currentTime-b)?Lj(a):(a.h.ra(a.g,"seeking",function(){Lj(a)}),Kj(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Lj(a){a.m=!0;a.h.o(a.g,"seeking",function(){return a.l()});a.s(a.g.currentTime)}function Gj(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new N(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Gj.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
328
+ function Kj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ka(.1)};function Mj(a){this.g=a;this.j=!1;this.h=null;this.i=new wf}q=Mj.prototype;q.je=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.ra(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;Dj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};q.ke=function(a){this.h=this.j?this.h:a};q.ld=function(){return(this.j?this.g.currentTime:this.h)||0};q.qf=function(){return 0};
329
329
  q.pf=function(){return 0};q.Rf=function(){};
330
330
  function Nj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.F=b.minBufferTime||0;this.l=c;this.C=e;this.B=null;this.s=Oj(a,c,f);this.j=new Bj(a,b.presentationTimeline,c,this.s,f);this.h=new Fj(a,function(){a:{var h=g.j;h.j=!0;h.s=!1;var k=Ij(g.h);h=Pj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.B||g.B<k-1)){g.B=k;Jj(g.h,h);h=void 0;break a}g.C();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},Qj(this,d));this.m=new N(function(){if(0!=g.i.readyState&&
331
331
  !g.i.paused){var h=Ij(g.h),k=g.g.ec(),l=g.g.jb();3>l-k&&(k=l-3);h<k&&(h=Pj(g,h),g.i.currentTime=h)}})}q=Nj.prototype;q.je=function(){this.m.ka(.25)};q.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.C=function(){}};q.ke=function(a){Jj(this.h,a)};q.ld=function(){var a=Ij(this.h);return 0<this.i.readyState&&!this.i.paused?Rj(this,a):a};q.qf=function(){return this.s?this.s.s:0};
@@ -346,9 +346,9 @@ if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].
346
346
  "regionremove",function(d){c.g.delete(d.region)})}pa(hk,db);hk.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;db.prototype.release.call(this)};hk.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=r(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?kk:a>d.endTime?lk:ik;this.g.set(d,f);for(var g=r(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.Wb==e&&h.Vb==f&&h.Kb(d,b)}}};
347
347
  function jk(a,b,c,d){b=new L(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var kk=1,ik=2,lk=3;function mk(a,b,c,d,e){a=nf(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function nk(a,b){var c=this;this.g=b;this.m=a;this.i=null;this.C=1;this.s=this.l=null;this.H=0;this.G=!1;this.j=new Map;this.F=!1;this.I=null;this.B=!1;this.h=new uf(function(){return ok(c)})}q=nk.prototype;q.destroy=function(){return this.h.destroy()};function ok(a){var b,c,d,e;return F(function(f){if(1==f.g){b=[];c=r(a.j.values());for(d=c.next();!d.done;d=c.next())e=d.value,pk(e),b.push(qk(e));return u(f,Promise.all(b),2)}a.j.clear();a.g=null;a.m=null;a.i=null;B(f)})}
348
348
  q.configure=function(a){this.i=a;this.I=new Ve({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)};q.start=function(){var a=this;return F(function(b){if(1==b.g)return u(b,rk(a),2);vf(a.h);a.F=!0;B(b)})};
349
- function sk(a,b){var c,d,e,f,g,h,k;F(function(l){switch(l.g){case 1:return c=Hb,a.H++,d=a.H,D(l,2),u(l,rj(a.g.T,c.ea),4);case 4:va(l,3);break;case 2:if(e=wa(l),a.g)a.g.onError(e);case 3:f=wd(b.mimeType,b.codecs),$i(a.g.T,f,a.m.sequenceMode),g=a.g.T.m,(h=g.isTextVisible()||a.i.alwaysStreamText)&&a.H==d&&(k=tk(b),a.j.set(c.ea,k),uk(a,k,0)),B(l)}})}function vk(a){var b=a.j.get(Gb);b&&(pk(b),qk(b).catch(function(){}),a.j.delete(Gb));a.s=null}
349
+ function sk(a,b){var c,d,e,f,g,h,k;F(function(l){switch(l.g){case 1:return c=Hb,a.H++,d=a.H,D(l,2),u(l,rj(a.g.T,c.ea),4);case 4:va(l,3);break;case 2:if(e=wa(l),a.g)a.g.onError(e);case 3:f=wd(b.mimeType,b.codecs),$i(a.g.T,f,a.m.sequenceMode,b.external),g=a.g.T.m,(h=g.isTextVisible()||a.i.alwaysStreamText)&&a.H==d&&(k=tk(b),a.j.set(c.ea,k),uk(a,k,0)),B(l)}})}function vk(a){var b=a.j.get(Gb);b&&(pk(b),qk(b).catch(function(){}),a.j.delete(Gb));a.s=null}
350
350
  function wk(a,b){var c=a.j.get("video");if(c){var d=c.stream;if(d)if(b)(b=d.trickModeVideo)&&!c.Tb&&(xk(a,b,!1,0,!1),c.Tb=d);else if(d=c.Tb)c.Tb=null,xk(a,d,!0,0,!1)}}function yk(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.l=b;a.F&&(b.video&&xk(a,b.video,c,d,e,f),b.audio&&xk(a,b.audio,c,d,e,f))}function zk(a,b){F(function(c){if(1==c.g)return a.s=b,a.F?b.segmentIndex?c.D(2):u(c,b.createSegmentIndex(),2):c.return();xk(a,b,!0,0,!1);B(c)})}
351
- function xk(a,b,c,d,e,f){var g=a.j.get(b.type);g||b.type!=Gb?g&&(g.Tb&&(b.trickModeVideo?(g.Tb=b,b=b.trickModeVideo):g.Tb=null),g.stream!=b||e)&&(b.type==Gb&&$i(a.g.T,wd(b.mimeType,b.codecs),a.m.sequenceMode),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.ia=null,g.rf=!!f,c&&(g.Dc?g.Rd=!0:g.Ia?(g.Eb=!0,g.rd=d,g.Rd=!0):(pk(g),Ak(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),Bk(a,g).catch(function(h){if(a.g)a.g.onError(h)})):sk(a,b)}
351
+ function xk(a,b,c,d,e,f){var g=a.j.get(b.type);g||b.type!=Gb?g&&(g.Tb&&(b.trickModeVideo?(g.Tb=b,b=b.trickModeVideo):g.Tb=null),g.stream!=b||e)&&(b.type==Gb&&$i(a.g.T,wd(b.mimeType,b.codecs),a.m.sequenceMode,b.external),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.ia=null,g.rf=!!f,c&&(g.Dc?g.Rd=!0:g.Ia?(g.Eb=!0,g.rd=d,g.Rd=!0):(pk(g),Ak(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),Bk(a,g).catch(function(h){if(a.g)a.g.onError(h)})):sk(a,b)}
352
352
  function Bk(a,b){var c,d;return F(function(e){if(1==e.g){if(!b.Ka)return e.return();c=b.stream;d=b.Ka;return c.segmentIndex?e.D(2):u(e,c.createSegmentIndex(),2)}if(b.Ka!=d||b.stream!=c)return e.return();var f=a.g.wd();var g=ej(a.g.T,b.type),h=b.stream.segmentIndex.find(b.Ga?b.Ga.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.Ca?k.Ca-k.Ta:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.Ca?k.Ca-k.Ta:null)||0),k=a.g.getBandwidthEstimate(),
353
353
  f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal)||b.Ka.h.g>h?!0:!1):f=!1;f&&b.Ka.abort();B(e)})}
354
354
  q.Yc=function(){if(this.g)for(var a=this.g.wd(),b=r(this.j.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.j.get(d);var e=null;c.ia&&(e=c.ia.current());if(!e||e.startTime>a||e.endTime<a)c.ia=null;e=this.g.T;d==Gb?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=dj(e,d),e=Fi(e,a));if(!e){(null!=ej(this.g.T,d)||c.Ia)&&Ck(this,c);c.Ka&&(c.Ka.abort(),c.Ka=null);if(d===Gb&&(d=this.g.T,d.B))for(d=d.B.g,d.l=0,d.h=[],d.g=[],e=d.i,e.i=[],e.h=[],e.g=0,fi(d),d=r(d.j.values()),e=d.next();!e.done;e=
@@ -422,113 +422,113 @@ minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth
422
422
  function Rl(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return Il(a,b,c||Pl(),d,"")}
423
423
  function Ql(a,b){var c=a.filter(function(g){return"variant"==g.type}),d=[],e=Sb(b,c.map(function(g){return g.language}));e&&(d=c.filter(function(g){return Kb(g.language)==e}));0==d.length&&(d=c.filter(function(g){return g.primary}));0==d.length&&(c.map(function(g){return g.language}),d=c);var f=d.filter(function(g){return g.height&&480>=g.height});f.length&&(f.sort(function(g,h){return h.height-g.height}),d=f.filter(function(g){return g.height==f[0].height}));b=[];d.length&&(c=Math.floor(d.length/
424
424
  2),d.sort(function(g,h){return g.bandwidth-h.bandwidth}),b.push(d[c]));a=r(a);for(d=a.next();!d.done;d=a.next())d=d.value,d.type!=Gb&&"image"!=d.type||b.push(d);return b}I("shaka.util.PlayerConfiguration",Ol);Ol.mergeConfigObjects=Rl;Ol.createDefault=Pl;function Sl(){this.g=null;this.h=[]}function Tl(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 Ul(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=r(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}
425
- function Vl(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(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 Wl(){this.i=this.h=null;this.g=[]}function Xl(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 Yl(){this.C=this.F=this.I=this.G=this.B=this.j=this.H=this.m=this.i=this.N=this.P=this.J=this.K=this.M=this.l=this.s=NaN;this.g=new Sl;this.h=new Wl};function S(a,b){db.call(this);var c=this;this.l=Zl;this.Cd=this.g=null;this.$=!1;this.Jd=new wf;this.gb=new wf;this.C=new wf;this.fb=this.i=this.Ld=this.K=this.j=this.ba=this.M=this.nf=this.V=this.sa=this.N=this.Ed=this.J=this.Za=this.F=this.I=this.m=this.H=null;this.Oc=!1;this.cf=this.B=null;this.kf=1E9;this.h=$l(this);this.Rc={width:Infinity,height:Infinity};this.s=null;this.La=new Ne(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Xa=this.h.preferredTextLanguage;
425
+ function Vl(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(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 Wl(){this.i=this.h=null;this.g=[]}function Xl(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 Yl(){this.C=this.F=this.I=this.G=this.B=this.j=this.H=this.m=this.i=this.N=this.P=this.J=this.K=this.M=this.l=this.s=NaN;this.g=new Sl;this.h=new Wl};function S(a,b){db.call(this);var c=this;this.l=Zl;this.Cd=this.g=null;this.$=!1;this.Jd=new wf;this.gb=new wf;this.C=new wf;this.fb=this.i=this.Ld=this.K=this.j=this.ba=this.M=this.nf=this.V=this.ua=this.N=this.Ed=this.J=this.Za=this.F=this.I=this.m=this.H=null;this.Oc=!1;this.cf=this.B=null;this.kf=1E9;this.h=$l(this);this.Rc={width:Infinity,height:Infinity};this.s=null;this.La=new Ne(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Xa=this.h.preferredTextLanguage;
426
426
  this.Lc=this.h.preferredTextRole;this.Fc=this.h.preferForcedSubs;this.vb=[];this.Sc=null;b&&b(this);this.H=am(this);this.H.Qe(this.h.streaming.forceHTTPS);this.G=null;bm&&(this.G=bm());this.Jd.o(window,"online",function(){c.Ie()});this.P={name:"detach"};this.X={name:"attach"};this.aa={name:"unload"};this.lf={name:"manifest-parser"};this.jf={name:"manifest"};this.Ya={name:"media-source"};this.gf={name:"drm-engine"};this.Z={name:"load"};this.ie={name:"src-equals-drm-engine"};this.$a={name:"src-equals"};
427
427
  var d=new Map;d.set(this.X,function(e,f){return bf(cm(c,e,f))});d.set(this.P,function(e){e.mediaElement&&(c.gb.Sb(),e.mediaElement=null);c.G&&c.G.release();c.g=null;e=Promise.resolve();return bf(e)});d.set(this.aa,function(e){return bf(dm(c,e))});d.set(this.Ya,function(e){e=em(c,e);return bf(e)});d.set(this.lf,function(e,f){e=fm(c,e,f);return bf(e)});d.set(this.jf,function(e){return gm(c,e)});d.set(this.gf,function(e){e=hm(c,e);return bf(e)});d.set(this.Z,function(e,f){return bf(im(c,e,f))});d.set(this.ie,
428
- function(e,f){e=jm(c,e,f);return bf(e)});d.set(this.$a,function(e,f){return km(c,e,f)});this.ua=new Qk(this.P,{Tg:function(e,f,g,h){var k=null;e==c.P&&(k=g==c.P?c.P:c.X);e==c.X&&(k=g==c.P||f.mediaElement!=h.mediaElement?c.P:g==c.X?c.X:g==c.Ya||g==c.Z?c.Ya:g==c.$a?c.ie:null);e==c.Ya&&(k=g==c.Z&&f.mediaElement==h.mediaElement?c.lf:c.aa);e==c.lf&&(k=lm(c.Z,c.jf,c.aa,g,f,h));e==c.jf&&(k=lm(c.Z,c.gf,c.aa,g,f,h));e==c.gf&&(k=lm(c.Z,c.Z,c.aa,g,f,h));e==c.ie&&(k=g==c.$a&&f.mediaElement==h.mediaElement?c.$a:
428
+ function(e,f){e=jm(c,e,f);return bf(e)});d.set(this.$a,function(e,f){return km(c,e,f)});this.va=new Qk(this.P,{Tg:function(e,f,g,h){var k=null;e==c.P&&(k=g==c.P?c.P:c.X);e==c.X&&(k=g==c.P||f.mediaElement!=h.mediaElement?c.P:g==c.X?c.X:g==c.Ya||g==c.Z?c.Ya:g==c.$a?c.ie:null);e==c.Ya&&(k=g==c.Z&&f.mediaElement==h.mediaElement?c.lf:c.aa);e==c.lf&&(k=lm(c.Z,c.jf,c.aa,g,f,h));e==c.jf&&(k=lm(c.Z,c.gf,c.aa,g,f,h));e==c.gf&&(k=lm(c.Z,c.Z,c.aa,g,f,h));e==c.ie&&(k=g==c.$a&&f.mediaElement==h.mediaElement?c.$a:
429
429
  c.aa);if(e==c.Z||e==c.$a)k=c.aa;e==c.aa&&(k=h.mediaElement&&f.mediaElement==h.mediaElement?c.X:c.P);return k},yg:function(e,f,g){c.dispatchEvent(mm("onstatechange",(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return F(function(f){return 1==f.g?u(f,dm(c,e),2):f.return(e.mediaElement?c.X:c.P)})},ph:function(e){c.dispatchEvent(mm("onstateidle",(new Map).set("state",e.name)))}});this.mf=new N(function(){Yd(c.i.variants,c.h.restrictions,c.Rc)&&nm(c)});a&&this.Cc(a,!0)}
430
430
  pa(S,db);function om(a){null!=a.M&&(a.M.release(),a.M=null)}function pm(a,b){if(b.lcevc.enabled){var c=a.Qa();c&&c[0]&&c[0].videoMimeType==qm.ts&&(Pc()||navigator.userAgent.match(/Edge\//))&&(b.streaming.forceTransmux||Ua("LCEVC Warning: For MPEG-2 TS decoding the config.streaming.forceTransmux must be enabled."));om(a);null==a.M&&(a.M=new Ri(a.g,a.nf,b.lcevc),a.I&&(a.I.H=a.M))}else om(a)}function mm(a,b){return new L(a,b)}q=S.prototype;
431
- q.destroy=function(){var a=this,b;return F(function(c){switch(c.g){case 1:if(a.l==rm)return c.return();om(a);a.l=rm;b=Vk(a.ua,function(){return{node:a.P,payload:Rk(),Jb:!1}});return u(c,new Promise(function(d){b.nc=function(){};b.Fd=function(){d()};b.Rb=function(){d()};b.onError=function(){d()};b.Hd=function(){d()}}),2);case 2:return u(c,a.ua.destroy(),3);case 3:a.Jd&&(a.Jd.release(),a.Jd=null);a.gb&&(a.gb.release(),a.gb=null);a.C&&(a.C.release(),a.C=null);a.cf=null;a.h=null;a.s=null;a.Cd=null;a.V=
431
+ q.destroy=function(){var a=this,b;return F(function(c){switch(c.g){case 1:if(a.l==rm)return c.return();om(a);a.l=rm;b=Vk(a.va,function(){return{node:a.P,payload:Rk(),Jb:!1}});return u(c,new Promise(function(d){b.nc=function(){};b.Fd=function(){d()};b.Rb=function(){d()};b.onError=function(){d()};b.Hd=function(){d()}}),2);case 2:return u(c,a.va.destroy(),3);case 3:a.Jd&&(a.Jd.release(),a.Jd=null);a.gb&&(a.gb.release(),a.gb=null);a.C&&(a.C.release(),a.C=null);a.cf=null;a.h=null;a.s=null;a.Cd=null;a.V=
432
432
  null;if(!a.H){c.D(4);break}return u(c,a.H.destroy(),5);case 5:a.H=null;case 4:a.B&&(a.B.release(),a.B=null),db.prototype.release.call(a),B(c)}})};
433
433
  function sm(){window.Promise||Ua("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Rc("Trident/"))return!1;var a=Wc();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Mc()?!0:Nc("application/x-mpegurl")}
434
- q.Cc=function(a,b){b=void 0===b?!0:b;if(this.l==rm)return Promise.reject(tm());var c=Rk();c.mediaElement=a;Mc()||(b=!1);var d=b?this.Ya:this.X;a=Vk(this.ua,function(){return{node:d,payload:c,Jb:!1}});a.nc=function(){};return um(a)};q.tf=function(a){this.nf=a};q.detach=function(){var a=this;if(this.l==rm)return Promise.reject(tm());var b=Vk(this.ua,function(){return{node:a.P,payload:Rk(),Jb:!1}});b.nc=function(){};return um(b)};
435
- q.df=function(a){var b=this;a=void 0===a?!0:a;if(this.l==rm)return Promise.reject(tm());this.Oc=!1;Mc()||(a=!1);om(this);var c=Rk(),d=Vk(this.ua,function(e){var f=e.mediaElement&&a?b.Ya:e.mediaElement?b.X:b.P;c.mediaElement=e.mediaElement;return{node:f,payload:c,Jb:!1}});d.nc=function(){};return um(d)};q.Rh=function(a){this.Sc=a};
436
- q.load=function(a,b,c){var d=this;this.Sc=null;this.Oc=!1;if(this.l==rm)return Promise.reject(tm());this.dispatchEvent(mm("loading"));var e=Rk();e.uri=a;e.Od=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=vm(this,e)?this.$a:this.Z,g=Vk(this.ua,function(h){if(null==h.mediaElement)return null;e.mediaElement=h.mediaElement;return{node:f,payload:e,Jb:!0}});this.s=new Yl;this.V=wm(this);g.nc=function(){};return new Promise(function(h,k){g.Hd=function(){return k(new M(2,7,7002))};g.Fd=
434
+ q.Cc=function(a,b){b=void 0===b?!0:b;if(this.l==rm)return Promise.reject(tm());var c=Rk();c.mediaElement=a;Mc()||(b=!1);var d=b?this.Ya:this.X;a=Vk(this.va,function(){return{node:d,payload:c,Jb:!1}});a.nc=function(){};return um(a)};q.tf=function(a){this.nf=a};q.detach=function(){var a=this;if(this.l==rm)return Promise.reject(tm());var b=Vk(this.va,function(){return{node:a.P,payload:Rk(),Jb:!1}});b.nc=function(){};return um(b)};
435
+ q.df=function(a){var b=this;a=void 0===a?!0:a;if(this.l==rm)return Promise.reject(tm());this.Oc=!1;Mc()||(a=!1);om(this);var c=Rk(),d=Vk(this.va,function(e){var f=e.mediaElement&&a?b.Ya:e.mediaElement?b.X:b.P;c.mediaElement=e.mediaElement;return{node:f,payload:c,Jb:!1}});d.nc=function(){};return um(d)};q.Rh=function(a){this.Sc=a};
436
+ q.load=function(a,b,c){var d=this;this.Sc=null;this.Oc=!1;if(this.l==rm)return Promise.reject(tm());this.dispatchEvent(mm("loading"));var e=Rk();e.uri=a;e.Od=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=vm(this,e)?this.$a:this.Z,g=Vk(this.va,function(h){if(null==h.mediaElement)return null;e.mediaElement=h.mediaElement;return{node:f,payload:e,Jb:!0}});this.s=new Yl;this.V=wm(this);g.nc=function(){};return new Promise(function(h,k){g.Hd=function(){return k(new M(2,7,7002))};g.Fd=
437
437
  function(){h();d.dispatchEvent(mm("loaded"))};g.Rb=function(){return k(tm())};g.onError=function(l){return k(l)}})};function vm(a,b){if(!Mc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=bh(d),c=qm[c]);if(c){if(""==(b.mediaElement||Oc()).canPlayType(c))return!1;if(!Mc()||!(c in ah||bh(d)in ch)||("application/x-mpegurl"===c||"application/vnd.apple.mpegurl"===c)&&a.h.streaming.preferNativeHls)return!0;if(Uc())return a.h.streaming.useNativeHlsOnSafari}return!1}
438
438
  function cm(a,b,c){null==b.mediaElement&&(b.mediaElement=c.mediaElement,a.gb.o(b.mediaElement,"error",function(){var d=xm(a);d&&ym(a,d)}));a.g=b.mediaElement;return Promise.resolve()}
439
- function dm(a,b){var c,d,e,f,g,h,k,l,m;return F(function(p){switch(p.g){case 1:return a.l!=rm&&(a.l=Zl),c=a.vb.map(function(n){return n()}),a.vb=[],u(p,Promise.all(c),2);case 2:a.dispatchEvent(mm("unloading"));b.mimeType=null;b.startTime=null;b.uri=null;a.sa&&(a.sa.release(),a.sa=null);b.mediaElement&&a.C.Sb();a.mf.stop();a.Za&&(a.Za.release(),a.Za=null);a.Ed&&(a.Ed.stop(),a.Ed=null);if(!a.K){p.D(3);break}return u(p,a.K.stop(),4);case 4:a.K=null,a.Ld=null;case 3:if(!a.B){p.D(5);break}return u(p,a.B.stop(),
439
+ function dm(a,b){var c,d,e,f,g,h,k,l,m;return F(function(p){switch(p.g){case 1:return a.l!=rm&&(a.l=Zl),c=a.vb.map(function(n){return n()}),a.vb=[],u(p,Promise.all(c),2);case 2:a.dispatchEvent(mm("unloading"));b.mimeType=null;b.startTime=null;b.uri=null;a.ua&&(a.ua.release(),a.ua=null);b.mediaElement&&a.C.Sb();a.mf.stop();a.Za&&(a.Za.release(),a.Za=null);a.Ed&&(a.Ed.stop(),a.Ed=null);if(!a.K){p.D(3);break}return u(p,a.K.stop(),4);case 4:a.K=null,a.Ld=null;case 3:if(!a.B){p.D(5);break}return u(p,a.B.stop(),
440
440
  5);case 5:if(!a.j){p.D(7);break}return u(p,a.j.destroy(),8);case 8:a.j=null;case 7:a.J&&(a.J.release(),a.J=null);a.F&&(a.F.release(),a.F=null);if(!a.I){p.D(9);break}return u(p,a.I.destroy(),10);case 10:a.I=null;case 9:if(a.G)a.G.onAssetUnload();if(!b.mediaElement||!b.mediaElement.src){p.D(11);break}return u(p,new Promise(function(n){return(new N(n)).R(.1)}),12);case 12:for(b.mediaElement.removeAttribute("src"),b.mediaElement.load();b.mediaElement.lastChild;)b.mediaElement.removeChild(b.mediaElement.firstChild);
441
441
  case 11:if(!a.m){p.D(13);break}return u(p,a.m.destroy(),14);case 14:a.m=null;case 13:a.fb=null;a.N=null;if(a.i){d=r(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(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 Yl;a.hf=null;zm(a);B(p)}})}
442
442
  function em(a,b){var c,d,e,f,g;return F(function(h){if(1==h.g)return c=a.h.textDisplayFactory,d=c(),a.hf=c,e=Am(b.mediaElement,d,function(k,l,m){Bm(a,k,l,m)},a.M),e.configure(a.h.mediaSource),f=a.h.manifest,g=f.segmentRelativeVttTiming,e.J=g,u(h,e.K,2);a.I=e;B(h)})}
443
443
  function fm(a,b,c){var d,e,f,g;return F(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.H,a.fb=d,f=a,u(h,$g(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.Ld=h.h;a.K=a.Ld();g=ef(a.h.manifest);c.mediaElement&&"AUDIO"===c.mediaElement.nodeName&&(g.disableVideo=!0);a.K.configure(g);B(h)})}
444
- function gm(a,b){var c=b.uri;b=a.H;a.sa=new gk(function(){return a.Ja()});a.sa.addEventListener("regionadd",function(f){f=f.region;Cm(a,"timelineregionadded",f);if(a.G)a.G.onDashTimedMetadata(f)});a.ba=null;a.h.streaming.observeQualityChanges&&(a.ba=new ck(function(){return a.ib()}),a.ba.addEventListener("qualitychange",function(f){var g=f.quality;f=f.position;g=(new Map).set("mediaQuality",{bandwidth:g.bandwidth,audioSamplingRate:g.audioSamplingRate,codecs:g.codecs,contentType:g.contentType,frameRate:g.frameRate,
444
+ function gm(a,b){var c=b.uri;b=a.H;a.ua=new gk(function(){return a.Ja()});a.ua.addEventListener("regionadd",function(f){f=f.region;Cm(a,"timelineregionadded",f);if(a.G)a.G.onDashTimedMetadata(f)});a.ba=null;a.h.streaming.observeQualityChanges&&(a.ba=new ck(function(){return a.ib()}),a.ba.addEventListener("qualitychange",function(f){var g=f.quality;f=f.position;g=(new Map).set("mediaQuality",{bandwidth:g.bandwidth,audioSamplingRate:g.audioSamplingRate,codecs:g.codecs,contentType:g.contentType,frameRate:g.frameRate,
445
445
  height:g.height,mimeType:g.mimeType,channelsCount:g.channelsCount,pixelAspectRatio:g.pixelAspectRatio,width:g.width}).set("position",f);a.dispatchEvent(mm("mediaqualitychanged",g))}));var d={networkingEngine:b,modifyManifestRequest:function(f,g){var h=a.V;try{h.g.enabled&&(h.s=g.format,yl(h,f,{ot:Bl,su:!h.i}))}catch(k){Wa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",k)}},modifySegmentRequest:function(f,g){ol(a.V,f,g)},filter:function(f){return Dm(a,f)},makeTextStreamsForClosedCaptions:function(f){return Em(a,
446
- f)},onTimelineRegionAdded:function(f){var g=a.sa;a:{var h=r(g.g);for(var k=h.next();!k.done;k=h.next())if(k=k.value,k.schemeIdUri==f.schemeIdUri&&k.id==f.id&&k.startTime==f.startTime&&k.endTime==f.endTime){h=k;break a}h=null}null==h&&(g.g.add(f),f=new L("regionadd",new Map([["region",f]])),g.dispatchEvent(f))},onEvent:function(f){return a.dispatchEvent(f)},onError:function(f){return ym(a,f)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
446
+ f)},onTimelineRegionAdded:function(f){var g=a.ua;a:{var h=r(g.g);for(var k=h.next();!k.done;k=h.next())if(k=k.value,k.schemeIdUri==f.schemeIdUri&&k.id==f.id&&k.startTime==f.startTime&&k.endTime==f.endTime){h=k;break a}h=null}null==h&&(g.g.add(f),f=new L("regionadd",new Map([["region",f]])),g.dispatchEvent(f))},onEvent:function(f){return a.dispatchEvent(f)},onError:function(f){return ym(a,f)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
447
447
  enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&a.j.updateDuration()},newDrmInfo:function(f){var g=a.m?a.m.g:null;g&&a.m.C&&Fm(a,g.keySystem,f)}},e=Date.now()/1E3;return new Ye(function(){var f,g,h,k;return F(function(l){if(1==l.g)return f=a,u(l,a.K.start(c,d),2);f.i=l.h;g=mm("manifestparsed");a.dispatchEvent(g);if(0==a.i.variants.length)throw new M(2,4,4036);Gm(a.i);h=Date.now()/1E3;k=h-e;a.s.H=k;B(l)})}(),function(){return a.K.stop()})}
448
448
  function hm(a,b){var c,d;return F(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Hm(a,{Pb:a.H,onError:function(f){ym(a,f)},Gd:function(f){Im(a,f)},onExpirationUpdated:function(f,g){Jm(a,f,g)},onEvent:function(f){a.dispatchEvent(f);"drmsessionupdate"==f.type&&d&&(d=!1,a.s.j=Date.now()/1E3-c,a.M&&(f=a.M,f.g&&f.h.classList.add("shaka-hidden")))}}),a.m.configure(a.h.drm),u(e,ug(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.Cc(b.mediaElement),3):u(e,Dm(a,a.i),0)})}
449
449
  function im(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z;return F(function(A){switch(A.g){case 1:b.startTime=c.startTime;null!=a.Sc&&(b.startTime=a.Sc,a.Sc=null);d=b.mediaElement;e=b.uri;a.fb=e;a.J=new Yj({xd:function(){return d.playbackRate},ud:function(){return d.defaultPlaybackRate},Se:function(E){d.playbackRate=E},Qf:function(E){d.currentTime+=E}});f=function(){return Km(a)};g=function(){return Lm(a)};a.C.o(d,"playing",f);a.C.o(d,"pause",f);a.C.o(d,"ended",f);a.C.o(d,"ratechange",g);pm(a,a.h);
450
450
  h=a.h.abrFactory;a.B&&a.cf==h||(a.cf=h,a.B=h(),"function"!=typeof a.B.setMediaElement&&(Ee("AbrManager","Please use an AbrManager with setMediaElement function."),a.B.setMediaElement=function(){}),a.B.configure(a.h.abr));a.La=new Ne(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Xa=a.h.preferredTextLanguage;a.Lc=a.h.preferredTextRole;a.Fc=a.h.preferForcedSubs;Mm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.B.init(function(E,G,H){a.j&&E!=a.j.l&&
451
451
  Nm(a,E,!0,void 0===G?!1:G,void 0===H?0:H)});a.B.setMediaElement(d);Kd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Om(a);a.j.configure(a.h.streaming);a.l=Pm;d.textTracks&&a.C.o(d.textTracks,"addtrack",function(E){if(E.track)switch(E=E.track,E.kind){case "chapters":Qm(a,E)}});a.dispatchEvent(mm("streaming"));k=null;(l=a.j.l)||(k=nm(a));m=[];p=l||k;n=r([p.video,p.audio]);for(t=n.next();!t.done;t=n.next())(v=t.value)&&!v.segmentIndex&&
452
- m.push(v.createSegmentIndex());if(!(0<m.length)){A.D(2);break}return u(A,Promise.all(m),2);case 2:a.F=Rm(a,b.startTime);a.Za=Sm(a,b.Od);y=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Tm(a,y);if(l){A.D(4);break}Nm(a,k,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){A.D(5);break}w=a.F.ld();return u(A,Um(k,w),6);case 6:x=A.h,a.F.ke(x);case 5:Vm(a,null,me(k));case 4:return a.F.je(),C=a.zb().find(function(E){return E.active}),C||((z=we(a.i.textStreams,a.Xa,a.Lc,a.Fc)[0]||null)&&Xl(a.s.h,
453
- z,!0),k&&(z?(k.audio&&Wm(a,k.audio,z)&&(a.$=!0),a.$&&a.I.m.setTextVisibility(!0),Xm(a)):a.$=!1),z&&(a.h.streaming.alwaysStreamText||a.Nb())&&zk(a.j,z)),u(A,a.j.start(),7);case 7:a.h.abr.enabled&&(a.B.enable(),Ym(a)),ae(a.j?a.j.l:null,a.i),Zm(a.i),$m(a),an(a),a.i.variants.some(function(E){return E.primary}),a.Oc=!0,a.C.ya(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-c.Od}),B(A)}})}
452
+ m.push(v.createSegmentIndex());if(!(0<m.length)){A.D(2);break}return u(A,Promise.all(m),2);case 2:Mm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.F=Rm(a,b.startTime);a.Za=Sm(a,b.Od);y=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Tm(a,y);if(l){A.D(4);break}Nm(a,k,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){A.D(4);break}w=a.F.ld();return u(A,Um(k,w),6);case 6:x=A.h,a.F.ke(x);case 4:return a.F.je(),C=a.zb().find(function(E){return E.active}),C||((z=we(a.i.textStreams,
453
+ a.Xa,a.Lc,a.Fc)[0]||null)&&Xl(a.s.h,z,!0),k&&(z?(k.audio&&Vm(a,k.audio,z)&&(a.$=!0),a.$&&a.I.m.setTextVisibility(!0),Wm(a)):a.$=!1),z&&(a.h.streaming.alwaysStreamText||a.Nb())&&zk(a.j,z)),u(A,a.j.start(),7);case 7:a.h.abr.enabled&&(a.B.enable(),Xm(a)),ae(a.j?a.j.l:null,a.i),Ym(a.i),Zm(a),$m(a),a.i.variants.some(function(E){return E.primary}),a.Oc=!0,a.C.ra(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-c.Od}),B(A)}})}
454
454
  function jm(a,b,c){var d,e,f,g,h,k,l;return F(function(m){return 1==m.g?(d=Hb,e=Date.now()/1E3,f=!0,a.m=Hm(a,{Pb:a.H,onError:function(p){ym(a,p)},Gd:function(p){Im(a,p)},onExpirationUpdated:function(p,n){Jm(a,p,n)},onEvent:function(p){a.dispatchEvent(p);"drmsessionupdate"==p.type&&f&&(f=!1,a.s.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=bh(g),k=qm[h],"application/x-mpegurl"==k&&Uc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,
455
- primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Ad(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Ma,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
456
- a.m.X=!0,u(m,ug(a.m,[l],[]),2)):u(m,a.m.Cc(b.mediaElement),0)})}
455
+ primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Ad(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Ma,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,
456
+ decodingInfos:[]},a.m.X=!0,u(m,ug(a.m,[l],[]),2)):u(m,a.m.Cc(b.mediaElement),0)})}
457
457
  function km(a,b,c){function d(){return Km(a)}b.uri=c.uri;b.startTime=c.startTime;a.fb=b.uri;var e=b.mediaElement;a.F=new Mj(e);var f=!1;a.vb.push(function(){f=!0});null!=b.startTime&&a.F.ke(b.startTime);a.J=new Yj({xd:function(){return e.playbackRate},ud:function(){return e.defaultPlaybackRate},Se:function(k){e.playbackRate=k},Qf:function(k){e.currentTime+=k}});Tm(a,a.h.streaming.rebufferingGoal);a.C.o(e,"playing",d);a.C.o(e,"pause",d);a.C.o(e,"ended",d);a.C.o(e,"ratechange",function(){return Lm(a)});
458
- "none"!=e.preload&&a.C.ya(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-c.Od});e.audioTracks&&(a.C.o(e.audioTracks,"addtrack",function(){return $m(a)}),a.C.o(e.audioTracks,"removetrack",function(){return $m(a)}),a.C.o(e.audioTracks,"change",function(){return $m(a)}));e.textTracks&&(a.C.o(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":bn(a,k);break;case "chapters":Qm(a,k);break;default:$m(a)}}),a.C.o(e.textTracks,"removetrack",function(){return $m(a)}),
459
- a.C.o(e.textTracks,"change",function(){return $m(a)}));var g=bh(b.uri);e.src=zl(a.V,b.uri,qm[g]);(Sc()||Rc("Web0S"))&&e.load();a.l=cn;a.dispatchEvent(mm("streaming"));var h=new Jc;Dj(e,HTMLMediaElement.HAVE_METADATA,a.C,function(){a.F.je();h.resolve()});Dj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.C,function(){var k;return F(function(l){if(1==l.g)return dn(a),k=en(a),k.find(function(m){return"disabled"!=m.mode})?(0<k.length&&(a.$=!0),l.D(2)):u(l,new Promise(function(m){a.C.ya(e.textTracks,"change",m);
460
- (new N(m)).R(1)}),2);if(f)return l.return();fn(a);B(l)})});e.error?h.reject(xm(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.C.ya(e,"error",function(){h.reject(xm(a))});return(new Ye(h,function(){h.reject(new M(2,7,7001));return Promise.resolve()})).ma(function(){a.Oc=
461
- !0})}function dn(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Nd(b);var c=a.h.preferredVariantRole;""!=c&&a.Nd(b,c)}}function fn(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.Le(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.Le(b,d,c)}}
462
- function bn(a,b){if("metadata"==b.kind){b.mode="hidden";a.C.o(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,gn(a,e.startTime,e.endTime,e.type,e.value),a.G)a.G.onCueMetadataChange(e.value)});var c=(new N(function(){var d=hn(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Aa().R(.5);a.vb.push(function(){c.stop()})}}
463
- function Bm(a,b,c,d){b=r(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=r(e.frames),k=h.next();!k.done;k=h.next())gn(a,f,g,"org.id3",k.value);if(a.G)a.G.onHlsTimedMetadata(e,f)}}function gn(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(mm("metadata",b))}
458
+ "none"!=e.preload&&a.C.ra(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-c.Od});e.audioTracks&&(a.C.o(e.audioTracks,"addtrack",function(){return Zm(a)}),a.C.o(e.audioTracks,"removetrack",function(){return Zm(a)}),a.C.o(e.audioTracks,"change",function(){return Zm(a)}));e.textTracks&&(a.C.o(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":an(a,k);break;case "chapters":Qm(a,k);break;default:Zm(a)}}),a.C.o(e.textTracks,"removetrack",function(){return Zm(a)}),
459
+ a.C.o(e.textTracks,"change",function(){return Zm(a)}));var g=bh(b.uri);e.src=zl(a.V,b.uri,qm[g]);(Sc()||Rc("Web0S"))&&e.load();a.l=bn;a.dispatchEvent(mm("streaming"));var h=new Jc;Dj(e,HTMLMediaElement.HAVE_METADATA,a.C,function(){a.F.je();h.resolve()});Dj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.C,function(){var k;return F(function(l){if(1==l.g)return cn(a),k=dn(a),k.find(function(m){return"disabled"!=m.mode})?(0<k.length&&(a.$=!0),l.D(2)):u(l,new Promise(function(m){a.C.ra(e.textTracks,"change",m);
460
+ (new N(m)).R(1)}),2);if(f)return l.return();en(a);B(l)})});e.error?h.reject(xm(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.C.ra(e,"error",function(){h.reject(xm(a))});return(new Ye(h,function(){h.reject(new M(2,7,7001));return Promise.resolve()})).ma(function(){a.Oc=
461
+ !0})}function cn(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Nd(b);var c=a.h.preferredVariantRole;""!=c&&a.Nd(b,c)}}function en(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.Le(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.Le(b,d,c)}}
462
+ function an(a,b){if("metadata"==b.kind){b.mode="hidden";a.C.o(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,fn(a,e.startTime,e.endTime,e.type,e.value),a.G)a.G.onCueMetadataChange(e.value)});var c=(new N(function(){var d=gn(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Aa().R(.5);a.vb.push(function(){c.stop()})}}
463
+ function Bm(a,b,c,d){b=r(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=r(e.frames),k=h.next();!k.done;k=h.next())fn(a,f,g,"org.id3",k.value);if(a.G)a.G.onHlsTimedMetadata(e,f)}}function fn(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(mm("metadata",b))}
464
464
  function Qm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new N(function(){b.mode="hidden"})).Aa().R(.5);a.vb.push(function(){c.stop()})}}function Gm(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 Hm(a,b){return new ng(b,a.h.drm.updateExpirationTime)}
465
465
  function am(a){return new jf(function(b,c){a.B&&a.B.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(mm("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(mm("downloadfailed",b))})}
466
- function Rm(a,b){return new Nj(a.g,a.i,a.h.streaming,b,function(){a.Za&&bk(a.Za,!0);a.j&&a.j.Yc();a.N&&jn(a)},function(c){return a.dispatchEvent(c)})}
467
- function Sm(a,b){b=new hk(a.sa,a.S()||0<b);b.addEventListener("enter",function(d){Cm(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){Cm(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Cm(a,"timelineregionenter",e),Cm(a,"timelineregionexit",e))});var c=new ak(a.g);c.g.add(b);a.ba&&c.g.add(a.ba);return c}function Tm(a,b){a.N=new Re;a.N.g=Te;Ue(a.N,b,Math.min(.5,b/2));zm(a);a.Ed=(new N(function(){jn(a)})).ka(.25)}
468
- function jn(a){switch(a.l){case cn:if(a.g.ended)var b=!0;else{var c=Ei(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Pm:a:if(a.g.ended||bj(a.I))b=!0;else{if(a.i.presentationTimeline.S()){c=a.i.presentationTimeline.Ib();var d=Ei(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Gi(a.g.buffered,a.g.currentTime);c=a.N;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Se:Te;c.g=d;b!=d&&zm(a)}function Am(a,b,c,d){return new Wi(a,b,c,d)}
466
+ function Rm(a,b){return new Nj(a.g,a.i,a.h.streaming,b,function(){a.Za&&bk(a.Za,!0);a.j&&a.j.Yc();a.N&&hn(a)},function(c){return a.dispatchEvent(c)})}
467
+ function Sm(a,b){b=new hk(a.ua,a.S()||0<b);b.addEventListener("enter",function(d){Cm(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){Cm(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Cm(a,"timelineregionenter",e),Cm(a,"timelineregionexit",e))});var c=new ak(a.g);c.g.add(b);a.ba&&c.g.add(a.ba);return c}function Tm(a,b){a.N=new Re;a.N.g=Te;Ue(a.N,b,Math.min(.5,b/2));zm(a);a.Ed=(new N(function(){hn(a)})).ka(.25)}
468
+ function hn(a){switch(a.l){case bn:if(a.g.ended)var b=!0;else{var c=Ei(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Pm:a:if(a.g.ended||bj(a.I))b=!0;else{if(a.i.presentationTimeline.S()){c=a.i.presentationTimeline.Ib();var d=Ei(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Gi(a.g.buffered,a.g.currentTime);c=a.N;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Se:Te;c.g=d;b!=d&&zm(a)}function Am(a,b,c,d){return new Wi(a,b,c,d)}
469
469
  function wm(a){return new nl({getBandwidthEstimate:function(){return a.B?a.B.getBandwidthEstimate():NaN},ib:function(){return a.ib()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Qa:function(){return a.Qa()},yb:function(){return a.yb()},S:function(){return a.S()}},a.h.cmcd)}
470
- function Om(a){return new nk(a.i,{wd:function(){return a.F?a.F.ld():0},getBandwidthEstimate:function(){return a.B.getBandwidthEstimate()},modifySegmentRequest:function(b,c){ol(a.V,b,c)},T:a.I,Pb:a.H,onError:function(b){return ym(a,b)},onEvent:function(b){return a.dispatchEvent(b)},rh:function(){a.K&&a.K.update&&a.K.update()},Fe:function(b,c,d){a.F&&a.F.Rf();jn(a);b=(new Map).set("start",b).set("end",c).set("contentType",d);a.dispatchEvent(mm("segmentappended",b))},qh:function(b,c){(c=c.ze)&&a.ba&&
470
+ function Om(a){return new nk(a.i,{wd:function(){return a.F?a.F.ld():0},getBandwidthEstimate:function(){return a.B.getBandwidthEstimate()},modifySegmentRequest:function(b,c){ol(a.V,b,c)},T:a.I,Pb:a.H,onError:function(b){return ym(a,b)},onEvent:function(b){return a.dispatchEvent(b)},rh:function(){a.K&&a.K.update&&a.K.update()},Fe:function(b,c,d){a.F&&a.F.Rf();hn(a);b=(new Map).set("start",b).set("end",c).set("contentType",d);a.dispatchEvent(mm("segmentappended",b))},qh:function(b,c){(c=c.ze)&&a.ba&&
471
471
  ek(a.ba,c,b)},vf:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&!d.K&&["audio","video"].includes(b)){c=new Rf(Fc(c));var e=0,f=r(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=r(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;Dg(d,"cenc",e);d=d.s}}else d=Promise.resolve();return d},sh:function(b,c,d){Bm(a,b,c,d)}})}
472
472
  q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Jl(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(Ee("streaming.forceTransmuxTS configuration","Please Use streaming.forceTransmux instead."),a.streaming.forceTransmux=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=
473
- .01));var c=Rl(this.h,a,$l(this));kn(this);return c};
474
- function kn(a){if(a.K){var b=ef(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.K.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{ln(a,a.i)}catch(f){ym(a,f)}a.B&&an(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||mn(a)}a.H&&a.H.Qe(a.h.streaming.forceHTTPS);if(a.I&&(a.I.configure(a.h.mediaSource),a.I.J=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.hf!=b)){var c=b(),d=a.I,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),
475
- e.destroy());d.g&&(d.g.j=c);a.hf=b;a.j&&(b=a.j,(c=b.j.get(Gb))&&xk(b,c.stream,!0,0,!0))}a.B&&(a.B.configure(a.h.abr),a.h.abr.enabled?a.B.enable():a.B.disable(),Ym(a));a.N&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ue(a.N,b,Math.min(.5,b/2)));a.i&&Mm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=$l(this);Rl(a,this.h,$l(this));return a};
476
- q.Bg=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.Ja().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};q.Eh=function(){for(var a in this.h)delete this.h[a];Rl(this.h,$l(this),$l(this));kn(this)};q.pe=function(){return this.l};q.Sg=function(){return this.g};q.Ic=function(){return this.H};q.oe=function(){return this.fb};
473
+ .01));var c=Rl(this.h,a,$l(this));jn(this);return c};
474
+ function jn(a){if(a.K){var b=ef(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.K.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{kn(a,a.i)}catch(f){ym(a,f)}a.B&&$m(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||ln(a)}a.H&&a.H.Qe(a.h.streaming.forceHTTPS);if(a.I&&(a.I.configure(a.h.mediaSource),a.I.J=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.hf!=b)){var c=b(),d=a.I,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),
475
+ e.destroy());d.g&&(d.g.j=c);a.hf=b;a.j&&(b=a.j,(c=b.j.get(Gb))&&xk(b,c.stream,!0,0,!0))}a.B&&(a.B.configure(a.h.abr),a.h.abr.enabled?a.B.enable():a.B.disable(),Xm(a));a.N&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ue(a.N,b,Math.min(.5,b/2)));a.i&&Mm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=$l(this);Rl(a,this.h,$l(this));return a};
476
+ q.Bg=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.Ja().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};q.Eh=function(){for(var a in this.h)delete this.h[a];Rl(this.h,$l(this),$l(this));jn(this)};q.pe=function(){return this.l};q.Sg=function(){return this.g};q.Ic=function(){return this.H};q.oe=function(){return this.fb};
477
477
  q.td=function(){return this.G?this.G:null};q.S=function(){return this.i?this.i.presentationTimeline.S():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Lb=function(){return this.i?this.i.presentationTimeline.Lb():!1};q.ic=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};
478
478
  q.Ja=function(){if(!this.Oc)return{start:0,end:0};if(this.i){var a=this.i.presentationTimeline;return{start:a.ec(),end:a.jb()}}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}};q.eh=function(){this.S()&&(this.g.currentTime=this.Ja().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.Hc=function(){return this.m?this.m.Hc():Infinity};
479
- q.vd=function(){return this.m?this.m.vd():{}};q.Qc=function(){return this.N?this.N.g==Te:!1};q.yb=function(){return this.g?this.J?this.J.i:1:0};q.bf=function(a){0==a?Ua("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.J.set(a),this.l==Pm&&(this.B.playbackRateChanged(a),wk(this.j,1<Math.abs(a))))};q.xf=function(){var a=this.J.ud();this.l==cn&&this.J.set(a);this.l==Pm&&(this.J.set(a),this.B.playbackRateChanged(a),wk(this.j,!1))};
479
+ q.vd=function(){return this.m?this.m.vd():{}};q.Qc=function(){return this.N?this.N.g==Te:!1};q.yb=function(){return this.g?this.J?this.J.i:1:0};q.bf=function(a){0==a?Ua("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.J.set(a),this.l==Pm&&(this.B.playbackRateChanged(a),wk(this.j,1<Math.abs(a))))};q.xf=function(){var a=this.J.ud();this.l==bn&&this.J.set(a);this.l==Pm&&(this.J.set(a),this.B.playbackRateChanged(a),wk(this.j,!1))};
480
480
  q.Qa=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=r(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,ue(e)){var f=me(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 te(g)}):[]};
481
- q.zb=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=ne(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?en(this).map(function(f){return re(f)}):[]};q.Kg=function(){return this.i?this.i.imageStreams.map(function(a){return oe(a)}):[]};
481
+ q.zb=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=ne(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?dn(this).map(function(f){return re(f)}):[]};q.Kg=function(){return this.i?this.i.imageStreams.map(function(a){return oe(a)}):[]};
482
482
  q.$g=function(a,b){var c=this,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,G;return F(function(H){if(1==H.g)return c.i?(d=c.i.imageStreams.find(function(J){return J.id==a}))?d.segmentIndex?H.D(3):u(H,d.createSegmentIndex(),3):H.return(null):H.D(2);if(2!=H.g){e=d.segmentIndex.find(b);if(null==e)return H.return(null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return H.return(null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);p=parseInt(h[2],10);n=k/m;t=l/p;v=m*p;
483
483
  y=f.l-f.startTime;w=f.B||y/v;x=f.startTime;z=C=0;1<v&&(A=Math.floor((b-f.startTime)/w),x=f.startTime+A*w,C=A%m*n,z=Math.floor(A/m)*t);E=!1;if(G=f.s)E=!0,t=G.height,C=G.positionX,z=G.positionY,n=G.width;return H.return({imageHeight:l,imageWidth:k,height:t,positionX:C,positionY:z,startTime:x,duration:w,uris:f.Pa(),width:n,sprite:E})}return H.return(null)})};
484
- q.Me=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(Xl(this.s.h,b,!1),zk(this.j,b),nn(this),this.Xa=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=en(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,pe(c)==a.id?c.mode=this.$?"showing":"hidden":c.mode="disabled";nn(this)}};
485
- q.Ne=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&&ue(d)&&(Nm(this,d,!1,b,c),this.La=new Me(d),an(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=r(b),c=b.next();!c.done;c=b.next())if(c=c.value,
486
- pe(c)==a.id){on(this,c);break}};q.Ag=function(){return pn(this.Qa())};q.Yg=function(){return pn(this.zb())};q.zg=function(){return Array.from(qn(this.Qa()))};q.Xg=function(){return Array.from(qn(this.zb()))};
487
- q.Nd=function(a,b,c){c=void 0===c?0:c;if(this.i&&this.F){this.La=new Ne(a,b||"",c,"");b=function(h,k){return h.video||k.video?h.video&&k.video?Math.abs((h.video.height||0)-(k.video.height||0))+Math.abs((h.video.width||0)-(k.video.width||0)):Infinity:0};a=this.j.l;var d=this.La.create(this.i.variants);c=null;d=r(d.values());for(var e=d.next();!e.done;e=d.next())if(e=e.value,!c||b(c,a)>b(e,a))c=e;c?(b=me(c),this.Ne(b,!0)):mn(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);
488
- a=Kb(a);d=c=null;e=r(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=te(f);Kb(g.language)==a&&(c=f,b?g.roles.includes(b)&&(d=f):0==g.roles.length&&(d=f))}d?on(this,d):c&&on(this,c)}};
489
- q.Le=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.F){if(this.Xa=a,this.Lc=b||"",this.Fc=c,(a=we(this.i.textStreams,this.Xa,this.Lc,this.Fc)[0]||null)&&a!=this.j.s&&(Xl(this.s.h,a,!1),this.h.streaming.alwaysStreamText||this.Nb()))zk(this.j,a),nn(this)}else{var d=Kb(a);(a=this.zb().find(function(e){return Kb(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Me(a)}};
490
- q.Hh=function(a){if(this.i&&this.F){for(var b=null,c=r(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.La=new Ne(b.language,"",0,a),mn(this))}else if(this.g&&this.g.audioTracks){c=Array.from(this.g.audioTracks);b=null;c=r(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&on(this,b)}};
491
- q.Nb=function(){var a=this.$;return this.I?this.I.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?en(this).some(function(b){return"showing"==b.mode}):a};q.If=function(){return this.g&&this.g.src&&this.g.textTracks?rn(this).map(function(a){return re(a)}):[]};
492
- q.Dg=function(a){var b=Kb(a),c=rn(this).filter(function(h){return Kb(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=r(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=r(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};
493
- function en(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function hn(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function rn(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
494
- q.Ve=function(a){a=!!a;if(this.$!=a){this.$=a;if(this.l==Pm)this.I.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.s||(a=we(this.i.textStreams,this.Xa,this.Lc,this.Fc),0<a.length&&(zk(this.j,a[0]),nn(this))):vk(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=en(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Xm(this)}};
495
- q.Ug=function(){if(!this.S())return null;var a=this.ua.l,b=0;if(this.F)b=this.F.ld();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.i+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
496
- q.Kf=function(){if(!this.S())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.i);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.ib=function(){if(this.l==Pm)return this.I.ib();var a={total:[],audio:[],video:[],text:[]};this.l==cn&&(a.total=Hi(this.g.buffered));return a};
497
- q.getStats=function(){if(this.l!=Pm&&this.l!=cn)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped: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:[]};Km(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.s;b=
484
+ q.Me=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(Xl(this.s.h,b,!1),zk(this.j,b),mn(this),this.Xa=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=dn(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,pe(c)==a.id?c.mode=this.$?"showing":"hidden":c.mode="disabled";mn(this)}};
485
+ q.Ne=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&&ue(d)&&(Nm(this,d,!1,b,c),this.La=new Me(d),$m(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=r(b),c=b.next();!c.done;c=b.next())if(c=c.value,
486
+ pe(c)==a.id){nn(this,c);break}};q.Ag=function(){return on(this.Qa())};q.Yg=function(){return on(this.zb())};q.zg=function(){return Array.from(pn(this.Qa()))};q.Xg=function(){return Array.from(pn(this.zb()))};
487
+ q.Nd=function(a,b,c){c=void 0===c?0:c;if(this.i&&this.F){this.La=new Ne(a,b||"",c,"");b=function(h,k){return h.video||k.video?h.video&&k.video?Math.abs((h.video.height||0)-(k.video.height||0))+Math.abs((h.video.width||0)-(k.video.width||0)):Infinity:0};a=this.j.l;var d=this.La.create(this.i.variants);c=null;d=r(d.values());for(var e=d.next();!e.done;e=d.next())if(e=e.value,!c||b(c,a)>b(e,a))c=e;c?(b=me(c),this.Ne(b,!0)):ln(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);
488
+ a=Kb(a);d=c=null;e=r(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=te(f);Kb(g.language)==a&&(c=f,b?g.roles.includes(b)&&(d=f):0==g.roles.length&&(d=f))}d?nn(this,d):c&&nn(this,c)}};
489
+ q.Le=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.F){if(this.Xa=a,this.Lc=b||"",this.Fc=c,(a=we(this.i.textStreams,this.Xa,this.Lc,this.Fc)[0]||null)&&a!=this.j.s&&(Xl(this.s.h,a,!1),this.h.streaming.alwaysStreamText||this.Nb()))zk(this.j,a),mn(this)}else{var d=Kb(a);(a=this.zb().find(function(e){return Kb(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Me(a)}};
490
+ q.Hh=function(a){if(this.i&&this.F){for(var b=null,c=r(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.La=new Ne(b.language,"",0,a),ln(this))}else if(this.g&&this.g.audioTracks){c=Array.from(this.g.audioTracks);b=null;c=r(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&nn(this,b)}};
491
+ q.Nb=function(){var a=this.$;return this.I?this.I.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?dn(this).some(function(b){return"showing"==b.mode}):a};q.If=function(){return this.g&&this.g.src&&this.g.textTracks?qn(this).map(function(a){return re(a)}):[]};
492
+ q.Dg=function(a){var b=Kb(a),c=qn(this).filter(function(h){return Kb(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=r(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=r(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};
493
+ function dn(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function gn(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function qn(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
494
+ q.Ve=function(a){a=!!a;if(this.$!=a){this.$=a;if(this.l==Pm)this.I.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.s||(a=we(this.i.textStreams,this.Xa,this.Lc,this.Fc),0<a.length&&(zk(this.j,a[0]),mn(this))):vk(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=dn(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Wm(this)}};
495
+ q.Ug=function(){if(!this.S())return null;var a=this.va.l,b=0;if(this.F)b=this.F.ld();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.i+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
496
+ q.Kf=function(){if(!this.S())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.i);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.ib=function(){if(this.l==Pm)return this.I.ib();var a={total:[],audio:[],video:[],text:[]};this.l==bn&&(a.total=Hi(this.g.buffered));return a};
497
+ q.getStats=function(){if(this.l!=Pm&&this.l!=bn)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped: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:[]};Km(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.s;b=
498
498
  Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.F&&(this.s.N=this.F.pf(),this.s.P=this.F.qf());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.M=Number(c.droppedVideoFrames);b.K=d;this.s.J=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.J?c.J:NaN):c=NaN;this.s.B=c;if(this.l==Pm){if(c=this.j.l)this.s.F=(this.J?this.J.i:1)*c.bandwidth;c&&c.video&&(b=this.s,d=c.video.height||NaN,b.s=c.video.width||NaN,b.l=d);this.S()&&(c=this.Kf().valueOf()+
499
- 1E3*this.Ja().end,this.s.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.s.I=this.i.presentationTimeline.g);c=this.B.getBandwidthEstimate();this.s.C=c}this.l==cn&&(c=this.s,b=a.videoHeight||NaN,c.s=a.videoWidth||NaN,c.l=b);var e=this.s;a=e.s;c=e.l;b=e.F;d=e.K;var f=e.M,g=e.J,h=e.P,k=e.N,l=e.C,m=e.i,p=e.m,n=e.H,t=e.j,v=Ul(e.g,"playing"),y=Ul(e.g,"paused"),w=Ul(e.g,"buffering"),x=e.B,C=e.G,z=e.I,A=Vl(e.g),E=[];e=r(e.h.g);for(var G=e.next();!G.done;G=e.next())G=G.value,E.push({timestamp:G.timestamp,
499
+ 1E3*this.Ja().end,this.s.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.s.I=this.i.presentationTimeline.g);c=this.B.getBandwidthEstimate();this.s.C=c}this.l==bn&&(c=this.s,b=a.videoHeight||NaN,c.s=a.videoWidth||NaN,c.l=b);var e=this.s;a=e.s;c=e.l;b=e.F;d=e.K;var f=e.M,g=e.J,h=e.P,k=e.N,l=e.C,m=e.i,p=e.m,n=e.H,t=e.j,v=Ul(e.g,"playing"),y=Ul(e.g,"paused"),w=Ul(e.g,"buffering"),x=e.B,C=e.G,z=e.I,A=Vl(e.g),E=[];e=r(e.h.g);for(var G=e.next();!G.done;G=e.next())G=G.value,E.push({timestamp:G.timestamp,
500
500
  id:G.id,type:G.type,fromAdaptation:G.fromAdaptation,bandwidth:G.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:p,manifestTimeSeconds:n,drmTimeSeconds:t,playTime:v,pauseTime:y,bufferingTime:w,licenseTime:x,liveLatency:C,maxSegmentDuration:z,stateHistory:A,switchHistory:E}};
501
- q.mg=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,p,n,t,v,y,w,x,C;return F(function(z){switch(z.g){case 1:if(h.l!=Pm&&h.l!=cn)throw new M(1,7,7004);if(d){z.D(2);break}return u(z,sn(h,a),3);case 3:d=z.h;case 2:k=[];if(h.G)try{k=h.G.getServerSideCuePoints()}catch(A){}if(h.l!=cn){z.D(4);break}g&&(c="forced");return u(z,tn(h,a,b,c,d,f||"",k),5);case 5:l=h.zb();if(m=l.find(function(A){return A.language==b&&A.label==(f||"")&&A.kind==c}))return $m(h),z.return(m);throw new M(1,2,2012);case 4:p=
502
- Hb;n=h.i.presentationTimeline.getDuration();if(Infinity==n)throw new M(1,4,4033);if(!k.length){z.D(6);break}return u(z,un(h,a,h.H,h.h.streaming.retryParameters),7);case 7:t=z.h,v=vn(h,t,d,k),y=new Blob([v],{type:"text/vtt"}),a=Zi(y),d="text/vtt";case 6:w={id:h.kf++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Wj(0,n,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:p.ea,primary:!1,trickModeVideo:null,
503
- emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};x=wd(w.mimeType,w.codecs);C=Cd(x);if(!C)throw new M(2,2,2014,d);h.i.textStreams.push(w);$m(h);return z.return(ne(w))}})};
504
- q.ng=function(a,b){var c=this,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C;return F(function(z){switch(z.g){case 1:if(c.l!=Pm&&c.l!=cn)throw new M(1,7,7004);if(c.l==cn)throw new M(1,2,2016);if(b){z.D(2);break}return u(z,sn(c,a),3);case 3:b=z.h;case 2:if("text/vtt"!=b)throw new M(1,2,2017,a);d=Hb;e=c.i.presentationTimeline.getDuration();if(Infinity==e)throw new M(1,4,4045);return u(z,un(c,a,c.H,c.h.streaming.retryParameters),4);case 4:f=z.h;g=Dd[b];if(!g)throw new M(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,
501
+ q.mg=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,p,n,t,v,y,w,x,C;return F(function(z){switch(z.g){case 1:if(h.l!=Pm&&h.l!=bn)throw new M(1,7,7004);if(d){z.D(2);break}return u(z,rn(h,a),3);case 3:d=z.h;case 2:k=[];if(h.G)try{k=h.G.getServerSideCuePoints()}catch(A){}if(h.l!=bn){z.D(4);break}g&&(c="forced");return u(z,sn(h,a,b,c,d,f||"",k),5);case 5:l=h.zb();if(m=l.find(function(A){return A.language==b&&A.label==(f||"")&&A.kind==c}))return Zm(h),z.return(m);throw new M(1,2,2012);case 4:p=
502
+ Hb;n=h.i.presentationTimeline.getDuration();if(Infinity==n)throw new M(1,4,4033);if(!k.length){z.D(6);break}return u(z,tn(h,a,h.H,h.h.streaming.retryParameters),7);case 7:t=z.h,v=un(h,t,d,k),y=new Blob([v],{type:"text/vtt"}),a=Zi(y),d="text/vtt";case 6:w={id:h.kf++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Wj(0,n,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:p.ea,primary:!1,trickModeVideo:null,
503
+ emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!0};x=wd(w.mimeType,w.codecs);C=Cd(x);if(!C)throw new M(2,2,2014,d);h.i.textStreams.push(w);Zm(h);return z.return(ne(w))}})};
504
+ q.ng=function(a,b){var c=this,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C;return F(function(z){switch(z.g){case 1:if(c.l!=Pm&&c.l!=bn)throw new M(1,7,7004);if(c.l==bn)throw new M(1,2,2016);if(b){z.D(2);break}return u(z,rn(c,a),3);case 3:b=z.h;case 2:if("text/vtt"!=b)throw new M(1,2,2017,a);d=Hb;e=c.i.presentationTimeline.getDuration();if(Infinity==e)throw new M(1,4,4045);return u(z,tn(c,a,c.H,c.h.streaming.retryParameters),4);case 4:f=z.h;g=Dd[b];if(!g)throw new M(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,
505
505
  segmentEnd:e,vttOffset:0};l=Fc(f);m=h.parseMedia(l,k);p=[];n={};t=r(m);for(v=t.next();!v.done;n={vc:n.vc},v=t.next())y=v.value,n.vc=Bb([a],[y.payload])[0],w=new Ai(y.startTime,y.endTime,function(A){return function(){return[A.vc]}}(n),0,null,null,0,0,Infinity),n.vc.includes("#xywh")&&(x=n.vc.split("#xywh=")[1].split(","),4===x.length&&w.ag({height:parseInt(x[3],10),positionX:parseInt(x[0],10),positionY:parseInt(x[1],10),width:parseInt(x[2],10)})),p.push(w);C={id:c.kf++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},
506
- segmentIndex:new Tj(p),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Bc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1"};c.i.imageStreams.push(C);$m(c);return z.return(oe(C))}})};
507
- q.lg=function(a,b,c){var d=this,e,f,g,h;return F(function(k){switch(k.g){case 1:if(d.l!=Pm&&d.l!=cn)throw new M(1,7,7004);if(c){k.D(2);break}return u(k,sn(d,a),3);case 3:c=k.h;case 2:e=[];if(d.G)try{e=d.G.getServerSideCuePoints()}catch(l){}return u(k,tn(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.If();h=g.find(function(l){return l.language==b});if(!h){k.D(5);break}return u(k,new Promise(function(l,m){d.C.ya(f,"load",l);d.C.ya(f,"error",function(){m(new M(1,2,2015))})}),6);case 6:return k.return(h);
508
- case 5:throw new M(1,2,2012);}})};function sn(a,b){var c,d;return F(function(e){switch(e.g){case 1:c=bh(b);if(d=wn[c])return e.return(d);D(e,2);return u(e,dh(b,a.H,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:wa(e);case 3:if(d)return e.return(d);throw new M(1,2,2011,c);}})}
509
- function tn(a,b,c,d,e,f,g){var h,k,l,m;return F(function(p){if(1==p.g)return"text/vtt"!=e||g.length?u(p,un(a,b,a.H,a.h.streaming.retryParameters),3):p.D(2);2!=p.g&&(h=p.h,k=vn(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Zi(l),e="text/vtt");m=document.createElement("track");var n=a.V,t=b;try{if(n.g.enabled){var v=Al(n);v.ot=Gl;v.su=!0;var y=Cl(v);var w=Dl(t,y)}else w=t}catch(x){Wa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",x),w=t}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
510
- a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return p.return(m)})}function un(a,b,c,d){var e,f,g;return F(function(h){if(1==h.g){e=tf;f=nf([b],d);f.method="GET";var k=a.V;try{k.g.enabled&&yl(k,f,{ot:Gl,su:!0})}catch(l){Wa("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)})}
511
- function vn(a,b,c,d){var e=Dd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=Fc(b),b=c.parseMedia(b,a),ml(b,d);throw new M(2,2,2014,c);}q.Re=function(a,b){this.Rc.width=a;this.Rc.height=b};q.Ie=function(a){if(this.l==Pm){var b=this.j;a=void 0===a?.1:a;if(b.h.g)b=!1;else if(b.B)b=!1;else{for(var c=r(b.j.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Nc||d.Ia||d.eb||(d.Nc=!1,uk(b,d,a));b=!0}}else b=!1;return b};
506
+ segmentIndex:new Tj(p),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Bc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",external:!0};c.i.imageStreams.push(C);Zm(c);return z.return(oe(C))}})};
507
+ q.lg=function(a,b,c){var d=this,e,f,g,h;return F(function(k){switch(k.g){case 1:if(d.l!=Pm&&d.l!=bn)throw new M(1,7,7004);if(c){k.D(2);break}return u(k,rn(d,a),3);case 3:c=k.h;case 2:e=[];if(d.G)try{e=d.G.getServerSideCuePoints()}catch(l){}return u(k,sn(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.If();h=g.find(function(l){return l.language==b});if(!h){k.D(5);break}return u(k,new Promise(function(l,m){d.C.ra(f,"load",l);d.C.ra(f,"error",function(){m(new M(1,2,2015))})}),6);case 6:return k.return(h);
508
+ case 5:throw new M(1,2,2012);}})};function rn(a,b){var c,d;return F(function(e){switch(e.g){case 1:c=bh(b);if(d=vn[c])return e.return(d);D(e,2);return u(e,dh(b,a.H,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:wa(e);case 3:if(d)return e.return(d);throw new M(1,2,2011,c);}})}
509
+ function sn(a,b,c,d,e,f,g){var h,k,l,m;return F(function(p){if(1==p.g)return"text/vtt"!=e||g.length?u(p,tn(a,b,a.H,a.h.streaming.retryParameters),3):p.D(2);2!=p.g&&(h=p.h,k=un(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Zi(l),e="text/vtt");m=document.createElement("track");var n=a.V,t=b;try{if(n.g.enabled){var v=Al(n);v.ot=Gl;v.su=!0;var y=Cl(v);var w=Dl(t,y)}else w=t}catch(x){Wa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",x),w=t}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
510
+ a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return p.return(m)})}function tn(a,b,c,d){var e,f,g;return F(function(h){if(1==h.g){e=tf;f=nf([b],d);f.method="GET";var k=a.V;try{k.g.enabled&&yl(k,f,{ot:Gl,su:!0})}catch(l){Wa("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)})}
511
+ function un(a,b,c,d){var e=Dd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=Fc(b),b=c.parseMedia(b,a),ml(b,d);throw new M(2,2,2014,c);}q.Re=function(a,b){this.Rc.width=a;this.Rc.height=b};q.Ie=function(a){if(this.l==Pm){var b=this.j;a=void 0===a?.1:a;if(b.h.g)b=!1;else if(b.B)b=!1;else{for(var c=r(b.j.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Nc||d.Ia||d.eb||(d.Nc=!1,uk(b,d,a));b=!0}}else b=!1;return b};
512
512
  q.Pg=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};q.Qg=function(){return this.Ld};
513
513
  function $l(a){var b=Pl();b.streaming.failureCallback=function(c){if(a.S()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Ie(d))}};b.textDisplayFactory=function(){return a.Cd?new el(a.g,a.Cd):new Zk(a.g)};return b}q.We=function(a){this.Cd=a};
514
514
  function Em(a,b){for(var c=new Set,d=r(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=r(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=r(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 Xj;h={id:a.kf++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
515
- segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Gb,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 Dm(a,b){return F(function(c){if(1==c.g)return u(c,xn(a,b),2);ln(a,b);B(c)})}
516
- function xn(a,b){var c;return F(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,Zd(c,b),2);Zm(b);B(d)})}function ln(a,b){if(a.l!=rm){Yd(b.variants,a.h.restrictions,a.Rc)&&a.j&&$m(a);var c=a.m?a.m.g:null;if(c&&a.m.C)for(var d=r(b.variants),e=d.next();!e.done;e=d.next())e=e.value,Fm(a,c.keySystem,e.video),Fm(a,c.keySystem,e.audio);yn(a,b)}}
515
+ segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Gb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1};b.textStreams.push(h);c.add(g)}}function Dm(a,b){return F(function(c){if(1==c.g)return u(c,wn(a,b),2);kn(a,b);B(c)})}
516
+ function wn(a,b){var c;return F(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,Zd(c,b),2);Ym(b);B(d)})}function kn(a,b){if(a.l!=rm){Yd(b.variants,a.h.restrictions,a.Rc)&&a.j&&Zm(a);var c=a.m?a.m.g:null;if(c&&a.m.C)for(var d=r(b.variants),e=d.next();!e.done;e=d.next())e=e.value,Fm(a,c.keySystem,e.video),Fm(a,c.keySystem,e.audio);xn(a,b)}}
517
517
  function Fm(a,b,c){if(c){c=r(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=r(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,Dg(a.m,e.initDataType,e.initData)}}}
518
518
  function Um(a,b){var c,d,e,f,g;return F(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,p,n;return F(function(t){if(1==t.g)return k?u(t,k.createSegmentIndex(),2):t.return(null);p=(m=k.segmentIndex.cc(l))?m.next().value:null;if(!p)return t.return(null);n=p.startTime;return t.return(n)})},u(h,e(c,b),2);if(3!=h.g)return f=h.h,u(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
519
519
  function zm(a){var b=a.Qc();if(a.s&&a.N&&a.F){var c=a.J;c.j=b;Zj(c);a.V&&(c=a.V,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);Km(a)}b=(new Map).set("buffering",b);a.dispatchEvent(mm("buffering",b))}function Lm(a){var b=a.g.playbackRate;0!=b&&(a.J&&a.J.set(b),b=mm("ratechange"),a.dispatchEvent(b))}function Km(a){if(a.s&&a.N){var b=a.s.g;a.N.g==Te?Tl(b,"buffering"):a.g.paused?Tl(b,"paused"):a.g.ended?Tl(b,"ended"):Tl(b,"playing")}}
520
- function an(a){try{yn(a,a.i)}catch(c){return ym(a,c),!1}var b=a.i.variants.filter(function(c){return ue(c)});b=a.La.create(b);a.B.setVariants(Array.from(b.values()));return!0}function nm(a){return an(a)?a.B.chooseVariant():null}function mn(a){var b=nm(a);b&&Nm(a,b,!0,!0,0)}
521
- function Nm(a,b,c,d,e){var f=a.j.l;if(b==f)d&&yk(a.j,b,d,e,!0);else{var g=a.s.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));yk(a.j,b,d,e,void 0,c);d=null;f&&(d=me(f));b=me(b);c?Vm(a,d,b):zn(a,d,b)}}function on(a,b){var c=Array.from(a.g.audioTracks).find(function(d){return d.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=te(c);b=te(b);zn(a,c,b)}
522
- function Wm(a,b,c){if(0==a.h.autoShowText)return!1;if(1==a.h.autoShowText)return!0;var d=Kb(a.h.preferredTextLanguage);c=Kb(c.language);if(2==a.h.autoShowText)return Jb(c,d);if(3==a.h.autoShowText)return a=Kb(b.language),Jb(c,d)&&!Jb(a,c);Ua("Invalid autoShowText setting!");return!1}function Vm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.M&&Si(a.M,c);c=mm("adaptation",b);An(a,c)}function $m(a){var b=mm("trackschanged");An(a,b)}
523
- function zn(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.M&&Si(a.M,c);c=mm("variantchanged",b);An(a,c)}function nn(a){var b=mm("textchanged");An(a,b)}function Xm(a){var b=mm("texttrackvisibility");An(a,b)}function Ym(a){var b=(new Map).set("newStatus",a.h.abr.enabled);An(a,mm("abrstatuschanged",b))}
524
- function Bn(a,b){if(1002!=b.code&&1011!=b.code||1!=b.category||a.l!=Pm||!navigator.onLine)return!1;var c=a.h.streaming.maxDisabledTime;if(0==c)if(1011==b.code)c=1;else return!1;b=a.Qa().find(function(g){return g.active});for(var d=a.i,e=r(d.variants),f=e.next();!f.done;f=e.next())f=f.value,f.id===b.id&&(f.disabledUntilTime=Date.now()/1E3+c);Yd(d.variants,a.h.restrictions,a.Rc);b=nm(a);if(!b)return!1;d=a.ib().video.reduce(function(g,h){return g+h.end-h.start},0);Nm(a,b,!1,!0,d);a.mf.R(c);return!0}
525
- function ym(a,b){if(a.l!=rm)if(Bn(a,b))b.handled=!0;else{var c=mm("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Cm(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(mm(b,c))}
520
+ function $m(a){try{xn(a,a.i)}catch(c){return ym(a,c),!1}var b=a.i.variants.filter(function(c){return ue(c)});b=a.La.create(b);a.B.setVariants(Array.from(b.values()));return!0}function nm(a){return $m(a)?a.B.chooseVariant():null}function ln(a){var b=nm(a);b&&Nm(a,b,!0,!0,0)}
521
+ function Nm(a,b,c,d,e){var f=a.j.l;if(b==f)d&&yk(a.j,b,d,e,!0);else{var g=a.s.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));yk(a.j,b,d,e,void 0,c);d=null;f&&(d=me(f));b=me(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.M&&Si(a.M,b),c=mm("adaptation",c),yn(a,c)):zn(a,d,b)}}
522
+ function nn(a,b){var c=Array.from(a.g.audioTracks).find(function(d){return d.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=te(c);b=te(b);zn(a,c,b)}function Vm(a,b,c){if(0==a.h.autoShowText)return!1;if(1==a.h.autoShowText)return!0;var d=Kb(a.h.preferredTextLanguage);c=Kb(c.language);if(2==a.h.autoShowText)return Jb(c,d);if(3==a.h.autoShowText)return a=Kb(b.language),Jb(c,d)&&!Jb(a,c);Ua("Invalid autoShowText setting!");return!1}function Zm(a){var b=mm("trackschanged");yn(a,b)}
523
+ function zn(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.M&&Si(a.M,c);c=mm("variantchanged",b);yn(a,c)}function mn(a){var b=mm("textchanged");yn(a,b)}function Wm(a){var b=mm("texttrackvisibility");yn(a,b)}function Xm(a){var b=(new Map).set("newStatus",a.h.abr.enabled);yn(a,mm("abrstatuschanged",b))}
524
+ function An(a,b){if(1002!=b.code&&1011!=b.code||1!=b.category||a.l!=Pm||!navigator.onLine)return!1;var c=a.h.streaming.maxDisabledTime;if(0==c)if(1011==b.code)c=1;else return!1;b=a.Qa().find(function(g){return g.active});for(var d=a.i,e=r(d.variants),f=e.next();!f.done;f=e.next())f=f.value,f.id===b.id&&(f.disabledUntilTime=Date.now()/1E3+c);Yd(d.variants,a.h.restrictions,a.Rc);b=nm(a);if(!b)return!1;d=a.ib().video.reduce(function(g,h){return g+h.end-h.start},0);Nm(a,b,!1,!0,d);a.mf.R(c);return!0}
525
+ function ym(a,b){if(a.l!=rm)if(An(a,b))b.handled=!0;else{var c=mm("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Cm(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(mm(b,c))}
526
526
  function xm(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 M(2,3,3016,b,c,a.g.error.message)}
527
- function Im(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=r(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=r(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=r(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&&!Cn.includes(l)}h!=f.allowedByKeySystem&&
528
- (e=!0)}}}if(!e||an(a))(b=a.j.l)&&!b.allowedByKeySystem&&mn(a),e&&$m(a)}}function Jm(a,b,c){if(a.K&&a.K.onExpirationUpdated)a.K.onExpirationUpdated(b,c);b=mm("expirationupdated");a.dispatchEvent(b)}function Mm(a,b,c){0<b&&(a.S()||a.cg(b));b=a.getDuration();c<b&&(a.S()||a.Sa(c))}
529
- function yn(a,b){a=a.m?a.m.vd():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=r(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=r(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=r(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var p=a[c?"00":m];p?Cn.includes(p)&&g.add(p):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
530
- missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new M(2,4,4012,a);}function Zm(a){if(!a.variants.some(ue))throw new M(2,4,4032);}function An(a,b){F(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=rm&&a.dispatchEvent(b);B(c)})}function qn(a){var b=new Set;a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Kb(c.language)):b.add("und");return b}
531
- function pn(a){var b=new Map,c=new Map;a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Kb(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=r(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){k=r(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var p=null;c.has(l)&&c.get(l).has(m)&&(p=c.get(l).get(m));
527
+ function Im(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=r(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=r(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=r(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&&!Bn.includes(l)}h!=f.allowedByKeySystem&&
528
+ (e=!0)}}}if(!e||$m(a))(b=a.j.l)&&!b.allowedByKeySystem&&ln(a),e&&Zm(a)}}function Jm(a,b,c){if(a.K&&a.K.onExpirationUpdated)a.K.onExpirationUpdated(b,c);b=mm("expirationupdated");a.dispatchEvent(b)}function Mm(a,b,c){0<b&&(a.S()||a.cg(b));b=a.getDuration();c<b&&(a.S()||a.Sa(c))}
529
+ function xn(a,b){a=a.m?a.m.vd():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=r(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=r(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=r(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var p=a[c?"00":m];p?Bn.includes(p)&&g.add(p):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
530
+ missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new M(2,4,4012,a);}function Ym(a){if(!a.variants.some(ue))throw new M(2,4,4032);}function yn(a,b){F(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=rm&&a.dispatchEvent(b);B(c)})}function pn(a){var b=new Set;a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Kb(c.language)):b.add("und");return b}
531
+ function on(a){var b=new Map,c=new Map;a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Kb(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=r(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){k=r(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var p=null;c.has(l)&&c.get(l).has(m)&&(p=c.get(l).get(m));
532
532
  h.push({language:l,role:m,label:p})}});return h}function tm(){return new M(2,7,7E3)}function lm(a,b,c,d,e,f){return d==a&&e.mediaElement==f.mediaElement&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Rk(){return{mediaElement:null,mimeType:null,startTime:null,Od:NaN,uri:null}}function um(a){return new Promise(function(b,c){a.Rb=function(){return c(tm())};a.Fd=function(){return b()};a.onError=function(d){return c(d)};a.Hd=function(){return c(tm())}})}I("shaka.Player",S);
533
533
  S.prototype.setVideoContainer=S.prototype.We;S.prototype.getManifestParserFactory=S.prototype.Qg;S.prototype.getManifest=S.prototype.Pg;S.prototype.retryStreaming=S.prototype.Ie;S.prototype.setMaxHardwareResolution=S.prototype.Re;S.prototype.addChaptersTrack=S.prototype.lg;S.prototype.addThumbnailsTrack=S.prototype.ng;S.prototype.addTextTrackAsync=S.prototype.mg;S.prototype.getStats=S.prototype.getStats;S.prototype.getBufferedInfo=S.prototype.ib;S.prototype.getPresentationStartTimeAsDate=S.prototype.Kf;
534
534
  S.prototype.getPlayheadTimeAsDate=S.prototype.Ug;S.prototype.setTextTrackVisibility=S.prototype.Ve;S.prototype.getChapters=S.prototype.Dg;S.prototype.getChaptersTracks=S.prototype.If;S.prototype.isTextTrackVisible=S.prototype.Nb;S.prototype.selectVariantsByLabel=S.prototype.Hh;S.prototype.selectTextLanguage=S.prototype.Le;S.prototype.selectAudioLanguage=S.prototype.Nd;S.prototype.getTextLanguages=S.prototype.Xg;S.prototype.getAudioLanguages=S.prototype.zg;S.prototype.getTextLanguagesAndRoles=S.prototype.Yg;
@@ -537,350 +537,350 @@ S.prototype.getExpiration=S.prototype.Hc;S.prototype.drmInfo=S.prototype.drmInfo
537
537
  S.prototype.getLoadMode=S.prototype.pe;S.prototype.resetConfiguration=S.prototype.Eh;S.prototype.getBufferFullness=S.prototype.Bg;S.prototype.getConfiguration=S.prototype.getConfiguration;S.prototype.configure=S.prototype.configure;S.prototype.load=S.prototype.load;S.prototype.updateStartTime=S.prototype.Rh;S.prototype.unload=S.prototype.df;S.prototype.detach=S.prototype.detach;S.prototype.attachCanvas=S.prototype.tf;S.prototype.attach=S.prototype.Cc;
538
538
  S.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return F(function(h){if(1==h.g)return b={},a?u(h,Ug(),3):h.D(2);2!=h.g&&(b=h.h);var k={};if(Mc()){for(var l in ah)k[l]=!0;for(var m in ch)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var p=m.next();!p.done;p=m.next())p=p.value,k[p]=Mc()?!!ah[p]:Nc(p);for(var n in l)k[n]=
539
539
  Mc()?!!ch[n]:Nc(l[n]);c=k;n='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(",").concat(ha(hj));
540
- k={};n=r(n);for(l=n.next();!l.done;l=n.next())l=l.value,k[l]=Mc()?Cd(l)?!0:bc(l)||qd(l):Nc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Dn;for(g in f)e[g]=f[g]();return h.return(e)})};S.isBrowserSupported=sm;S.setAdManagerFactory=function(a){bm=a};S.registerSupportPlugin=function(a,b){Dn[a]=b};S.prototype.destroy=S.prototype.destroy;var rm=0,Zl=1,Pm=2,cn=3;S.LoadMode={DESTROYED:rm,NOT_LOADED:Zl,MEDIA_SOURCE:Pm,SRC_EQUALS:cn};S.version="v4.3.8";var En=["4","3"];
541
- Fe=new function(a){this.g=a;this.i=Ge;this.h=He}(new De(Number(En[0]),Number(En[1])));
542
- var Cn=["output-restricted","internal-error"],Dn={},bm=null,qm={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"},wn={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
543
- ssa:"text/x-ssa",ass:"text/x-ssa"};function Fn(){this.h=[];this.j=this.i=this.g=0};function Gn(a,b,c){var d=this;this.h=a;this.g=b;this.m=c;this.i=!1;this.l=this.g.getVolume();this.j=new wf;this.j.o(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.o(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=Gn.prototype;q.getDuration=function(){return this.h.getDuration()};q.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.i};
540
+ k={};n=r(n);for(l=n.next();!l.done;l=n.next())l=l.value,k[l]=Mc()?Cd(l)?!0:bc(l)||qd(l):Nc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Cn;for(g in f)e[g]=f[g]();return h.return(e)})};S.isBrowserSupported=sm;S.setAdManagerFactory=function(a){bm=a};S.registerSupportPlugin=function(a,b){Cn[a]=b};S.prototype.destroy=S.prototype.destroy;var rm=0,Zl=1,Pm=2,bn=3;S.LoadMode={DESTROYED:rm,NOT_LOADED:Zl,MEDIA_SOURCE:Pm,SRC_EQUALS:bn};S.version="v4.3.10";var Dn=["4","3"];
541
+ Fe=new function(a){this.g=a;this.i=Ge;this.h=He}(new De(Number(Dn[0]),Number(Dn[1])));
542
+ var Bn=["output-restricted","internal-error"],Cn={},bm=null,qm={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"},vn={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
543
+ ssa:"text/x-ssa",ass:"text/x-ssa"};function En(){this.h=[];this.j=this.i=this.g=0};function Fn(a,b,c){var d=this;this.h=a;this.g=b;this.m=c;this.i=!1;this.l=this.g.getVolume();this.j=new wf;this.j.o(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.o(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=Fn.prototype;q.getDuration=function(){return this.h.getDuration()};q.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.i};
544
544
  q.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.g.getAdSkippableState()};q.skip=function(){return this.g.skip()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.resume()};q.getVolume=function(){return this.g.getVolume()};q.setVolume=function(a){return this.g.setVolume(a)};q.isMuted=function(){return 0==this.g.getVolume()};
545
545
  q.isLinear=function(){return this.h.isLinear()};q.resize=function(a,b){var c=!1,d=this.m;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.g.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};
546
- q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.h.getTitle()};q.getDescription=function(){return this.h.getDescription()};q.release=function(){this.g=this.h=null};I("shaka.ads.ClientSideAd",Gn);Gn.prototype.release=Gn.prototype.release;Gn.prototype.getDescription=Gn.prototype.getDescription;Gn.prototype.getTitle=Gn.prototype.getTitle;Gn.prototype.getPositionInSequence=Gn.prototype.getPositionInSequence;
547
- Gn.prototype.getSequenceLength=Gn.prototype.getSequenceLength;Gn.prototype.setMuted=Gn.prototype.setMuted;Gn.prototype.resize=Gn.prototype.resize;Gn.prototype.isLinear=Gn.prototype.isLinear;Gn.prototype.isMuted=Gn.prototype.isMuted;Gn.prototype.setVolume=Gn.prototype.setVolume;Gn.prototype.getVolume=Gn.prototype.getVolume;Gn.prototype.play=Gn.prototype.play;Gn.prototype.pause=Gn.prototype.pause;Gn.prototype.skip=Gn.prototype.skip;Gn.prototype.canSkipNow=Gn.prototype.canSkipNow;
548
- Gn.prototype.getTimeUntilSkippable=Gn.prototype.getTimeUntilSkippable;Gn.prototype.isSkippable=Gn.prototype.isSkippable;Gn.prototype.isPaused=Gn.prototype.isPaused;Gn.prototype.getRemainingTime=Gn.prototype.getRemainingTime;Gn.prototype.getMinSuggestedDuration=Gn.prototype.getMinSuggestedDuration;Gn.prototype.getDuration=Gn.prototype.getDuration;function Hn(a,b,c,d){var e=this;this.s=a;this.i=b;this.B=null;this.C=NaN;this.l=d;this.j=null;this.h=new wf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.s,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.3.8");this.g=null;this.h.ya(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){In(e,f)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
549
- function(f){Jn(e,f)});this.h.o(this.i,"ended",function(){e.m.contentComplete()})}Hn.prototype.stop=function(){this.g&&this.g.stop();this.s&&dl(this.s)};Hn.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function Jn(a,b){b.getError();Kn(a,null);a.l(new L("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
550
- function In(a,b){a.l(new L("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.C)));a.g=b.getAdsManager(a.i);a.l(new L("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){b=[];c=r(c);for(var d=c.next();!d.done;d=c.next())b.push({start:d.value,end:null});a.l(new L("ad-cue-points-changed",(new Map).set("cuepoints",b)))}Ln(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,Mn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.o(a.i,"loadeddata",
551
- function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Mn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Mn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.i)):a.h.o(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Mn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.h.ya(a.i,"play",function(){a.g.start()})}catch(e){Kn(a,
552
- null)}}function Mn(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
553
- function Ln(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new L(d,c))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Jn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Nn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){Nn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.o(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
554
- function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Kn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Kn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
546
+ q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.h.getTitle()};q.getDescription=function(){return this.h.getDescription()};q.release=function(){this.g=this.h=null};I("shaka.ads.ClientSideAd",Fn);Fn.prototype.release=Fn.prototype.release;Fn.prototype.getDescription=Fn.prototype.getDescription;Fn.prototype.getTitle=Fn.prototype.getTitle;Fn.prototype.getPositionInSequence=Fn.prototype.getPositionInSequence;
547
+ Fn.prototype.getSequenceLength=Fn.prototype.getSequenceLength;Fn.prototype.setMuted=Fn.prototype.setMuted;Fn.prototype.resize=Fn.prototype.resize;Fn.prototype.isLinear=Fn.prototype.isLinear;Fn.prototype.isMuted=Fn.prototype.isMuted;Fn.prototype.setVolume=Fn.prototype.setVolume;Fn.prototype.getVolume=Fn.prototype.getVolume;Fn.prototype.play=Fn.prototype.play;Fn.prototype.pause=Fn.prototype.pause;Fn.prototype.skip=Fn.prototype.skip;Fn.prototype.canSkipNow=Fn.prototype.canSkipNow;
548
+ Fn.prototype.getTimeUntilSkippable=Fn.prototype.getTimeUntilSkippable;Fn.prototype.isSkippable=Fn.prototype.isSkippable;Fn.prototype.isPaused=Fn.prototype.isPaused;Fn.prototype.getRemainingTime=Fn.prototype.getRemainingTime;Fn.prototype.getMinSuggestedDuration=Fn.prototype.getMinSuggestedDuration;Fn.prototype.getDuration=Fn.prototype.getDuration;function Gn(a,b,c,d){var e=this;this.s=a;this.i=b;this.C=!1;this.B=null;this.F=NaN;this.l=d;this.j=null;this.h=new wf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.s,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.3.10");this.g=null;this.h.ra(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Hn(e,f)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
549
+ function(f){In(e,f)});this.h.o(this.i,"ended",function(){e.m.contentComplete()});this.h.ra(this.i,"play",function(){e.C=!0})}Gn.prototype.stop=function(){this.g&&this.g.stop();this.s&&dl(this.s)};Gn.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function In(a,b){b.getError();Jn(a,null);a.l(new L("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
550
+ function Hn(a,b){a.l(new L("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));a.g=b.getAdsManager(a.i);a.l(new L("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){b=[];c=r(c);for(var d=c.next();!d.done;d=c.next())b.push({start:d.value,end:null});a.l(new L("ad-cue-points-changed",(new Map).set("cuepoints",b)))}Kn(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,Ln(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.o(a.i,"loadeddata",
551
+ function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Ln(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Ln(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.i)):a.h.o(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Ln(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.C?a.g.start():a.h.ra(a.i,"play",
552
+ function(){a.C=!0;a.g.start()})}catch(e){Jn(a,null)}}function Ln(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
553
+ function Kn(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new L(d,c))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){In(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Mn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){Mn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.o(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
554
+ function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Jn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Jn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
555
555
  a.h.o(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.o(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.o(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.o(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});
556
556
  a.h.o(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.o(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.o(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.o(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.o(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.o(a.g,
557
557
  google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
558
- function Nn(a,b){var c=b.getAd();c?(a.j=new Gn(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new L("ad-started",b)),a.j.isLinear()&&(a.s.setAttribute("ad-active","true"),a.i.pause(),a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))):Ua("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
559
- function Kn(a,b){a.l(new L("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.s.removeAttribute("ad-active"),a.i.ended||a.i.play())};function On(a,b){this.i=a;this.h=null;this.g=b}q=On.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
558
+ function Mn(a,b){var c=b.getAd();c?(a.j=new Fn(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new L("ad-started",b)),a.j.isLinear()&&(a.s.setAttribute("ad-active","true"),a.i.pause(),a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))):Ua("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
559
+ function Jn(a,b){a.l(new L("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.s.removeAttribute("ad-active"),a.i.ended||a.i.play())};function Nn(a,b){this.i=a;this.h=null;this.g=b}q=Nn.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
560
560
  q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.g.currentTime+=this.getRemainingTime()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.isLinear=function(){return!0};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};
561
- q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.i.getTitle()};q.getDescription=function(){return this.i.getDescription()};q.release=function(){this.g=this.h=this.i=null};I("shaka.ads.ServerSideAd",On);On.prototype.release=On.prototype.release;On.prototype.getDescription=On.prototype.getDescription;On.prototype.getTitle=On.prototype.getTitle;
562
- On.prototype.getPositionInSequence=On.prototype.getPositionInSequence;On.prototype.getSequenceLength=On.prototype.getSequenceLength;On.prototype.setMuted=On.prototype.setMuted;On.prototype.resize=On.prototype.resize;On.prototype.isLinear=On.prototype.isLinear;On.prototype.isMuted=On.prototype.isMuted;On.prototype.setVolume=On.prototype.setVolume;On.prototype.getVolume=On.prototype.getVolume;On.prototype.play=On.prototype.play;On.prototype.pause=On.prototype.pause;On.prototype.skip=On.prototype.skip;
563
- On.prototype.canSkipNow=On.prototype.canSkipNow;On.prototype.getTimeUntilSkippable=On.prototype.getTimeUntilSkippable;On.prototype.isSkippable=On.prototype.isSkippable;On.prototype.isPaused=On.prototype.isPaused;On.prototype.getRemainingTime=On.prototype.getRemainingTime;On.prototype.getMinSuggestedDuration=On.prototype.getMinSuggestedDuration;On.prototype.getDuration=On.prototype.getDuration;function Pn(a,b,c,d){var e=this;this.B=a;this.l=b;this.j=null;this.I=NaN;this.i=d;this.H=!1;this.C=this.m=this.s=null;this.F="";this.G=[];this.h=new wf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.B,a);this.i(new L("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Qn(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.F.length?
564
- e.j.resolve(e.F):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new On(f,e.l);e.C&&(e.m.h=e.C);e.i(new L("ad-started",(new Map).set("ad",e.m)));e.B.setAttribute("ad-active","true")});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.B.removeAttribute("ad-active");
561
+ q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.i.getTitle()};q.getDescription=function(){return this.i.getDescription()};q.release=function(){this.g=this.h=this.i=null};I("shaka.ads.ServerSideAd",Nn);Nn.prototype.release=Nn.prototype.release;Nn.prototype.getDescription=Nn.prototype.getDescription;Nn.prototype.getTitle=Nn.prototype.getTitle;
562
+ Nn.prototype.getPositionInSequence=Nn.prototype.getPositionInSequence;Nn.prototype.getSequenceLength=Nn.prototype.getSequenceLength;Nn.prototype.setMuted=Nn.prototype.setMuted;Nn.prototype.resize=Nn.prototype.resize;Nn.prototype.isLinear=Nn.prototype.isLinear;Nn.prototype.isMuted=Nn.prototype.isMuted;Nn.prototype.setVolume=Nn.prototype.setVolume;Nn.prototype.getVolume=Nn.prototype.getVolume;Nn.prototype.play=Nn.prototype.play;Nn.prototype.pause=Nn.prototype.pause;Nn.prototype.skip=Nn.prototype.skip;
563
+ Nn.prototype.canSkipNow=Nn.prototype.canSkipNow;Nn.prototype.getTimeUntilSkippable=Nn.prototype.getTimeUntilSkippable;Nn.prototype.isSkippable=Nn.prototype.isSkippable;Nn.prototype.isPaused=Nn.prototype.isPaused;Nn.prototype.getRemainingTime=Nn.prototype.getRemainingTime;Nn.prototype.getMinSuggestedDuration=Nn.prototype.getMinSuggestedDuration;Nn.prototype.getDuration=Nn.prototype.getDuration;function On(a,b,c,d){var e=this;this.B=a;this.l=b;this.j=null;this.I=NaN;this.i=d;this.H=!1;this.C=this.m=this.s=null;this.F="";this.G=[];this.h=new wf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.B,a);this.i(new L("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Pn(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.F.length?
564
+ e.j.resolve(e.F):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new Nn(f,e.l);e.C&&(e.m.h=e.C);e.i(new L("ad-started",(new Map).set("ad",e.m)));e.B.setAttribute("ad-active","true")});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.B.removeAttribute("ad-active");
565
565
  var f=e.l.currentTime;e.s&&e.s>f&&(e.l.currentTime=e.s,e.s=null)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.C=f.getStreamData().adProgressData;e.m&&(e.m.h=e.C)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new L("ad-first-quartile"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new L("ad-midpoint"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new L("ad-third-quartile"))});
566
566
  this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new L("ad-complete"));e.i(new L("ad-stopped"));e.B.removeAttribute("ad-active");e.m=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new L("ad-skipped"));e.i(new L("ad-stopped"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=r(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.G=
567
- f;e.i(new L("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Pn.prototype.stop=function(){this.F="";this.s=null;this.G=[]};Pn.prototype.release=function(){this.stop();this.h&&this.h.release()};Pn.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
568
- function Qn(a,b){a.i(new L("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.H||a.h.o(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.s=c,a.l.currentTime=d.start)}})};function T(){db.call(this);this.g=this.i=null;this.h=new Fn;this.j=navigator.language}pa(T,db);q=T.prototype;q.setLocale=function(a){this.j=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new M(2,10,1E4);this.i&&this.i.release();this.i=new Hn(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)})};
569
- q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);db.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new L("ad-stopped"));this.h=new Fn};q.requestClientSideAds=function(a){if(!this.i)throw new M(1,10,10001);var b=this.i;b.C=Date.now()/1E3;b.m.requestAds(a)};
570
- q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new M(2,10,10002);this.g&&this.g.release();this.g=new Pn(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)})};
571
- q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new M(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="v4.3.8";c=this.g;c.j?a=Promise.reject(new M(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
572
- (c.H=!0),c.j=new Jc,c.g.requestStream(a),c.F=b||"",c.I=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new M(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="v4.3.8";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new M(1,10,10003);return this.g.G};
567
+ f;e.i(new L("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}On.prototype.stop=function(){this.F="";this.s=null;this.G=[]};On.prototype.release=function(){this.stop();this.h&&this.h.release()};On.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
568
+ function Pn(a,b){a.i(new L("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.H||a.h.o(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.s=c,a.l.currentTime=d.start)}})};function T(){db.call(this);this.g=this.i=null;this.h=new En;this.j=navigator.language}pa(T,db);q=T.prototype;q.setLocale=function(a){this.j=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new M(2,10,1E4);this.i&&this.i.release();this.i=new Gn(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)})};
569
+ q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);db.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new L("ad-stopped"));this.h=new En};q.requestClientSideAds=function(a){if(!this.i)throw new M(1,10,10001);var b=this.i;b.F=Date.now()/1E3;b.m.requestAds(a)};
570
+ q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new M(2,10,10002);this.g&&this.g.release();this.g=new On(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)})};
571
+ q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new M(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="v4.3.10";c=this.g;c.j?a=Promise.reject(new M(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
572
+ (c.H=!0),c.j=new Jc,c.g.requestStream(a),c.F=b||"",c.I=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new M(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="v4.3.10";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new M(1,10,10003);return this.g.G};
573
573
  q.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.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)}};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};I("shaka.ads.AdManager",T);
574
574
  T.prototype.onCueMetadataChange=T.prototype.onCueMetadataChange;T.prototype.onHlsTimedMetadata=T.prototype.onHlsTimedMetadata;T.prototype.onDashTimedMetadata=T.prototype.onDashTimedMetadata;T.prototype.getStats=T.prototype.getStats;T.prototype.getServerSideCuePoints=T.prototype.getServerSideCuePoints;T.prototype.replaceServerSideAdTagParameters=T.prototype.replaceServerSideAdTagParameters;T.prototype.requestServerSideStream=T.prototype.requestServerSideStream;T.prototype.initServerSide=T.prototype.initServerSide;
575
575
  T.prototype.requestClientSideAds=T.prototype.requestClientSideAds;T.prototype.onAssetUnload=T.prototype.onAssetUnload;T.prototype.release=T.prototype.release;T.prototype.initClientSide=T.prototype.initClientSide;T.prototype.setLocale=T.prototype.setLocale;T.ADS_LOADED="ads-loaded";T.AD_STARTED="ad-started";T.AD_FIRST_QUARTILE="ad-first-quartile";T.AD_MIDPOINT="ad-midpoint";T.AD_THIRD_QUARTILE="ad-third-quartile";T.AD_COMPLETE="ad-complete";T.AD_STOPPED="ad-stopped";T.AD_SKIPPED="ad-skipped";
576
576
  T.AD_VOLUME_CHANGED="ad-volume-changed";T.AD_MUTED="ad-muted";T.AD_PAUSED="ad-paused";T.AD_RESUMED="ad-resumed";T.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";T.CUEPOINTS_CHANGED="ad-cue-points-changed";T.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";T.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";T.AD_CLICKED="ad-clicked";T.AD_PROGRESS="ad-progress";T.AD_BUFFERING="ad-buffering";T.AD_IMPRESSION="ad-impression";T.AD_DURATION_CHANGED="ad-duration-changed";T.AD_CLOSED="ad-closed";
577
- T.AD_LOADED="ad-loaded";T.ALL_ADS_COMPLETED="all-ads-completed";T.AD_LINEAR_CHANGED="ad-linear-changed";T.AD_METADATA="ad-metadata";T.AD_RECOVERABLE_ERROR="ad-recoverable-error";T.AD_BREAK_READY="ad-break-ready";T.AD_INTERACTION="ad-interaction";bm=function(){return new T};function Rn(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof L){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);b=r(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())e.add(d.value);b={};e=r(e);for(d=e.next();!d.done;d=e.next())d=d.value,b[d]=c[d];c={__type__:"Error",contents:b}}else if(c instanceof
577
+ T.AD_LOADED="ad-loaded";T.ALL_ADS_COMPLETED="all-ads-completed";T.AD_LINEAR_CHANGED="ad-linear-changed";T.AD_METADATA="ad-metadata";T.AD_RECOVERABLE_ERROR="ad-recoverable-error";T.AD_BREAK_READY="ad-break-ready";T.AD_INTERACTION="ad-interaction";bm=function(){return new T};function Qn(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof L){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);b=r(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())e.add(d.value);b={};e=r(e);for(d=e.next();!d.done;d=e.next())d=d.value,b[d]=c[d];c={__type__:"Error",contents:b}}else if(c instanceof
578
578
  TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=r(Hi(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})}
579
- function Sn(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=Tn(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
580
- function Tn(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
581
- var Un="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Vn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Wn=["loop","playbackRate"],Xn=["pause","play"],Yn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
582
- isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},Zn={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},$n={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},ao=[["getConfiguration","configure"]],bo=[["isTextTrackVisible","setTextTrackVisibility"]],co="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
583
- eo=["attach","attachCanvas","detach","load","unload"];function fo(a,b,c,d,e,f,g){var h=this;this.I=a;this.N=g;this.j=new N(b);this.P=c;this.C=!1;this.B=d;this.H=e;this.K=f;this.h=this.m=!1;this.M="";this.s=null;this.F=function(){return go(h)};this.G=function(k,l){k=Sn(l);switch(k.type){case "event":var m=k.targetName,p=Pa(k.event);h.B(m,p);break;case "update":m=k.update;for(p in m){k=h.g[p]||{};for(var n in m[p])k[n]=m[p][n]}h.C&&(h.P(),h.C=!1);break;case "asyncComplete":if(p=k.id,n=k.error,k=h.i[p],delete h.i[p],k)if(n){p=new M(n.severity,n.category,
584
- n.code);for(m in n)p[m]=n[m];k.reject(p)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;ho.add(this)}q=fo.prototype;q.destroy=function(){ho.delete(this);io(this);jo&&ko(this);this.j&&(this.j.stop(),this.j=null);this.H=this.B=null;this.h=this.m=!1;this.G=this.F=this.l=this.i=this.g=this.s=null;return Promise.resolve()};q.oa=function(){return this.h};q.Kd=function(){return this.M};
585
- q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Aa();var a=new chrome.cast.SessionRequest(this.I,[],null,this.N,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(ho),d=c.next();!d.done;d=c.next())lo(d.value,b)},function(b){for(var c=r(ho),d=c.next();!d.done;d=c.next())d=d.value,mo="available"==b,d.j.Aa()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});mo&&this.j.R(no);(a=jo)&&a.status!=chrome.cast.SessionStatus.STOPPED?
586
- lo(this,a):jo=null}else window.__onGCastApiAvailable!==oo&&(po=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=oo)};q.Oe=function(a){this.s=a;this.h&&qo(this,{type:"appData",appData:this.s})};q.cast=function(a){var b=this;return F(function(c){if(!b.m)throw new M(1,8,8E3);if(!mo)throw new M(1,8,8001);if(b.h)throw new M(1,8,8002);b.l=new Jc;chrome.cast.requestSession(function(d){return ro(b,a,d)},function(d){return so(b,d)});return u(c,b.l,0)})};
587
- function to(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return ro(a,b,c)},function(c){return so(a,c)})}}q.ac=function(){if(this.h){io(this);if(jo){ko(this);try{jo.stop(function(){},function(){})}catch(a){}jo=null}go(this)}};
588
- q.get=function(a,b){var c=this;if("video"==a){if(Xn.includes(b))return function(){return c.Tf.apply(c,[a,b].concat(ha(Ga.apply(0,arguments))))}}else if("player"==a){if($n[b]&&!this.get("player","isLive")())return function(){};if(co.includes(b))return function(){return c.Tf.apply(c,[a,b].concat(ha(Ga.apply(0,arguments))))};if(eo.includes(b))return function(){return c.Bh.apply(c,[a,b].concat(ha(Ga.apply(0,arguments))))};if(Yn[b]||Zn[b])return function(){return c.g[a][b]}}return this.g[a][b]};
589
- q.set=function(a,b,c){this.g[a][b]=c;qo(this,{type:"set",targetName:a,property:b,value:c})};function ro(a,b,c){jo=c;c.addUpdateListener(a.F);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);go(a);qo(a,{type:"init",initState:b,appData:a.s});a.l.resolve()}function so(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 M(2,8,c,b))}
590
- q.Tf=function(a,b){qo(this,{type:"call",targetName:a,methodName:b,args:Ga.apply(2,arguments)})};q.Bh=function(a,b){var c=Ga.apply(2,arguments),d=new Jc,e=this.J.toString();this.J++;this.i[e]=d;try{qo(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function lo(a,b){var c=a.K();a.l=new Jc;a.C=!0;ro(a,c,b)}function ko(a){var b=jo;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
591
- function go(a){var b=jo?"connected"==jo.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};io(a)}a.h=b;a.M=b?jo.receiver.friendlyName:"";a.j.Aa()}function io(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new M(1,7,7E3))}}function qo(a,b){b=Rn(b);var c=jo;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Ya)}catch(d){throw b=new M(2,8,8005,d),c=new L("error",(new Map).set("detail",b)),a.B("player",c),a.ac(),b;}}var no=.02,mo=!1,jo=null,po=null,ho=new Set;
592
- function oo(a){po?window.__onGCastApiAvailable=po:delete window.__onGCastApiAvailable;po=null;if(a)for(var b=r(ho),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function uo(a,b,c,d){d=void 0===d?!1:d;db.call(this);var e=this;this.i=a;this.h=b;this.m=this.s=this.j=this.B=this.l=null;this.G=c;this.F=d;this.C=new Map;this.g=new fo(c,function(){return vo(e)},function(){return wo(e)},function(f,g){return xo(e,f,g)},function(){return yo(e)},function(){return zo(e)},d);Ao(this)}pa(uo,db);q=uo.prototype;
593
- q.destroy=function(a){a&&this.g.ac();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.B=this.l=this.i=null;db.prototype.release.call(this);return Promise.all(a)};q.Ab=function(){return this.l};q.dc=function(){return this.B};q.wf=function(){return this.g.m&&mo};q.oa=function(){return this.g.oa()};q.Kd=function(){return this.g.Kd()};
594
- q.cast=function(){var a=this,b;return F(function(c){return 1==c.g?(b=zo(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.df(),0):c.return()})};q.Oe=function(a){this.g.Oe(a)};q.eg=function(){to(this.g)};q.ac=function(){this.g.ac()};
595
- q.Af=function(a,b){b=void 0===b?!1:b;var c=this;return F(function(d){if(1==d.g){if(a==c.G&&b==c.F)return d.return();c.G=a;c.F=b;c.g.ac();return u(d,c.g.destroy(),2)}c.g=null;c.g=new fo(a,function(){return vo(c)},function(){return wo(c)},function(e,f){return xo(c,e,f)},function(){return yo(c)},function(){return zo(c)},b);c.g.init();B(d)})};
596
- function Ao(a){a.g.init();a.m=new wf;for(var b=r(Un),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.oa()||(f=Pa(f),a.j.dispatchEvent(f))});for(var d in Qa)a.m.o(a.h,Qa[d],function(f){a.g.oa()||a.s.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.wc=e,Object.defineProperty(a.l,b.wc,{configurable:!1,enumerable:!0,get:function(f){return function(){return Bo(a,f.wc)}}(b),set:function(f){return function(g){var h=f.wc;a.g.oa()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={wc:b.wc};a.B={};Co(a,
597
- function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return Do(a,f)}})});Eo(a);a.j=new db;a.j.Id=a.l;a.s=new db;a.s.Id=a.B}function Eo(a){var b=new Map;Co(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.C.set(c,d):a.C.set(d,c)):b.set(d,c)})}
598
- function Co(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=r(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
599
- function zo(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.oe(),startTime:null};a.i.pause();for(var c=r(Wn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=r(ao);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=r(bo);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function vo(a){var b=new L("caststatuschanged");a.dispatchEvent(b)}
600
- function wo(a){var b=new L(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
601
- function yo(a){for(var b=r(ao),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.i.autoplay=!1,b=a.h.load(e,d));var g={};c=r(Wn);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var h=r(Wn),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=r(bo);for(k=
579
+ function Rn(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=Sn(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
580
+ function Sn(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
581
+ var Tn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Un="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Vn=["loop","playbackRate"],Wn=["pause","play"],Xn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
582
+ isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},Yn={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},Zn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},$n=[["getConfiguration","configure"]],ao=[["isTextTrackVisible","setTextTrackVisibility"]],bo="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
583
+ co=["attach","attachCanvas","detach","load","unload"];function eo(a,b,c,d,e,f,g){var h=this;this.I=a;this.N=g;this.j=new N(b);this.P=c;this.C=!1;this.B=d;this.H=e;this.K=f;this.h=this.m=!1;this.M="";this.s=null;this.F=function(){return fo(h)};this.G=function(k,l){k=Rn(l);switch(k.type){case "event":var m=k.targetName,p=Pa(k.event);h.B(m,p);break;case "update":m=k.update;for(p in m){k=h.g[p]||{};for(var n in m[p])k[n]=m[p][n]}h.C&&(h.P(),h.C=!1);break;case "asyncComplete":if(p=k.id,n=k.error,k=h.i[p],delete h.i[p],k)if(n){p=new M(n.severity,n.category,
584
+ n.code);for(m in n)p[m]=n[m];k.reject(p)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;go.add(this)}q=eo.prototype;q.destroy=function(){go.delete(this);ho(this);io&&jo(this);this.j&&(this.j.stop(),this.j=null);this.H=this.B=null;this.h=this.m=!1;this.G=this.F=this.l=this.i=this.g=this.s=null;return Promise.resolve()};q.oa=function(){return this.h};q.Kd=function(){return this.M};
585
+ q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Aa();var a=new chrome.cast.SessionRequest(this.I,[],null,this.N,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(go),d=c.next();!d.done;d=c.next())ko(d.value,b)},function(b){for(var c=r(go),d=c.next();!d.done;d=c.next())d=d.value,lo="available"==b,d.j.Aa()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});lo&&this.j.R(mo);(a=io)&&a.status!=chrome.cast.SessionStatus.STOPPED?
586
+ ko(this,a):io=null}else window.__onGCastApiAvailable!==no&&(oo=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=no)};q.Oe=function(a){this.s=a;this.h&&po(this,{type:"appData",appData:this.s})};q.cast=function(a){var b=this;return F(function(c){if(!b.m)throw new M(1,8,8E3);if(!lo)throw new M(1,8,8001);if(b.h)throw new M(1,8,8002);b.l=new Jc;chrome.cast.requestSession(function(d){return qo(b,a,d)},function(d){return ro(b,d)});return u(c,b.l,0)})};
587
+ function so(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return qo(a,b,c)},function(c){return ro(a,c)})}}q.ac=function(){if(this.h){ho(this);if(io){jo(this);try{io.stop(function(){},function(){})}catch(a){}io=null}fo(this)}};
588
+ q.get=function(a,b){var c=this;if("video"==a){if(Wn.includes(b))return function(){return c.Tf.apply(c,[a,b].concat(ha(Ga.apply(0,arguments))))}}else if("player"==a){if(Zn[b]&&!this.get("player","isLive")())return function(){};if(bo.includes(b))return function(){return c.Tf.apply(c,[a,b].concat(ha(Ga.apply(0,arguments))))};if(co.includes(b))return function(){return c.Bh.apply(c,[a,b].concat(ha(Ga.apply(0,arguments))))};if(Xn[b]||Yn[b])return function(){return c.g[a][b]}}return this.g[a][b]};
589
+ q.set=function(a,b,c){this.g[a][b]=c;po(this,{type:"set",targetName:a,property:b,value:c})};function qo(a,b,c){io=c;c.addUpdateListener(a.F);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);fo(a);po(a,{type:"init",initState:b,appData:a.s});a.l.resolve()}function ro(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 M(2,8,c,b))}
590
+ q.Tf=function(a,b){po(this,{type:"call",targetName:a,methodName:b,args:Ga.apply(2,arguments)})};q.Bh=function(a,b){var c=Ga.apply(2,arguments),d=new Jc,e=this.J.toString();this.J++;this.i[e]=d;try{po(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function ko(a,b){var c=a.K();a.l=new Jc;a.C=!0;qo(a,c,b)}function jo(a){var b=io;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
591
+ function fo(a){var b=io?"connected"==io.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};ho(a)}a.h=b;a.M=b?io.receiver.friendlyName:"";a.j.Aa()}function ho(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new M(1,7,7E3))}}function po(a,b){b=Qn(b);var c=io;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Ya)}catch(d){throw b=new M(2,8,8005,d),c=new L("error",(new Map).set("detail",b)),a.B("player",c),a.ac(),b;}}var mo=.02,lo=!1,io=null,oo=null,go=new Set;
592
+ function no(a){oo?window.__onGCastApiAvailable=oo:delete window.__onGCastApiAvailable;oo=null;if(a)for(var b=r(go),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function to(a,b,c,d){d=void 0===d?!1:d;db.call(this);var e=this;this.i=a;this.h=b;this.m=this.s=this.j=this.B=this.l=null;this.G=c;this.F=d;this.C=new Map;this.g=new eo(c,function(){return uo(e)},function(){return vo(e)},function(f,g){return wo(e,f,g)},function(){return xo(e)},function(){return yo(e)},d);zo(this)}pa(to,db);q=to.prototype;
593
+ q.destroy=function(a){a&&this.g.ac();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.B=this.l=this.i=null;db.prototype.release.call(this);return Promise.all(a)};q.Ab=function(){return this.l};q.dc=function(){return this.B};q.wf=function(){return this.g.m&&lo};q.oa=function(){return this.g.oa()};q.Kd=function(){return this.g.Kd()};
594
+ q.cast=function(){var a=this,b;return F(function(c){return 1==c.g?(b=yo(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.df(),0):c.return()})};q.Oe=function(a){this.g.Oe(a)};q.eg=function(){so(this.g)};q.ac=function(){this.g.ac()};
595
+ q.Af=function(a,b){b=void 0===b?!1:b;var c=this;return F(function(d){if(1==d.g){if(a==c.G&&b==c.F)return d.return();c.G=a;c.F=b;c.g.ac();return u(d,c.g.destroy(),2)}c.g=null;c.g=new eo(a,function(){return uo(c)},function(){return vo(c)},function(e,f){return wo(c,e,f)},function(){return xo(c)},function(){return yo(c)},b);c.g.init();B(d)})};
596
+ function zo(a){a.g.init();a.m=new wf;for(var b=r(Tn),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.oa()||(f=Pa(f),a.j.dispatchEvent(f))});for(var d in Qa)a.m.o(a.h,Qa[d],function(f){a.g.oa()||a.s.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.wc=e,Object.defineProperty(a.l,b.wc,{configurable:!1,enumerable:!0,get:function(f){return function(){return Ao(a,f.wc)}}(b),set:function(f){return function(g){var h=f.wc;a.g.oa()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={wc:b.wc};a.B={};Bo(a,
597
+ function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return Co(a,f)}})});Do(a);a.j=new db;a.j.Id=a.l;a.s=new db;a.s.Id=a.B}function Do(a){var b=new Map;Bo(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.C.set(c,d):a.C.set(d,c)):b.set(d,c)})}
598
+ function Bo(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=r(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
599
+ function yo(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.oe(),startTime:null};a.i.pause();for(var c=r(Vn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=r($n);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=r(ao);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function uo(a){var b=new L("caststatuschanged");a.dispatchEvent(b)}
600
+ function vo(a){var b=new L(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
601
+ function xo(a){for(var b=r($n),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.i.autoplay=!1,b=a.h.load(e,d));var g={};c=r(Vn);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var h=r(Vn),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=r(ao);for(k=
602
602
  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 L("error",h);a.h.dispatchEvent(h)})}
603
- function Bo(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.oa()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.oa()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
604
- function Do(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.s.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.s.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.Ic()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.td()};
605
- if("setVideoContainer"==b)return function(c){return a.h.We(c)};if(a.g.oa()){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.oa()&&0==Object.keys(a.g.g.video).length&&(Yn[b]||Zn[b])||!a.g.oa()?a.h[b].bind(a.h):a.g.get("player",b)}
606
- function xo(a,b,c){a.g.oa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}I("shaka.cast.CastProxy",uo);uo.prototype.changeReceiverId=uo.prototype.Af;uo.prototype.forceDisconnect=uo.prototype.ac;uo.prototype.suggestDisconnect=uo.prototype.eg;uo.prototype.setAppData=uo.prototype.Oe;uo.prototype.cast=uo.prototype.cast;uo.prototype.receiverName=uo.prototype.Kd;uo.prototype.isCasting=uo.prototype.oa;uo.prototype.canCast=uo.prototype.wf;uo.prototype.getPlayer=uo.prototype.dc;
607
- uo.prototype.getVideo=uo.prototype.Ab;uo.prototype.destroy=uo.prototype.destroy;function Fo(a,b,c,d){db.call(this);var e=this;this.g=a;this.h=b;this.j=new wf;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.s=!0;this.m=0;this.F=!1;this.C=!0;this.B=this.l=null;this.I=new N(function(){Go(e)});Ho(this)}pa(Fo,db);q=Fo.prototype;q.isConnected=function(){return this.H};q.hh=function(){return this.s};q.Kh=function(a){this.i=a};q.ug=function(){this.i=null};
603
+ function Ao(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.oa()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.oa()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
604
+ function Co(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.s.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.s.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.Ic()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.td()};
605
+ if("setVideoContainer"==b)return function(c){return a.h.We(c)};if(a.g.oa()){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.oa()&&0==Object.keys(a.g.g.video).length&&(Xn[b]||Yn[b])||!a.g.oa()?a.h[b].bind(a.h):a.g.get("player",b)}
606
+ function wo(a,b,c){a.g.oa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}I("shaka.cast.CastProxy",to);to.prototype.changeReceiverId=to.prototype.Af;to.prototype.forceDisconnect=to.prototype.ac;to.prototype.suggestDisconnect=to.prototype.eg;to.prototype.setAppData=to.prototype.Oe;to.prototype.cast=to.prototype.cast;to.prototype.receiverName=to.prototype.Kd;to.prototype.isCasting=to.prototype.oa;to.prototype.canCast=to.prototype.wf;to.prototype.getPlayer=to.prototype.dc;
607
+ to.prototype.getVideo=to.prototype.Ab;to.prototype.destroy=to.prototype.destroy;function Eo(a,b,c,d){db.call(this);var e=this;this.g=a;this.h=b;this.j=new wf;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.s=!0;this.m=0;this.F=!1;this.C=!0;this.B=this.l=null;this.I=new N(function(){Fo(e)});Go(this)}pa(Eo,db);q=Eo.prototype;q.isConnected=function(){return this.H};q.hh=function(){return this.s};q.Kh=function(a){this.i=a};q.ug=function(){this.i=null};
608
608
  q.Lh=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.Jh=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.Ih=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
609
609
  q.destroy=function(){var a=this,b,c;return F(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.I&&(a.I.stop(),a.I=null),a.g=null,a.J=null,a.G=null,a.H=!1,a.s=!0,a.l=null,a.B=null,db.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();B(d)})};
610
- function Ho(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Io(a)};b.onSenderDisconnected=function(){return Io(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Jo(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Jo(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.B=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.B.onMessage=function(e){return Ko(a,
611
- e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Lo(a,e)};b.start();b=r(Un);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return Mo(a,"video",e)});for(var d in Qa)a.j.o(a.h,Qa[d],function(e){return Mo(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.Re(3840,2160):a.h.Re(1920,1080);a.j.o(a.g,"loadeddata",function(){a.F=!0});a.j.o(a.h,"loading",function(){a.s=
612
- !1;No(a)});a.j.o(a.g,"playing",function(){a.s=!1;No(a)});a.j.o(a.g,"pause",function(){No(a)});a.j.o(a.h,"unloading",function(){a.s=!0;No(a)});a.j.o(a.g,"ended",function(){(new N(function(){a.g&&a.g.ended&&(a.s=!0,No(a))})).R(Oo)})}function Io(a){a.m=0;a.C=!0;a.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;No(a)}
613
- function No(a){var b;F(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c.return();b=new L("caststatuschanged");a.dispatchEvent(b);Po(a)||Qo(a);B(c)})}
614
- function Ro(a,b,c){var d,e,f,g,h,k,l,m,p,n;F(function(t){switch(t.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.G(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,D(t,5),u(t,a.h.load(b.manifest,b.startTime),7)):u(t,Promise.resolve(),3);case 7:va(t,3);break;case 5:return g=wa(t),h=(new Map).set("detail",g),k=new L("error",h),a.h&&a.h.dispatchEvent(k),t.return();case 3:if(!a.h)return t.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(p in b.playerAfterLoad)n=b.playerAfterLoad[p],a.h[p](n);
615
- a.g.autoplay=f;b.manifest&&(a.g.play(),Qo(a));B(t)}})}function Mo(a,b,c){a.h&&(Go(a),Jo(a,{type:"event",targetName:b,event:c},a.l))}
616
- function Go(a){a.I.R(So);for(var b={video:{},player:{}},c=r(Vn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.S())for(var e in $n)0==a.m%$n[e]&&(b.player[e]=a.h[e]());for(var f in Yn)0==a.m%Yn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;Jo(a,{type:"update",update:b},a.l);for(var g in Zn)0==a.m%Zn[g]&&(b={player:{}},b.player[g]=a.h[g](),Jo(a,{type:"update",update:b},a.l));a.F&&(a.m+=
617
- 1);Po(a)}function Po(a){return a.C&&(a.g.duration||a.h.S())?(To(a),a.C=!1,!0):!1}function To(a,b){var c={contentId:a.h.oe(),streamType:a.h.S()?"LIVE":"BUFFERED",contentType:""};a.h.S()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Qo(a,void 0===b?0:b,c)}
618
- function Lo(a,b){var c=Sn(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.C=!0;Ro(a,c.initState,c.appData);Go(a);break;case "appData":a.G(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.J[d][e]=c;break;case "call":d=a.J[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
619
- "player"==d&&"load"==e&&(a.m=0,a.F=!1);var f=c.id,g=b.senderId;b=a.J[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.C=!0}));c.then(function(){return Uo(a,g,f,null)},function(h){return Uo(a,g,f,h)})}}
620
- function Ko(a,b){var c=Sn(b.data);switch(c.type){case "PLAY":a.g.play();Qo(a);break;case "PAUSE":a.g.pause();Qo(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),Qo(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Qo(a));break;case "STOP":a.h.df().then(function(){a.h&&Qo(a)});break;case "GET_STATUS":To(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
621
- null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||Qo(a);break;case "LOAD":a.m=0;a.F=!1;a.C=!1;b=c.media;d=c.currentTime;e=a.K(b.contentId);f=c.autoplay||!0;a.G(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&To(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");Jo(a,{requestId:Number(c.requestId),type:h},a.B)});break;default:Jo(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.B)}}
622
- function Uo(a,b,c,d){a.h&&Jo(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Jo(a,b,c,d){a.H&&(a=Rn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Qo(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.s?Vo:a.h.Qc()?Wo:a.g.paused?Xo:Yo,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Jo(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.B)}
623
- I("shaka.cast.CastReceiver",Fo);Fo.prototype.destroy=Fo.prototype.destroy;Fo.prototype.setContentArtist=Fo.prototype.Ih;Fo.prototype.setContentImage=Fo.prototype.Jh;Fo.prototype.setContentTitle=Fo.prototype.Lh;Fo.prototype.clearContentMetadata=Fo.prototype.ug;Fo.prototype.setContentMetadata=Fo.prototype.Kh;Fo.prototype.isIdle=Fo.prototype.hh;Fo.prototype.isConnected=Fo.prototype.isConnected;var So=.5,Oo=5,Vo="IDLE",Yo="PLAYING",Wo="BUFFERING",Xo="PAUSED";function Zo(a,b,c){var d=$o(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 M(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.Ke?(e=h.init||e,!1):!0}),f.length&&(a=ap(e,f,c,g),0==a.length&&(a=[Cb("",e)])));if(d.length&&(b||!f.length))for(a=[],b=r(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Cb(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
624
- r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Df:g,rj:e,drmInfos:a,Hf:!0}}function bp(a,b,c,d){var e=Zo(a,c,d);if(b.Hf){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.Hf=!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 M(2,4,4008);return e.Df||b.Df}
625
- function cp(a){var b=0,c=Ic(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=Fc(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
626
- function dp(a){a=r(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=r(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 ep(a){a=Vf(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=id(a.textContent);a=cp(a).filter(function(b){return b.type===fp})[0];if(!a)return"";a=ad(a.value,!0);return(a=kg(a,"WRMHEADER"))?dp(a):""}
627
- function ap(a,b,c,d){var e=[];b=r(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=c[f.Ke];if(g){var h;if(h=Vf(f.node,"urn:microsoft:playready","pro")){h=id(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Sf(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.Ke)if(k=d,0==k.size)k=null;else{var l=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,
628
- 226,251,75]),m=new Uint8Array([]);k=[{initData:Sf(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=Cb(g,f.init||a||h||k);if(g=gp.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function $o(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=hp(c.value))&&b.push(c);return b}
629
- function hp(a){var b=a.getAttribute("schemeIdUri"),c=Yf(a,"urn:mpeg:cenc:2013","default_KID"),d=Wf(a,"urn:mpeg:cenc:2013","pssh").map($f);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new M(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:id(f),keyId:null}})}catch(f){throw new M(2,4,4007);}return{node:a,Ke:b,keyId:c,init:0<e.length?e:null}}
630
- var fp=1,gp=(new Map).set("com.widevine.alpha",function(a){return(a=Vf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",ep).set("com.microsoft.playready.recommendation",ep).set("com.microsoft.playready.software",ep).set("com.microsoft.playready.hardware",ep).set("org.w3.clearkey",function(a){return(a=Vf(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function ip(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=
610
+ function Go(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Ho(a)};b.onSenderDisconnected=function(){return Ho(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Io(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Io(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.B=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.B.onMessage=function(e){return Jo(a,
611
+ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Ko(a,e)};b.start();b=r(Tn);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return Lo(a,"video",e)});for(var d in Qa)a.j.o(a.h,Qa[d],function(e){return Lo(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.Re(3840,2160):a.h.Re(1920,1080);a.j.o(a.g,"loadeddata",function(){a.F=!0});a.j.o(a.h,"loading",function(){a.s=
612
+ !1;Mo(a)});a.j.o(a.g,"playing",function(){a.s=!1;Mo(a)});a.j.o(a.g,"pause",function(){Mo(a)});a.j.o(a.h,"unloading",function(){a.s=!0;Mo(a)});a.j.o(a.g,"ended",function(){(new N(function(){a.g&&a.g.ended&&(a.s=!0,Mo(a))})).R(No)})}function Ho(a){a.m=0;a.C=!0;a.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Mo(a)}
613
+ function Mo(a){var b;F(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c.return();b=new L("caststatuschanged");a.dispatchEvent(b);Oo(a)||Po(a);B(c)})}
614
+ function Qo(a,b,c){var d,e,f,g,h,k,l,m,p,n;F(function(t){switch(t.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.G(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,D(t,5),u(t,a.h.load(b.manifest,b.startTime),7)):u(t,Promise.resolve(),3);case 7:va(t,3);break;case 5:return g=wa(t),h=(new Map).set("detail",g),k=new L("error",h),a.h&&a.h.dispatchEvent(k),t.return();case 3:if(!a.h)return t.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(p in b.playerAfterLoad)n=b.playerAfterLoad[p],a.h[p](n);
615
+ a.g.autoplay=f;b.manifest&&(a.g.play(),Po(a));B(t)}})}function Lo(a,b,c){a.h&&(Fo(a),Io(a,{type:"event",targetName:b,event:c},a.l))}
616
+ function Fo(a){a.I.R(Ro);for(var b={video:{},player:{}},c=r(Un),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.S())for(var e in Zn)0==a.m%Zn[e]&&(b.player[e]=a.h[e]());for(var f in Xn)0==a.m%Xn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;Io(a,{type:"update",update:b},a.l);for(var g in Yn)0==a.m%Yn[g]&&(b={player:{}},b.player[g]=a.h[g](),Io(a,{type:"update",update:b},a.l));a.F&&(a.m+=
617
+ 1);Oo(a)}function Oo(a){return a.C&&(a.g.duration||a.h.S())?(So(a),a.C=!1,!0):!1}function So(a,b){var c={contentId:a.h.oe(),streamType:a.h.S()?"LIVE":"BUFFERED",contentType:""};a.h.S()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Po(a,void 0===b?0:b,c)}
618
+ function Ko(a,b){var c=Rn(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.C=!0;Qo(a,c.initState,c.appData);Fo(a);break;case "appData":a.G(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.J[d][e]=c;break;case "call":d=a.J[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
619
+ "player"==d&&"load"==e&&(a.m=0,a.F=!1);var f=c.id,g=b.senderId;b=a.J[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.C=!0}));c.then(function(){return To(a,g,f,null)},function(h){return To(a,g,f,h)})}}
620
+ function Jo(a,b){var c=Rn(b.data);switch(c.type){case "PLAY":a.g.play();Po(a);break;case "PAUSE":a.g.pause();Po(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),Po(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Po(a));break;case "STOP":a.h.df().then(function(){a.h&&Po(a)});break;case "GET_STATUS":So(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
621
+ null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||Po(a);break;case "LOAD":a.m=0;a.F=!1;a.C=!1;b=c.media;d=c.currentTime;e=a.K(b.contentId);f=c.autoplay||!0;a.G(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&So(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");Io(a,{requestId:Number(c.requestId),type:h},a.B)});break;default:Io(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.B)}}
622
+ function To(a,b,c,d){a.h&&Io(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Io(a,b,c,d){a.H&&(a=Qn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Po(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.s?Uo:a.h.Qc()?Vo:a.g.paused?Wo:Xo,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Io(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.B)}
623
+ I("shaka.cast.CastReceiver",Eo);Eo.prototype.destroy=Eo.prototype.destroy;Eo.prototype.setContentArtist=Eo.prototype.Ih;Eo.prototype.setContentImage=Eo.prototype.Jh;Eo.prototype.setContentTitle=Eo.prototype.Lh;Eo.prototype.clearContentMetadata=Eo.prototype.ug;Eo.prototype.setContentMetadata=Eo.prototype.Kh;Eo.prototype.isIdle=Eo.prototype.hh;Eo.prototype.isConnected=Eo.prototype.isConnected;var Ro=.5,No=5,Uo="IDLE",Xo="PLAYING",Vo="BUFFERING",Wo="PAUSED";function Yo(a,b,c){var d=Zo(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 M(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.Ke?(e=h.init||e,!1):!0}),f.length&&(a=$o(e,f,c,g),0==a.length&&(a=[Cb("",e)])));if(d.length&&(b||!f.length))for(a=[],b=r(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Cb(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
624
+ r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Df:g,rj:e,drmInfos:a,Hf:!0}}function ap(a,b,c,d){var e=Yo(a,c,d);if(b.Hf){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.Hf=!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 M(2,4,4008);return e.Df||b.Df}
625
+ function bp(a){var b=0,c=Ic(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=Fc(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
626
+ function cp(a){a=r(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=r(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 dp(a){a=Vf(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=id(a.textContent);a=bp(a).filter(function(b){return b.type===ep})[0];if(!a)return"";a=ad(a.value,!0);return(a=kg(a,"WRMHEADER"))?cp(a):""}
627
+ function $o(a,b,c,d){var e=[];b=r(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=c[f.Ke];if(g){var h;if(h=Vf(f.node,"urn:microsoft:playready","pro")){h=id(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Sf(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.Ke)if(k=d,0==k.size)k=null;else{var l=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,
628
+ 226,251,75]),m=new Uint8Array([]);k=[{initData:Sf(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=Cb(g,f.init||a||h||k);if(g=fp.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function Zo(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=gp(c.value))&&b.push(c);return b}
629
+ function gp(a){var b=a.getAttribute("schemeIdUri"),c=Yf(a,"urn:mpeg:cenc:2013","default_KID"),d=Wf(a,"urn:mpeg:cenc:2013","pssh").map($f);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new M(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:id(f),keyId:null}})}catch(f){throw new M(2,4,4007);}return{node:a,Ke:b,keyId:c,init:0<e.length?e:null}}
630
+ var ep=1,fp=(new Map).set("com.widevine.alpha",function(a){return(a=Vf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",dp).set("com.microsoft.playready.recommendation",dp).set("com.microsoft.playready.software",dp).set("com.microsoft.playready.hardware",dp).set("org.w3.clearkey",function(a){return(a=Vf(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function hp(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=
631
631
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
632
- function jp(a,b){var c=kp(a,b,"timescale"),d=1;c&&(d=gg(c)||1);var e=kp(a,b,"duration");c=gg(e||"");"image"==a.L.contentType&&(c=ig(e||""));c&&(c/=d);var f=kp(a,b,"startNumber");e=Number(kp(a,b,"presentationTimeOffset"))||0;var g=hg(f||"");if(null==f||null==g)g=1;f=lp(a,b,"SegmentTimeline");b=null;if(f){b=d;a=a.Y.duration||Infinity;f=Uf(f,"S");for(var h=[],k=-e,l=0;l<f.length;++l){var m=f[l],p=f[l+1],n=bg(m,"t",hg),t=bg(m,"d",hg);m=bg(m,"r",fg);null!=n&&(n-=e);if(!t)break;n=null!=n?n:k;m=m||0;if(0>
633
- m)if(p){p=bg(p,"t",hg);if(null==p)break;else if(n>=p)break;m=Math.ceil((p-n)/t)-1}else{if(Infinity==a)break;else if(n/b>=a)break;m=Math.ceil((a*b-n)/t)-1}0<h.length&&n!=k&&(h[h.length-1].end=n/b);for(p=0;p<=m;++p)k=n+t,h.push({start:n/b,end:k/b,Ph:n}),n=k}b=h}return{timescale:d,za:c,qc:g,qb:e/d||0,ef:e,timeline:b}}function kp(a,b,c){return[b(a.L),b(a.va),b(a.qa)].filter(Ab).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
634
- function lp(a,b,c){return[b(a.L),b(a.va),b(a.qa)].filter(Ab).map(function(d){return Tf(d,c)}).reduce(function(d,e){return d||e})}
635
- function mp(a,b,c,d,e,f){for(var g=Yf(a,"http://www.w3.org/1999/xlink","href"),h=Yf(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=r(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 Ze(new M(2,4,4028));if("onLoad"!=h)return Ze(new M(2,4,4027));var m=Bb([d],[g]);return e.request(0,nf(m,b)).ma(function(p){p=mg(p.data,a.tagName);if(!p)return Ze(new M(2,4,4001,g));
636
- for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;p.childNodes.length;){var n=p.childNodes[0];p.removeChild(n);a.appendChild(n)}p=r(Array.from(p.attributes));for(n=p.next();!n.done;n=p.next())a.setAttributeNode(n.value.cloneNode(!1));return np(a,b,c,m[0],e,f+1)})}
637
- function np(a,b,c,d,e,f){f=void 0===f?0:f;if(Yf(a,"http://www.w3.org/1999/xlink","href")){var g=mp(a,b,c,d,e,f);c&&(g=g.ma(void 0,function(){return np(a,b,c,d,e,f)}));return g}g=[];for(var h=r(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"==Yf(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(np(k,b,c,d,e,f)));return cf(g).ma(function(){return a})};function op(a,b,c,d,e,f,g){var h,k=(new Hf).U("sidx",function(l){h=pp(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new M(2,3,3004);}
638
- function pp(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.O();if(0==k)throw new M(2,3,3005);if(0==g.version){var l=g.reader.O();var m=g.reader.O()}else l=g.reader.Cb(),m=g.reader.Cb();g.reader.skip(2);var p=g.reader.Ge();a=a+g.size+m;for(m=0;m<p;m++){var n=g.reader.O(),t=(n&2147483648)>>>31;n&=2147483647;var v=g.reader.O();g.reader.skip(4);if(1==t)throw new M(2,3,3006);h.push(new Ai(l/k+c,(l+v)/k+c,function(){return f},a,a+n-1,b,c,d,e));l+=v;a+=n}g.parser.stop();return h};function qp(a){this.h=Ic(a);this.g=new Ef(this.h,0)}qp.prototype.xa=function(){return this.g.xa()};
639
- function rp(a){var b=sp(a);if(7<b.length)throw new M(2,3,3002);var c=0;b=r(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=sp(a);a:{d=r(tp);for(var e=d.next();!e.done;e=d.next())if(Dc(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.na();else{if(8==b.length&&b[1]&224)throw new M(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.na()+b<=a.h.byteLength?b:a.h.byteLength-a.g.na();d=Ic(a.h,a.g.na(),b);a.g.skip(b);return new up(c,
640
- d)}function sp(a){var b=a.g.na(),c=a.g.pb();if(0==c)throw new M(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Fc(a.h,b,c)}var tp=[[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 up(a,b){this.id=a;this.g=b}
641
- function vp(a){if(8<a.g.byteLength)throw new M(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new M(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 wp(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new qp(a.g);for(var p=null,n=null;a.xa();){var t=rp(a);if(187==t.id){var v=xp(t);v&&(t=c*v.Qh,v=b+v.Ah,null!=p&&m.push(new Ai(p+g,t+g,l,n,v-1,f,g,h,k)),p=t,n=v)}}null!=p&&m.push(new Ai(p+g,d+g,l,n,null,f,g,h,k));return m}
642
- function xp(a){var b=new qp(a.g);a=rp(b);if(179!=a.id)throw new M(2,3,3013);a=vp(a);b=rp(b);if(183!=b.id)throw new M(2,3,3012);b=new qp(b.g);for(var c=0;b.xa();){var d=rp(b);if(241==d.id){c=vp(d);break}}return{Qh:a,Ah:c}};function yp(a,b){b=lp(a,b,"Initialization");if(!b)return null;var c=a.L.Na,d=b.getAttribute("sourceURL");d&&(c=Bb(a.L.Na,[d]));d=0;var e=null;if(b=bg(b,"range",eg))d=b.start,e=b.end;return new yi(function(){return c},d,e,zp(a))}
643
- function Ap(a,b){var c=Number(kp(a,Bp,"presentationTimeOffset"))||0,d=kp(a,Bp,"timescale"),e=1;d&&(e=gg(d)||1);var f=c/e||0,g=yp(a,Bp);Cp(a,g);var h=ff(a);return{bc:function(){var k=lp(h,Bp,"RepresentationIndex");var l=h.L.Na;k&&(k=k.getAttribute("sourceURL"))&&(l=Bb(h.L.Na,[k]));k=Dp(h);return Ep(h,b,g,l,k.start,k.end,f)}}}
644
- function Ep(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,v,y,w,x,C,z,A,E;return F(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.wb||!a.Y.re,l=a.Y.start,m=a.Y.duration,p=a.L.mimeType.split("/")[1],n=b,t=null,v=[n(d,e,f),"webm"==p?n(c.Pa(),c.Ta,c.Ca):null],n=null,u(G,Promise.all(v),2);y=G.h;w=y[0];x=y[1]||null;C=null;z=l-g;A=l;E=m?l+m:Infinity;if("mp4"==p)var H=op(w,e,d,c,z,A,E);else{H=new qp(x);if(440786851!=rp(H).id)throw new M(2,3,3008);var J=rp(H);if(408125543!=J.id)throw new M(2,3,3009);H=J.g.byteOffset;
645
- J=new qp(J.g);for(var K=null;J.xa();){var Q=rp(J);if(357149030==Q.id){K=Q;break}}if(!K)throw new M(2,3,3010);K=new qp(K.g);Q=1E6;for(J=null;K.xa();){var V=rp(K);if(2807729==V.id)Q=vp(V);else if(17545==V.id)if(4==V.g.byteLength)J=V.g.getFloat32(0);else if(8==V.g.byteLength)J=V.g.getFloat64(0);else throw new M(2,3,3003);}if(null==J)throw new M(2,3,3011);K=Q/1E9;J*=K;Q=rp(new qp(w));if(475249515!=Q.id)throw new M(2,3,3007);H=wp(Q,H,K,J,d,c,z,A,E)}C=H;h.mc(C);t=new Tj(C);k&&t.xb(A,E,!0);return G.return(t)})}
646
- function Bp(a){return a.Zc}function Dp(a){var b=lp(a,Bp,"RepresentationIndex");a=kp(a,Bp,"indexRange");a=eg(a||"");b&&(a=bg(b,"range",eg,a));return a}function Cp(a,b){Fp(a,b);if(!Dp(a))throw new M(2,4,4002);}function Fp(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=Gb&&"mp4"!=c&&"webm"!=c)throw new M(2,4,4006);if("webm"==c&&!b)throw new M(2,4,4005);}
647
- function zp(a){var b=a.L;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.Dd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Gp(a,b){var c=yp(a,Hp),d=Ip(a);if(!d.za&&!d.timeline&&1<d.kc.length)throw new M(2,4,4002);if(!d.za&&!a.Y.duration&&!d.timeline&&1==d.kc.length)throw new M(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new M(2,4,4002);var e=null,f=null;a.qa.id&&a.L.id&&(f=b[a.qa.id+","+a.L.id])&&(e=f.segmentIndex);var g=Jp(a.Y.start,a.Y.duration,a.L.Na,d,c);b=!e;e?e.lc(g,a.presentationTimeline.kb()):e=new Tj(g);a.presentationTimeline.mc(g);a.wb&&a.Y.re||e.xb(a.Y.start,a.Y.duration?a.Y.start+a.Y.duration:
648
- Infinity,b);f&&(f.segmentIndex=e);return{bc:function(){e&&0!=e.g.length||e.Tc(g);return Promise.resolve(e)}}}function Hp(a){return a.Db}function Ip(a){var b=Kp(a);a=jp(a,Hp);var c=a.qc;0==c&&(c=1);var d=0;a.za?d=a.za*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{za:a.za,startTime:d,qc:c,qb:a.qb,timeline:a.timeline,kc:b}}
649
- function Jp(a,b,c,d,e){var f=d.kc.length;d.timeline&&d.timeline.length!=d.kc.length&&(f=Math.min(d.timeline.length,d.kc.length));for(var g=a-d.qb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},p=0;p<f;m={Xd:m.Xd},p++){var n=d.kc[p];m.Xd=Bb(c,[n.oh]);var t=void 0;t=null!=d.za?l+d.za:d.timeline?d.timeline[p].end:l+b;k.push(new Ai(a+l,a+t,function(v){return function(){return v.Xd}}(m),n.start,n.end,e,g,a,h));l=t}return k}
650
- function Kp(a){return[a.L.Db,a.va.Db,a.qa.Db].filter(Ab).map(function(b){return Uf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Nf&&(a.Nf=!0);var c=b.getAttribute("media");b=bg(b,"mediaRange",eg,{start:0,end:null});return{oh:c,start:b.start,end:b.end}})};function Lp(a,b,c,d,e,f){var g=Np(a),h=Op(a);Pp(h);var k=ff(a);if(h.Pc)return Fp(a,g),{bc:function(){var t=ip(h.Pc,k.L.id,null,k.bandwidth||null,null);t=Bb(k.L.Na,[t]);return Ep(k,b,g,t,0,null,h.qb)}};if(h.za)return d||"image"===a.va.contentType||(a.presentationTimeline.Ce(h.za),a.presentationTimeline.De(a.Y.start)),{bc:function(){return Qp(k,h,e,g,f)}};var l=null;d=d=null;a.qa.id&&a.L.id&&(d=a.qa.id+","+a.L.id,d=c[d])&&(l=d.segmentIndex);var m=Rp(k,h,g);c=a.Y.start;var p=a.Y.duration?a.Y.start+a.Y.duration:
651
- Infinity,n=!(a.wb&&a.Y.re);l?(n&&(new Tj(m)).xb(c,p,!0),l.lc(m,a.presentationTimeline.kb())):l=new Tj(m);a.presentationTimeline.mc(m);n&&l.xb(c,p);d&&a.wb&&(d.segmentIndex=l);return{bc:function(){l&&0!=l.g.length||l.Tc(m);return Promise.resolve(l)}}}function Sp(a){return a.$c}function Op(a){var b=jp(a,Sp),c=kp(a,Sp,"media");a=kp(a,Sp,"index");return{za:b.za,timescale:b.timescale,qc:b.qc,qb:b.qb,ef:b.ef,timeline:b.timeline,Ae:c,Pc:a}}
652
- function Pp(a){var b=a.Pc?1:0;b+=a.timeline?1:0;b+=a.za?1:0;if(0==b)throw new M(2,4,4002);1!=b&&(a.Pc&&(a.timeline=null),a.za=null);if(!a.Pc&&!a.Ae)throw new M(2,4,4002);}
653
- function Qp(a,b,c,d,e){function f(K){var Q=(K-t)*n,V=Q+b.qb,U=Q+l;Q=U+n;var ia=Math.min(Q,h());U=new Ai(U,ia,function(){var O=ip(y,x,K,w,V*v);return Bb(C,[O])},0,null,d,z,l,h());U.l=Q;return U}function g(){var K=[Math.max(k.kb(),l),Math.min(k.Ib(),h())].map(function(Q){return Q-l});return[Math.ceil(K[0]/n),Math.ceil(K[1]/n)-1].map(function(Q){return Q+t})}function h(){var K=null!=m&&e[m]||p;return K?l+K:Infinity}var k=a.presentationTimeline,l=a.Y.start,m=a.qa.id,p=a.Y.duration,n=b.za,t=b.qc,v=b.timescale,
632
+ function ip(a,b){var c=jp(a,b,"timescale"),d=1;c&&(d=gg(c)||1);var e=jp(a,b,"duration");c=gg(e||"");"image"==a.L.contentType&&(c=ig(e||""));c&&(c/=d);var f=jp(a,b,"startNumber");e=Number(jp(a,b,"presentationTimeOffset"))||0;var g=hg(f||"");if(null==f||null==g)g=1;f=kp(a,b,"SegmentTimeline");b=null;if(f){b=d;a=a.Y.duration||Infinity;f=Uf(f,"S");for(var h=[],k=-e,l=0;l<f.length;++l){var m=f[l],p=f[l+1],n=bg(m,"t",hg),t=bg(m,"d",hg);m=bg(m,"r",fg);null!=n&&(n-=e);if(!t)break;n=null!=n?n:k;m=m||0;if(0>
633
+ m)if(p){p=bg(p,"t",hg);if(null==p)break;else if(n>=p)break;m=Math.ceil((p-n)/t)-1}else{if(Infinity==a)break;else if(n/b>=a)break;m=Math.ceil((a*b-n)/t)-1}0<h.length&&n!=k&&(h[h.length-1].end=n/b);for(p=0;p<=m;++p)k=n+t,h.push({start:n/b,end:k/b,Ph:n}),n=k}b=h}return{timescale:d,za:c,qc:g,qb:e/d||0,ef:e,timeline:b}}function jp(a,b,c){return[b(a.L),b(a.wa),b(a.qa)].filter(Ab).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
634
+ function kp(a,b,c){return[b(a.L),b(a.wa),b(a.qa)].filter(Ab).map(function(d){return Tf(d,c)}).reduce(function(d,e){return d||e})}
635
+ function lp(a,b,c,d,e,f){for(var g=Yf(a,"http://www.w3.org/1999/xlink","href"),h=Yf(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=r(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 Ze(new M(2,4,4028));if("onLoad"!=h)return Ze(new M(2,4,4027));var m=Bb([d],[g]);return e.request(0,nf(m,b)).ma(function(p){p=mg(p.data,a.tagName);if(!p)return Ze(new M(2,4,4001,g));
636
+ for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;p.childNodes.length;){var n=p.childNodes[0];p.removeChild(n);a.appendChild(n)}p=r(Array.from(p.attributes));for(n=p.next();!n.done;n=p.next())a.setAttributeNode(n.value.cloneNode(!1));return mp(a,b,c,m[0],e,f+1)})}
637
+ function mp(a,b,c,d,e,f){f=void 0===f?0:f;if(Yf(a,"http://www.w3.org/1999/xlink","href")){var g=lp(a,b,c,d,e,f);c&&(g=g.ma(void 0,function(){return mp(a,b,c,d,e,f)}));return g}g=[];for(var h=r(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"==Yf(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(mp(k,b,c,d,e,f)));return cf(g).ma(function(){return a})};function np(a,b,c,d,e,f,g){var h,k=(new Hf).U("sidx",function(l){h=op(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new M(2,3,3004);}
638
+ function op(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.O();if(0==k)throw new M(2,3,3005);if(0==g.version){var l=g.reader.O();var m=g.reader.O()}else l=g.reader.Cb(),m=g.reader.Cb();g.reader.skip(2);var p=g.reader.Ge();a=a+g.size+m;for(m=0;m<p;m++){var n=g.reader.O(),t=(n&2147483648)>>>31;n&=2147483647;var v=g.reader.O();g.reader.skip(4);if(1==t)throw new M(2,3,3006);h.push(new Ai(l/k+c,(l+v)/k+c,function(){return f},a,a+n-1,b,c,d,e));l+=v;a+=n}g.parser.stop();return h};function pp(a){this.h=Ic(a);this.g=new Ef(this.h,0)}pp.prototype.ya=function(){return this.g.ya()};
639
+ function qp(a){var b=rp(a);if(7<b.length)throw new M(2,3,3002);var c=0;b=r(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=rp(a);a:{d=r(sp);for(var e=d.next();!e.done;e=d.next())if(Dc(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.na();else{if(8==b.length&&b[1]&224)throw new M(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.na()+b<=a.h.byteLength?b:a.h.byteLength-a.g.na();d=Ic(a.h,a.g.na(),b);a.g.skip(b);return new tp(c,
640
+ d)}function rp(a){var b=a.g.na(),c=a.g.pb();if(0==c)throw new M(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Fc(a.h,b,c)}var sp=[[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 tp(a,b){this.id=a;this.g=b}
641
+ function up(a){if(8<a.g.byteLength)throw new M(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new M(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 vp(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new pp(a.g);for(var p=null,n=null;a.ya();){var t=qp(a);if(187==t.id){var v=wp(t);v&&(t=c*v.Qh,v=b+v.Ah,null!=p&&m.push(new Ai(p+g,t+g,l,n,v-1,f,g,h,k)),p=t,n=v)}}null!=p&&m.push(new Ai(p+g,d+g,l,n,null,f,g,h,k));return m}
642
+ function wp(a){var b=new pp(a.g);a=qp(b);if(179!=a.id)throw new M(2,3,3013);a=up(a);b=qp(b);if(183!=b.id)throw new M(2,3,3012);b=new pp(b.g);for(var c=0;b.ya();){var d=qp(b);if(241==d.id){c=up(d);break}}return{Qh:a,Ah:c}};function xp(a,b){b=kp(a,b,"Initialization");if(!b)return null;var c=a.L.Na,d=b.getAttribute("sourceURL");d&&(c=Bb(a.L.Na,[d]));d=0;var e=null;if(b=bg(b,"range",eg))d=b.start,e=b.end;return new yi(function(){return c},d,e,yp(a))}
643
+ function zp(a,b){var c=Number(jp(a,Ap,"presentationTimeOffset"))||0,d=jp(a,Ap,"timescale"),e=1;d&&(e=gg(d)||1);var f=c/e||0,g=xp(a,Ap);Bp(a,g);var h=ff(a);return{bc:function(){var k=kp(h,Ap,"RepresentationIndex");var l=h.L.Na;k&&(k=k.getAttribute("sourceURL"))&&(l=Bb(h.L.Na,[k]));k=Cp(h);return Dp(h,b,g,l,k.start,k.end,f)}}}
644
+ function Dp(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,v,y,w,x,C,z,A,E;return F(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.wb||!a.Y.re,l=a.Y.start,m=a.Y.duration,p=a.L.mimeType.split("/")[1],n=b,t=null,v=[n(d,e,f),"webm"==p?n(c.Pa(),c.Ta,c.Ca):null],n=null,u(G,Promise.all(v),2);y=G.h;w=y[0];x=y[1]||null;C=null;z=l-g;A=l;E=m?l+m:Infinity;if("mp4"==p)var H=np(w,e,d,c,z,A,E);else{H=new pp(x);if(440786851!=qp(H).id)throw new M(2,3,3008);var J=qp(H);if(408125543!=J.id)throw new M(2,3,3009);H=J.g.byteOffset;
645
+ J=new pp(J.g);for(var K=null;J.ya();){var Q=qp(J);if(357149030==Q.id){K=Q;break}}if(!K)throw new M(2,3,3010);K=new pp(K.g);Q=1E6;for(J=null;K.ya();){var V=qp(K);if(2807729==V.id)Q=up(V);else if(17545==V.id)if(4==V.g.byteLength)J=V.g.getFloat32(0);else if(8==V.g.byteLength)J=V.g.getFloat64(0);else throw new M(2,3,3003);}if(null==J)throw new M(2,3,3011);K=Q/1E9;J*=K;Q=qp(new pp(w));if(475249515!=Q.id)throw new M(2,3,3007);H=vp(Q,H,K,J,d,c,z,A,E)}C=H;h.mc(C);t=new Tj(C);k&&t.xb(A,E,!0);return G.return(t)})}
646
+ function Ap(a){return a.Zc}function Cp(a){var b=kp(a,Ap,"RepresentationIndex");a=jp(a,Ap,"indexRange");a=eg(a||"");b&&(a=bg(b,"range",eg,a));return a}function Bp(a,b){Ep(a,b);if(!Cp(a))throw new M(2,4,4002);}function Ep(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=Gb&&"mp4"!=c&&"webm"!=c)throw new M(2,4,4006);if("webm"==c&&!b)throw new M(2,4,4005);}
647
+ function yp(a){var b=a.L;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.Dd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Fp(a,b){var c=xp(a,Gp),d=Hp(a);if(!d.za&&!d.timeline&&1<d.kc.length)throw new M(2,4,4002);if(!d.za&&!a.Y.duration&&!d.timeline&&1==d.kc.length)throw new M(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new M(2,4,4002);var e=null,f=null;a.qa.id&&a.L.id&&(f=b[a.qa.id+","+a.L.id])&&(e=f.segmentIndex);var g=Ip(a.Y.start,a.Y.duration,a.L.Na,d,c);b=!e;e?e.lc(g,a.presentationTimeline.kb()):e=new Tj(g);a.presentationTimeline.mc(g);a.wb&&a.Y.re||e.xb(a.Y.start,a.Y.duration?a.Y.start+a.Y.duration:
648
+ Infinity,b);f&&(f.segmentIndex=e);return{bc:function(){e&&0!=e.g.length||e.Tc(g);return Promise.resolve(e)}}}function Gp(a){return a.Db}function Hp(a){var b=Jp(a);a=ip(a,Gp);var c=a.qc;0==c&&(c=1);var d=0;a.za?d=a.za*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{za:a.za,startTime:d,qc:c,qb:a.qb,timeline:a.timeline,kc:b}}
649
+ function Ip(a,b,c,d,e){var f=d.kc.length;d.timeline&&d.timeline.length!=d.kc.length&&(f=Math.min(d.timeline.length,d.kc.length));for(var g=a-d.qb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},p=0;p<f;m={Xd:m.Xd},p++){var n=d.kc[p];m.Xd=Bb(c,[n.oh]);var t=void 0;t=null!=d.za?l+d.za:d.timeline?d.timeline[p].end:l+b;k.push(new Ai(a+l,a+t,function(v){return function(){return v.Xd}}(m),n.start,n.end,e,g,a,h));l=t}return k}
650
+ function Jp(a){return[a.L.Db,a.wa.Db,a.qa.Db].filter(Ab).map(function(b){return Uf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Nf&&(a.Nf=!0);var c=b.getAttribute("media");b=bg(b,"mediaRange",eg,{start:0,end:null});return{oh:c,start:b.start,end:b.end}})};function Kp(a,b,c,d,e,f){var g=Mp(a),h=Np(a);Op(h);var k=ff(a);if(h.Pc)return Ep(a,g),{bc:function(){var t=hp(h.Pc,k.L.id,null,k.bandwidth||null,null);t=Bb(k.L.Na,[t]);return Dp(k,b,g,t,0,null,h.qb)}};if(h.za)return d||"image"===a.wa.contentType||(a.presentationTimeline.Ce(h.za),a.presentationTimeline.De(a.Y.start)),{bc:function(){return Pp(k,h,e,g,f)}};var l=null;d=d=null;a.qa.id&&a.L.id&&(d=a.qa.id+","+a.L.id,d=c[d])&&(l=d.segmentIndex);var m=Qp(k,h,g);c=a.Y.start;var p=a.Y.duration?a.Y.start+a.Y.duration:
651
+ Infinity,n=!(a.wb&&a.Y.re);l?(n&&(new Tj(m)).xb(c,p,!0),l.lc(m,a.presentationTimeline.kb())):l=new Tj(m);a.presentationTimeline.mc(m);n&&l.xb(c,p);d&&a.wb&&(d.segmentIndex=l);return{bc:function(){l&&0!=l.g.length||l.Tc(m);return Promise.resolve(l)}}}function Rp(a){return a.$c}function Np(a){var b=ip(a,Rp),c=jp(a,Rp,"media");a=jp(a,Rp,"index");return{za:b.za,timescale:b.timescale,qc:b.qc,qb:b.qb,ef:b.ef,timeline:b.timeline,Ae:c,Pc:a}}
652
+ function Op(a){var b=a.Pc?1:0;b+=a.timeline?1:0;b+=a.za?1:0;if(0==b)throw new M(2,4,4002);1!=b&&(a.Pc&&(a.timeline=null),a.za=null);if(!a.Pc&&!a.Ae)throw new M(2,4,4002);}
653
+ function Pp(a,b,c,d,e){function f(K){var Q=(K-t)*n,V=Q+b.qb,U=Q+l;Q=U+n;var ia=Math.min(Q,h());U=new Ai(U,ia,function(){var O=hp(y,x,K,w,V*v);return Bb(C,[O])},0,null,d,z,l,h());U.l=Q;return U}function g(){var K=[Math.max(k.kb(),l),Math.min(k.Ib(),h())].map(function(Q){return Q-l});return[Math.ceil(K[0]/n),Math.ceil(K[1]/n)-1].map(function(Q){return Q+t})}function h(){var K=null!=m&&e[m]||p;return K?l+K:Infinity}var k=a.presentationTimeline,l=a.Y.start,m=a.qa.id,p=a.Y.duration,n=b.za,t=b.qc,v=b.timescale,
654
654
  y=b.Ae,w=a.bandwidth||null,x=a.L.id,C=a.L.Na,z=l-b.qb,A=g();a=a.wb?Math.max(A[0],A[1]-c+1):A[0];A=A[1];c=[];for(var E=a;E<=A;++E){var G=f(E);c.push(G)}var H=new Tj(c);c=k.Ib()<h();E=k.S();if(c||E){var J=Math.max(a,A+1);H.Pd(n,function(){var K=k.kb();H.Gb(K);var Q=r(g());Q.next();Q=Q.next().value;for(var V=[];J<=Q;){var U=f(J);V.push(U);J++}return K>h()&&!V.length?null:V})}return Promise.resolve(H)}
655
- function Rp(a,b,c){var d=a.Y.start,e=a.Y.duration,f=d-b.qb;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={Wd:h.Wd,$d:h.$d,ce:h.ce,Td:h.Td,fe:h.fe,Ud:h.Ud},k++){var l=b.timeline[k],m=l.start,p=l.Ph;l=l.end;h.ce=k+b.qc;h.fe=p+b.ef;h.$d=a.L.id;h.Td=a.bandwidth||null;h.Wd=b.Ae;h.Ud=a.L.Na;g.push(new Ai(d+m,d+l,function(n){return function(){var t=ip(n.Wd,n.$d,n.ce,n.Td||null,n.fe);return Bb(n.Ud,[t]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
656
- function Np(a){var b=kp(a,Sp,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.Na;return new yi(function(){var f=ip(b,c,null,d,null);return Bb(e,[f])},0,null,zp(a))};function Tp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Tp.prototype.release=function(){for(var a=r(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=[]};
657
- function Up(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,G,H,J,K,Q,V,U,ia,O,qa,Ka;return F(function(Ca){switch(Ca.g){case 1:d=Hb;Vp(b);Wp(b);Xp(b);Yp(b);if(!c&&1==b.length){e=b[0];a.g=e.od;a.h=e.Qd;a.j=e.textStreams;a.i=e.imageStreams;Ca.D(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 Ca.return();k=b.map(function(Va){return Va.od});l=b.map(function(Va){return Va.Qd});m=b.map(function(Va){return Va.textStreams});p=b.map(function(Va){return Va.imageStreams});
658
- n=r(m);for(t=n.next();!t.done;t=n.next())v=t.value,v.push(Zp(d.ea));y=r(p);for(w=y.next();!w.done;w=y.next())x=w.value,x.push(Zp(d.Bc));return u(Ca,$p(a.g,k,f,aq,bq),3);case 3:return u(Ca,$p(a.h,l,f,aq,bq),4);case 4:return u(Ca,$p(a.j,m,f,aq,bq),5);case 5:return u(Ca,$p(a.i,p,f,aq,bq),2);case 2:C=0;z=[];if(a.h.length&&a.g.length)for(K=r(a.g),Q=K.next();!Q.done;Q=K.next())for(V=Q.value,U=r(a.h),ia=U.next();!ia.done;ia=U.next())O=ia.value,qa=Xg(V.drmInfos,O.drmInfos),V.drmInfos.length&&O.drmInfos.length&&
655
+ function Qp(a,b,c){var d=a.Y.start,e=a.Y.duration,f=d-b.qb;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={Wd:h.Wd,$d:h.$d,ce:h.ce,Td:h.Td,fe:h.fe,Ud:h.Ud},k++){var l=b.timeline[k],m=l.start,p=l.Ph;l=l.end;h.ce=k+b.qc;h.fe=p+b.ef;h.$d=a.L.id;h.Td=a.bandwidth||null;h.Wd=b.Ae;h.Ud=a.L.Na;g.push(new Ai(d+m,d+l,function(n){return function(){var t=hp(n.Wd,n.$d,n.ce,n.Td||null,n.fe);return Bb(n.Ud,[t]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
656
+ function Mp(a){var b=jp(a,Rp,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.Na;return new yi(function(){var f=hp(b,c,null,d,null);return Bb(e,[f])},0,null,yp(a))};function Sp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Sp.prototype.release=function(){for(var a=r(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=[]};
657
+ function Tp(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,G,H,J,K,Q,V,U,ia,O,qa,Ka;return F(function(Ca){switch(Ca.g){case 1:d=Hb;Up(b);Vp(b);Wp(b);Xp(b);if(!c&&1==b.length){e=b[0];a.g=e.od;a.h=e.Qd;a.j=e.textStreams;a.i=e.imageStreams;Ca.D(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 Ca.return();k=b.map(function(Va){return Va.od});l=b.map(function(Va){return Va.Qd});m=b.map(function(Va){return Va.textStreams});p=b.map(function(Va){return Va.imageStreams});
658
+ n=r(m);for(t=n.next();!t.done;t=n.next())v=t.value,v.push(Yp(d.ea));y=r(p);for(w=y.next();!w.done;w=y.next())x=w.value,x.push(Yp(d.Bc));return u(Ca,Zp(a.g,k,f,$p,aq),3);case 3:return u(Ca,Zp(a.h,l,f,$p,aq),4);case 4:return u(Ca,Zp(a.j,m,f,$p,aq),5);case 5:return u(Ca,Zp(a.i,p,f,$p,aq),2);case 2:C=0;z=[];if(a.h.length&&a.g.length)for(K=r(a.g),Q=K.next();!Q.done;Q=K.next())for(V=Q.value,U=r(a.h),ia=U.next();!ia.done;ia=U.next())O=ia.value,qa=Xg(V.drmInfos,O.drmInfos),V.drmInfos.length&&O.drmInfos.length&&
659
659
  !qa.length||(Ka=C++,z.push({id:Ka,language:V.language,primary:V.primary,audio:V,video:O,bandwidth:(V.bandwidth||0)+(O.bandwidth||0),drmInfos:qa,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(A=a.h.concat(a.g),E=r(A),G=E.next();!G.done;G=E.next())H=G.value,J=C++,z.push({id:J,language:H.language,primary:H.primary,audio:H.type==d.kd?H:null,video:H.type==d.Ma?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
660
- a.l=z;B(Ca)}})}function Vp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.od),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(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&&fc(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.od=c}}
661
- function Xp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(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&&fc(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
662
- function Wp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Qd),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(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&&fc(e.roles,h.roles)&&Df(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Qd=c}}
663
- function Yp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(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}}
664
- function cq(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,G,H,J,K,Q,V;return F(function(U){switch(U.g){case 1:b=Hb;if(1==a.length)return U.return(a[0]);c=a.map(function(ia){return ia.filter(function(O){return O.type==b.kd})});d=a.map(function(ia){return ia.filter(function(O){return O.type==b.Ma})});e=a.map(function(ia){return ia.filter(function(O){return O.type==b.ea})});f=a.map(function(ia){return ia.filter(function(O){return O.type==b.Bc})});g=r(e);for(h=g.next();!h.done;h=g.next())k=h.value,
665
- k.push(dq(b.ea));l=r(f);for(m=l.next();!m.done;m=l.next())p=m.value,p.push(dq(b.Bc));return u(U,$p([],c,0,eq,fq),2);case 2:return n=U.h,u(U,$p([],d,0,eq,fq),3);case 3:return t=U.h,u(U,$p([],e,0,eq,fq),4);case 4:return v=U.h,u(U,$p([],f,0,eq,fq),5);case 5:y=U.h;w=0;if(t.length&&n.length)for(E=r(n),G=E.next();!G.done;G=E.next())for(H=G.value,J=r(t),K=J.next();!K.done;K=J.next())Q=K.value,V=w++,Q.variantIds.push(V),H.variantIds.push(V);else for(x=t.concat(n),C=r(x),z=C.next();!z.done;z=C.next())A=z.value,
660
+ a.l=z;B(Ca)}})}function Up(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.od),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(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&&fc(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.od=c}}
661
+ function Wp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(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&&fc(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
662
+ function Vp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Qd),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(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&&fc(e.roles,h.roles)&&Df(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Qd=c}}
663
+ function Xp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(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}}
664
+ function bq(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,G,H,J,K,Q,V;return F(function(U){switch(U.g){case 1:b=Hb;if(1==a.length)return U.return(a[0]);c=a.map(function(ia){return ia.filter(function(O){return O.type==b.kd})});d=a.map(function(ia){return ia.filter(function(O){return O.type==b.Ma})});e=a.map(function(ia){return ia.filter(function(O){return O.type==b.ea})});f=a.map(function(ia){return ia.filter(function(O){return O.type==b.Bc})});g=r(e);for(h=g.next();!h.done;h=g.next())k=h.value,
665
+ k.push(cq(b.ea));l=r(f);for(m=l.next();!m.done;m=l.next())p=m.value,p.push(cq(b.Bc));return u(U,Zp([],c,0,dq,eq),2);case 2:return n=U.h,u(U,Zp([],d,0,dq,eq),3);case 3:return t=U.h,u(U,Zp([],e,0,dq,eq),4);case 4:return v=U.h,u(U,Zp([],f,0,dq,eq),5);case 5:y=U.h;w=0;if(t.length&&n.length)for(E=r(n),G=E.next();!G.done;G=E.next())for(H=G.value,J=r(t),K=J.next();!K.done;K=J.next())Q=K.value,V=w++,Q.variantIds.push(V),H.variantIds.push(V);else for(x=t.concat(n),C=r(x),z=C.next();!z.done;z=C.next())A=z.value,
666
666
  A.variantIds=[w++];return U.return(t.concat(n).concat(v).concat(y))}})}
667
- function $p(a,b,c,d,e){var f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,G,H,J,K;return F(function(Q){switch(Q.g){case 1:f=Hb;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=r(a);l=k.next();case 2:if(l.done){Q.D(4);break}m=l.value;return u(Q,gq(m,b,c,e,g),5);case 5:p=Q.h;if(!p)throw new M(2,4,4037);l=k.next();Q.D(2);break;case 4:n=r(g);for(t=n.next();!t.done;t=n.next())for(v=t.value,y=r(v),w=y.next();!w.done;w=y.next())x=w.value,(C=hq(x,b,d,e,g))&&a.push(C);z=r(g);for(t=z.next();!t.done;t=
668
- z.next())for(A=t.value,E={},G=r(A),w=G.next();!w.done;E={ub:E.ub},w=G.next())if(E.ub=w.value,H=E.ub.type==f.ea&&!E.ub.language,J=E.ub.type==f.Bc&&!E.ub.tilesLayout,!H&&!J&&(K=a.some(function(V){return function(U){return U.mimeType==V.ub.mimeType&&yd(U.codecs)==yd(V.ub.codecs)}}(E))))throw new M(2,4,4037);return Q.return(a)}})}function gq(a,b,c,d,e){return F(function(f){if(1==f.g)return iq(b,a),a.matchedStreams?a.segmentIndex?u(f,jq(a,c),2):f.D(2):f.return(!1);kq(a,c,d,e);return f.return(!0)})}
669
- function jq(a,b){var c,d,e,f,g,h,k;return F(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=r(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 Xj)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.l.push(k.segmentIndex);B(l)})}
670
- function hq(a,b,c,d,e){var f=c(a);iq(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return F(function(g){if(f.segmentIndex)return g.D(0);f.segmentIndex=new Xj;return u(g,jq(f,0),0)})});if(!f.matchedStreams||!f.matchedStreams.length)return null;kq(f,0,d,e);return f}function kq(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==Qb(a.language,g.language)&&(h=!1);h&&d[f].delete(g)}}
671
- function aq(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=r(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}
672
- function eq(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
673
- function bq(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(ha(f),ha(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 M(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
674
- (a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=aq(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),bq(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&bq(a.trickModeVideo,b)}
675
- function fq(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ha(a.keyIds),ha(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ha(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=r(b.closedCaptions),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;a.closedCaptions.set(c,d)}}
676
- function iq(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=b,f={audio:lq,video:lq,text:mq,image:nq}[e.type],g={audio:oq,video:pq,text:qq,image:rq}[e.type],h=null;d=r(d.value);for(var k=d.next();!k.done;k=d.next())k=k.value,!f(e,k)||h&&!g(e,h,k)||(h=k);e=h;if(!e)return;c.push(e)}b.matchedStreams=c}function lq(a,b){var c;!(c=b.mimeType!=a.mimeType||yd(b.codecs)!=yd(a.codecs))&&(c=a.drmInfos)&&(a=a.drmInfos,b=b.drmInfos,c=!(a.length&&b.length?0<Xg(a,b).length:1));return c?!1:!0}
677
- function mq(a,b){return a.language?b.language?0==Qb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function nq(a){return a.tilesLayout?!0:!1}
678
- function oq(a,b,c){if(a.id==c.id)return!0;var d=Qb(a.language,b.language),e=Qb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;
679
- d=sq(a.channelsCount,b.channelsCount,c.channelsCount);if(d==tq)return!0;if(d==uq)return!1;d=sq(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==tq?!0:d==uq?!1:a.bandwidth&&vq(a.bandwidth,b.bandwidth,c.bandwidth)==tq?!0:!1}
680
- function pq(a,b,c){if(a.id==c.id)return!0;var d=sq(a.width*a.height,b.width*b.height,c.width*c.height);if(d==tq)return!0;if(d==uq)return!1;if(a.frameRate){d=sq(a.frameRate,b.frameRate,c.frameRate);if(d==tq)return!0;if(d==uq)return!1}return a.bandwidth&&vq(a.bandwidth,b.bandwidth,c.bandwidth)==tq?!0:!1}
681
- function qq(a,b,c){if(a.id==c.id)return!0;var d=Qb(a.language,b.language),e=Qb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=
682
- a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function rq(a,b,c){return a.id==c.id?!0:sq(a.width*a.height,b.width*b.height,c.width*c.height)==tq?!0:!1}function dq(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}}
683
- function Zp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Tj([]),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}}
684
- function sq(a,b,c){if(b==a&&a!=c)return uq;if(c==a&&a!=b)return tq;if(b>a){if(c<=a||c-a<b-a)return tq;if(c-a>b-a)return uq}else{if(c>a)return uq;if(a-c<a-b)return tq;if(a-c>a-b)return uq}return wq}function vq(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?tq:b<a?uq:wq}var tq=1,wq=0,uq=-1;function xq(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.I=1;this.l={};this.M={};this.j=new Tp;this.H=0;this.J=new Zb(5);this.G=new N(function(){yq(a)});this.s=new gf;this.B=null;this.K=[];this.C=Infinity;this.F=!1}q=xq.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return F(function(e){if(1==e.g)return c.F=b.isLowLatencyMode(),c.m=[a],c.h=b,u(e,zq(c),2);d=e.h;c.h&&Aq(c,d);if(!c.h)throw new M(2,7,7001);return e.return(c.i)})};
685
- q.stop=function(){for(var a=r(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.G&&(this.G.stop(),this.G=null);return this.s.destroy()};q.update=function(){var a=this,b;return F(function(c){if(1==c.g)return D(c,2),u(c,zq(a),4);if(2!=c.g)return va(c,0);b=wa(c);if(!a.h||!b)return c.return();a.h.onError(b);B(c)})};q.onExpirationUpdated=function(){};
686
- function zq(a){var b,c,d,e,f,g,h;return F(function(k){if(1==k.g)return b=nf(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),hf(a.s,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,Bq(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.J.sample(1,h);return k.return(h)})}
687
- function Bq(a,b,c){var d,e,f,g,h;return F(function(k){if(1==k.g){d=mg(b,"MPD");if(!d)throw new M(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k.return(Cq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=np(d,a.g.retryParameters,f,c,a.h.networkingEngine);hf(a.s,g);return u(k,g.promise,2)}h=k.h;return k.return(Cq(a,h,c))})}
688
- function Cq(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,G,H,J,K,Q,V,U,ia,O,qa,Ka,Ca,Va;return F(function(Oa){switch(Oa.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Uf(b,"Location").map($f).filter(Ab);0<f.length&&(g=Bb(e,f),e=a.m=g);h=Uf(b,"BaseURL");k=h.map($f);l=Bb(e,k);m=0;h&&h.length&&(m=bg(h[0],"availabilityTimeOffset",ig)||0);p=a.g.dash.ignoreMinBufferTime;n=0;p||(n=bg(b,"minBufferTime",dg)||0);a.H=bg(b,"minimumUpdatePeriod",dg,-1);t=bg(b,"availabilityStartTime",cg);v=bg(b,
667
+ function Zp(a,b,c,d,e){var f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,G,H,J,K;return F(function(Q){switch(Q.g){case 1:f=Hb;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=r(a);l=k.next();case 2:if(l.done){Q.D(4);break}m=l.value;return u(Q,fq(m,b,c,e,g),5);case 5:p=Q.h;if(!p)throw new M(2,4,4037);l=k.next();Q.D(2);break;case 4:n=r(g);for(t=n.next();!t.done;t=n.next())for(v=t.value,y=r(v),w=y.next();!w.done;w=y.next())x=w.value,(C=gq(x,b,d,e,g))&&a.push(C);z=r(g);for(t=z.next();!t.done;t=
668
+ z.next())for(A=t.value,E={},G=r(A),w=G.next();!w.done;E={ub:E.ub},w=G.next())if(E.ub=w.value,H=E.ub.type==f.ea&&!E.ub.language,J=E.ub.type==f.Bc&&!E.ub.tilesLayout,!H&&!J&&(K=a.some(function(V){return function(U){return U.mimeType==V.ub.mimeType&&yd(U.codecs)==yd(V.ub.codecs)}}(E))))throw new M(2,4,4037);return Q.return(a)}})}function fq(a,b,c,d,e){return F(function(f){if(1==f.g)return hq(b,a),a.matchedStreams?a.segmentIndex?u(f,iq(a,c),2):f.D(2):f.return(!1);jq(a,c,d,e);return f.return(!0)})}
669
+ function iq(a,b){var c,d,e,f,g,h,k;return F(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=r(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 Xj)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.l.push(k.segmentIndex);B(l)})}
670
+ function gq(a,b,c,d,e){var f=c(a);hq(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return F(function(g){if(f.segmentIndex)return g.D(0);f.segmentIndex=new Xj;return u(g,iq(f,0),0)})});if(!f.matchedStreams||!f.matchedStreams.length)return null;jq(f,0,d,e);return f}function jq(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==Qb(a.language,g.language)&&(h=!1);h&&d[f].delete(g)}}
671
+ function $p(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=r(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}
672
+ function dq(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
673
+ function aq(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(ha(f),ha(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 M(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
674
+ (a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=$p(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),aq(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&aq(a.trickModeVideo,b)}
675
+ function eq(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ha(a.keyIds),ha(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ha(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=r(b.closedCaptions),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;a.closedCaptions.set(c,d)}}
676
+ function hq(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=b,f={audio:kq,video:kq,text:lq,image:mq}[e.type],g={audio:nq,video:oq,text:pq,image:qq}[e.type],h=null;d=r(d.value);for(var k=d.next();!k.done;k=d.next())k=k.value,!f(e,k)||h&&!g(e,h,k)||(h=k);e=h;if(!e)return;c.push(e)}b.matchedStreams=c}function kq(a,b){var c;!(c=b.mimeType!=a.mimeType||yd(b.codecs)!=yd(a.codecs))&&(c=a.drmInfos)&&(a=a.drmInfos,b=b.drmInfos,c=!(a.length&&b.length?0<Xg(a,b).length:1));return c?!1:!0}
677
+ function lq(a,b){return a.language?b.language?0==Qb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function mq(a){return a.tilesLayout?!0:!1}
678
+ function nq(a,b,c){if(a.id==c.id)return!0;var d=Qb(a.language,b.language),e=Qb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;
679
+ d=rq(a.channelsCount,b.channelsCount,c.channelsCount);if(d==sq)return!0;if(d==tq)return!1;d=rq(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==sq?!0:d==tq?!1:a.bandwidth&&uq(a.bandwidth,b.bandwidth,c.bandwidth)==sq?!0:!1}
680
+ function oq(a,b,c){if(a.id==c.id)return!0;var d=rq(a.width*a.height,b.width*b.height,c.width*c.height);if(d==sq)return!0;if(d==tq)return!1;if(a.frameRate){d=rq(a.frameRate,b.frameRate,c.frameRate);if(d==sq)return!0;if(d==tq)return!1}return a.bandwidth&&uq(a.bandwidth,b.bandwidth,c.bandwidth)==sq?!0:!1}
681
+ function pq(a,b,c){if(a.id==c.id)return!0;var d=Qb(a.language,b.language),e=Qb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=
682
+ a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function qq(a,b,c){return a.id==c.id?!0:rq(a.width*a.height,b.width*b.height,c.width*c.height)==sq?!0:!1}function cq(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,external:!1}}
683
+ function Yp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Tj([]),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,external:!1}}
684
+ function rq(a,b,c){if(b==a&&a!=c)return tq;if(c==a&&a!=b)return sq;if(b>a){if(c<=a||c-a<b-a)return sq;if(c-a>b-a)return tq}else{if(c>a)return tq;if(a-c<a-b)return sq;if(a-c>a-b)return tq}return vq}function uq(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?sq:b<a?tq:vq}var sq=1,vq=0,tq=-1;function wq(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.I=1;this.l={};this.M={};this.j=new Sp;this.H=0;this.J=new Zb(5);this.G=new N(function(){xq(a)});this.s=new gf;this.B=null;this.K=[];this.C=Infinity;this.F=!1}q=wq.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return F(function(e){if(1==e.g)return c.F=b.isLowLatencyMode(),c.m=[a],c.h=b,u(e,yq(c),2);d=e.h;c.h&&zq(c,d);if(!c.h)throw new M(2,7,7001);return e.return(c.i)})};
685
+ q.stop=function(){for(var a=r(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.G&&(this.G.stop(),this.G=null);return this.s.destroy()};q.update=function(){var a=this,b;return F(function(c){if(1==c.g)return D(c,2),u(c,yq(a),4);if(2!=c.g)return va(c,0);b=wa(c);if(!a.h||!b)return c.return();a.h.onError(b);B(c)})};q.onExpirationUpdated=function(){};
686
+ function yq(a){var b,c,d,e,f,g,h;return F(function(k){if(1==k.g)return b=nf(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),hf(a.s,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,Aq(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.J.sample(1,h);return k.return(h)})}
687
+ function Aq(a,b,c){var d,e,f,g,h;return F(function(k){if(1==k.g){d=mg(b,"MPD");if(!d)throw new M(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k.return(Bq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=mp(d,a.g.retryParameters,f,c,a.h.networkingEngine);hf(a.s,g);return u(k,g.promise,2)}h=k.h;return k.return(Bq(a,h,c))})}
688
+ function Bq(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,G,H,J,K,Q,V,U,ia,O,qa,Ka,Ca,Va;return F(function(Oa){switch(Oa.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Uf(b,"Location").map($f).filter(Ab);0<f.length&&(g=Bb(e,f),e=a.m=g);h=Uf(b,"BaseURL");k=h.map($f);l=Bb(e,k);m=0;h&&h.length&&(m=bg(h[0],"availabilityTimeOffset",ig)||0);p=a.g.dash.ignoreMinBufferTime;n=0;p||(n=bg(b,"minBufferTime",dg)||0);a.H=bg(b,"minimumUpdatePeriod",dg,-1);t=bg(b,"availabilityStartTime",cg);v=bg(b,
689
689
  "timeShiftBufferDepth",dg);y=a.g.dash.ignoreSuggestedPresentationDelay;w=null;y||(w=bg(b,"suggestedPresentationDelay",dg));x=a.g.dash.ignoreMaxSegmentDuration;C=null;x||(C=bg(b,"maxSegmentDuration",dg));z=b.getAttribute("type")||"static";if(a.i)for(A=a.i.presentationTimeline,E=r(Object.values(a.l)),G=E.next();!G.done;G=E.next())H=G.value,H.segmentIndex&&H.segmentIndex.Gb(A.kb());else J=a.g.defaultPresentationDelay||1.5*n,K=null!=w?w:J,A=new P(t,K,a.g.dash.autoCorrectDrift);A.bd("static"==z);(Q=A.S())&&
690
- !isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);A.Ue(v);V=b.getAttribute("profiles")||"";U={wb:"static"!=z,presentationTimeline:A,qa:null,Y:null,va:null,L:null,bandwidth:0,Nf:!1,$b:m,profiles:V.split(",")};ia=Dq(a,U,l,b);O=ia.duration;qa=ia.periods;"static"!=z&&ia.Ff||A.Sa(O||Infinity);a.C&&!a.F&&(Ka=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.F=a.h.isLowLatencyMode());a.F?A.Vf(a.C):a.C&&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.");
691
- A.Ce(C||1);return u(Oa,Up(a.j,qa,U.wb),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);Oa.D(3);break}a.i={presentationTimeline:A,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:n||0,sequenceMode:a.g.dash.sequenceMode};if(!A.gg()){Oa.D(4);break}Ca=Uf(b,"UTCTiming");return u(Oa,Eq(a,l,Ca),5);case 5:Va=Oa.h;if(!a.h)return Oa.return();A.Wf(Va);case 4:A.ye();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),
690
+ !isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);A.Ue(v);V=b.getAttribute("profiles")||"";U={wb:"static"!=z,presentationTimeline:A,qa:null,Y:null,wa:null,L:null,bandwidth:0,Nf:!1,$b:m,profiles:V.split(",")};ia=Cq(a,U,l,b);O=ia.duration;qa=ia.periods;"static"!=z&&ia.Ff||A.Sa(O||Infinity);a.C&&!a.F&&(Ka=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.F=a.h.isLowLatencyMode());a.F?A.Vf(a.C):a.C&&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.");
691
+ A.Ce(C||1);return u(Oa,Tp(a.j,qa,U.wb),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);Oa.D(3);break}a.i={presentationTimeline:A,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:n||0,sequenceMode:a.g.dash.sequenceMode};if(!A.gg()){Oa.D(4);break}Ca=Uf(b,"UTCTiming");return u(Oa,Dq(a,l,Ca),5);case 5:Va=Oa.h;if(!a.h)return Oa.return();A.Wf(Va);case 4:A.ye();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),
692
692
  B(Oa)}})}
693
- function Dq(a,b,c,d){var e=bg(d,"mediaPresentationDuration",dg),f=[],g=0;d=Uf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=bg(k,"start",dg,g),p=k.id,n=bg(k,"duration",dg),t=null;if(l){var v=bg(l,"start",dg);null!=v&&(t=v-m)}else null!=e&&(t=e-m);null==t&&(t=n);if(!(null!==a.B&&null!==p&&null!==m&&m<a.B)||a.K.includes(p)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=Fq(a,b,c,{start:m,duration:t,node:k,re:null==t||!l});f.push(g);b.qa.id&&t&&(a.M[b.qa.id]=t);if(null==t){g=
693
+ function Cq(a,b,c,d){var e=bg(d,"mediaPresentationDuration",dg),f=[],g=0;d=Uf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=bg(k,"start",dg,g),p=k.id,n=bg(k,"duration",dg),t=null;if(l){var v=bg(l,"start",dg);null!=v&&(t=v-m)}else null!=e&&(t=e-m);null==t&&(t=n);if(!(null!==a.B&&null!==p&&null!==m&&m<a.B)||a.K.includes(p)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=Eq(a,b,c,{start:m,duration:t,node:k,re:null==t||!l});f.push(g);b.qa.id&&t&&(a.M[b.qa.id]=t);if(null==t){g=
694
694
  null;break}g=m+t}}a.K=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,Ff:!1}:{periods:f,duration:g,Ff:!0}}
695
- function Fq(a,b,c,d){b.qa=Gq(d.node,null,c);b.Y=d;b.qa.$b=b.$b;b.qa.id||(b.qa.id="__shaka_period_"+d.start);var e=Uf(d.node,"EventStream");c=b.presentationTimeline.kb();e=r(e);for(var f=e.next();!f.done;f=e.next())Hq(a,d.start,d.duration,f.value,c);c=Uf(d.node,"AdaptationSet").map(function(m){return Iq(a,b,m)}).filter(Ab);if(b.wb){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.Dh);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new M(2,4,4018);
696
- }d=c.filter(function(m){return!m.$e});c=c.filter(function(m){return m.$e});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.$e.split(" ");g=r(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=r(k.streams);for(var l=k.next();!l.done;h={jd:h.jd},l=k.next())h.jd=l.value,h.jd.trickModeVideo=e.streams.find(function(m){return function(p){return yd(m.jd.codecs)==yd(p.codecs)}}(h))}}}e=a.g.disableAudio?[]:Jq(d,"audio");g=a.g.disableVideo?[]:Jq(d,"video");f=a.g.disableText?
697
- []:Jq(d,Gb);c=a.g.disableThumbnails?[]:Jq(d,"image");if(!g.length&&!e.length)throw new M(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ha(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ha(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ha(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ha(h.value.streams));return{id:b.qa.id,od:d,Qd:e,textStreams:g,imageStreams:f}}
698
- function Jq(a,b){return a.filter(function(c){return c.contentType==b})}
699
- function Iq(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.va=Gq(c,b.qa,null);var e=!1,f=Uf(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Ab),h=void 0,k=b.va.contentType==Gb;k&&(h="subtitle");f=r(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=
695
+ function Eq(a,b,c,d){b.qa=Fq(d.node,null,c);b.Y=d;b.qa.$b=b.$b;b.qa.id||(b.qa.id="__shaka_period_"+d.start);var e=Uf(d.node,"EventStream");c=b.presentationTimeline.kb();e=r(e);for(var f=e.next();!f.done;f=e.next())Gq(a,d.start,d.duration,f.value,c);c=Uf(d.node,"AdaptationSet").map(function(m){return Hq(a,b,m)}).filter(Ab);if(b.wb){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.Dh);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new M(2,4,4018);
696
+ }d=c.filter(function(m){return!m.$e});c=c.filter(function(m){return m.$e});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.$e.split(" ");g=r(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=r(k.streams);for(var l=k.next();!l.done;h={jd:h.jd},l=k.next())h.jd=l.value,h.jd.trickModeVideo=e.streams.find(function(m){return function(p){return yd(m.jd.codecs)==yd(p.codecs)}}(h))}}}e=a.g.disableAudio?[]:Iq(d,"audio");g=a.g.disableVideo?[]:Iq(d,"video");f=a.g.disableText?
697
+ []:Iq(d,Gb);c=a.g.disableThumbnails?[]:Iq(d,"image");if(!g.length&&!e.length)throw new M(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ha(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ha(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ha(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ha(h.value.streams));return{id:b.qa.id,od:d,Qd:e,textStreams:g,imageStreams:f}}
698
+ function Iq(a,b){return a.filter(function(c){return c.contentType==b})}
699
+ function Hq(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.wa=Fq(c,b.qa,null);var e=!1,f=Uf(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Ab),h=void 0,k=b.wa.contentType==Gb;k&&(h="subtitle");f=r(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=
700
700
  l}}var p;m=Uf(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var n=m.next();!n.done;n=m.next()){n=n.value;var t=n.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=n.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?p=d(parseInt(n.getAttribute("value"),10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"!=t&&"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=t&&(l=!0)}m=Uf(c,"SupplementalProperty");m=r(m);for(n=m.next();!n.done;n=m.next())n=n.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==
701
701
  n.getAttribute("schemeIdUri")&&(p=d(parseInt(n.getAttribute("value"),10)));m=Uf(c,"Accessibility");var v=new Map;m=r(m);for(n=m.next();!n.done;n=m.next())if(t=n.value,n=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==n)if(n=1,null!=t){t=t.split(";");for(var y=r(t),w=y.next();!w.done;w=y.next()){var x=w.value,C=w=void 0;x.includes("=")?(x=x.split("="),w=x[0].startsWith("CC")?x[0]:"CC"+x[0],C=x[1]||"und"):(w="CC"+n,2==t.length?n+=2:n++,C=x);v.set(w,Kb(C))}}else v.set("CC1",
702
- "und");else if("urn:scte:dash:cc:cea-708:2015"==n)if(n=1,null!=t)for(t=r(t.split(";")),w=t.next();!w.done;w=t.next())w=w.value,x=y=void 0,w.includes("=")?(w=w.split("="),y="svc"+w[0],x=w[1].split(",")[0].split(":").pop()):(y="svc"+n,n++,x=w),v.set(y,Kb(x));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==n&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=Uf(c,"ContentProtection");var z=Zo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),A=Kb(c.getAttribute("lang")||"und"),
703
- E=c.getAttribute("label");(l=Uf(c,"Label"))&&l.length&&(l=l[0],l.textContent&&(E=l.textContent));l=Uf(c,"Representation");c=l.map(function(G){if(G=Kq(a,b,z,h,A,E,e,g,v,G))G.hdr=G.hdr||p;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.va.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new M(2,4,4003);}if(!b.va.contentType||"application"==b.va.contentType)for(b.va.contentType=Lq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=
704
- b.va.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=m.value,n=r(z.drmInfos),t=n.next();!t.done;t=n.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ha(t.keyIds),ha(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Ab);return{id:b.va.id||"__fake__"+a.I++,contentType:b.va.contentType,language:A,sj:e,streams:c,drmInfos:z.drmInfos,$e:f,Dh:k}}
705
- function Kq(a,b,c,d,e,f,g,h,k,l){b.L=Gq(l,b.va,null);a.C=Math.min(a.C,b.L.$b);if(!Mq(b.L))return null;var m=b.Y.start;b.bandwidth=bg(l,"bandwidth",gg)||0;var p=b.L.contentType,n=p==Gb||"application"==p;p="image"==p;try{var t=function(G,H,J){return Nq(a,G,H,J)};if(b.L.Zc)var v=Ap(b,t);else if(b.L.Db)v=Gp(b,a.l);else if(b.L.$c)v=Lp(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var y=b.L.Na,w=b.Y.duration||0;v={bc:function(){return Promise.resolve(Wj(m,w,y))}}}}catch(G){if((n||p)&&4002==G.code)return null;
706
- throw G;}t=Uf(l,"ContentProtection");t=bp(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var x=!1;Uf(l,"SupplementalProperty").some(function(G){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==G.getAttribute("schemeIdUri")&&"JOC"==G.getAttribute("value")})&&(x=!0);var C=!1;n&&(C=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(p&&((l=Uf(l,"EssentialProperty").find(function(G){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(G.getAttribute("schemeIdUri"))}))&&
702
+ "und");else if("urn:scte:dash:cc:cea-708:2015"==n)if(n=1,null!=t)for(t=r(t.split(";")),w=t.next();!w.done;w=t.next())w=w.value,x=y=void 0,w.includes("=")?(w=w.split("="),y="svc"+w[0],x=w[1].split(",")[0].split(":").pop()):(y="svc"+n,n++,x=w),v.set(y,Kb(x));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==n&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=Uf(c,"ContentProtection");var z=Yo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),A=Kb(c.getAttribute("lang")||"und"),
703
+ E=c.getAttribute("label");(l=Uf(c,"Label"))&&l.length&&(l=l[0],l.textContent&&(E=l.textContent));l=Uf(c,"Representation");c=l.map(function(G){if(G=Jq(a,b,z,h,A,E,e,g,v,G))G.hdr=G.hdr||p;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.wa.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new M(2,4,4003);}if(!b.wa.contentType||"application"==b.wa.contentType)for(b.wa.contentType=Kq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=
704
+ b.wa.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=m.value,n=r(z.drmInfos),t=n.next();!t.done;t=n.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ha(t.keyIds),ha(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Ab);return{id:b.wa.id||"__fake__"+a.I++,contentType:b.wa.contentType,language:A,sj:e,streams:c,drmInfos:z.drmInfos,$e:f,Dh:k}}
705
+ function Jq(a,b,c,d,e,f,g,h,k,l){b.L=Fq(l,b.wa,null);a.C=Math.min(a.C,b.L.$b);if(!Lq(b.L))return null;var m=b.Y.start;b.bandwidth=bg(l,"bandwidth",gg)||0;var p=b.L.contentType,n=p==Gb||"application"==p;p="image"==p;try{var t=function(G,H,J){return Mq(a,G,H,J)};if(b.L.Zc)var v=zp(b,t);else if(b.L.Db)v=Fp(b,a.l);else if(b.L.$c)v=Kp(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var y=b.L.Na,w=b.Y.duration||0;v={bc:function(){return Promise.resolve(Wj(m,w,y))}}}}catch(G){if((n||p)&&4002==G.code)return null;
706
+ throw G;}t=Uf(l,"ContentProtection");t=ap(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var x=!1;Uf(l,"SupplementalProperty").some(function(G){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==G.getAttribute("schemeIdUri")&&"JOC"==G.getAttribute("value")})&&(x=!0);var C=!1;n&&(C=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(p&&((l=Uf(l,"EssentialProperty").find(function(G){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(G.getAttribute("schemeIdUri"))}))&&
707
707
  (z=l.getAttribute("value")),!z))return null;var A;l=b.L.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"))&&(A="PQ");l=b.L.id?b.qa.id+","+b.L.id:"";var E=l&&a.l[l]?a.l[l]:{id:a.I++,originalId:b.L.id,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){E.segmentIndex&&(E.segmentIndex.release(),E.segmentIndex=null)},segmentIndex:null,mimeType:b.L.mimeType,codecs:b.L.codecs,
708
- frameRate:b.L.frameRate,pixelAspectRatio:b.L.pixelAspectRatio,bandwidth:b.bandwidth,width:b.L.width,height:b.L.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.va.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.L.Dd,audioSamplingRate:b.L.audioSamplingRate,spatialAudio:x,closedCaptions:k,hdr:A,tilesLayout:z,matchedStreams:[]};E.createSegmentIndex=function(){var G;return F(function(H){if(1==
709
- H.g){if(E.segmentIndex)return H.D(0);G=E;return u(H,v.bc(),3)}G.segmentIndex=H.h;B(H)})};l&&b.wb&&!a.l[l]&&(a.l[l]=E);return E}function yq(a){var b,c;F(function(d){switch(d.g){case 1:return b=0,D(d,2),u(d,zq(a),4);case 4:b=d.h;va(d,3);break;case 2:c=wa(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d.return();Aq(a,b);B(d)}})}function Aq(a,b){0>a.H||a.G.R(Math.max(3,a.H-b,$b(a.J)))}
710
- function Gq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Dd:null,audioSamplingRate:null,$b:0};c=c||b.Na;var d=Uf(a,"BaseURL"),e=d.map($f),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=bg(a,"frameRate",jg)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Uf(a,"InbandEventStream"),p=b.emsgSchemeIdUris.slice();m=r(m);for(var n=m.next();!n.done;n=
711
- m.next())n=n.value.getAttribute("schemeIdUri"),p.includes(n)||p.push(n);m=Uf(a,"AudioChannelConfiguration");m=Oq(m)||b.Dd;n=bg(a,"audioSamplingRate",hg)||b.audioSamplingRate;f||(f=Lq(g,h));var t=Tf(a,"SegmentBase"),v=Tf(a,"SegmentTemplate"),y=t?bg(t,"availabilityTimeOffset",ig)||0:0,w=v?bg(v,"availabilityTimeOffset",ig)||0:0;d=d&&d.length?bg(d[0],"availabilityTimeOffset",ig)||0:0;d=b.$b+d+y+w;return{Na:Bb(c,e),Zc:t||b.Zc,Db:Tf(a,"SegmentList")||b.Db,$c:v||b.$c,width:bg(a,"width",hg)||b.width,height:bg(a,
708
+ frameRate:b.L.frameRate,pixelAspectRatio:b.L.pixelAspectRatio,bandwidth:b.bandwidth,width:b.L.width,height:b.L.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.wa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.L.Dd,audioSamplingRate:b.L.audioSamplingRate,spatialAudio:x,closedCaptions:k,hdr:A,tilesLayout:z,matchedStreams:[],external:!1};E.createSegmentIndex=function(){var G;return F(function(H){if(1==
709
+ H.g){if(E.segmentIndex)return H.D(0);G=E;return u(H,v.bc(),3)}G.segmentIndex=H.h;B(H)})};l&&b.wb&&!a.l[l]&&(a.l[l]=E);return E}function xq(a){var b,c;F(function(d){switch(d.g){case 1:return b=0,D(d,2),u(d,yq(a),4);case 4:b=d.h;va(d,3);break;case 2:c=wa(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d.return();zq(a,b);B(d)}})}function zq(a,b){0>a.H||a.G.R(Math.max(3,a.H-b,$b(a.J)))}
710
+ function Fq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Dd:null,audioSamplingRate:null,$b:0};c=c||b.Na;var d=Uf(a,"BaseURL"),e=d.map($f),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=bg(a,"frameRate",jg)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Uf(a,"InbandEventStream"),p=b.emsgSchemeIdUris.slice();m=r(m);for(var n=m.next();!n.done;n=
711
+ m.next())n=n.value.getAttribute("schemeIdUri"),p.includes(n)||p.push(n);m=Uf(a,"AudioChannelConfiguration");m=Nq(m)||b.Dd;n=bg(a,"audioSamplingRate",hg)||b.audioSamplingRate;f||(f=Kq(g,h));var t=Tf(a,"SegmentBase"),v=Tf(a,"SegmentTemplate"),y=t?bg(t,"availabilityTimeOffset",ig)||0:0,w=v?bg(v,"availabilityTimeOffset",ig)||0:0;d=d&&d.length?bg(d[0],"availabilityTimeOffset",ig)||0:0;d=b.$b+d+y+w;return{Na:Bb(c,e),Zc:t||b.Zc,Db:Tf(a,"SegmentList")||b.Db,$c:v||b.$c,width:bg(a,"width",hg)||b.width,height:bg(a,
712
712
  "height",hg)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:p,id:a.getAttribute("id"),Dd:m,audioSamplingRate:n,$b:d}}
713
- function Oq(a){a=r(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=
714
- 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 Mq(a){var b=a.Zc?1:0;b+=a.Db?1:0;b+=a.$c?1:0;if(0==b)return a.contentType==Gb||"application"==a.contentType?!0:!1;1!=b&&(a.Zc&&(a.Db=null),a.$c=null);return!0}
715
- function Pq(a,b,c,d){var e,f,g,h,k,l;return F(function(m){if(1==m.g)return e=Bb(b,[c]),f=nf(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),hf(a.s,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=$c(h.data);l=Date.parse(k);return isNaN(l)?m.return(0):m.return(l-Date.now())})}
716
- function Eq(a,b,c){var d,e,f,g,h,k,l,m;return F(function(p){switch(p.g){case 1:d=c.map(function(n){return{scheme:n.getAttribute("schemeIdUri"),value:n.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=r(d),g=f.next();case 2:if(g.done){p.D(4);break}h=g.value;D(p,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 p.D(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 p.D(8);
717
- case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),p.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)}p.D(9);break;case 7:return u(p,Pq(a,b,l,"HEAD"),10);case 10:return p.return(p.h);case 8:return u(p,Pq(a,b,l,"GET"),11);case 11:return p.return(p.h);case 9:va(p,
713
+ function Nq(a){a=r(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=
714
+ 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 Lq(a){var b=a.Zc?1:0;b+=a.Db?1:0;b+=a.$c?1:0;if(0==b)return a.contentType==Gb||"application"==a.contentType?!0:!1;1!=b&&(a.Zc&&(a.Db=null),a.$c=null);return!0}
715
+ function Oq(a,b,c,d){var e,f,g,h,k,l;return F(function(m){if(1==m.g)return e=Bb(b,[c]),f=nf(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),hf(a.s,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=$c(h.data);l=Date.parse(k);return isNaN(l)?m.return(0):m.return(l-Date.now())})}
716
+ function Dq(a,b,c){var d,e,f,g,h,k,l,m;return F(function(p){switch(p.g){case 1:d=c.map(function(n){return{scheme:n.getAttribute("schemeIdUri"),value:n.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=r(d),g=f.next();case 2:if(g.done){p.D(4);break}h=g.value;D(p,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 p.D(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 p.D(8);
717
+ case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),p.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)}p.D(9);break;case 7:return u(p,Oq(a,b,l,"HEAD"),10);case 10:return p.return(p.h);case 8:return u(p,Oq(a,b,l,"GET"),11);case 11:return p.return(p.h);case 9:va(p,
718
718
  3);break;case 5:wa(p);case 3:g=f.next();p.D(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!"),p.return(0)}})}
719
- function Hq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=bg(d,"timescale",hg)||1;d=r(Uf(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=bg(k,"presentationTime",hg)||0,m=bg(k,"duration",hg)||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))}}
720
- function Nq(a,b,c,d){var e,f,g,h,k;return F(function(l){if(1==l.g)return e=tf,f=mk(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),hf(a.s,h),u(l,h.promise,2);k=l.h;return l.return(k.data)})}function Lq(a,b){return Cd(wd(a,b))?Gb:a.split("/")[0]}I("shaka.dash.DashParser",xq);ch.mpd=function(){return new xq};ah["application/dash+xml"]=function(){return new xq};ah["video/vnd.mpeg.dash.mpd"]=function(){return new xq};function Qq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function Rq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Rq.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};
721
- Rq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function W(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Sq(a,b){a=a.getAttribute(b);if(!a)throw new M(2,4,4023,b);return a.value}function Tq(a,b,c){c=void 0===c?[]:c;this.g=b;this.i=a;this.h=c}function Uq(a,b){this.name=a;this.value=b};function Vq(a,b){return a.filter(function(c){return c.name==b})}function Wq(a,b){return a.filter(function(c){return Sq(c,"TYPE")==b})}function Xq(a,b){a=Vq(a,b);return a.length?a[0]:null}function Yq(a,b){var c=0;c=void 0===c?0:c;return(a=Xq(a,b))?Number(a.value):c}function Zq(a,b){return Bb([a],[b])[0]};function $q(a){this.h=a;this.g=0}function ar(a){br(a,/[ \t]+/gm)}function br(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function cr(a){return a.g==a.h.length?null:(a=br(a,/[^ \t\n]*/gm))?a[0]:null};function dr(){this.g=0}
722
- function er(a,b,c){b=$c(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 M(2,4,4015);b=0;for(var e=!0,f=r(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=fr(a,g),--a.g,gr.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=fr(a,h);if(hr.includes(h.name)){if(1!=b)throw new M(2,4,4017);
723
- var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=r(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=fr(a,m),gr.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"==W(m,"TYPE")?null!=W(m,"BYTERANGE-START")?null!=W(m,"BYTERANGE-LENGTH")&&k.push(m):k.push(m):"MAP"==W(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Zq(d,m.trim()),h&&g.push(h),e.push(new Tq(m,g,k)),g=[],k=[]);k.length&&
724
- (h&&g.push(h),e.push(new Tq("",g,k)));return new Qq(c,b,f,e)}f.push(h);"EXT-X-STREAM-INF"==h.name&&(h.g.push(new Uq("URI",k)),e=!0)}}return new Qq(c,b,f)}function fr(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new M(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new $q(d);var f;(f=br(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=br(d,g);)c.push(new Uq(f[1],f[2]||f[3])),ar(d)}return new Rq(a,b,c,e)}
725
- var gr="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 EXT-X-PART-INF".split(" "),hr="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function ir(){}function jr(a){try{var b=kr(a);return af({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Ze(c)}}
726
- function kr(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new M(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new M(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=id(a):e=dd(a);return{data:e,contentType:c}}I("shaka.net.DataUriPlugin",ir);ir.parse=jr;kf("data",jr);function lr(){var a=this;this.g=this.i=null;this.sa=1;this.s=new Map;this.C=new Map;this.H=new Map;this.H.set("video",new Map);this.H.set("audio",new Map);this.H.set(Gb,new Map);this.H.set("image",new Map);this.ba=new Set;this.h=new Map;this.j=null;this.N="";this.X=new dr;this.P=0;this.F=-1;this.J=Infinity;this.ua=!1;this.m=new N(function(){mr(a)});this.aa=nr;this.G=null;this.$=0;this.K=Infinity;this.V=this.ra=0;this.I=new gf;this.M=new Map;this.B=new Map;this.Z=new Map;this.l=!1}q=lr.prototype;
727
- q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return F(function(e){return 1==e.g?(c.i=b,c.l=b.isLowLatencyMode(),u(e,or(c,a),2)):3!=e.g?(d=e.h,c.N=d.uri,u(e,pr(c,d.data,a),3)):e.return(c.G)})};q.stop=function(){this.m&&(this.m.stop(),this.m=null);var a=[];this.I&&(a.push(this.I.destroy()),this.I=null);this.g=this.i=null;this.ba.clear();this.G=null;this.h.clear();this.C.clear();this.B.clear();this.s.clear();return Promise.all(a)};
728
- q.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return F(function(m){if(1==m.g){if(!qr(a))return m.return();b=[];c=Array.from(a.h.values());d=c.filter(function(p){return p.stream.segmentIndex});e=r(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(rr(a,g));return u(m,Promise.all(b),2)}sr(a,d.map(function(p){return p.stream}));h=d.some(function(p){return 0==p.Mc});d.length&&!h&&(k=tr,ur(a,k.kg),l=d.map(function(p){return p.mb}),a.j.Sa(Math.min.apply(Math,ha(l))),a.i.updateDuration());h&&vr(a);
729
- B(m)})};function wr(a,b){return qr(a)?a.H.get(b.type):b.Bd}
730
- function rr(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z;return F(function(A){if(1==A.g)return c=b.md,d=new jb(c),a.l&&b.qd&&mb(d,new ob("_HLS_skip=YES")),u(A,or(a,d.toString()),2);e=A.h;if(!b.stream.segmentIndex)return A.return();f=er(a.X,e.data,e.uri);if(1!=f.type)throw new M(2,4,4017);g=Vq(f.g,"EXT-X-DEFINE");h=xr(a,g);k=b.stream;l=wr(a,b);m=yr(f,k.mimeType);p=m.keyIds;n=m.drmInfos;t=function(E,G){return E.size===G.size&&[].concat(ha(E)).every(function(H){return G.has(H)})};t(k.keyIds,p)||(k.keyIds=
731
- p,k.drmInfos=n,a.i.newDrmInfo(k));v=zr(a,f,k.type,l,h);k.segmentIndex.lc(v,a.j.kb());v.length&&(y=Yq(f.g,"EXT-X-MEDIA-SEQUENCE"),w=l.get(y),k.segmentIndex.Gb(w));x=v[0];b.Ob=x.startTime;C=v[v.length-1];b.mb=C.endTime;if(z=Xq(f.g,"EXT-X-ENDLIST"))b.Mc=!0;B(A)})}q.onExpirationUpdated=function(){};
732
- function Ar(a,b){for(var c=-1==a.F,d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=wr(a,e);if(f=f.g[0]||null){g=r(g);for(var h=g.next();!h.done;h=g.next()){h=r(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.F=Math.max(a.F,k));e.me=k;break}}}}if(!(0>a.F))for(b=r(b),e=b.next();!e.done;e=b.next())if(c=e.value,d=c.stream.segmentIndex)if(d.g.splice(0,a.F-c.me),d=d.g[0]||null)d=-d.startTime,c.stream.segmentIndex.offset(d),Br(a,c,d)}
733
- function Cr(a,b){if(Infinity==a.J){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.g&&(a.J=Math.min(a.J,d.g))}}b=a.J;if(Infinity!=b)for(d=r(a.h.values()),c=d.next();!c.done;c=d.next()){c=c.value;var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.g)Ta("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.cd,"Expect AV sync issues!");else for(Br(a,c,f.g-b-f.startTime),c=r(e),e=c.next();!e.done;e=c.next())e.value.Xe(b)}}}
734
- function Br(a,b,c){b.Ob+=c;b.mb+=c;a=wr(a,b);b=r(a);for(var d=b.next();!d.done;d=b.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.set(d,e+c)}}
735
- function pr(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,G,H,J,K,Q,V,U,ia,O,qa,Ka,Ca,Va;return F(function(Oa){switch(Oa.g){case 1:d=er(a.X,b,a.N);e=Vq(d.g,"EXT-X-DEFINE");for(var Vb=r(e),Sa=Vb.next();!Sa.done;Sa=Vb.next()){var cb=Sa.value;Sa=W(cb,"NAME");cb=W(cb,"VALUE");Sa&&cb&&(a.s.has(Sa)||a.s.set(Sa,cb))}f=[];g=[];h=[];if(1==d.type)return G=a.g.hls.mediaPlaylistFullMimeType,d.segments.length&&(H=new jb(d.segments[0].i),J=H.Ha.split(".").pop(),(K=Dr[J])?G=K:"ts"!==J&&"mp4"!==J&&(Er[J]?(K=Er[J],
736
- Q=a.g.hls.defaultAudioCodec,G=K+'; codecs="'+Q+'"'):Fr[J]&&(K=Fr[J],V=a.g.hls.defaultVideoCodec,G=K+'; codecs="'+V+'"'))),U=G.split(";")[0],ia=U.split("/")[0],O=Ad(G),qa=new Map,u(Oa,Gr(a,d,c,c,O,ia,"",!0,"Media Playlist",null,qa,null,!1,!1,U),5);k=Vq(d.g,"EXT-X-MEDIA");l=Vq(d.g,"EXT-X-STREAM-INF");m=Vq(d.g,"EXT-X-IMAGE-STREAM-INF");p=Vq(d.g,"EXT-X-SESSION-KEY");Vb=r(l);for(Sa=Vb.next();!Sa.done;Sa=Vb.next()){var kc=Sa.value;cb=W(kc,"AUDIO");Sa=W(kc,"VIDEO");var yb=W(kc,"SUBTITLES");kc=Hr(a,kc);if(yb){var Mp=
737
- Eb(Gb,kc);a.B.set(yb,Mp);ec(kc,Mp)}cb&&(yb=Eb("audio",kc),yb||(yb=a.g.hls.defaultAudioCodec),a.B.set(cb,yb));Sa&&(cb=Eb("video",kc),cb||(cb=a.g.hls.defaultVideoCodec),a.B.set(Sa,cb))}n=Vq(d.g,"EXT-X-SESSION-DATA");t=r(n);for(v=t.next();!v.done;v=t.next())if(y=v.value,w=W(y,"DATA-ID"),x=W(y,"URI"),C=W(y,"LANGUAGE"),z=W(y,"VALUE"),A=(new Map).set("id",w),x&&A.set("uri",Zq(a.N,x)),C&&A.set("language",C),z&&A.set("value",z),E=new L("sessiondata",A),a.i)a.i.onEvent(E);Ir(a,k);Vb=Wq(k,"CLOSED-CAPTIONS");
738
- Vb=r(Vb);for(Sa=Vb.next();!Sa.done;Sa=Vb.next())yb=Sa.value,Sa=Jr(yb),cb=Sq(yb,"GROUP-ID"),yb=Sq(yb,"INSTREAM-ID"),a.M.get(cb)||a.M.set(cb,new Map),a.M.get(cb).set(yb,Sa);f=Kr(a,l,p);g=Lr(a,k);return u(Oa,Mr(a,m),4);case 4:h=Oa.h;Oa.D(3);break;case 5:Ka=Oa.h,a.h.set(c,Ka),f.push({id:0,language:"und",disabledUntilTime:0,primary:!0,audio:"audio"==ia?Ka.stream:null,video:"video"==ia?Ka.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new M(2,
739
- 7,7001);a.j=new P(null,0);a.j.bd(!0);1==d.type&&(qr(a)&&(Nr(a),Ca=a.P,a.m.R(Ca)),Va=Array.from(a.h.values()),Or(a,Va),vr(a));a.G={presentationTimeline:a.j,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.i.makeTextStreamsForClosedCaptions(a.G);B(Oa)}})}
740
- function vr(a){if(qr(a)){if(a.P=a.K,a.aa==Pr){for(var b,c=b=Infinity,d=r(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.mb),c=Math.min(c,e.Ob));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.j.m);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.j.Ue(b)}}else a.j.Sa(Qr(a));a.j.ye()}
741
- function xr(a,b){var c=new Map;b=r(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=W(e,"NAME");var f=W(e,"VALUE");e=W(e,"IMPORT");d&&f&&c.set(d,f);e&&(d=a.s.get(e))&&c.set(e,d)}return c}
742
- function Lr(a,b){var c=Wq(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Rr(a,g).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=Sq(d.value,"GROUP-ID");if(d=a.B.get(e))if(e=a.C.get(e)){e=r(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Sr(Gb,d)||Tr(Gb)}}return b.filter(function(g){return g})}
743
- function Mr(a,b){var c,d;return F(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return F(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l.return(null);D(l,2);return u(l,Ur(a,f),4)}if(2!=l.g)return h=l.h,l.return(h.stream);k=wa(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}))})}
744
- function Ir(a,b){b=b.filter(function(d){var e=W(d,"URI")||"";return"SUBTITLES"!=W(d,"TYPE")&&""!=e});b=r(b);for(var c=b.next();!c.done;c=b.next())Rr(a,c.value)}
745
- function Kr(a,b,c){var d=[],e=new Set;if(0<c.length){c=r(c);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=Sq(f,"METHOD");if("NONE"!=g&&"AES-128"!=g&&(g=W(f,"KEYFORMAT")||"identity",f=(g=Vr[g])?g(f,""):null)){if(f.keyIds){g=r(f.keyIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}d.push(f)}}}b=b.map(function(k){var l=W(k,"FRAME-RATE"),m=Number(W(k,"AVERAGE-BANDWIDTH"))||Number(Sq(k,"BANDWIDTH")),p=W(k,"RESOLUTION");p=r(p?p.split("x"):[null,null]);var n=p.next().value,t=p.next().value,
746
- v=W(k,"VIDEO-RANGE");k=Wr(a,k);p=k.audio;k=k.video;for(var y=r(k),w=y.next();!w.done;w=y.next())if(w=w.value.stream)w.width=Number(n)||void 0,w.height=Number(t)||void 0,w.frameRate=Number(l)||void 0,w.hdr=v||void 0;l=a.g.disableAudio;if(!p.length||l)p=[null];l=a.g.disableVideo;if(!k.length||l)k=[null];l=[];p=r(p);for(n=p.next();!n.done;n=p.next())for(n=n.value,t=r(k),v=t.next();!v.done;v=t.next()){var x=v.value;if(v=n?n.stream:null)v.drmInfos=d,v.keyIds=e;if(y=x?x.stream:null)y.drmInfos=d,y.keyIds=
747
- e;w=n?n.stream.drmInfos:null;var C=x?x.stream.drmInfos:null;x=(x?x.cd:"")+" - "+(n?n.cd:"");v&&y&&w.length&&C.length&&!(0<Xg(w,C).length)||a.ba.has(x)||(v={id:a.sa++,language:v?v.language:"und",primary:!!v&&v.primary||!!y&&y.primary,audio:v,video:y,bandwidth:m,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},l.push(v),a.ba.add(x))}return l}).reduce(xb,[]);return b=b.filter(function(k){return null!=k})}
748
- function Wr(a,b){var c=Hr(a,b),d=W(b,"AUDIO"),e=W(b,"VIDEO"),f=d||e;f=f&&a.C.has(f)?a.C.get(f):[];d={audio:d?f:[],video:e?f:[]};e=!1;var g=Sq(b,"URI"),h=d.audio.find(function(m){return m&&m.cd==g}),k=Eb("video",c),l=Eb("audio",c);l&&!k?f="audio":!f.length&&l&&k?(f="video",c=[[k,l].join()]):d.audio.length&&h?(f="audio",e=!0):f=d.video.length&&!d.audio.length?"audio":"video";e||(a=Xr(a,b,c,f),d[a.stream.type]=[a]);return d}
749
- function Hr(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);c=W(b,"CODECS",c.join(",")).split(/\s*,\s*/);a=new Set;b=[];c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=zd(d)[0];a.has(e)||(b.push(d),a.add(e))}return b}function Jr(a){a=W(a,"LANGUAGE")||"und";return Kb(a)}
750
- function Rr(a,b){var c=Sq(b,"GROUP-ID"),d="",e=Sq(b,"TYPE").toLowerCase();"subtitles"==e&&(e=Gb);var f=e;f==Gb?d=W(b,"CODECS")||"":c&&a.B.has(c)&&(d=a.B.get(c));e=Yr(Sq(b,"URI"),a.s);if(a.h.has(e))return a.h.get(e);var g=Jr(b),h=W(b,"NAME"),k="YES"==W(b,"DEFAULT");var l="audio"==f?(l=W(b,"CHANNELS"))?parseInt(l.split("/")[0],10):null:null;var m="audio"==f?(m=W(b,"CHANNELS"))?m.includes("/JOC"):!1:!1;var p=W(b,"CHARACTERISTICS");b="YES"==W(b,"FORCED");d=Zr(a,e,d,f,g,k,h,l,null,p,b,m);a.C.has(c)?a.C.get(c).push(d):
719
+ function Gq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=bg(d,"timescale",hg)||1;d=r(Uf(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=bg(k,"presentationTime",hg)||0,m=bg(k,"duration",hg)||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))}}
720
+ function Mq(a,b,c,d){var e,f,g,h,k;return F(function(l){if(1==l.g)return e=tf,f=mk(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),hf(a.s,h),u(l,h.promise,2);k=l.h;return l.return(k.data)})}function Kq(a,b){return Cd(wd(a,b))?Gb:a.split("/")[0]}I("shaka.dash.DashParser",wq);ch.mpd=function(){return new wq};ah["application/dash+xml"]=function(){return new wq};ah["video/vnd.mpeg.dash.mpd"]=function(){return new wq};function Pq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function Qq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Qq.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};
721
+ Qq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function W(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Rq(a,b){a=a.getAttribute(b);if(!a)throw new M(2,4,4023,b);return a.value}function Sq(a,b,c){c=void 0===c?[]:c;this.g=b;this.i=a;this.h=c}function Tq(a,b){this.name=a;this.value=b};function Uq(a,b){return a.filter(function(c){return c.name==b})}function Vq(a,b){return a.filter(function(c){return Rq(c,"TYPE")==b})}function Wq(a,b){a=Uq(a,b);return a.length?a[0]:null}function Xq(a,b){var c=0;c=void 0===c?0:c;return(a=Wq(a,b))?Number(a.value):c}function Yq(a,b){return Bb([a],[b])[0]};function Zq(a){this.h=a;this.g=0}function $q(a){ar(a,/[ \t]+/gm)}function ar(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function br(a){return a.g==a.h.length?null:(a=ar(a,/[^ \t\n]*/gm))?a[0]:null};function cr(){this.g=0}
722
+ function dr(a,b,c){b=$c(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 M(2,4,4015);b=0;for(var e=!0,f=r(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=er(a,g),--a.g,fr.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=er(a,h);if(gr.includes(h.name)){if(1!=b)throw new M(2,4,4017);
723
+ var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=r(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=er(a,m),fr.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"==W(m,"TYPE")?null!=W(m,"BYTERANGE-START")?null!=W(m,"BYTERANGE-LENGTH")&&k.push(m):k.push(m):"MAP"==W(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Yq(d,m.trim()),h&&g.push(h),e.push(new Sq(m,g,k)),g=[],k=[]);k.length&&
724
+ (h&&g.push(h),e.push(new Sq("",g,k)));return new Pq(c,b,f,e)}f.push(h);"EXT-X-STREAM-INF"==h.name&&(h.g.push(new Tq("URI",k)),e=!0)}}return new Pq(c,b,f)}function er(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new M(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Zq(d);var f;(f=ar(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=ar(d,g);)c.push(new Tq(f[1],f[2]||f[3])),$q(d)}return new Qq(a,b,c,e)}
725
+ var fr="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 EXT-X-PART-INF".split(" "),gr="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function hr(){}function ir(a){try{var b=jr(a);return af({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Ze(c)}}
726
+ function jr(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new M(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new M(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=id(a):e=dd(a);return{data:e,contentType:c}}I("shaka.net.DataUriPlugin",hr);hr.parse=ir;kf("data",ir);function kr(){var a=this;this.g=this.i=null;this.ua=1;this.s=new Map;this.C=new Map;this.H=new Map;this.H.set("video",new Map);this.H.set("audio",new Map);this.H.set(Gb,new Map);this.H.set("image",new Map);this.ba=new Set;this.h=new Map;this.j=null;this.N="";this.X=new cr;this.P=0;this.F=-1;this.J=Infinity;this.va=!1;this.m=new N(function(){lr(a)});this.aa=mr;this.G=null;this.$=0;this.K=Infinity;this.V=this.sa=0;this.I=new gf;this.M=new Map;this.B=new Map;this.Z=new Map;this.l=!1}q=kr.prototype;
727
+ q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return F(function(e){return 1==e.g?(c.i=b,c.l=b.isLowLatencyMode(),u(e,nr(c,a),2)):3!=e.g?(d=e.h,c.N=d.uri,u(e,or(c,d.data,a),3)):e.return(c.G)})};q.stop=function(){this.m&&(this.m.stop(),this.m=null);var a=[];this.I&&(a.push(this.I.destroy()),this.I=null);this.g=this.i=null;this.ba.clear();this.G=null;this.h.clear();this.C.clear();this.B.clear();this.s.clear();return Promise.all(a)};
728
+ q.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return F(function(m){if(1==m.g){if(!pr(a))return m.return();b=[];c=Array.from(a.h.values());d=c.filter(function(p){return p.stream.segmentIndex});e=r(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(qr(a,g));return u(m,Promise.all(b),2)}rr(a,d.map(function(p){return p.stream}));h=d.some(function(p){return 0==p.Mc});d.length&&!h&&(k=sr,tr(a,k.kg),l=d.map(function(p){return p.mb}),a.j.Sa(Math.min.apply(Math,ha(l))),a.i.updateDuration());h&&ur(a);
729
+ B(m)})};function vr(a,b){return pr(a)?a.H.get(b.type):b.Bd}
730
+ function qr(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z;return F(function(A){if(1==A.g)return c=b.md,d=new jb(c),a.l&&b.qd&&mb(d,new ob("_HLS_skip=YES")),u(A,nr(a,d.toString()),2);e=A.h;if(!b.stream.segmentIndex)return A.return();f=dr(a.X,e.data,e.uri);if(1!=f.type)throw new M(2,4,4017);g=Uq(f.g,"EXT-X-DEFINE");h=wr(a,g);k=b.stream;l=vr(a,b);m=xr(f,k.mimeType);p=m.keyIds;n=m.drmInfos;t=function(E,G){return E.size===G.size&&[].concat(ha(E)).every(function(H){return G.has(H)})};t(k.keyIds,p)||(k.keyIds=
731
+ p,k.drmInfos=n,a.i.newDrmInfo(k));v=yr(a,f,k.type,l,h);k.segmentIndex.lc(v,a.j.kb());v.length&&(y=Xq(f.g,"EXT-X-MEDIA-SEQUENCE"),w=l.get(y),k.segmentIndex.Gb(w));x=v[0];b.Ob=x.startTime;C=v[v.length-1];b.mb=C.endTime;if(z=Wq(f.g,"EXT-X-ENDLIST"))b.Mc=!0;B(A)})}q.onExpirationUpdated=function(){};
732
+ function zr(a,b){for(var c=-1==a.F,d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=vr(a,e);if(f=f.g[0]||null){g=r(g);for(var h=g.next();!h.done;h=g.next()){h=r(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.F=Math.max(a.F,k));e.me=k;break}}}}if(!(0>a.F))for(b=r(b),e=b.next();!e.done;e=b.next())if(c=e.value,d=c.stream.segmentIndex)if(d.g.splice(0,a.F-c.me),d=d.g[0]||null)d=-d.startTime,c.stream.segmentIndex.offset(d),Ar(a,c,d)}
733
+ function Br(a,b){if(Infinity==a.J){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.g&&(a.J=Math.min(a.J,d.g))}}b=a.J;if(Infinity!=b)for(d=r(a.h.values()),c=d.next();!c.done;c=d.next()){c=c.value;var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.g)Ta("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.cd,"Expect AV sync issues!");else for(Ar(a,c,f.g-b-f.startTime),c=r(e),e=c.next();!e.done;e=c.next())e.value.Xe(b)}}}
734
+ function Ar(a,b,c){b.Ob+=c;b.mb+=c;a=vr(a,b);b=r(a);for(var d=b.next();!d.done;d=b.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.set(d,e+c)}}
735
+ function or(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,G,H,J,K,Q,V,U,ia,O,qa,Ka,Ca,Va;return F(function(Oa){switch(Oa.g){case 1:d=dr(a.X,b,a.N);e=Uq(d.g,"EXT-X-DEFINE");for(var Vb=r(e),Sa=Vb.next();!Sa.done;Sa=Vb.next()){var cb=Sa.value;Sa=W(cb,"NAME");cb=W(cb,"VALUE");Sa&&cb&&(a.s.has(Sa)||a.s.set(Sa,cb))}f=[];g=[];h=[];if(1==d.type)return G=a.g.hls.mediaPlaylistFullMimeType,d.segments.length&&(H=new jb(d.segments[0].i),J=H.Ha.split(".").pop(),(K=Cr[J])?G=K:"ts"!==J&&"mp4"!==J&&(Dr[J]?(K=Dr[J],
736
+ Q=a.g.hls.defaultAudioCodec,G=K+'; codecs="'+Q+'"'):Er[J]&&(K=Er[J],V=a.g.hls.defaultVideoCodec,G=K+'; codecs="'+V+'"'))),U=G.split(";")[0],ia=U.split("/")[0],O=Ad(G),qa=new Map,u(Oa,Fr(a,d,c,c,O,ia,"",!0,"Media Playlist",null,qa,null,!1,!1,U),5);k=Uq(d.g,"EXT-X-MEDIA");l=Uq(d.g,"EXT-X-STREAM-INF");m=Uq(d.g,"EXT-X-IMAGE-STREAM-INF");p=Uq(d.g,"EXT-X-SESSION-KEY");Vb=r(l);for(Sa=Vb.next();!Sa.done;Sa=Vb.next()){var kc=Sa.value;cb=W(kc,"AUDIO");Sa=W(kc,"VIDEO");var yb=W(kc,"SUBTITLES");kc=Gr(a,kc);if(yb){var Lp=
737
+ Eb(Gb,kc);a.B.set(yb,Lp);ec(kc,Lp)}cb&&(yb=Eb("audio",kc),yb||(yb=a.g.hls.defaultAudioCodec),a.B.set(cb,yb));Sa&&(cb=Eb("video",kc),cb||(cb=a.g.hls.defaultVideoCodec),a.B.set(Sa,cb))}n=Uq(d.g,"EXT-X-SESSION-DATA");t=r(n);for(v=t.next();!v.done;v=t.next())if(y=v.value,w=W(y,"DATA-ID"),x=W(y,"URI"),C=W(y,"LANGUAGE"),z=W(y,"VALUE"),A=(new Map).set("id",w),x&&A.set("uri",Yq(a.N,x)),C&&A.set("language",C),z&&A.set("value",z),E=new L("sessiondata",A),a.i)a.i.onEvent(E);Hr(a,k);Vb=Vq(k,"CLOSED-CAPTIONS");
738
+ Vb=r(Vb);for(Sa=Vb.next();!Sa.done;Sa=Vb.next())yb=Sa.value,Sa=Ir(yb),cb=Rq(yb,"GROUP-ID"),yb=Rq(yb,"INSTREAM-ID"),a.M.get(cb)||a.M.set(cb,new Map),a.M.get(cb).set(yb,Sa);f=Jr(a,l,p);g=Kr(a,k);return u(Oa,Lr(a,m),4);case 4:h=Oa.h;Oa.D(3);break;case 5:Ka=Oa.h,a.h.set(c,Ka),f.push({id:0,language:"und",disabledUntilTime:0,primary:!0,audio:"audio"==ia?Ka.stream:null,video:"video"==ia?Ka.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new M(2,
739
+ 7,7001);a.j=new P(null,0);a.j.bd(!0);1==d.type&&(pr(a)&&(Mr(a),Ca=a.P,a.m.R(Ca)),Va=Array.from(a.h.values()),Nr(a,Va),ur(a));a.G={presentationTimeline:a.j,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.i.makeTextStreamsForClosedCaptions(a.G);B(Oa)}})}
740
+ function ur(a){if(pr(a)){if(a.P=a.K,a.aa==Or){for(var b,c=b=Infinity,d=r(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.mb),c=Math.min(c,e.Ob));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.j.m);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.j.Ue(b)}}else a.j.Sa(Pr(a));a.j.ye()}
741
+ function wr(a,b){var c=new Map;b=r(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=W(e,"NAME");var f=W(e,"VALUE");e=W(e,"IMPORT");d&&f&&c.set(d,f);e&&(d=a.s.get(e))&&c.set(e,d)}return c}
742
+ function Kr(a,b){var c=Vq(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Qr(a,g).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=Rq(d.value,"GROUP-ID");if(d=a.B.get(e))if(e=a.C.get(e)){e=r(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Rr(Gb,d)||Sr(Gb)}}return b.filter(function(g){return g})}
743
+ function Lr(a,b){var c,d;return F(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return F(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l.return(null);D(l,2);return u(l,Tr(a,f),4)}if(2!=l.g)return h=l.h,l.return(h.stream);k=wa(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}))})}
744
+ function Hr(a,b){b=b.filter(function(d){var e=W(d,"URI")||"";return"SUBTITLES"!=W(d,"TYPE")&&""!=e});b=r(b);for(var c=b.next();!c.done;c=b.next())Qr(a,c.value)}
745
+ function Jr(a,b,c){var d=[],e=new Set;if(0<c.length){c=r(c);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=Rq(f,"METHOD");if("NONE"!=g&&"AES-128"!=g&&(g=W(f,"KEYFORMAT")||"identity",f=(g=Ur[g])?g(f,""):null)){if(f.keyIds){g=r(f.keyIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}d.push(f)}}}b=b.map(function(k){var l=W(k,"FRAME-RATE"),m=Number(W(k,"AVERAGE-BANDWIDTH"))||Number(Rq(k,"BANDWIDTH")),p=W(k,"RESOLUTION");p=r(p?p.split("x"):[null,null]);var n=p.next().value,t=p.next().value,
746
+ v=W(k,"VIDEO-RANGE");k=Vr(a,k);p=k.audio;k=k.video;for(var y=r(k),w=y.next();!w.done;w=y.next())if(w=w.value.stream)w.width=Number(n)||void 0,w.height=Number(t)||void 0,w.frameRate=Number(l)||void 0,w.hdr=v||void 0;l=a.g.disableAudio;if(!p.length||l)p=[null];l=a.g.disableVideo;if(!k.length||l)k=[null];l=[];p=r(p);for(n=p.next();!n.done;n=p.next())for(n=n.value,t=r(k),v=t.next();!v.done;v=t.next()){var x=v.value;if(v=n?n.stream:null)v.drmInfos=d,v.keyIds=e;if(y=x?x.stream:null)y.drmInfos=d,y.keyIds=
747
+ e;w=n?n.stream.drmInfos:null;var C=x?x.stream.drmInfos:null;x=(x?x.cd:"")+" - "+(n?n.cd:"");v&&y&&w.length&&C.length&&!(0<Xg(w,C).length)||a.ba.has(x)||(v={id:a.ua++,language:v?v.language:"und",primary:!!v&&v.primary||!!y&&y.primary,audio:v,video:y,bandwidth:m,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},l.push(v),a.ba.add(x))}return l}).reduce(xb,[]);return b=b.filter(function(k){return null!=k})}
748
+ function Vr(a,b){var c=Gr(a,b),d=W(b,"AUDIO"),e=W(b,"VIDEO"),f=d||e;f=f&&a.C.has(f)?a.C.get(f):[];d={audio:d?f:[],video:e?f:[]};e=!1;var g=Rq(b,"URI"),h=d.audio.find(function(m){return m&&m.cd==g}),k=Eb("video",c),l=Eb("audio",c);l&&!k?f="audio":!f.length&&l&&k?(f="video",c=[[k,l].join()]):d.audio.length&&h?(f="audio",e=!0):f=d.video.length&&!d.audio.length?"audio":"video";e||(a=Wr(a,b,c,f),d[a.stream.type]=[a]);return d}
749
+ function Gr(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);c=W(b,"CODECS",c.join(",")).split(/\s*,\s*/);a=new Set;b=[];c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=zd(d)[0];a.has(e)||(b.push(d),a.add(e))}return b}function Ir(a){a=W(a,"LANGUAGE")||"und";return Kb(a)}
750
+ function Qr(a,b){var c=Rq(b,"GROUP-ID"),d="",e=Rq(b,"TYPE").toLowerCase();"subtitles"==e&&(e=Gb);var f=e;f==Gb?d=W(b,"CODECS")||"":c&&a.B.has(c)&&(d=a.B.get(c));e=Xr(Rq(b,"URI"),a.s);if(a.h.has(e))return a.h.get(e);var g=Ir(b),h=W(b,"NAME"),k="YES"==W(b,"DEFAULT");var l="audio"==f?(l=W(b,"CHANNELS"))?parseInt(l.split("/")[0],10):null:null;var m="audio"==f?(m=W(b,"CHANNELS"))?m.includes("/JOC"):!1:!1;var p=W(b,"CHARACTERISTICS");b="YES"==W(b,"FORCED");d=Yr(a,e,d,f,g,k,h,l,null,p,b,m);a.C.has(c)?a.C.get(c).push(d):
751
751
  a.C.set(c,[d]);if(a.h.has(e))return a.h.get(e);a.h.set(e,d);return d}
752
- function Ur(a,b){var c,d,e,f,g,h,k,l,m,p;return F(function(n){if(1==n.g){c=Yr(Sq(b,"URI"),a.s);d=W(b,"CODECS","jpeg")||"";if(a.h.has(c))return n.return(a.h.get(c));e=Jr(b);f=W(b,"NAME");g=W(b,"CHARACTERISTICS");h=Zr(a,c,d,"image",e,!1,f,null,null,g,!1,!1);return a.h.has(c)?n.return(a.h.get(c)):(k=W(b,"RESOLUTION"))?u(n,h.stream.createSegmentIndex(),3):n.D(2)}2!=n.g&&(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=Number(k.split("x")[1])*
753
- Number(m.split("x")[1]));if(p=W(b,"BANDWIDTH"))h.stream.bandwidth=Number(p);a.h.set(c,h);return n.return(h)})}function Xr(a,b,c,d){var e=Yr(Sq(b,"URI"),a.s);if(a.h.has(e))return a.h.get(e);b=W(b,"CLOSED-CAPTIONS");b="video"==d&&b&&"NONE"!=b?a.M.get(b):null;c=Db(d,c);d=Zr(a,e,c,d,"und",!1,null,null,b,null,!1,!1);if(a.h.has(e))return a.h.get(e);a.h.set(e,d);return d}
754
- function Zr(a,b,c,d,e,f,g,h,k,l,m,p){function n(C){var z,A,E,G,H,J,K,Q,V,U,ia,O,qa,Ka;return F(function(Ca){if(1==Ca.g)return u(Ca,or(a,y.md),2);if(3!=Ca.g){z=Ca.h;if(C.aborted)return Ca.return();A=z.uri;E=er(a.X,z.data,A);G=qr(a);return u(Ca,Gr(a,E,b,A,c,d,e,f,g,h,k,l,m,p),3)}H=Ca.h;if(C.aborted)return Ca.return();J=H.stream;qr(a)&&!G&&Nr(a);y.md=A;y.Ob=H.Ob;y.mb=H.mb;y.qd=H.qd;y.Mc=H.Mc;y.Bd=H.Bd;y.xe=!0;v.segmentIndex=J.segmentIndex;v.encrypted=J.encrypted;v.drmInfos=J.drmInfos;v.keyIds=J.keyIds;
755
- v.mimeType=J.mimeType;hj.includes(v.mimeType)&&(v.codecs="");v.drmInfos.length&&a.i.newDrmInfo(v);K=Hb;if(d==K.Ma||d==K.kd)for(Q=r(a.h.values()),V=Q.next();!V.done;V=Q.next())U=V.value,U.xe||U.type!=d||(U.stream.mimeType=J.mimeType,hj.includes(U.stream.mimeType)&&(U.stream.codecs=""));d==K.ea&&(ia=J.segmentIndex.get(0))&&ia.h&&(v.mimeType="application/mp4");$r(a)&&(a.ua?Or(a,[y]):(a.ua=!0,O=Array.from(a.h.values()),qa=O.filter(function(Va){return Va.stream.segmentIndex}),Or(a,qa),vr(a),Ka=a.P,0<Ka&&
756
- a.m.R(Ka)));B(Ca)})}var t=Zq(a.N,b),v=as(a,c,d,e,f,g,h,k,l,m,p);hj.includes(v.mimeType)&&(v.codecs="");var y={stream:v,type:d,cd:b,md:t,Ob:0,mb:0,Bd:new Map,qd:!1,Mc:!1,me:-1,xe:!1},w=null,x=new AbortController;v.createSegmentIndex=function(){if(w)return w;x=new AbortController;return w=new Promise(function(C){C(n(x.signal))})};v.closeSegmentIndex=function(){w&&!v.segmentIndex&&x.abort();v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null);w=null};return y}
757
- function Qr(a){var b=Infinity;a=r(a.h.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.mb));return b}function sr(a,b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&Uj(d.segmentIndex,function(e){c.push(e)});a.j.mc(c)}
758
- function Or(a,b){if(!qr(a))for(var c=Qr(a),d=r(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.xb(0,c);c=r(b);for(e=c.next();!e.done;e=c.next())e=e.value.stream,hj.includes(e.mimeType)&&(e.codecs="");sr(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?Ar(a,b):Cr(a,b)}
759
- function $r(a){if(!a.G)return!1;var b=[],c=[];a=r(a.G.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
760
- function Gr(a,b,c,d,e,f,g,h,k,l,m,p,n,t,v){var y,w,x,C,z,A,E,G,H,J,K,Q,V,U,ia,O;return F(function(qa){if(1==qa.g){if(1!=b.type)throw new M(2,4,4017);y=Vq(b.g,"EXT-X-DEFINE");w=xr(a,y);bs(a,b);return v?qa.D(2):u(qa,cs(a,f,e,b,w),3)}2!=qa.g&&(v=qa.h);x=yr(b,v);C=x.drmInfos;z=x.keyIds;A=x.encrypted;E=x.og;if(A&&!C.length&&!E)throw new M(2,4,4026);G=qr(a)?a.H.get(f):new Map;H=a.l;J=zr(a,b,f,G,w);H!=a.l&&bs(a,b);K=J[0].startTime;Q=J[J.length-1].endTime;V=new Tj(J);ia=(U=Xq(b.g,"EXT-X-SERVER-CONTROL"))?
761
- null!=U.getAttribute("CAN-SKIP-UNTIL"):!1;O=as(a,e,f,g,h,k,l,m,p,n,t);O.segmentIndex=V;O.encrypted=A;O.drmInfos=C;O.keyIds=z;O.mimeType=v;return qa.return({stream:O,type:f,cd:c,md:d,Ob:K,mb:Q,qd:ia,Mc:!1,me:-1,Bd:G,xe:!1})})}
762
- function as(a,b,c,d,e,f,g,h,k,l,m){var p=Sr(c,b)||Tr(c),n=[];if(k){k=r(k.split(","));for(var t=k.next();!t.done;t=k.next())n.push(t.value)}k=c==Gb?"subtitle":void 0;n.length||"subtitle"!==k||n.push("subtitle");return{id:a.sa++,originalId:f,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:p,codecs:b,kind:k,encrypted:!1,drmInfos:[],keyIds:new Set,language:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,
763
- height:void 0,bandwidth:void 0,roles:n,forced:l,channelsCount:g,audioSamplingRate:null,spatialAudio:m,closedCaptions:h,hdr:void 0,tilesLayout:void 0}}
764
- function yr(a,b){var c=[];if(a.segments){a=r(a.segments);for(var d=a.next();!d.done;d=a.next())d=Vq(d.value.g,"EXT-X-KEY"),c.push.apply(c,ha(d))}d=a=!1;var e=[],f=new Set;c=r(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=Sq(g,"METHOD");if("NONE"!=h)if(a=!0,"AES-128"==h)d=!0;else if(h=W(g,"KEYFORMAT")||"identity",g=(h=Vr[h])?h(g,b):null){if(g.keyIds){h=r(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}return{drmInfos:e,keyIds:f,encrypted:a,og:d}}
765
- function ds(a,b,c){if(!window.crypto||!window.crypto.subtle)throw Ua("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new M(2,4,4042);var d=0,e=W(b,"IV","");if(e){var f=jd(e.substr(2));if(16!=f.byteLength)throw new M(2,4,4043);}else d=Yq(c.g,"EXT-X-MEDIA-SEQUENCE");b=Zq(c.h,Sq(b,"URI"));var g=nf([b],a.g.retryParameters),h={method:"AES-128",iv:f,firstMediaSequenceNumber:d,fetchKey:function(){var k,l,m;return F(function(p){if(1==p.g)return u(p,
766
- es(a,g,6),2);if(3!=p.g){k=p.h;if(!k.data||16!=k.data.byteLength)throw new M(2,4,4044);l={name:"AES-CBC"};m=h;return u(p,window.crypto.subtle.importKey("raw",k.data,l,!0,["decrypt"]),3)}m.cryptoKey=p.h;h.fetchKey=void 0;B(p)})}};return h}
767
- function bs(a,b){var c=Xq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Xq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)ur(a,nr);else{c?ur(a,Pr):ur(a,fs);d=Xq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new M(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Xq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ra=Number(Sq(c,"PART-TARGET")),a.K=Math.min(a.ra,a.K),b=Xq(b.g,"EXT-X-SERVER-CONTROL"),a.V=b?Number(Sq(b,"PART-HOLD-BACK")):0):a.K=Math.min(d,a.K);a.$=Math.max(d,a.$)}}
768
- function Nr(a){var b=a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.V?a.V:a.$*a.g.hls.liveSegmentsDelay;a.j.$f(0);a.j.Xf(b);a.j.bd(!1)}function gs(a,b,c,d){c=Xq(c,"EXT-X-MAP");if(!c)return null;var e=Sq(c,"URI");d=Yr(Zq(b,e),d);b=[d,W(c,"BYTERANGE","")].join("-");a.Z.has(b)||(c=hs(d,c),a.Z.set(b,c));return a.Z.get(b)}function hs(a,b){var c=0,d=null;if(b=W(b,"BYTERANGE"))c=b.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1;return new yi(function(){return[a]},c,d)}
769
- function is(a,b,c,d,e,f,g,h,k,l){var m=d.g,p=Yr(d.i,f),n=Xq(m,"EXTINF"),t=0;f=0;var v=null;d.h.length&&!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.");var y=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Xq(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(y=cg(w.value))}w=Bi;Xq(m,"EXT-X-GAP")&&(w=2);if(!n){if(0==d.h.length)throw new M(2,4,
770
- 4024,"EXTINF");if(!a.l)return null}var x=[];if(a.l){t={};for(var C=0;C<d.h.length;t={Yd:t.Yd},C++){var z=d.h[C],A=0==C?c:x[x.length-1],E=0==C?e:A.endTime,G=Number(W(z,"DURATION"))||a.ra;if(G){G=E+G;var H=0,J=null;"EXT-X-PRELOAD-HINT"==z.name?H=(H=W(z,"BYTERANGE-START"))?Number(H):0:(H=W(z,"BYTERANGE"),J=r(js(A,H)),H=J.next().value,J=J.next().value);if(A=W(z,"URI"))t.Yd=Zq(g,A),A=Bi,"YES"==W(z,"GAP")&&(A=2),E=new Ai(E,G,function(K){return function(){return[K.Yd]}}(t),H,J,b,0,0,Infinity,[],"",null,
771
- null,A),"EXT-X-PRELOAD-HINT"==z.name&&E.Pf(),x.push(E)}}}if(n){a=Number(n.value.split(",")[0]);if(0==a)return null;t=e+a}else t=x[x.length-1].endTime;(a=Xq(m,"EXT-X-BYTERANGE"))?(v=r(js(c,a.value)),f=v.next().value,v=v.next().value):x.length&&(f=x[0].Ta,v=x[x.length-1].Ca);c="";a=null;"image"==h&&(c="1x1",h=Xq(m,"EXT-X-TILES"))&&(c=Sq(h,"LAYOUT"),(h=W(h,"DURATION"))&&(a=Number(h)));return new Ai(e,t,function(){return p.length?[p]:[]},f,v,b,k,0,Infinity,x,c,a,y,w,l)}
772
- function js(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.Ca+1,d=c+b-1);return[c,d]}
773
- function zr(a,b,c,d,e){var f=b.segments,g=void 0,h=Yq(b.g,"EXT-X-DISCONTINUITY-SEQUENCE"),k=Yq(b.g,"EXT-X-MEDIA-SEQUENCE"),l=Xq(b.g,"EXT-X-SKIP");l=l?Number(W(l,"SKIPPED-SEGMENTS")):0;var m=k+l,p=0;qr(a)&&d.has(m)&&(p=d.get(m));for(var n=[],t=null,v=p,y=0;y<f.length;y++){var w=f[y],x=0==y?p:t.endTime;m=k+l+y;Xq(w.g,"EXT-X-DISCONTINUITY")&&(h++,v=x);var C=r(w.g);for(var z=C.next();!z.done;z=C.next())z=z.value,"EXT-X-KEY"==z.name&&("AES-128"==Sq(z,"METHOD")?g=ds(a,z,b):g=void 0);d.set(m,x);C=gs(a,b.h,
774
- w.g,e);!a.l&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());if(w=is(a,C,t,w,x,e,b.h,c,v,g))t=w,w.j=h,a.g.hls.ignoreManifestProgramDateTime&&null!=a.F&&m<a.F||n.push(w)}if(b=n.some(function(A){return null!=A.g}))for(c={},d=0;d<n.length;c={uc:c.uc,tc:c.tc,dd:c.dd,rb:c.rb,sc:c.sc},d++)if(c.rb=n[d],null==c.rb.g)for(c.tc=0,c.uc=d,e=function(A){return function(){var E=n[A.uc];if(E){if(null!=E.g)return E.g+A.tc;A.tc-=E.endTime-E.startTime;A.uc+=1}return null}}(c),c.sc=
752
+ function Tr(a,b){var c,d,e,f,g,h,k,l,m,p;return F(function(n){if(1==n.g){c=Xr(Rq(b,"URI"),a.s);d=W(b,"CODECS","jpeg")||"";if(a.h.has(c))return n.return(a.h.get(c));e=Ir(b);f=W(b,"NAME");g=W(b,"CHARACTERISTICS");h=Yr(a,c,d,"image",e,!1,f,null,null,g,!1,!1);return a.h.has(c)?n.return(a.h.get(c)):(k=W(b,"RESOLUTION"))?u(n,h.stream.createSegmentIndex(),3):n.D(2)}2!=n.g&&(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=Number(k.split("x")[1])*
753
+ Number(m.split("x")[1]));if(p=W(b,"BANDWIDTH"))h.stream.bandwidth=Number(p);a.h.set(c,h);return n.return(h)})}function Wr(a,b,c,d){var e=Xr(Rq(b,"URI"),a.s);if(a.h.has(e))return a.h.get(e);b=W(b,"CLOSED-CAPTIONS");b="video"==d&&b&&"NONE"!=b?a.M.get(b):null;c=Db(d,c);d=Yr(a,e,c,d,"und",!1,null,null,b,null,!1,!1);if(a.h.has(e))return a.h.get(e);a.h.set(e,d);return d}
754
+ function Yr(a,b,c,d,e,f,g,h,k,l,m,p){function n(C){var z,A,E,G,H,J,K,Q,V,U,ia,O,qa,Ka;return F(function(Ca){if(1==Ca.g)return u(Ca,nr(a,y.md),2);if(3!=Ca.g){z=Ca.h;if(C.aborted)return Ca.return();A=z.uri;E=dr(a.X,z.data,A);G=pr(a);return u(Ca,Fr(a,E,b,A,c,d,e,f,g,h,k,l,m,p),3)}H=Ca.h;if(C.aborted)return Ca.return();J=H.stream;pr(a)&&!G&&Mr(a);y.md=A;y.Ob=H.Ob;y.mb=H.mb;y.qd=H.qd;y.Mc=H.Mc;y.Bd=H.Bd;y.xe=!0;v.segmentIndex=J.segmentIndex;v.encrypted=J.encrypted;v.drmInfos=J.drmInfos;v.keyIds=J.keyIds;
755
+ v.mimeType=J.mimeType;hj.includes(v.mimeType)&&(v.codecs="");v.drmInfos.length&&a.i.newDrmInfo(v);K=Hb;if(d==K.Ma||d==K.kd)for(Q=r(a.h.values()),V=Q.next();!V.done;V=Q.next())U=V.value,U.xe||U.type!=d||(U.stream.mimeType=J.mimeType,hj.includes(U.stream.mimeType)&&(U.stream.codecs=""));d==K.ea&&(ia=J.segmentIndex.get(0))&&ia.h&&(v.mimeType="application/mp4");Zr(a)&&(a.va?Nr(a,[y]):(a.va=!0,O=Array.from(a.h.values()),qa=O.filter(function(Va){return Va.stream.segmentIndex}),Nr(a,qa),ur(a),Ka=a.P,0<Ka&&
756
+ a.m.R(Ka)));B(Ca)})}var t=Yq(a.N,b),v=$r(a,c,d,e,f,g,h,k,l,m,p);hj.includes(v.mimeType)&&(v.codecs="");var y={stream:v,type:d,cd:b,md:t,Ob:0,mb:0,Bd:new Map,qd:!1,Mc:!1,me:-1,xe:!1},w=null,x=new AbortController;v.createSegmentIndex=function(){if(w)return w;x=new AbortController;return w=new Promise(function(C){C(n(x.signal))})};v.closeSegmentIndex=function(){w&&!v.segmentIndex&&x.abort();v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null);w=null};return y}
757
+ function Pr(a){var b=Infinity;a=r(a.h.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.mb));return b}function rr(a,b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&Uj(d.segmentIndex,function(e){c.push(e)});a.j.mc(c)}
758
+ function Nr(a,b){if(!pr(a))for(var c=Pr(a),d=r(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.xb(0,c);c=r(b);for(e=c.next();!e.done;e=c.next())e=e.value.stream,hj.includes(e.mimeType)&&(e.codecs="");rr(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?zr(a,b):Br(a,b)}
759
+ function Zr(a){if(!a.G)return!1;var b=[],c=[];a=r(a.G.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
760
+ function Fr(a,b,c,d,e,f,g,h,k,l,m,p,n,t,v){var y,w,x,C,z,A,E,G,H,J,K,Q,V,U,ia,O;return F(function(qa){if(1==qa.g){if(1!=b.type)throw new M(2,4,4017);y=Uq(b.g,"EXT-X-DEFINE");w=wr(a,y);as(a,b);return v?qa.D(2):u(qa,bs(a,f,e,b,w),3)}2!=qa.g&&(v=qa.h);x=xr(b,v);C=x.drmInfos;z=x.keyIds;A=x.encrypted;E=x.og;if(A&&!C.length&&!E)throw new M(2,4,4026);G=pr(a)?a.H.get(f):new Map;H=a.l;J=yr(a,b,f,G,w);H!=a.l&&as(a,b);K=J[0].startTime;Q=J[J.length-1].endTime;V=new Tj(J);ia=(U=Wq(b.g,"EXT-X-SERVER-CONTROL"))?
761
+ null!=U.getAttribute("CAN-SKIP-UNTIL"):!1;O=$r(a,e,f,g,h,k,l,m,p,n,t);O.segmentIndex=V;O.encrypted=A;O.drmInfos=C;O.keyIds=z;O.mimeType=v;return qa.return({stream:O,type:f,cd:c,md:d,Ob:K,mb:Q,qd:ia,Mc:!1,me:-1,Bd:G,xe:!1})})}
762
+ function $r(a,b,c,d,e,f,g,h,k,l,m){var p=Rr(c,b)||Sr(c),n=[];if(k){k=r(k.split(","));for(var t=k.next();!t.done;t=k.next())n.push(t.value)}k=c==Gb?"subtitle":void 0;n.length||"subtitle"!==k||n.push("subtitle");return{id:a.ua++,originalId:f,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:p,codecs:b,kind:k,encrypted:!1,drmInfos:[],keyIds:new Set,language:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,
763
+ height:void 0,bandwidth:void 0,roles:n,forced:l,channelsCount:g,audioSamplingRate:null,spatialAudio:m,closedCaptions:h,hdr:void 0,tilesLayout:void 0,external:!1}}
764
+ function xr(a,b){var c=[];if(a.segments){a=r(a.segments);for(var d=a.next();!d.done;d=a.next())d=Uq(d.value.g,"EXT-X-KEY"),c.push.apply(c,ha(d))}d=a=!1;var e=[],f=new Set;c=r(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=Rq(g,"METHOD");if("NONE"!=h)if(a=!0,"AES-128"==h)d=!0;else if(h=W(g,"KEYFORMAT")||"identity",g=(h=Ur[h])?h(g,b):null){if(g.keyIds){h=r(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}return{drmInfos:e,keyIds:f,encrypted:a,og:d}}
765
+ function cs(a,b,c){if(!window.crypto||!window.crypto.subtle)throw Ua("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new M(2,4,4042);var d=0,e=W(b,"IV","");if(e){var f=jd(e.substr(2));if(16!=f.byteLength)throw new M(2,4,4043);}else d=Xq(c.g,"EXT-X-MEDIA-SEQUENCE");b=Yq(c.h,Rq(b,"URI"));var g=nf([b],a.g.retryParameters),h={method:"AES-128",iv:f,firstMediaSequenceNumber:d,fetchKey:function(){var k,l,m;return F(function(p){if(1==p.g)return u(p,
766
+ ds(a,g,6),2);if(3!=p.g){k=p.h;if(!k.data||16!=k.data.byteLength)throw new M(2,4,4044);l={name:"AES-CBC"};m=h;return u(p,window.crypto.subtle.importKey("raw",k.data,l,!0,["decrypt"]),3)}m.cryptoKey=p.h;h.fetchKey=void 0;B(p)})}};return h}
767
+ function as(a,b){var c=Wq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Wq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)tr(a,mr);else{c?tr(a,Or):tr(a,es);d=Wq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new M(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Wq(b.g,"EXT-X-PART-INF");a.l&&c?(a.sa=Number(Rq(c,"PART-TARGET")),a.K=Math.min(a.sa,a.K),b=Wq(b.g,"EXT-X-SERVER-CONTROL"),a.V=b?Number(Rq(b,"PART-HOLD-BACK")):0):a.K=Math.min(d,a.K);a.$=Math.max(d,a.$)}}
768
+ function Mr(a){var b=a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.V?a.V:a.$*a.g.hls.liveSegmentsDelay;a.j.$f(0);a.j.Xf(b);a.j.bd(!1)}function fs(a,b,c,d){c=Wq(c,"EXT-X-MAP");if(!c)return null;var e=Rq(c,"URI");d=Xr(Yq(b,e),d);b=[d,W(c,"BYTERANGE","")].join("-");a.Z.has(b)||(c=gs(d,c),a.Z.set(b,c));return a.Z.get(b)}function gs(a,b){var c=0,d=null;if(b=W(b,"BYTERANGE"))c=b.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1;return new yi(function(){return[a]},c,d)}
769
+ function hs(a,b,c,d,e,f,g,h,k,l){var m=d.g,p=Xr(d.i,f),n=Wq(m,"EXTINF"),t=0;f=0;var v=null;d.h.length&&!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.");var y=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Wq(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(y=cg(w.value))}w=Bi;Wq(m,"EXT-X-GAP")&&(w=2);if(!n){if(0==d.h.length)throw new M(2,4,
770
+ 4024,"EXTINF");if(!a.l)return null}var x=[];if(a.l){t={};for(var C=0;C<d.h.length;t={Yd:t.Yd},C++){var z=d.h[C],A=0==C?c:x[x.length-1],E=0==C?e:A.endTime,G=Number(W(z,"DURATION"))||a.sa;if(G){G=E+G;var H=0,J=null;"EXT-X-PRELOAD-HINT"==z.name?H=(H=W(z,"BYTERANGE-START"))?Number(H):0:(H=W(z,"BYTERANGE"),J=r(is(A,H)),H=J.next().value,J=J.next().value);if(A=W(z,"URI"))t.Yd=Yq(g,A),A=Bi,"YES"==W(z,"GAP")&&(A=2),E=new Ai(E,G,function(K){return function(){return[K.Yd]}}(t),H,J,b,0,0,Infinity,[],"",null,
771
+ null,A),"EXT-X-PRELOAD-HINT"==z.name&&E.Pf(),x.push(E)}}}if(n){a=Number(n.value.split(",")[0]);if(0==a)return null;t=e+a}else t=x[x.length-1].endTime;(a=Wq(m,"EXT-X-BYTERANGE"))?(v=r(is(c,a.value)),f=v.next().value,v=v.next().value):x.length&&(f=x[0].Ta,v=x[x.length-1].Ca);c="";a=null;"image"==h&&(c="1x1",h=Wq(m,"EXT-X-TILES"))&&(c=Rq(h,"LAYOUT"),(h=W(h,"DURATION"))&&(a=Number(h)));return new Ai(e,t,function(){return p.length?[p]:[]},f,v,b,k,0,Infinity,x,c,a,y,w,l)}
772
+ function is(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.Ca+1,d=c+b-1);return[c,d]}
773
+ function yr(a,b,c,d,e){var f=b.segments,g=void 0,h=Xq(b.g,"EXT-X-DISCONTINUITY-SEQUENCE"),k=Xq(b.g,"EXT-X-MEDIA-SEQUENCE"),l=Wq(b.g,"EXT-X-SKIP");l=l?Number(W(l,"SKIPPED-SEGMENTS")):0;var m=k+l,p=0;pr(a)&&d.has(m)&&(p=d.get(m));for(var n=[],t=null,v=p,y=0;y<f.length;y++){var w=f[y],x=0==y?p:t.endTime;m=k+l+y;Wq(w.g,"EXT-X-DISCONTINUITY")&&(h++,v=x);var C=r(w.g);for(var z=C.next();!z.done;z=C.next())z=z.value,"EXT-X-KEY"==z.name&&("AES-128"==Rq(z,"METHOD")?g=cs(a,z,b):g=void 0);d.set(m,x);C=fs(a,b.h,
774
+ w.g,e);!a.l&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());if(w=hs(a,C,t,w,x,e,b.h,c,v,g))t=w,w.j=h,a.g.hls.ignoreManifestProgramDateTime&&null!=a.F&&m<a.F||n.push(w)}if(b=n.some(function(A){return null!=A.g}))for(c={},d=0;d<n.length;c={uc:c.uc,tc:c.tc,dd:c.dd,rb:c.rb,sc:c.sc},d++)if(c.rb=n[d],null==c.rb.g)for(c.tc=0,c.uc=d,e=function(A){return function(){var E=n[A.uc];if(E){if(null!=E.g)return E.g+A.tc;A.tc-=E.endTime-E.startTime;A.uc+=1}return null}}(c),c.sc=
775
775
  0,c.dd=d,f=function(A){return function(){var E=n[A.dd];if(E){E!=A.rb&&(A.sc+=E.endTime-E.startTime);if(null!=E.g)return E.g+A.sc;--A.dd}return null}}(c);null==c.rb.g;)c.rb.g=f(),null==c.rb.g&&(c.rb.g=e());if(b)for(c=r(n),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.g,e=r(e.i),f=e.next();!f.done;f=e.next())f=f.value,f.g=d,d+=f.endTime-f.startTime;a=a.J;if(b&&Infinity!=a)for(b=r(n),d=b.next();!d.done;d=b.next())d.value.Xe(a);return n}
776
- function Yr(a,b){if(!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new M(2,4,4039,e);}}return a}function Sr(a,b){if(a==Gb){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":null:"image/jpeg"}
777
- function Tr(a){return a==Gb?"text/vtt":ks[a].mp4}function cs(a,b,c,d,e){var f,g,h,k,l,m,p,n,t,v;return F(function(y){if(1==y.g){f=tf;g=Math.trunc((d.segments.length-1)/2);h=Yr(d.segments[g].i,e);k=new jb(h);l=k.Ha.split(".").pop();m=ks[b];if((p=m[l])||(p=Dr[l])||(p=Sr(b,c)))return y.return(p);n=nf([h],a.g.retryParameters);n.method="HEAD";return u(y,es(a,n,f),2)}t=y.h;return(v=t.headers["content-type"])?y.return(v.split(";")[0]):y.return(Tr(b))})}
778
- function or(a,b){b=nf([b],a.g.retryParameters);a.i.modifyManifestRequest(b,{format:"h"});return es(a,b,0)}function mr(a){var b,c;F(function(d){if(1==d.g){if(!a.i)return d.return();D(d,2);return u(d,a.update(),4)}if(2!=d.g)return qr(a)&&(b=a.P,a.m.R(b)),va(d,0);c=wa(d);if(!a.i)return d.return();c.severity=1;a.i.onError(c);a.m.R(.1);B(d)})}function qr(a){return a.aa!=nr}function ur(a,b){a.aa=b;a.j&&a.j.bd(!qr(a));qr(a)||a.m.stop()}
779
- function es(a,b,c){if(!a.I)throw new M(2,7,7001);b=a.i.networkingEngine.request(c,b);hf(a.I,b);return b.promise}I("shaka.hls.HlsParser",lr);
780
- var Dr={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},Er={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"},Fr={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"},ks={audio:Er,video:Fr,text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
781
- 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"}},Vr={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new M(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new M(2,4,4041);return Cb("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Sq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
782
- b=Sq(a,"URI");b=kr(b);b=Fc(b.data);b=Cb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=W(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=Sq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Sq(a,"URI");a=kr(a);a=Fc(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Sf(a,b,new Set,0);return Cb("com.microsoft.playready",[{initDataType:"cenc",initData:a}])},identity:function(a){a=
783
- Sq(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?Cb("org.w3.clearkey",null):null}},nr="VOD",fs="EVENT",Pr="LIVE",tr={kg:nr,ji:fs,ig:Pr};Rc("Tizen 3")||Rc("Tizen 2")||Tc()||(ch.m3u8=function(){return new lr},ah["application/x-mpegurl"]=function(){return new lr},ah["application/vnd.apple.mpegurl"]=function(){return new lr});function ls(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=cd(b)}catch(g){}throw new M(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function ms(){}function ns(a,b,c,d,e){var f=new os;Bf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new ps,h={yf:!1,fg:!1};a=qs(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 Ye(a,function(){h.yf=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new N(function(){h.fg=!0;g.abort()});k.R(b/1E3);a.finally(function(){k.stop()})}return a}
784
- function qs(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,v,y,w,x,C,z;return F(function(A){switch(A.g){case 1:return h=rs,k=ss,n=p=0,t=Date.now(),D(A,2),u(A,h(a,c),4);case 4:l=A.h;f(ts(l.headers));if("HEAD"==c.method){A.D(5);break}v=l.clone().body.getReader();w=(y=l.headers.get("Content-Length"))?parseInt(y,10):0;x=function(E){function G(){var H,J;return F(function(K){switch(K.g){case 1:return D(K,2),u(K,v.read(),4);case 4:H=K.h;va(K,3);break;case 2:return wa(K),K.return();case 3:if(H.done){K.D(5);break}p+=H.value.byteLength;
785
- if(!g){K.D(5);break}return u(K,g(H.value),5);case 5:J=Date.now();if(100<J-t||H.done)e(J-t,p-n,w-p),n=p,t=J;H.done?E.close():(E.enqueue(H.value),G());B(K)}})}G()};new k({start:x});return u(A,l.arrayBuffer(),6);case 6:m=A.h;case 5:va(A,3);break;case 2:C=wa(A);if(d.yf)throw new M(1,1,7001,a,b);if(d.fg)throw new M(1,1,1003,a,b);throw new M(1,1,1002,a,C,b);case 3:return z=ts(l.headers),A.return(ls(z,m,l.status,a,l.url,b))}})}function ts(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
786
- function us(){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)}I("shaka.net.HttpFetchPlugin",ms);ms.isSupported=us;ms.parse=ns;var rs=window.fetch,ps=window.AbortController,ss=window.ReadableStream,os=window.Headers;us()&&(kf("http",ns,2,!0),kf("https",ns,2,!0),kf("blob",ns,2,!0));function vs(){}
787
- function ws(a,b,c,d,e){var f=new xs,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 M(1,1,7001,a,c))};var p=!1;f.onreadystatechange=function(){if(2==f.readyState&&!p){var t=ys(f);e(t);p=!0}};f.onload=function(){var t=ys(f),v=f.response;try{var y=ls(t,v,f.status,a,f.responseURL,c);l(y)}catch(w){m(w)}};f.onerror=function(t){m(new M(1,1,1002,a,t,
776
+ function Xr(a,b){if(!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new M(2,4,4039,e);}}return a}function Rr(a,b){if(a==Gb){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":null:"image/jpeg"}
777
+ function Sr(a){return a==Gb?"text/vtt":js[a].mp4}function bs(a,b,c,d,e){var f,g,h,k,l,m,p,n,t,v;return F(function(y){if(1==y.g){f=tf;g=Math.trunc((d.segments.length-1)/2);h=Xr(d.segments[g].i,e);k=new jb(h);l=k.Ha.split(".").pop();m=js[b];if((p=m[l])||(p=Cr[l])||(p=Rr(b,c)))return y.return(p);n=nf([h],a.g.retryParameters);n.method="HEAD";return u(y,ds(a,n,f),2)}t=y.h;return(v=t.headers["content-type"])?y.return(v.split(";")[0]):y.return(Sr(b))})}
778
+ function nr(a,b){b=nf([b],a.g.retryParameters);a.i.modifyManifestRequest(b,{format:"h"});return ds(a,b,0)}function lr(a){var b,c;F(function(d){if(1==d.g){if(!a.i)return d.return();D(d,2);return u(d,a.update(),4)}if(2!=d.g)return pr(a)&&(b=a.P,a.m.R(b)),va(d,0);c=wa(d);if(!a.i)return d.return();c.severity=1;a.i.onError(c);a.m.R(.1);B(d)})}function pr(a){return a.aa!=mr}function tr(a,b){a.aa=b;a.j&&a.j.bd(!pr(a));pr(a)||a.m.stop()}
779
+ function ds(a,b,c){if(!a.I)throw new M(2,7,7001);b=a.i.networkingEngine.request(c,b);hf(a.I,b);return b.promise}I("shaka.hls.HlsParser",kr);
780
+ var Cr={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},Dr={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"},Er={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"},js={audio:Dr,video:Er,text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
781
+ 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"}},Ur={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new M(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new M(2,4,4041);return Cb("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Rq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
782
+ b=Rq(a,"URI");b=jr(b);b=Fc(b.data);b=Cb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=W(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=Rq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Rq(a,"URI");a=jr(a);a=Fc(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Sf(a,b,new Set,0);return Cb("com.microsoft.playready",[{initDataType:"cenc",initData:a}])},identity:function(a){a=
783
+ Rq(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?Cb("org.w3.clearkey",null):null}},mr="VOD",es="EVENT",Or="LIVE",sr={kg:mr,ji:es,ig:Or};Rc("Tizen 3")||Rc("Tizen 2")||Tc()||(ch.m3u8=function(){return new kr},ah["application/x-mpegurl"]=function(){return new kr},ah["application/vnd.apple.mpegurl"]=function(){return new kr});function ks(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=cd(b)}catch(g){}throw new M(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function ls(){}function ms(a,b,c,d,e){var f=new ns;Bf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new os,h={yf:!1,fg:!1};a=ps(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 Ye(a,function(){h.yf=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new N(function(){h.fg=!0;g.abort()});k.R(b/1E3);a.finally(function(){k.stop()})}return a}
784
+ function ps(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,v,y,w,x,C,z;return F(function(A){switch(A.g){case 1:return h=qs,k=rs,n=p=0,t=Date.now(),D(A,2),u(A,h(a,c),4);case 4:l=A.h;f(ss(l.headers));if("HEAD"==c.method){A.D(5);break}v=l.clone().body.getReader();w=(y=l.headers.get("Content-Length"))?parseInt(y,10):0;x=function(E){function G(){var H,J;return F(function(K){switch(K.g){case 1:return D(K,2),u(K,v.read(),4);case 4:H=K.h;va(K,3);break;case 2:return wa(K),K.return();case 3:if(H.done){K.D(5);break}p+=H.value.byteLength;
785
+ if(!g){K.D(5);break}return u(K,g(H.value),5);case 5:J=Date.now();if(100<J-t||H.done)e(J-t,p-n,w-p),n=p,t=J;H.done?E.close():(E.enqueue(H.value),G());B(K)}})}G()};new k({start:x});return u(A,l.arrayBuffer(),6);case 6:m=A.h;case 5:va(A,3);break;case 2:C=wa(A);if(d.yf)throw new M(1,1,7001,a,b);if(d.fg)throw new M(1,1,1003,a,b);throw new M(1,1,1002,a,C,b);case 3:return z=ss(l.headers),A.return(ks(z,m,l.status,a,l.url,b))}})}function ss(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
786
+ function ts(){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)}I("shaka.net.HttpFetchPlugin",ls);ls.isSupported=ts;ls.parse=ms;var qs=window.fetch,os=window.AbortController,rs=window.ReadableStream,ns=window.Headers;ts()&&(kf("http",ms,2,!0),kf("https",ms,2,!0),kf("blob",ms,2,!0));function us(){}
787
+ function vs(a,b,c,d,e){var f=new ws,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 M(1,1,7001,a,c))};var p=!1;f.onreadystatechange=function(){if(2==f.readyState&&!p){var t=xs(f);e(t);p=!0}};f.onload=function(){var t=xs(f),v=f.response;try{var y=ks(t,v,f.status,a,f.responseURL,c);l(y)}catch(w){m(w)}};f.onerror=function(t){m(new M(1,1,1002,a,t,
788
788
  c))};f.ontimeout=function(){m(new M(1,1,1003,a,c))};f.onprogress=function(t){var v=Date.now();if(100<v-g||t.lengthComputable&&t.loaded==t.total)d(v-g,t.loaded-h,t.total-t.loaded),h=t.loaded,g=v};for(var n in b.headers)f.setRequestHeader(n.toLowerCase(),b.headers[n]);f.send(b.body)});return new Ye(k,function(){f.abort();return Promise.resolve()})}
789
- function ys(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=r(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}I("shaka.net.HttpXHRPlugin",vs);vs.parse=ws;var xs=window.XMLHttpRequest;kf("http",ws,1,!0);kf("https",ws,1,!0);kf("blob",ws,1,!0);function zs(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function As(a){return a.Pa().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ta+":"+a.Ca}function Bs(a,b){return mk(a.g.Pa(),a.g.Ta,a.g.Ca,b.streaming.retryParameters)};function Cs(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Ds(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Cs.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 Es(a){var b=this;this.s=a;this.j=new Map;this.i=new uf(function(){return Fs(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Cs}Es.prototype.destroy=function(){return this.i.destroy()};function Gs(a,b,c){a.m=b;a.l=c}function Fs(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
790
- function Hs(a,b,c,d,e,f){vf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,p,n,t;return F(function(v){if(1==v.g)return u(v,Is(a,c),2);h=v.h;if(a.i.g)throw new M(2,9,7001);if(e)for(m in k=Fc(h),l=new Rf(k),l.data)p=Number(m),n=l.data[p],t=l.g[p],a.l(n,t);a.g.close(d,h.byteLength);var y=a.g;a.m(0==y.i?0:y.j/y.i,a.g.h);return v.return(f(h))})});a.j.set(b,g)}function Js(a){return F(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
791
- function Is(a,b){var c,d,e,f;return F(function(g){if(1==g.g)return c=tf,d=a.s.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;ec(a.h,e);return g.return(f.data)})};function Ks(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Jc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Ks.prototype.abort=function(){var a=this;return F(function(b){if(1==b.g){try{a.i.abort()}catch(c){}D(b,2);return u(b,a.g,4)}if(2!=b.g)return va(b,0);wa(b);B(b)})};
792
- function Ls(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return F(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();B(g)})}})}Ks.prototype.store=function(){return this.h};Ks.prototype.promise=function(){return this.g};function Ms(a){this.h=a;this.g=[]}Ms.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Ns(a,b){return Os(a,b,"readwrite")}function Os(a,b,c){c=a.h.transaction([b],c);var d=new Ks(c,b);a.g.push(d);d.promise().then(function(){ec(a.g,d)},function(){ec(a.g,d)});return d};function Ps(a,b,c){this.h=new Ms(a);this.i=b;this.g=c}q=Ps.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return Qs(this.i)};q.removeSegments=function(a,b){return Rs(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return F(function(d){if(1==d.g)return u(d,Ss(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Bf(e)}))})};q.addManifests=function(){return Qs(this.g)};
793
- q.updateManifest=function(){return Promise.reject(new M(2,9,9016,"Cannot modify values in "+this.g))};function Ts(a,b,c){a=Ns(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}q.updateManifestExpiration=function(a,b){var c=Ns(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()};q.removeManifests=function(a,b){return Rs(this,this.g,a,b)};
794
- q.getManifests=function(a){var b=this,c;return F(function(d){if(1==d.g)return u(d,Ss(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Ec(e)})))})};q.getAllManifests=function(){var a=this,b,c;return F(function(d){return 1==d.g?(b=Os(a.h,a.g,"readonly"),c=new Map,u(d,Ls(b,function(e,f){var g;return F(function(h){if(1==h.g)return u(h,a.Ec(f),2);g=h.h;c.set(e,g);B(h)})}),2)):3!=d.g?u(d,b.promise(),3):d.return(c)})};q.Bf=function(a){return a};q.Ec=function(a){return Promise.resolve(a)};
795
- function Qs(a){return Promise.reject(new M(2,9,9011,"Cannot add new value to "+a))}q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return F(function(m){if(1==m.g){d=Ns(c.h,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={hd:g.hd},k=h.next())l=k.value,g.hd=e.add(l),g.hd.onsuccess=function(p){return function(){f.push(p.hd.result)}}(g);return u(m,d.promise(),2)}return m.return(f)})};
796
- function Rs(a,b,c,d){a=Ns(a.h,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={gd:e.gd},f=c.next())e.gd=f.value,b.delete(e.gd).onsuccess=function(g){return function(){return d(g.gd)}}(e);return a.promise()}
797
- function Ss(a,b,c){var d,e,f,g,h,k,l;return F(function(m){if(1==m.g){d=Os(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={Ac:h.Ac,xc:h.xc},l=k.next())h.xc=l.value,h.Ac=e.get(h.xc),h.Ac.onsuccess=function(p){return function(){void 0==p.Ac.result&&g.push(p.xc);f[p.xc]=p.Ac.result}}(h);return u(m,d.promise(),2)}if(g.length)throw new M(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(p){return f[p]}))})};function Us(a){this.g=new Ms(a)}Us.prototype.destroy=function(){return this.g.destroy()};Us.prototype.getAll=function(){var a=this,b,c;return F(function(d){return 1==d.g?(b=Os(a.g,"session-ids","readonly"),c=[],u(d,Ls(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d.return(c)})};Us.prototype.add=function(a){var b=Ns(this.g,"session-ids"),c=b.store();a=r(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
798
- Us.prototype.remove=function(a){var b=this,c;return F(function(d){return 1==d.g?(c=Ns(b.g,"session-ids"),u(d,Ls(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):u(d,c.promise(),0)})};function Vs(){this.g=new Map}Vs.prototype.destroy=function(){for(var a=[],b=r(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};Vs.prototype.init=function(){var a=this;Ws.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=r(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
799
- function Xs(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ra:d,Ba:f},Ba:e})})});if(b)return b;throw new M(2,9,9013,"Could not find a cell that supports add-operations");}function Ys(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ra:d,Ba:f},e)})})}
800
- function Zs(a,b,c){a=a.g.get(b);if(!a)throw new M(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new M(2,9,9013,"Could not find cell with name "+c);return b}function $s(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function at(a){var b=Array.from(a.g.keys());if(!b.length)throw new M(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
801
- function bt(a){var b,c,d;return F(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Ws,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.D(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function ct(a,b){Ws.set(a,b)}I("shaka.offline.StorageMuxer",Vs);Vs.unregister=function(a){Ws.delete(a)};Vs.register=ct;Vs.prototype.destroy=Vs.prototype.destroy;var Ws=new Map;function dt(){Ps.apply(this,arguments)}pa(dt,Ps);dt.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return F(function(g){d=Ns(c.h,c.g);e=d.store();f=new Jc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new M(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
802
- dt.prototype.Ec=function(a){var b,c,d,e,f,g;return F(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=et(a.periods[c],e),b.push(f);return u(h,cq(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,sequenceMode:!1})})};
803
- function et(a,b){ft(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return gt(e,a.startTime,b)})}
804
- function gt(a,b,c){var d=a.initSegmentUri?ht(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=ht(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
805
- dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}dt.prototype.Bf=function(a){return{data:a.data}};function ht(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new M(2,9,9004,"Could not parse uri "+a);}
806
- function ft(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=r(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=r(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=r(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
807
- f=r(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=r(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=r(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function it(){Ps.apply(this,arguments)}pa(it,Ps);
808
- it.prototype.Ec=function(a){var b,c,d,e,f,g;return F(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;for(var k=a.periods[c],l=[],m=r(k.streams),p=m.next();!p.done;p=m.next())p=p.value,0!=p.variantIds.length&&l.push(jt(p,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,cq(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
789
+ function xs(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=r(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}I("shaka.net.HttpXHRPlugin",us);us.parse=vs;var ws=window.XMLHttpRequest;kf("http",vs,1,!0);kf("https",vs,1,!0);kf("blob",vs,1,!0);function ys(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function zs(a){return a.Pa().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ta+":"+a.Ca}function As(a,b){return mk(a.g.Pa(),a.g.Ta,a.g.Ca,b.streaming.retryParameters)};function Bs(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Cs(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Bs.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 Ds(a){var b=this;this.s=a;this.j=new Map;this.i=new uf(function(){return Es(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Bs}Ds.prototype.destroy=function(){return this.i.destroy()};function Fs(a,b,c){a.m=b;a.l=c}function Es(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
790
+ function Gs(a,b,c,d,e,f){vf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,p,n,t;return F(function(v){if(1==v.g)return u(v,Hs(a,c),2);h=v.h;if(a.i.g)throw new M(2,9,7001);if(e)for(m in k=Fc(h),l=new Rf(k),l.data)p=Number(m),n=l.data[p],t=l.g[p],a.l(n,t);a.g.close(d,h.byteLength);var y=a.g;a.m(0==y.i?0:y.j/y.i,a.g.h);return v.return(f(h))})});a.j.set(b,g)}function Is(a){return F(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
791
+ function Hs(a,b){var c,d,e,f;return F(function(g){if(1==g.g)return c=tf,d=a.s.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;ec(a.h,e);return g.return(f.data)})};function Js(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Jc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Js.prototype.abort=function(){var a=this;return F(function(b){if(1==b.g){try{a.i.abort()}catch(c){}D(b,2);return u(b,a.g,4)}if(2!=b.g)return va(b,0);wa(b);B(b)})};
792
+ function Ks(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return F(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();B(g)})}})}Js.prototype.store=function(){return this.h};Js.prototype.promise=function(){return this.g};function Ls(a){this.h=a;this.g=[]}Ls.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Ms(a,b){return Ns(a,b,"readwrite")}function Ns(a,b,c){c=a.h.transaction([b],c);var d=new Js(c,b);a.g.push(d);d.promise().then(function(){ec(a.g,d)},function(){ec(a.g,d)});return d};function Os(a,b,c){this.h=new Ls(a);this.i=b;this.g=c}q=Os.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return Ps(this.i)};q.removeSegments=function(a,b){return Qs(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return F(function(d){if(1==d.g)return u(d,Rs(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Bf(e)}))})};q.addManifests=function(){return Ps(this.g)};
793
+ q.updateManifest=function(){return Promise.reject(new M(2,9,9016,"Cannot modify values in "+this.g))};function Ss(a,b,c){a=Ms(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}q.updateManifestExpiration=function(a,b){var c=Ms(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()};q.removeManifests=function(a,b){return Qs(this,this.g,a,b)};
794
+ q.getManifests=function(a){var b=this,c;return F(function(d){if(1==d.g)return u(d,Rs(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Ec(e)})))})};q.getAllManifests=function(){var a=this,b,c;return F(function(d){return 1==d.g?(b=Ns(a.h,a.g,"readonly"),c=new Map,u(d,Ks(b,function(e,f){var g;return F(function(h){if(1==h.g)return u(h,a.Ec(f),2);g=h.h;c.set(e,g);B(h)})}),2)):3!=d.g?u(d,b.promise(),3):d.return(c)})};q.Bf=function(a){return a};q.Ec=function(a){return Promise.resolve(a)};
795
+ function Ps(a){return Promise.reject(new M(2,9,9011,"Cannot add new value to "+a))}q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return F(function(m){if(1==m.g){d=Ms(c.h,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={hd:g.hd},k=h.next())l=k.value,g.hd=e.add(l),g.hd.onsuccess=function(p){return function(){f.push(p.hd.result)}}(g);return u(m,d.promise(),2)}return m.return(f)})};
796
+ function Qs(a,b,c,d){a=Ms(a.h,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={gd:e.gd},f=c.next())e.gd=f.value,b.delete(e.gd).onsuccess=function(g){return function(){return d(g.gd)}}(e);return a.promise()}
797
+ function Rs(a,b,c){var d,e,f,g,h,k,l;return F(function(m){if(1==m.g){d=Ns(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={Ac:h.Ac,xc:h.xc},l=k.next())h.xc=l.value,h.Ac=e.get(h.xc),h.Ac.onsuccess=function(p){return function(){void 0==p.Ac.result&&g.push(p.xc);f[p.xc]=p.Ac.result}}(h);return u(m,d.promise(),2)}if(g.length)throw new M(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(p){return f[p]}))})};function Ts(a){this.g=new Ls(a)}Ts.prototype.destroy=function(){return this.g.destroy()};Ts.prototype.getAll=function(){var a=this,b,c;return F(function(d){return 1==d.g?(b=Ns(a.g,"session-ids","readonly"),c=[],u(d,Ks(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d.return(c)})};Ts.prototype.add=function(a){var b=Ms(this.g,"session-ids"),c=b.store();a=r(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
798
+ Ts.prototype.remove=function(a){var b=this,c;return F(function(d){return 1==d.g?(c=Ms(b.g,"session-ids"),u(d,Ks(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):u(d,c.promise(),0)})};function Us(){this.g=new Map}Us.prototype.destroy=function(){for(var a=[],b=r(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};Us.prototype.init=function(){var a=this;Vs.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=r(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
799
+ function Ws(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ra:d,Ba:f},Ba:e})})});if(b)return b;throw new M(2,9,9013,"Could not find a cell that supports add-operations");}function Xs(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ra:d,Ba:f},e)})})}
800
+ function Ys(a,b,c){a=a.g.get(b);if(!a)throw new M(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new M(2,9,9013,"Could not find cell with name "+c);return b}function Zs(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function $s(a){var b=Array.from(a.g.keys());if(!b.length)throw new M(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
801
+ function at(a){var b,c,d;return F(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Vs,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.D(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function bt(a,b){Vs.set(a,b)}I("shaka.offline.StorageMuxer",Us);Us.unregister=function(a){Vs.delete(a)};Us.register=bt;Us.prototype.destroy=Us.prototype.destroy;var Vs=new Map;function ct(){Os.apply(this,arguments)}pa(ct,Os);ct.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return F(function(g){d=Ms(c.h,c.g);e=d.store();f=new Jc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new M(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
802
+ ct.prototype.Ec=function(a){var b,c,d,e,f,g;return F(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=dt(a.periods[c],e),b.push(f);return u(h,bq(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,sequenceMode:!1})})};
803
+ function dt(a,b){et(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return ft(e,a.startTime,b)})}
804
+ function ft(a,b,c){var d=a.initSegmentUri?gt(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=gt(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
805
+ dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1}}ct.prototype.Bf=function(a){return{data:a.data}};function gt(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new M(2,9,9004,"Could not parse uri "+a);}
806
+ function et(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=r(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=r(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=r(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
807
+ f=r(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=r(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=r(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function ht(){Os.apply(this,arguments)}pa(ht,Os);
808
+ ht.prototype.Ec=function(a){var b,c,d,e,f,g;return F(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;for(var k=a.periods[c],l=[],m=r(k.streams),p=m.next();!p.done;p=m.next())p=p.value,0!=p.variantIds.length&&l.push(it(p,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,bq(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
809
809
  Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
810
- function jt(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
811
- dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function kt(){Ps.apply(this,arguments)}pa(kt,Ps);q=kt.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return Ts(this,a,b)};q.Ec=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function lt(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=lt.prototype;
812
- q.init=function(){var a=this,b=new Jc,c=!1,d=new N(function(){c=!0;b.reject(new M(2,9,9017))});d.R(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new dt(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new it(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
813
- new it(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new kt(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Us(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=r(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new M(2,
810
+ function it(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
811
+ dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1}};function jt(){Os.apply(this,arguments)}pa(jt,Os);q=jt.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return Ss(this,a,b)};q.Ec=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function kt(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=kt.prototype;
812
+ q.init=function(){var a=this,b=new Jc,c=!1,d=new N(function(){c=!0;b.reject(new M(2,9,9017))});d.R(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new ct(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new ht(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
813
+ new ht(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new jt(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Ts(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=r(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new M(2,
814
814
  9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return F(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.D(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),B(b)}})};
815
815
  q.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};q.getEmeSessionCell=function(){return this.m};
816
- q.erase=function(){var a=this;return F(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,mt(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
817
- function mt(){var a=new Jc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new M(2,9,9001,b.error));c.preventDefault()};return a}ct("idb",function(){return Rc("CrKey")||Qc()||!window.indexedDB?null:new lt});function nt(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}nt.prototype.Ra=function(){return this.i};nt.prototype.Ba=function(){return this.h};nt.prototype.key=function(){return this.l};nt.prototype.toString=function(){return this.j};
818
- function ot(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 nt(b,c,d,Number(a[4])):null};function pt(a,b){this.h=a;this.g=b}
819
- function qt(a,b){var c=new P(null,0);c.Sa(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=rt(a,d,e,c);e=b.streams.filter(function(l){return l.type==Gb}).map(function(l){return st(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return st(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=r(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
816
+ q.erase=function(){var a=this;return F(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,lt(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
817
+ function lt(){var a=new Jc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new M(2,9,9001,b.error));c.preventDefault()};return a}bt("idb",function(){return Rc("CrKey")||Qc()||!window.indexedDB?null:new kt});function mt(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}mt.prototype.Ra=function(){return this.i};mt.prototype.Ba=function(){return this.h};mt.prototype.key=function(){return this.l};mt.prototype.toString=function(){return this.j};
818
+ function nt(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 mt(b,c,d,Number(a[4])):null};function ot(a,b){this.h=a;this.g=b}
819
+ function pt(a,b){var c=new P(null,0);c.Sa(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=qt(a,d,e,c);e=b.streams.filter(function(l){return l.type==Gb}).map(function(l){return rt(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return rt(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=r(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
820
820
  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,sequenceMode:b.sequenceMode||!1}}
821
- function rt(a,b,c,d){for(var e=new Set,f=r(b),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(c);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=r(b);for(e=b.next();!e.done;e=
822
- b.next())for(e=e.value,g=st(a,e,d),h=r(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=r(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=st(a,e,d),g=r(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
823
- function st(a,b,c){var d=b.segments.map(function(e){return tt(a,e)});c.mc(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Tj(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,
824
- roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function tt(a,b){var c=new nt("segment",a.h,a.g,b.dataKey);return new Ai(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?ut(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
825
- function ut(a,b){var c=new nt("segment",a.h,a.g,b);return new yi(function(){return[c.toString()]},0,null)};function vt(){this.g=null}q=vt.prototype;q.configure=function(){};
826
- q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return F(function(m){switch(m.g){case 1:d=ot(a);c.g=d;if(null==d||"manifest"!=d.g)throw new M(2,1,9004,a);e=new Vs;ua(m);return u(m,e.init(),4);case 4:return u(m,Zs(e,d.Ra(),d.Ba()),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 pt(d.Ra(),d.Ba()),l=qt(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return xa(m),u(m,e.destroy(),7);case 7:ya(m,0)}})};q.stop=function(){return Promise.resolve()};
821
+ function qt(a,b,c,d){for(var e=new Set,f=r(b),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(c);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=r(b);for(e=b.next();!e.done;e=
822
+ b.next())for(e=e.value,g=rt(a,e,d),h=r(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=r(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=rt(a,e,d),g=r(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
823
+ function rt(a,b,c){var d=b.segments.map(function(e){return st(a,e)});c.mc(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Tj(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,
824
+ roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,external:b.external}}function st(a,b){var c=new mt("segment",a.h,a.g,b.dataKey);return new Ai(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?tt(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
825
+ function tt(a,b){var c=new mt("segment",a.h,a.g,b);return new yi(function(){return[c.toString()]},0,null)};function ut(){this.g=null}q=ut.prototype;q.configure=function(){};
826
+ q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return F(function(m){switch(m.g){case 1:d=nt(a);c.g=d;if(null==d||"manifest"!=d.g)throw new M(2,1,9004,a);e=new Us;ua(m);return u(m,e.init(),4);case 4:return u(m,Ys(e,d.Ra(),d.Ba()),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 ot(d.Ra(),d.Ba()),l=pt(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return xa(m),u(m,e.destroy(),7);case 7:ya(m,0)}})};q.stop=function(){return Promise.resolve()};
827
827
  q.update=function(){};
828
- q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return F(function(m){switch(m.g){case 1:return d=c.g,e=new Vs,D(m,2,3),u(m,e.init(),5);case 5:return u(m,Zs(e,d.Ra(),d.Ba()),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.D(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return xa(m),u(m,e.destroy(),10);case 10:ya(m,0);break;case 2:wa(m),m.D(3)}})};
829
- ah["application/x-offline-manifest"]=function(){return new vt};function wt(){}function xt(a){var b=ot(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=af(a)):a=b&&"segment"==b.g?yt(b.key(),b):Ze(new M(2,1,9004,a));return a}
830
- function yt(a,b){var c=new Vs;return af(void 0).ma(function(){return c.init()}).ma(function(){return Zs(c,b.Ra(),b.Ba())}).ma(function(d){return d.getSegments([b.key()])}).ma(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}I("shaka.offline.OfflineScheme",wt);wt.plugin=xt;kf("offline",xt);function zt(a,b,c){var d,e,f,g,h,k;return F(function(l){switch(l.g){case 1:d=[];for(var m=[],p=r(c),n=p.next();!n.done;n=p.next()){n=n.value;for(var t=!1,v=r(m),y=v.next();!y.done;y=v.next())if(y=y.value,At(y.info,n)){y.sessionIds.push(n.sessionId);t=!0;break}t||m.push({info:n,sessionIds:[n.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.D(4);break}g=f.value;h=Bt(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.D(2);break;case 4:return l.return(d)}})}
831
- function Bt(a,b,c){var d,e;return F(function(f){switch(f.g){case 1:return d=new ng({Pb:b,onError:function(){},Gd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),D(f,2),d.configure(a),u(f,vg(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 wa(f),u(f,d.destroy(),5);case 5:return f.return([]);case 3:return D(f,6),u(f,Gg(d),8);case 8:va(f,7);break;case 6:return wa(f),u(f,d.destroy(),
828
+ q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return F(function(m){switch(m.g){case 1:return d=c.g,e=new Us,D(m,2,3),u(m,e.init(),5);case 5:return u(m,Ys(e,d.Ra(),d.Ba()),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.D(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return xa(m),u(m,e.destroy(),10);case 10:ya(m,0);break;case 2:wa(m),m.D(3)}})};
829
+ ah["application/x-offline-manifest"]=function(){return new ut};function vt(){}function wt(a){var b=nt(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=af(a)):a=b&&"segment"==b.g?xt(b.key(),b):Ze(new M(2,1,9004,a));return a}
830
+ function xt(a,b){var c=new Us;return af(void 0).ma(function(){return c.init()}).ma(function(){return Ys(c,b.Ra(),b.Ba())}).ma(function(d){return d.getSegments([b.key()])}).ma(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}I("shaka.offline.OfflineScheme",vt);vt.plugin=wt;kf("offline",wt);function yt(a,b,c){var d,e,f,g,h,k;return F(function(l){switch(l.g){case 1:d=[];for(var m=[],p=r(c),n=p.next();!n.done;n=p.next()){n=n.value;for(var t=!1,v=r(m),y=v.next();!y.done;y=v.next())if(y=y.value,zt(y.info,n)){y.sessionIds.push(n.sessionId);t=!0;break}t||m.push({info:n,sessionIds:[n.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.D(4);break}g=f.value;h=At(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.D(2);break;case 4:return l.return(d)}})}
831
+ function At(a,b,c){var d,e;return F(function(f){switch(f.g){case 1:return d=new ng({Pb:b,onError:function(){},Gd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),D(f,2),d.configure(a),u(f,vg(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 wa(f),u(f,d.destroy(),5);case 5:return f.return([]);case 3:return D(f,6),u(f,Gg(d),8);case 8:va(f,7);break;case 6:return wa(f),u(f,d.destroy(),
832
832
  9);case 9:return f.return([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return F(function(h){if(1==h.g)return D(h,2),u(h,Hg(d,g),4);if(2!=h.g)return e.push(g),va(h,0);wa(h);B(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f.return(e)}})}
833
- function At(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&fc(a.audioCapabilities,b.audioCapabilities,c)&&fc(a.videoCapabilities,b.videoCapabilities,c)};function Ct(a,b,c){var d=b.presentationTimeline.getDuration();b=Dt(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Et(a,b){var c=qt(new pt(a.Ra(),a.Ba()),b),d=b.appMetadata||{};c=Dt(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}}
834
- function Dt(a){var b=[],c=ve(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(me(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(ne(c.value));return b};function Ft(){this.g={}}function Gt(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 Ht(a,b){a.g[b.id]=b.bandwidth||2048}function It(a,b){a=a.g[b];null==a&&(a=0);return a};function Jt(a){var b=this;if(a&&a.constructor!=S)throw new M(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Ic()):(this.h=Pl(),this.g=new jf);this.i=[];this.j=[];var c=!a;this.l=new uf(function(){var d,e,f,g,h;return F(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return Fs(l)})),2);case 2:d=function(){};e=[];f=r(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.D(4);break}return u(k,b.g.destroy(),4);
835
- case 4:b.h=null,b.g=null,B(k)}})})}function Kt(){if(Mc())a:{var a=r(Ws.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}q=Jt.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Jl(a,b));return Rl(this.h,a)};q.getConfiguration=function(){var a=Pl();Rl(a,this.h,Pl());return a};q.Ic=function(){return this.g};
836
- q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Es(this.g);this.j.push(f);b=Lt(this,a,b||{},function(){var g;return F(function(h){if(1==h.g)return u(h,$g(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h.return(g())})},e,f);b=new Ye(b,function(){return Fs(f)});b.finally(function(){ec(d.j,f)});return Mt(this,b)};
837
- function Lt(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,v,y,w,x,C,z;return F(function(A){switch(A.g){case 1:return Nt(),h=g=null,k=new Vs,p=m=l=null,D(A,2,3),u(A,d(),5);case 5:return g=A.h,u(A,Ot(a,b,g,e),6);case 6:n=A.h;Pt(a);t=!n.presentationTimeline.S()&&!n.presentationTimeline.Lb();if(!t)throw new M(2,9,9005,b);return u(A,Qt(a,n,function(E){p=p||E},e),7);case 7:h=A.h;Pt(a);if(p)throw p;return u(A,Rt(n,e),8);case 8:return u(A,k.init(),9);case 9:return Pt(a),u(A,Xs(k),10);case 10:return l=A.h,Pt(a),v=St(h,
838
- n,b,c,e,f),y=v.lh,w=v.Ye,u(A,l.Ba.addManifests([y]),11);case 11:x=A.h;Pt(a);m=x[0];Pt(a);if(p)throw p;return u(A,Tt(a,w,m,y,f,e,l.Ba,n,h),12);case 12:return Pt(a),C=new nt("manifest",l.path.Ra,l.path.Ba,m),A.return(Et(C,y));case 3:return xa(A),u(A,k.destroy(),13);case 13:if(!g){A.D(14);break}return u(A,g.stop(),14);case 14:if(!h){A.D(16);break}return u(A,h.destroy(),16);case 16:ya(A,0);break;case 2:z=wa(A);if(null==m){A.D(18);break}return u(A,Ut(m),18);case 18:throw p||z;}})}
839
- function Tt(a,b,c,d,e,f,g,h,k){var l,m,p,n,t,v,y,w,x,C;return F(function(z){switch(z.g){case 1:l={};m=0;p=function(A,E){var G,H,J,K,Q,V,U;return F(function(ia){if(1==ia.g){G={};H=r(A);for(J=H.next();!J.done;G={Fb:G.Fb},J=H.next())G.Fb=J.value,K=Bs(G.Fb,f),Q=G.Fb.i,V=G.Fb.h,U=function(O){return function(qa){var Ka,Ca,Va;return F(function(Oa){if(1==Oa.g)return u(Oa,g.addSegments([{data:qa}]),2);Ka=Oa.h;Pt(a);Ca=O.Fb.g;Va=As(Ca);l[Va]=Ka[0];m+=qa.byteLength;B(Oa)})}}(G),Hs(e,G.Fb.groupId,K,Q,V,U);return u(ia,
840
- Js(e),2)}if(!E)return ia.D(0);Pt(a);Vt(h,d,k,f);return u(ia,g.updateManifest(c,d),0)})};n=!1;D(z,2);if(!Wt(h)||!n||Xt(h)){z.D(4);break}return u(z,p(b.filter(function(A){return A.h}),!0),5);case 5:return Pt(a),b=b.filter(function(A){return!A.h}),t=l,v=m,l={},m=0,u(z,Yt(g,c,d,t,v,function(){return Pt(a)}),6);case 6:Pt(a);case 4:if(n){z.D(7);break}return u(z,p(b,!1),8);case 8:return Pt(a),y=l,w=m,l={},m=0,u(z,Yt(g,c,d,y,w,function(){return Pt(a)}),9);case 9:Pt(a);case 7:va(z,0);break;case 2:return x=
841
- wa(z),C=Object.values(l),u(z,g.removeSegments(C,function(){}),10);case 10:throw x;}})}function Ut(a){var b,c,d,e;return F(function(f){switch(f.g){case 1:return b=new Vs,u(f,b.init(),2);case 2:return u(f,Xs(b),3);case 3:return c=f.h,d=new nt("manifest",c.path.Ra,c.path.Ba,a),u(f,b.destroy(),4);case 4:return e=new Jt,u(f,e.remove(d.toString()),0)}})}
842
- function Yt(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,v,y,w;return F(function(x){switch(x.g){case 1:g=!1;D(x,2);h=!0;k=r(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,p=r(m.segments),n=p.next();!n.done;n=p.next())t=n.value,v=t.pendingSegmentRefId?d[t.pendingSegmentRefId]:null,null!=v&&(t.dataKey=v,t.pendingSegmentRefId=void 0),v=t.pendingInitSegmentRefId?d[t.pendingInitSegmentRefId]:null,null!=v&&(t.initSegmentKey=v,t.pendingInitSegmentRefId=void 0),t.pendingSegmentRefId&&(h=!1),t.pendingInitSegmentRefId&&
843
- (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 y=wa(x),u(x,Ut(b),5);case 5:if(g){x.D(6);break}w=Object.values(d);return u(x,a.removeSegments(w,function(){}),6);case 6:throw y;}})}
844
- function Rt(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,G,H,J,K,Q,V,U,ia,O;return F(function(qa){switch(qa.g){case 1:return c={width:Infinity,height:Infinity},Wd(a,b.restrictions,c),u(qa,$d(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Kd(a,g,h,e,f);k=r(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(me(m));p=r(a.textStreams);for(n=p.next();!n.done;n=p.next())t=n.value,
833
+ function zt(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&fc(a.audioCapabilities,b.audioCapabilities,c)&&fc(a.videoCapabilities,b.videoCapabilities,c)};function Bt(a,b,c){var d=b.presentationTimeline.getDuration();b=Ct(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Dt(a,b){var c=pt(new ot(a.Ra(),a.Ba()),b),d=b.appMetadata||{};c=Ct(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}}
834
+ function Ct(a){var b=[],c=ve(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(me(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(ne(c.value));return b};function Et(){this.g={}}function Ft(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 Gt(a,b){a.g[b.id]=b.bandwidth||2048}function Ht(a,b){a=a.g[b];null==a&&(a=0);return a};function It(a){var b=this;if(a&&a.constructor!=S)throw new M(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Ic()):(this.h=Pl(),this.g=new jf);this.i=[];this.j=[];var c=!a;this.l=new uf(function(){var d,e,f,g,h;return F(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return Es(l)})),2);case 2:d=function(){};e=[];f=r(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.D(4);break}return u(k,b.g.destroy(),4);
835
+ case 4:b.h=null,b.g=null,B(k)}})})}function Jt(){if(Mc())a:{var a=r(Vs.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}q=It.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Jl(a,b));return Rl(this.h,a)};q.getConfiguration=function(){var a=Pl();Rl(a,this.h,Pl());return a};q.Ic=function(){return this.g};
836
+ q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Ds(this.g);this.j.push(f);b=Kt(this,a,b||{},function(){var g;return F(function(h){if(1==h.g)return u(h,$g(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h.return(g())})},e,f);b=new Ye(b,function(){return Es(f)});b.finally(function(){ec(d.j,f)});return Lt(this,b)};
837
+ function Kt(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,v,y,w,x,C,z;return F(function(A){switch(A.g){case 1:return Mt(),h=g=null,k=new Us,p=m=l=null,D(A,2,3),u(A,d(),5);case 5:return g=A.h,u(A,Nt(a,b,g,e),6);case 6:n=A.h;Ot(a);t=!n.presentationTimeline.S()&&!n.presentationTimeline.Lb();if(!t)throw new M(2,9,9005,b);return u(A,Pt(a,n,function(E){p=p||E},e),7);case 7:h=A.h;Ot(a);if(p)throw p;return u(A,Qt(n,e),8);case 8:return u(A,k.init(),9);case 9:return Ot(a),u(A,Ws(k),10);case 10:return l=A.h,Ot(a),v=Rt(h,
838
+ n,b,c,e,f),y=v.lh,w=v.Ye,u(A,l.Ba.addManifests([y]),11);case 11:x=A.h;Ot(a);m=x[0];Ot(a);if(p)throw p;return u(A,St(a,w,m,y,f,e,l.Ba,n,h),12);case 12:return Ot(a),C=new mt("manifest",l.path.Ra,l.path.Ba,m),A.return(Dt(C,y));case 3:return xa(A),u(A,k.destroy(),13);case 13:if(!g){A.D(14);break}return u(A,g.stop(),14);case 14:if(!h){A.D(16);break}return u(A,h.destroy(),16);case 16:ya(A,0);break;case 2:z=wa(A);if(null==m){A.D(18);break}return u(A,Tt(m),18);case 18:throw p||z;}})}
839
+ function St(a,b,c,d,e,f,g,h,k){var l,m,p,n,t,v,y,w,x,C;return F(function(z){switch(z.g){case 1:l={};m=0;p=function(A,E){var G,H,J,K,Q,V,U;return F(function(ia){if(1==ia.g){G={};H=r(A);for(J=H.next();!J.done;G={Fb:G.Fb},J=H.next())G.Fb=J.value,K=As(G.Fb,f),Q=G.Fb.i,V=G.Fb.h,U=function(O){return function(qa){var Ka,Ca,Va;return F(function(Oa){if(1==Oa.g)return u(Oa,g.addSegments([{data:qa}]),2);Ka=Oa.h;Ot(a);Ca=O.Fb.g;Va=zs(Ca);l[Va]=Ka[0];m+=qa.byteLength;B(Oa)})}}(G),Gs(e,G.Fb.groupId,K,Q,V,U);return u(ia,
840
+ Is(e),2)}if(!E)return ia.D(0);Ot(a);Ut(h,d,k,f);return u(ia,g.updateManifest(c,d),0)})};n=!1;D(z,2);if(!Vt(h)||!n||Wt(h)){z.D(4);break}return u(z,p(b.filter(function(A){return A.h}),!0),5);case 5:return Ot(a),b=b.filter(function(A){return!A.h}),t=l,v=m,l={},m=0,u(z,Xt(g,c,d,t,v,function(){return Ot(a)}),6);case 6:Ot(a);case 4:if(n){z.D(7);break}return u(z,p(b,!1),8);case 8:return Ot(a),y=l,w=m,l={},m=0,u(z,Xt(g,c,d,y,w,function(){return Ot(a)}),9);case 9:Ot(a);case 7:va(z,0);break;case 2:return x=
841
+ wa(z),C=Object.values(l),u(z,g.removeSegments(C,function(){}),10);case 10:throw x;}})}function Tt(a){var b,c,d,e;return F(function(f){switch(f.g){case 1:return b=new Us,u(f,b.init(),2);case 2:return u(f,Ws(b),3);case 3:return c=f.h,d=new mt("manifest",c.path.Ra,c.path.Ba,a),u(f,b.destroy(),4);case 4:return e=new It,u(f,e.remove(d.toString()),0)}})}
842
+ function Xt(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,v,y,w;return F(function(x){switch(x.g){case 1:g=!1;D(x,2);h=!0;k=r(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,p=r(m.segments),n=p.next();!n.done;n=p.next())t=n.value,v=t.pendingSegmentRefId?d[t.pendingSegmentRefId]:null,null!=v&&(t.dataKey=v,t.pendingSegmentRefId=void 0),v=t.pendingInitSegmentRefId?d[t.pendingInitSegmentRefId]:null,null!=v&&(t.initSegmentKey=v,t.pendingInitSegmentRefId=void 0),t.pendingSegmentRefId&&(h=!1),t.pendingInitSegmentRefId&&
843
+ (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 y=wa(x),u(x,Tt(b),5);case 5:if(g){x.D(6);break}w=Object.values(d);return u(x,a.removeSegments(w,function(){}),6);case 6:throw y;}})}
844
+ function Qt(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,G,H,J,K,Q,V,U,ia,O;return F(function(qa){switch(qa.g){case 1:return c={width:Infinity,height:Infinity},Wd(a,b.restrictions,c),u(qa,$d(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Kd(a,g,h,e,f);k=r(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(me(m));p=r(a.textStreams);for(n=p.next();!n.done;n=p.next())t=n.value,
845
845
  d.push(ne(t));v=r(a.imageStreams);for(y=v.next();!y.done;y=v.next())w=y.value,d.push(oe(w));return u(qa,b.offline.trackSelectionCallback(d),3);case 3:x=qa.h;C=a.presentationTimeline.getDuration();z=0;A=r(x);for(E=A.next();!E.done;E=A.next())G=E.value,H=G.bandwidth*C/8,z+=H;D(qa,4);return u(qa,b.offline.downloadSizeCallback(z),6);case 6:J=qa.h;if(!J)throw new M(2,9,9014);va(qa,5);break;case 4:K=wa(qa);if(K instanceof M)throw K;throw new M(2,9,9015);case 5:Q=new Set;V=new Set;U=new Set;ia=r(x);for(E=
846
- ia.next();!E.done;E=ia.next())O=E.value,"variant"==O.type&&Q.add(O.id),"text"==O.type&&V.add(O.id),"image"==O.type&&U.add(O.id);a.variants=a.variants.filter(function(Ka){return Q.has(Ka.id)});a.textStreams=a.textStreams.filter(function(Ka){return V.has(Ka.id)});a.imageStreams=a.imageStreams.filter(function(Ka){return U.has(Ka.id)});Zt(a);B(qa)}})}
847
- function St(a,b,c,d,e,f){var g=Ct(c,b,d),h=e.offline.progressCallback;Gs(f,function(t,v){g.size=v;h(g,t)},function(t,v){k&&e.offline.usePersistentLicense&&l==v&&Dg(a,"cenc",t)});var k=Wt(b)&&!Xt(b),l=null;k&&(l=$t.get(a.g.keySystem));for(var m=new Ft,p=r(b.textStreams),n=p.next();!n.done;n=p.next())m.g[n.value.id]=52;p=r(b.imageStreams);for(n=p.next();!n.done;n=p.next())Ht(m,n.value);n=r(b.variants);for(p=n.next();!p.done;p=n.next())Gt(m,p.value);m=au(f,m,b,e);f=m.streams;m=m.Ye;n=a.g;p=e.offline.usePersistentLicense;
848
- n&&p&&(n.initData=[]);return{lh:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Hc(),streams:f,sessionIds:p?Mg(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},Ye:m}}function Wt(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
849
- function Xt(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 Vt(a,b,c,d){b.expiration=c.Hc();c=Mg(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Wt(a)&&d.offline.usePersistentLicense&&!c.length)throw new M(2,9,9007);}q.remove=function(a){return bu(this,cu(this,a))};
850
- function cu(a,b){var c,d,e,f,g,h;return F(function(k){switch(k.g){case 1:Nt();c=ot(b);if(null==c||"manifest"!=c.g)throw new M(2,9,9004,b);d=c;e=new Vs;ua(k);return u(k,e.init(),4);case 4:return u(k,Zs(e,d.Ra(),d.Ba()),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([du(a,h,e),eu(f,d,h)]),2);case 2:return xa(k),u(k,e.destroy(),8);case 8:ya(k,0)}})}
851
- function fu(a,b){for(var c=[],d=r(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:wd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:wd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function du(a,b,c){return F(function(d){return u(d,gu(a.g,a.h.drm,c,b),0)})}
852
- function eu(a,b,c){function d(){}var e=hu(c);Et(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Ch=function(){return bu(this,iu(this))};
853
- function iu(a){var b,c,d,e,f,g,h,k,l,m;return F(function(p){switch(p.g){case 1:return Nt(),b=a.g,c=a.h.drm,d=new Vs,e=!1,ua(p),u(p,d.init(),4);case 4:f=[],$s(d,function(n){return f.push(n)}),g=r(f),h=g.next();case 5:if(h.done){p.D(2);break}k=h.value;return u(p,k.getAll(),8);case 8:return l=p.h,u(p,zt(c,b,l),9);case 9:return m=p.h,u(p,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();p.D(5);break;case 2:return xa(p),u(p,d.destroy(),11);case 11:ya(p,3);break;case 3:return p.return(!e)}})}
854
- q.list=function(){return bu(this,ju())};function ju(){var a,b,c;return F(function(d){switch(d.g){case 1:return Nt(),a=[],b=new Vs,ua(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),Ys(b,function(e,f){c=c.then(function(){var g;return F(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=Et(new nt("manifest",e.Ra,e.Ba,l),k);a.push(k)});B(h)})})}),u(d,c,2);case 2:return xa(d),u(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d.return(a)}})}
855
- function Ot(a,b,c,d){var e,f,g,h,k;return F(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(){},updateDuration:function(){},newDrmInfo:function(){}},
856
- c.configure(d.manifest),Pt(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Pt(a),k=ku(h),u(l,Promise.all(eb(k,function(m){return m.createSegmentIndex()})),3);Pt(a);if(e)throw e;return l.return(h)})}
857
- function Qt(a,b,c,d){var e;return F(function(f){switch(f.g){case 1:return e=new ng({Pb:a.g,onError:c,Gd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,sg(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Gg(e),3);case 3:return u(f,Fg(e),4);case 4:return f.return(e)}})}
858
- function au(a,b,c,d){var e=new Map,f=ku(c),g=new Map;f=r(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=lu(a,b,c,h,d,e);g.set(h.id,k)}a=r(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),Ye:Array.from(e.values())}}
859
- function lu(a,b,c,d,e,f){var g={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,
860
- tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;mu(d,c.presentationTimeline.kb(),function(l){var m=As(l),p=void 0;if(!f.has(m)){var n=l.endTime-l.startTime;n=It(b,d.id)*n;n=Ds(a.g,n);f.set(m,new zs(l,n,k,!1))}l.h&&(p=As(l.h),f.has(p)||(n=.5*It(b,d.id),n=Ds(a.g,n),f.set(p,new zs(l.h,n,k,!0))));g.segments.push({pendingInitSegmentRefId:p,initSegmentKey:p?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,
861
- tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function mu(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 Pt(a){if(a.l.g)throw new M(2,9,7001);}function Nt(){if(!Kt())throw new M(2,9,9E3);}function bu(a,b){return F(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);xa(c);ec(a.i,b);return ya(c,0)})}
862
- function Mt(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){ec(a.i,c)})}function hu(a){var b=new Set;a=r(a.streams);for(var c=a.next();!c.done;c=a.next()){c=r(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)}
863
- function gu(a,b,c,d){var e,f,g;return F(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=at(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:fu(d,!1),videoCapabilities:fu(d,!0)}});return u(h,zt(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)})}
864
- function ku(a){for(var b=new Set,c=r(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=r(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=r(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}
865
- function Zt(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=r(b),d=c.next();!d.done;d=c.next()){d=r(b);for(var e=d.next();!e.done;e=d.next());}b=r(a);for(c=b.next();!c.done;c=b.next())for(c=r(a),d=c.next();!d.done;d=c.next());}I("shaka.offline.Storage",Jt);Jt.deleteAll=function(){var a;return F(function(b){return 1==b.g?(a=new Vs,ua(b),u(b,bt(a),2)):5!=b.g?(xa(b),u(b,a.destroy(),5)):ya(b,0)})};Jt.prototype.list=Jt.prototype.list;
866
- Jt.prototype.removeEmeSessions=Jt.prototype.Ch;Jt.prototype.remove=Jt.prototype.remove;Jt.prototype.store=Jt.prototype.store;Jt.prototype.getNetworkingEngine=Jt.prototype.Ic;Jt.prototype.getConfiguration=Jt.prototype.getConfiguration;Jt.prototype.configure=Jt.prototype.configure;Jt.prototype.destroy=Jt.prototype.destroy;Jt.support=Kt;
867
- var $t=(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");
868
- Dn.offline=Kt;function nu(){}function ou(){for(var a=r(pu),b=a.next();!b.done;b=a.next()){b=b.value;try{b.qg()}catch(c){Ua("Error installing polyfill!",c)}}}function qu(a,b){a={priority:b||0,qg:a};for(b=0;b<pu.length;b++)if(pu[b].priority<a.priority){pu.splice(b,0,a);return}pu.push(a)}I("shaka.polyfill",nu);nu.register=qu;nu.installAll=ou;var pu=[];function ru(){this.g=new su}function tu(){window.AbortController||(window.AbortController=ru,window.AbortSignal=su)}ru.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new L("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};da.Object.defineProperties(ru.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});nu.AbortController=ru;ru.install=tu;
869
- function su(){db.call(this);this.h=!1;this.g=void 0;this.onabort=null}pa(su,db);da.Object.defineProperties(su.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});qu(tu);function uu(){}function vu(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=r(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())wu(b.value)}function wu(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)}})}nu.Aria=uu;uu.install=vu;qu(vu);function xu(){}function yu(){zu()}nu.EncryptionScheme=xu;xu.install=yu;qu(yu,-2);function Au(){}
870
- function Bu(){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}}),
871
- Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Cu);document.addEventListener("webkitfullscreenerror",Cu);document.addEventListener("mozfullscreenchange",Cu);document.addEventListener("mozfullscreenerror",Cu);document.addEventListener("MSFullscreenChange",Cu);document.addEventListener("MSFullscreenError",Cu)}}
872
- function Cu(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)}nu.Fullscreen=Au;Au.install=Bu;qu(Bu);function Du(){}function Eu(){var a=!0;if(Uc()||Rc("PlayStation 5")||Vc()||Rc("Web0S")||Sc()||Rc("CrKey")||Rc("PC=EOS")||Rc("Hisense")||Rc("VIDAA"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Fu=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Gu)}
873
- function Gu(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C;return F(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(!Mc())return z.return(b);if(c){if(Rc("CrKey"))if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType){var A=c.contentType;c.width&&c.height&&(A+="; width="+c.width+"; height="+c.height);c.framerate&&(A+="; framerate="+c.framerate);"pq"===
846
+ ia.next();!E.done;E=ia.next())O=E.value,"variant"==O.type&&Q.add(O.id),"text"==O.type&&V.add(O.id),"image"==O.type&&U.add(O.id);a.variants=a.variants.filter(function(Ka){return Q.has(Ka.id)});a.textStreams=a.textStreams.filter(function(Ka){return V.has(Ka.id)});a.imageStreams=a.imageStreams.filter(function(Ka){return U.has(Ka.id)});Yt(a);B(qa)}})}
847
+ function Rt(a,b,c,d,e,f){var g=Bt(c,b,d),h=e.offline.progressCallback;Fs(f,function(t,v){g.size=v;h(g,t)},function(t,v){k&&e.offline.usePersistentLicense&&l==v&&Dg(a,"cenc",t)});var k=Vt(b)&&!Wt(b),l=null;k&&(l=Zt.get(a.g.keySystem));for(var m=new Et,p=r(b.textStreams),n=p.next();!n.done;n=p.next())m.g[n.value.id]=52;p=r(b.imageStreams);for(n=p.next();!n.done;n=p.next())Gt(m,n.value);n=r(b.variants);for(p=n.next();!p.done;p=n.next())Ft(m,p.value);m=$t(f,m,b,e);f=m.streams;m=m.Ye;n=a.g;p=e.offline.usePersistentLicense;
848
+ n&&p&&(n.initData=[]);return{lh:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Hc(),streams:f,sessionIds:p?Mg(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},Ye:m}}function Vt(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
849
+ function Wt(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 Ut(a,b,c,d){b.expiration=c.Hc();c=Mg(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Vt(a)&&d.offline.usePersistentLicense&&!c.length)throw new M(2,9,9007);}q.remove=function(a){return au(this,bu(this,a))};
850
+ function bu(a,b){var c,d,e,f,g,h;return F(function(k){switch(k.g){case 1:Mt();c=nt(b);if(null==c||"manifest"!=c.g)throw new M(2,9,9004,b);d=c;e=new Us;ua(k);return u(k,e.init(),4);case 4:return u(k,Ys(e,d.Ra(),d.Ba()),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([cu(a,h,e),du(f,d,h)]),2);case 2:return xa(k),u(k,e.destroy(),8);case 8:ya(k,0)}})}
851
+ function eu(a,b){for(var c=[],d=r(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:wd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:wd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function cu(a,b,c){return F(function(d){return u(d,fu(a.g,a.h.drm,c,b),0)})}
852
+ function du(a,b,c){function d(){}var e=gu(c);Dt(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Ch=function(){return au(this,hu(this))};
853
+ function hu(a){var b,c,d,e,f,g,h,k,l,m;return F(function(p){switch(p.g){case 1:return Mt(),b=a.g,c=a.h.drm,d=new Us,e=!1,ua(p),u(p,d.init(),4);case 4:f=[],Zs(d,function(n){return f.push(n)}),g=r(f),h=g.next();case 5:if(h.done){p.D(2);break}k=h.value;return u(p,k.getAll(),8);case 8:return l=p.h,u(p,yt(c,b,l),9);case 9:return m=p.h,u(p,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();p.D(5);break;case 2:return xa(p),u(p,d.destroy(),11);case 11:ya(p,3);break;case 3:return p.return(!e)}})}
854
+ q.list=function(){return au(this,iu())};function iu(){var a,b,c;return F(function(d){switch(d.g){case 1:return Mt(),a=[],b=new Us,ua(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),Xs(b,function(e,f){c=c.then(function(){var g;return F(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=Dt(new mt("manifest",e.Ra,e.Ba,l),k);a.push(k)});B(h)})})}),u(d,c,2);case 2:return xa(d),u(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d.return(a)}})}
855
+ function Nt(a,b,c,d){var e,f,g,h,k;return F(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(){},updateDuration:function(){},newDrmInfo:function(){}},
856
+ c.configure(d.manifest),Ot(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Ot(a),k=ju(h),u(l,Promise.all(eb(k,function(m){return m.createSegmentIndex()})),3);Ot(a);if(e)throw e;return l.return(h)})}
857
+ function Pt(a,b,c,d){var e;return F(function(f){switch(f.g){case 1:return e=new ng({Pb:a.g,onError:c,Gd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,sg(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Gg(e),3);case 3:return u(f,Fg(e),4);case 4:return f.return(e)}})}
858
+ function $t(a,b,c,d){var e=new Map,f=ju(c),g=new Map;f=r(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=ku(a,b,c,h,d,e);g.set(h.id,k)}a=r(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),Ye:Array.from(e.values())}}
859
+ function ku(a,b,c,d,e,f){var g={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,
860
+ tilesLayout:d.tilesLayout,external:d.external},h=e.offline.numberOfParallelDownloads,k=0;lu(d,c.presentationTimeline.kb(),function(l){var m=zs(l),p=void 0;if(!f.has(m)){var n=l.endTime-l.startTime;n=Ht(b,d.id)*n;n=Cs(a.g,n);f.set(m,new ys(l,n,k,!1))}l.h&&(p=zs(l.h),f.has(p)||(n=.5*Ht(b,d.id),n=Cs(a.g,n),f.set(p,new ys(l.h,n,k,!0))));g.segments.push({pendingInitSegmentRefId:p,initSegmentKey:p?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,
861
+ timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function lu(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 Ot(a){if(a.l.g)throw new M(2,9,7001);}function Mt(){if(!Jt())throw new M(2,9,9E3);}function au(a,b){return F(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);xa(c);ec(a.i,b);return ya(c,0)})}
862
+ function Lt(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){ec(a.i,c)})}function gu(a){var b=new Set;a=r(a.streams);for(var c=a.next();!c.done;c=a.next()){c=r(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)}
863
+ function fu(a,b,c,d){var e,f,g;return F(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=$s(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:eu(d,!1),videoCapabilities:eu(d,!0)}});return u(h,yt(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)})}
864
+ function ju(a){for(var b=new Set,c=r(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=r(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=r(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}
865
+ function Yt(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=r(b),d=c.next();!d.done;d=c.next()){d=r(b);for(var e=d.next();!e.done;e=d.next());}b=r(a);for(c=b.next();!c.done;c=b.next())for(c=r(a),d=c.next();!d.done;d=c.next());}I("shaka.offline.Storage",It);It.deleteAll=function(){var a;return F(function(b){return 1==b.g?(a=new Us,ua(b),u(b,at(a),2)):5!=b.g?(xa(b),u(b,a.destroy(),5)):ya(b,0)})};It.prototype.list=It.prototype.list;
866
+ It.prototype.removeEmeSessions=It.prototype.Ch;It.prototype.remove=It.prototype.remove;It.prototype.store=It.prototype.store;It.prototype.getNetworkingEngine=It.prototype.Ic;It.prototype.getConfiguration=It.prototype.getConfiguration;It.prototype.configure=It.prototype.configure;It.prototype.destroy=It.prototype.destroy;It.support=Jt;
867
+ var Zt=(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");
868
+ Cn.offline=Jt;function mu(){}function nu(){for(var a=r(ou),b=a.next();!b.done;b=a.next()){b=b.value;try{b.qg()}catch(c){Ua("Error installing polyfill!",c)}}}function pu(a,b){a={priority:b||0,qg:a};for(b=0;b<ou.length;b++)if(ou[b].priority<a.priority){ou.splice(b,0,a);return}ou.push(a)}I("shaka.polyfill",mu);mu.register=pu;mu.installAll=nu;var ou=[];function qu(){this.g=new ru}function su(){window.AbortController||(window.AbortController=qu,window.AbortSignal=ru)}qu.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new L("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};da.Object.defineProperties(qu.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});mu.AbortController=qu;qu.install=su;
869
+ function ru(){db.call(this);this.h=!1;this.g=void 0;this.onabort=null}pa(ru,db);da.Object.defineProperties(ru.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});pu(su);function tu(){}function uu(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=r(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())vu(b.value)}function vu(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)}})}mu.Aria=tu;tu.install=uu;pu(uu);function wu(){}function xu(){yu()}mu.EncryptionScheme=wu;wu.install=xu;pu(xu,-2);function zu(){}
870
+ function Au(){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}}),
871
+ Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Bu);document.addEventListener("webkitfullscreenerror",Bu);document.addEventListener("mozfullscreenchange",Bu);document.addEventListener("mozfullscreenerror",Bu);document.addEventListener("MSFullscreenChange",Bu);document.addEventListener("MSFullscreenError",Bu)}}
872
+ function Bu(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)}mu.Fullscreen=zu;zu.install=Au;pu(Au);function Cu(){}function Du(){var a=!0;if(Uc()||Rc("PlayStation 5")||Vc()||Rc("Web0S")||Sc()||Rc("CrKey")||Rc("PC=EOS")||Rc("Hisense")||Rc("VIDAA"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Eu=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Fu)}
873
+ function Fu(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C;return F(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(!Mc())return z.return(b);if(c){if(Rc("CrKey"))if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType){var A=c.contentType;c.width&&c.height&&(A+="; width="+c.width+"; height="+c.height);c.framerate&&(A+="; framerate="+c.framerate);"pq"===
874
874
  c.transferFunction&&(A+="; eotf=smpte2084");e=cast.__platform__.canDisplayType(A)}else e=bc(c.contentType);else Sc()?(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=bc(f)):e=bc(c.contentType);if(!e)return z.return(b)}if(d&&(g=d.contentType,h=bc(g),!h))return z.return(b)}else if("file"==a.type){if(c&&(k=c.contentType,l=Nc(k),!l)||d&&(m=d.contentType,p=Nc(m),!p))return z.return(b)}else return z.return(b);
875
875
  if(!a.keySystemConfiguration)return b.supported=!0,z.return(Promise.resolve(b));n=a.keySystemConfiguration;t=[];v=[];n.audio&&(y={robustness:n.audio.robustness||"",contentType:a.audio.contentType},t.push(y));n.video&&(w={robustness:n.video.robustness||"",contentType:a.video.contentType},v.push(w));x={initDataTypes:[n.initDataType],distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,sessionTypes:n.sessionTypes};t.length&&(x.audioCapabilities=t);v.length&&(x.videoCapabilities=
876
- v);D(z,3);return u(z,navigator.requestMediaKeySystemAccess(n.keySystem,[x]),5);case 5:C=z.h;va(z,4);break;case 3:wa(z);case 4:C&&(b.supported=!0,b.keySystemAccess=C);case 2:return z.return(b)}})}nu.MediaCapabilities=Du;Du.install=Eu;var Fu=null;Du.originalMcap=Fu;qu(Eu,-1);function Hu(){}function Iu(){var a=Wc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?Ju():a?12>=a?(Ku(),Lu()):15>=a&&Ku():Pc()?Mu():(Rc("Tizen 2")||Rc("Tizen 3")||Rc("Tizen 4"))&&Nu());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Ou()}
877
- function Ku(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ga.apply(0,arguments));b.abort=function(){};return b}}function Lu(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Mu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"!=b.split(";")[0].split("/")[1]&&a(b)}}
878
- function Nu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=zd(b)[0]&&a(b)}}function Ju(){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)}}
879
- function Ou(){var a=MediaSource.isTypeSupported;Rc("Web0S")||(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)})}nu.MediaSource=Hu;Hu.install=Iu;qu(Iu);function Pu(){}function Qu(){screen.orientation||void 0!=window.orientation&&Ru()}function Ru(){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 Su;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new L("change");b.dispatchEvent(c)})}nu.Orientation=Pu;
880
- Pu.install=Qu;function Su(){db.call(this);this.type="";this.angle=0}pa(Su,db);
876
+ v);D(z,3);return u(z,navigator.requestMediaKeySystemAccess(n.keySystem,[x]),5);case 5:C=z.h;va(z,4);break;case 3:wa(z);case 4:C&&(b.supported=!0,b.keySystemAccess=C);case 2:return z.return(b)}})}mu.MediaCapabilities=Cu;Cu.install=Du;var Eu=null;Cu.originalMcap=Eu;pu(Du,-1);function Gu(){}function Hu(){var a=Wc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?Iu():a?12>=a?(Ju(),Ku()):15>=a&&Ju():Pc()?Lu():(Rc("Tizen 2")||Rc("Tizen 3")||Rc("Tizen 4"))&&Mu());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Nu()}
877
+ function Ju(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ga.apply(0,arguments));b.abort=function(){};return b}}function Ku(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Lu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"!=b.split(";")[0].split("/")[1]&&a(b)}}
878
+ function Mu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=zd(b)[0]&&a(b)}}function Iu(){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)}}
879
+ function Nu(){var a=MediaSource.isTypeSupported;Rc("Web0S")||(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)})}mu.MediaSource=Gu;Gu.install=Hu;pu(Hu);function Ou(){}function Pu(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?Qu():void 0!=window.orientation&&Ru())}function Qu(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
880
+ function Ru(){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 Su;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new L("change");b.dispatchEvent(c)})}mu.Orientation=Ou;Ou.install=Pu;function Su(){db.call(this);this.type="";this.angle=0}pa(Su,db);
881
881
  Su.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
882
- Su.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};qu(Qu);function Tu(){}var Uu,Vu,Wu,Xu,Yu,Zu;function $u(a,b){try{var c=new av(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function bv(a){var b=this.mediaKeys;b&&b!=a&&cv(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?cv(a,this):Promise.resolve()}
883
- function dv(a){a=Fc(a.initData);if(Ic(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=ad(a.subarray(4),!0);a=dd(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Gc(a);this.dispatchEvent(b)}nu.PatchedMediaKeysApple=Tu;
882
+ Su.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};pu(Pu);function Tu(){}var Uu,Vu,Wu,Xu,Yu,Zu;function $u(a,b){try{var c=new av(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function bv(a){var b=this.mediaKeys;b&&b!=a&&cv(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?cv(a,this):Promise.resolve()}
883
+ function dv(a){a=Fc(a.initData);if(Ic(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=ad(a.subarray(4),!0);a=dd(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Gc(a);this.dispatchEvent(b)}mu.PatchedMediaKeysApple=Tu;
884
884
  Tu.uninstall=function(){Uu&&(Uu=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Vu),HTMLMediaElement.prototype.setMediaKeys=Wu,window.MediaKeys=Xu,window.MediaKeySystemAccess=Yu,navigator.requestMediaKeySystemAccess=Zu,Vu=Zu=Wu=Yu=Xu=null,window.shakaMediaKeysPolyfill=!1)};
885
885
  Tu.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)Uu=!0,Vu=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Wu=HTMLMediaElement.prototype.setMediaKeys,Xu=window.MediaKeys,Yu=window.MediaKeySystemAccess,Zu=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=bv;window.MediaKeys=ev;window.MediaKeySystemAccess=av;navigator.requestMediaKeySystemAccess=
886
886
  $u;window.shakaMediaKeysPolyfill=!0}};
@@ -892,9 +892,9 @@ q.generateRequest=function(a,b){var c=this;this.h=new Jc;try{var d=this.l.create
892
892
  function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:hv(c,"output-not-allowed");break;default:hv(c,"internal-error")}});hv(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
893
893
  q.update=function(a){this.g=new Jc;try{this.i.update(Fc(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Sb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function hv(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new L("keystatuseschange");a.dispatchEvent(b)}
894
894
  function gv(){this.size=0;this.g=void 0}q=gv.prototype;q.fc=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,Yg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Yg.value();return this.g&&Dc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};function iv(){}function jv(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=kv,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=lv,window.MediaKeys=mv,window.MediaKeySystemAccess=nv,window.shakaMediaKeysPolyfill=!0)}function kv(){return Promise.reject(Error("The key system specified is not supported."))}
895
- function lv(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}nu.PatchedMediaKeysNop=iv;iv.install=jv;function mv(){throw new TypeError("Illegal constructor.");}mv.prototype.createSession=function(){};mv.prototype.setServerCertificate=function(){};function nv(){this.keySystem="";throw new TypeError("Illegal constructor.");}nv.prototype.getConfiguration=function(){};nv.prototype.createMediaKeys=function(){};qu(jv,-10);function ov(){}
895
+ function lv(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}mu.PatchedMediaKeysNop=iv;iv.install=jv;function mv(){throw new TypeError("Illegal constructor.");}mv.prototype.createSession=function(){};mv.prototype.setServerCertificate=function(){};function nv(){this.keySystem="";throw new TypeError("Illegal constructor.");}nv.prototype.getConfiguration=function(){};nv.prototype.createMediaKeys=function(){};pu(jv,-10);function ov(){}
896
896
  function pv(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)qv="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=rv;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=sv;window.MediaKeys=tv;window.MediaKeySystemAccess=uv;window.shakaMediaKeysPolyfill=!0}}
897
- function vv(a){var b=qv;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function rv(a,b){try{var c=new uv(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function sv(a){var b=this.mediaKeys;b&&b!=a&&wv(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&wv(a,this);return Promise.resolve()}nu.PatchedMediaKeysWebkit=ov;ov.install=pv;
897
+ function vv(a){var b=qv;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function rv(a,b){try{var c=new uv(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function sv(a){var b=this.mediaKeys;b&&b!=a&&wv(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&wv(a,this);return Promise.resolve()}mu.PatchedMediaKeysWebkit=ov;ov.install=pv;
898
898
  function uv(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");b=r(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=r(f.audioCapabilities),
899
899
  l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=r(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
900
900
  d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}uv.prototype.createMediaKeys=function(){var a=new tv(this.g);return Promise.resolve(a)};uv.prototype.getConfiguration=function(){return this.h};function tv(a){this.l=a;this.h=null;this.g=new wf;this.i=[];this.j=new Map}
@@ -906,10 +906,10 @@ function Bv(a,b,c){if(a.m)return Promise.reject(Error("The session is already in
906
906
  function Cv(a,b,c){if(a.g)a.g.then(function(){return Cv(a,b,c)}).catch(function(){return Cv(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=$c(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=id(e.keys[0].k);e=id(e.keys[0].kid)}else d=Fc(c),e=null;var f=vv("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
907
907
  function yv(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new L("keystatuseschange");a.dispatchEvent(b)}q.generateRequest=function(a,b){return Bv(this,b,null)};q.load=function(a){return"persistent-license"==this.l?Bv(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Jc;Cv(this,b,a);return b};
908
908
  q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=vv("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function Av(){this.size=0;this.g=void 0}q=Av.prototype;q.fc=function(){return this.g};
909
- q.forEach=function(a){this.g&&a(this.g,Yg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Yg.value();return this.g&&Dc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var qv="";qu(pv);function Dv(){}function Ev(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Fv,Object.defineProperty(a,"disablePictureInPicture",{get:Gv,set:Hv,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Iv,document.addEventListener("webkitpresentationmodechanged",Jv,!0))}}
909
+ q.forEach=function(a){this.g&&a(this.g,Yg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Yg.value();return this.g&&Dc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var qv="";pu(pv);function Dv(){}function Ev(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Fv,Object.defineProperty(a,"disablePictureInPicture",{get:Gv,set:Hv,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Iv,document.addEventListener("webkitpresentationmodechanged",Jv,!0))}}
910
910
  function Jv(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
911
911
  function Fv(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function Iv(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
912
- function Gv(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Hv(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}nu.PiPWebkit=Dv;Dv.install=Ev;qu(Ev);function Kv(){}function Lv(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=Mv))}function Mv(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}nu.RandomUUID=Kv;Kv.install=Lv;qu(Lv);function Nv(){}function Ov(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Pv)}function Pv(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}nu.StorageEstimate=Nv;Nv.install=Ov;qu(Ov);function Qv(){}function Rv(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Sv})}function Sv(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}nu.Symbol=Qv;Qv.install=Rv;qu(Rv);function Tv(){}function Uv(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}nu.VideoPlayPromise=Tv;Tv.install=Uv;qu(Uv);function Vv(){}function Wv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Tc())&&(a.getVideoPlaybackQuality=Xv)}}function Xv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}nu.VideoPlaybackQuality=Vv;Vv.install=Wv;qu(Wv);function Yv(){}function Zv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=$v;else if(6==b)a=aw;else{try{var c=!!$v(1,2,"")}catch(d){c=!1}c&&(a=$v)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function $v(a,b,c){return new window.TextTrackCue(a,b,c)}function aw(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}nu.VTTCue=Yv;Yv.install=Zv;qu(Zv);function bw(){}bw.prototype.parseInit=function(){};bw.prototype.setSequenceMode=function(){};bw.prototype.parseMedia=function(a,b){var c=null,d=[];a=$c(a).split(/\r?\n/);a=r(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=cw.exec(e))){var f=dw.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new hc(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};I("shaka.text.LrcTextParser",bw);bw.prototype.parseMedia=bw.prototype.parseMedia;
912
+ function Gv(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Hv(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}mu.PiPWebkit=Dv;Dv.install=Ev;pu(Ev);function Kv(){}function Lv(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=Mv))}function Mv(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}mu.RandomUUID=Kv;Kv.install=Lv;pu(Lv);function Nv(){}function Ov(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Pv)}function Pv(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}mu.StorageEstimate=Nv;Nv.install=Ov;pu(Ov);function Qv(){}function Rv(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Sv})}function Sv(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}mu.Symbol=Qv;Qv.install=Rv;pu(Rv);function Tv(){}function Uv(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}mu.VideoPlayPromise=Tv;Tv.install=Uv;pu(Uv);function Vv(){}function Wv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Tc())&&(a.getVideoPlaybackQuality=Xv)}}function Xv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}mu.VideoPlaybackQuality=Vv;Vv.install=Wv;pu(Wv);function Yv(){}function Zv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=$v;else if(6==b)a=aw;else{try{var c=!!$v(1,2,"")}catch(d){c=!1}c&&(a=$v)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function $v(a,b,c){return new window.TextTrackCue(a,b,c)}function aw(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}mu.VTTCue=Yv;Yv.install=Zv;pu(Zv);function bw(){}bw.prototype.parseInit=function(){};bw.prototype.setSequenceMode=function(){};bw.prototype.parseMedia=function(a,b){var c=null,d=[];a=$c(a).split(/\r?\n/);a=r(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=cw.exec(e))){var f=dw.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new hc(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};I("shaka.text.LrcTextParser",bw);bw.prototype.parseMedia=bw.prototype.parseMedia;
913
913
  bw.prototype.setSequenceMode=bw.prototype.setSequenceMode;bw.prototype.parseInit=bw.prototype.parseInit;var cw=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,dw=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Dd["application/x-subtitle-lrc"]=function(){return new bw};function ew(){}ew.prototype.parseInit=function(){};ew.prototype.setSequenceMode=function(){};
914
914
  ew.prototype.parseMedia=function(a,b){var c=$c(a);a=[];if(""==c)return a;var d=kg(c,"tt");if(!d)throw new M(2,2,2005,"Failed to parse TTML.");c=d.getElementsByTagName("body")[0];if(!c)return[];var e=Zf(d,fw,"frameRate"),f=Zf(d,fw,"subFrameRate"),g=Zf(d,fw,"frameRateMultiplier"),h=Zf(d,fw,"tickRate"),k=Zf(d,fw,"cellResolution"),l=d.getAttribute("xml:space")||"default",m=Zf(d,gw,"extent");if("default"!=l&&"preserve"!=l)throw new M(2,2,2005,"Invalid xml:space value: "+l);l="default"==l;e=new hw(e,f,
915
915
  g,h);k=k?(k=/^(\d+) (\d+)$/.exec(k))?{columns:parseInt(k[1],10),rows:parseInt(k[2],10)}:null:null;f=(f=d.getElementsByTagName("metadata")[0])?Xf(f):[];g=Array.from(d.getElementsByTagName("style"));d=Array.from(d.getElementsByTagName("region"));h=[];for(var p=r(d),n=p.next();!n.done;n=p.next()){var t=n.value;n=new jc;var v=t.getAttribute("xml:id");if(v){n.id=v;var y=null;m&&(y=iw.exec(m)||jw.exec(m));v=y?Number(y[1]):null;y=y?Number(y[2]):null;var w,x;if(w=kw(t,g,"extent"))w=(x=iw.exec(w))||jw.exec(w),
@@ -934,28 +934,28 @@ function hw(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Num
934
934
  var iw=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,vw=/^(\d{1,2}(?:\.\d+)?|100)%$/,uw=/^(\d+px|\d+em|\d*\.?\d+c)$/,jw=/^(\d+)px (\d+)px$/,Aw=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Bw=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Dw=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Ew=/^(\d*(?:\.\d*)?)f$/,Fw=/^(\d*(?:\.\d*)?)t$/,Gw=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),tw={left:pc,center:"center",right:"end",start:pc,
935
935
  end:"end"},sw={left:"line-left",center:"center",right:"line-right"},fw=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],gw=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],mw=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Dd["application/ttml+xml"]=function(){return new ew};function Hw(){this.g=new ew}Hw.prototype.parseInit=function(a){var b=!1;(new Hf).box("moov",Mf).box("trak",Mf).box("mdia",Mf).box("minf",Mf).box("stbl",Mf).U("stsd",Of).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new M(2,2,2007);};Hw.prototype.setSequenceMode=function(){};Hw.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new Hf).box("mdat",Qf(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new M(2,2,2007);return e};
936
936
  I("shaka.text.Mp4TtmlParser",Hw);Hw.prototype.parseMedia=Hw.prototype.parseMedia;Hw.prototype.setSequenceMode=Hw.prototype.setSequenceMode;Hw.prototype.parseInit=Hw.prototype.parseInit;Dd['application/mp4; codecs="stpp"']=function(){return new Hw};Dd['application/mp4; codecs="stpp.ttml"']=function(){return new Hw};Dd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Hw};Dd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Hw};function Iw(){this.g=!1}Iw.prototype.parseInit=function(){};Iw.prototype.setSequenceMode=function(a){this.g=a};
937
- Iw.prototype.parseMedia=function(a,b){a=$c(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new M(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&this.g){var d=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),e=c[0].match(/MPEGTS:(\d+)/m);if(d&&e){a=Jw(new $q(d[1]));if(null==a)throw new M(2,2,2E3);e=Number(e[1]);for(d=b.segmentStart-b.periodStart;95443.7176888889<=d;)d-=95443.7176888889,e+=8589934592;a=b.periodStart+
938
- e/9E4-a}}b=[];e=r(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new $q(d);var f=new jc;cr(d);ar(d);for(var g=cr(d);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?
939
- (h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");ar(d);g=cr(d)}b.push(f)}e=new Map;Kw(e);d=[];c=r(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=r(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&
937
+ Iw.prototype.parseMedia=function(a,b){a=$c(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new M(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&this.g){var d=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),e=c[0].match(/MPEGTS:(\d+)/m);if(d&&e){a=Jw(new Zq(d[1]));if(null==a)throw new M(2,2,2E3);e=Number(e[1]);for(d=b.segmentStart-b.periodStart;95443.7176888889<=d;)d-=95443.7176888889,e+=8589934592;a=b.periodStart+
938
+ e/9E4-a}}b=[];e=r(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new Zq(d);var f=new jc;br(d);$q(d);for(var g=br(d);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?
939
+ (h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");$q(d);g=br(d)}b.push(f)}e=new Map;Kw(e);d=[];c=r(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=r(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&
940
940
  (g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=e.get(g))||(l=new hc(0,0,""));for(var m=!1,p=0;p<k.length;p++){var n=/^\s*([^:]+):\s*(.*)/.exec(k[p]);if(n){var t=n[2].trim().replace(";","");switch(n[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=t;break;case "color":m=!0;l.color=t;break;case "font-family":m=!0;l.fontFamily=t;break;case "font-size":m=!0;l.fontSize=t;break;case "font-weight":if(700<=parseInt(t,10)||"bold"==
941
941
  t)m=!0,l.fontWeight=700;break;case "font-style":switch(t){case "normal":m=!0;l.fontStyle=sc;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(t);break;case "text-shadow":m=!0;l.textShadow=t;break;case "white-space":m=!0,l.wrapLine="noWrap"!=t}}}m&&e.set(g,l)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else{h=null;f[0].includes("--\x3e")||(h=f[0],f.splice(0,1));
942
- g=new $q(f[0]);k=Jw(g);p=br(g,/[ \t]+--\x3e[ \t]+/g);l=Jw(g);if(null==k||null==p||null==l)throw new M(2,2,2001,"Could not parse cue time range in WebVTT");k+=m;l+=m;m=f.slice(1).join("\n").trim();e.has("global")?(f=e.get("global").clone(),f.startTime=k,f.endTime=l,f.payload=""):f=new hc(k,l,"");Lw(m,f,e);ar(g);for(k=cr(g);k;)Mw(f,k,b),ar(g),k=cr(g);null!=h&&(f.id=h)}f&&d.push(f)}return d};
942
+ g=new Zq(f[0]);k=Jw(g);p=ar(g,/[ \t]+--\x3e[ \t]+/g);l=Jw(g);if(null==k||null==p||null==l)throw new M(2,2,2001,"Could not parse cue time range in WebVTT");k+=m;l+=m;m=f.slice(1).join("\n").trim();e.has("global")?(f=e.get("global").clone(),f.startTime=k,f.endTime=l,f.payload=""):f=new hc(k,l,"");Lw(m,f,e);$q(g);for(k=br(g);k;)Mw(f,k,b),$q(g),k=br(g);null!=h&&(f.id=h)}f&&d.push(f)}return d};
943
943
  function Kw(a){for(var b=r(Object.entries(xc)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new hc(0,0,"");e.color=d;a.set("."+c,e)}b=r(Object.entries(yc));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new hc(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
944
944
  function Lw(a,b,c){0===c.size&&Kw(c);a:{var d=a;a=[];for(var e=-1,f="",g=0;g<d.length;g++)if("/"===d[g]&&0<g&&"<"===d[g-1]){var h=d.indexOf(">",g);if(h<=g){a=d;break a}if((h=d.substring(g+1,h))&&"c"===h){var k=a.pop();k?k===h?(f+="/"+h+">",g+=h.length+1):k.startsWith("c.")?(g+=h.length+1,f+="/"+k+">"):f+=d[g]:f+=d[g]}else f+=d[g]}else"<"===d[g]?(e=g+1,"c"!=d[e]&&(e=-1)):">"===d[g]&&0<e&&(a.push(d.substr(e,g-e)),e=-1),f+=d[g];a=f}d=[];f=-1;for(e=0;e<a.length;e++)"<"===a[e]?f=e+1:">"===a[e]&&0<f&&(f=
945
945
  a.substr(f,e-f),f.match(Nw)&&d.push(f),f=-1);d=r(d);for(e=d.next();!e.done;e=d.next())e=e.value,a=a.replace("<"+e+">",'<div time="'+e+'">'),a+="</div>";a:{e=a;f=[];g=-1;d="";a=!1;for(h=0;h<e.length;h++)if("/"===e[h]){k=e.indexOf(">",h);if(-1===k){a=e;break a}if((k=e.substring(h+1,k))&&"v"==k){a=!0;var l=null;f.length&&(l=f[f.length-1]);if(l){if(l===k)d+="/"+k+">";else{if(!l.startsWith("v")){d+=e[h];continue}d+="/"+l+">"}h+=k.length+1}else d+=e[h]}else d+=e[h]}else"<"===e[h]?(g=h+1,"v"!=e[g]&&(g=-1)):
946
946
  ">"===e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),d+=e[h];e=r(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),d=d.replace("<"+f+">","<"+g+">"),d=d.replace("</"+f+">","</"+g+">"),a||(d+="</"+g+">");a=d}if(e=kg("<span>"+a+"</span>","span")){d=[];e=e.childNodes;if(1==e.length&&(f=e[0],f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE)){b.payload=Ow(a);return}a=r(e);for(e=a.next();!e.done;e=a.next())Pw(e.value,b,d,c);b.nestedCues=d}else b.payload=Ow(a)}
947
947
  function Qw(a,b){return a&&0<a.length?a:b}
948
948
  function Pw(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=r(a.nodeName.split(/(?=[ .])+/g)),g=f.next();!g.done;g=f.next()){var h=g=g.value;if(h.startsWith(".voice-")){var k=h.split("-").pop();h='v[voice="'+k+'"]';d.has(h)||(h="v[voice="+k+"]")}d.has(h)&&(h=d.get(h))&&(e.backgroundColor=Qw(h.backgroundColor,e.backgroundColor),e.color=Qw(h.color,e.color),e.fontFamily=Qw(h.fontFamily,e.fontFamily),e.fontSize=Qw(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=
949
- h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine);switch(g){case "br":g=b.clone();g.lineBreak=!0;c.push(g);break;case "b":e.fontWeight=700;break;case "i":e.fontStyle="italic";break;case "u":e.textDecoration.push("underline");break;case "div":if(g=a.getAttribute("time"))if(g=Jw(new $q(g)))e.startTime=g}}if(ag(a))for(f=!0,d=r(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=Ow(a),c.push(f)),f=!1;else for(b=
950
- r(a.childNodes),a=b.next();!a.done;a=b.next())Pw(a.value,e,c,d)}
949
+ h.fontStyle,e.opacity=h.opacity,e.textShadow=h.textShadow,e.wrapLine=h.wrapLine);switch(g){case "br":g=b.clone();g.lineBreak=!0;c.push(g);break;case "b":e.fontWeight=700;break;case "i":e.fontStyle="italic";break;case "u":e.textDecoration.push("underline");break;case "div":if(g=a.getAttribute("time"))if(g=Jw(new Zq(g)))e.startTime=g}}if(ag(a))for(f=!0,d=r(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=
950
+ Ow(a),c.push(f)),f=!1;else for(b=r(a.childNodes),a=b.next();!a.done;a=b.next())Pw(a.value,e,c,d)}
951
951
  function Mw(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=mc:a.textAlign=uc[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||
952
952
  "end"==b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Rw(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=wc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=oc,a.line=Number(c[1]),c[2]&&(a.lineAlign=wc[c[2].toUpperCase()])}function Rw(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}
953
- function Jw(a){a=br(a,Nw);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 Ow(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||""}I("shaka.text.VttTextParser",Iw);Iw.prototype.parseMedia=Iw.prototype.parseMedia;
953
+ function Jw(a){a=ar(a,Nw);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 Ow(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||""}I("shaka.text.VttTextParser",Iw);Iw.prototype.parseMedia=Iw.prototype.parseMedia;
954
954
  Iw.prototype.setSequenceMode=Iw.prototype.setSequenceMode;Iw.prototype.parseInit=Iw.prototype.parseInit;var Nw=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;Dd["text/vtt"]=function(){return new Iw};Dd['text/vtt; codecs="vtt"']=function(){return new Iw};Dd['text/vtt; codecs="wvtt"']=function(){return new Iw};function Sw(){this.g=null}Sw.prototype.parseInit=function(a){var b=this,c=!1;(new Hf).box("moov",Mf).box("trak",Mf).box("mdia",Mf).U("mdhd",function(d){d=oi(d.reader,d.version);b.g=d.timescale}).box("minf",Mf).box("stbl",Mf).U("stsd",Of).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new M(2,2,2008);if(!c)throw new M(2,2,2008);};Sw.prototype.setSequenceMode=function(){};
955
955
  Sw.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new M(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Hf).box("moof",Mf).box("traf",Mf).U("tfdt",function(z){g=!0;c=ni(z.reader,z.version).uf}).U("tfhd",function(z){l=mi(z.reader,z.flags).Ef}).U("trun",function(z){h=!0;d=pi(z.reader,z.version,z.flags).Uf}).box("mdat",Qf(function(z){k=!0;e=z})).parse(a,!1);if(!k&&!g&&!h)throw new M(2,2,2008);a=c;for(var m=new Ef(e,0),p=r(d),n=p.next();!n.done;n=p.next()){n=n.value;
956
956
  var t=n.Je||l,v=n.Md?c+n.Md:a;a=v+(t||0);var y=0;do{var w=m.O();y+=w;var x=m.O(),C=null;"vttc"==Lf(x)?8<w&&(C=m.Bb(w-8)):m.skip(w-8);t&&C&&(w=Tw(C,b.periodStart+v/this.g,b.periodStart+a/this.g),f.push(w))}while(n.sampleSize&&y<n.sampleSize)}return f.filter(Ab)};function Tw(a,b,c){var d,e,f;(new Hf).box("payl",Qf(function(g){d=$c(g)})).box("iden",Qf(function(g){e=$c(g)})).box("sttg",Qf(function(g){f=$c(g)})).parse(a);return d?Uw(d,e,f,b,c):null}
957
- function Uw(a,b,c,d,e){d=new hc(d,e,"");Lw(a,d,new Map);b&&(d.id=b);if(c)for(a=new $q(c),b=cr(a);b;)Mw(d,b,[]),ar(a),b=cr(a);return d}I("shaka.text.Mp4VttParser",Sw);Sw.prototype.parseMedia=Sw.prototype.parseMedia;Sw.prototype.setSequenceMode=Sw.prototype.setSequenceMode;Sw.prototype.parseInit=Sw.prototype.parseInit;Dd['application/mp4; codecs="wvtt"']=function(){return new Sw};function Vw(){}Vw.prototype.parseInit=function(){};Vw.prototype.setSequenceMode=function(){};Vw.prototype.parseMedia=function(a){var b=$c(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=r(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new $q(c[0]),e=Ww(d),f=br(d,/,/g);d=Ww(d);if(null==e||null==f||null==d)throw new M(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new hc(e,d,c.slice(1).join("\n").trim()))}return a};
958
- function Ww(a){a=br(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)}I("shaka.text.SbvTextParser",Vw);Vw.prototype.parseMedia=Vw.prototype.parseMedia;Vw.prototype.setSequenceMode=Vw.prototype.setSequenceMode;Vw.prototype.parseInit=Vw.prototype.parseInit;Dd["text/x-subviewer"]=function(){return new Vw};function Xw(){this.g=new Iw}Xw.prototype.parseInit=function(){};Xw.prototype.setSequenceMode=function(){};Xw.prototype.parseMedia=function(a,b){a=$c(a);a=Yw(a);a=Fc(dd(a));return this.g.parseMedia(a,b)};function Yw(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=r(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}I("shaka.text.SrtTextParser",Xw);
957
+ function Uw(a,b,c,d,e){d=new hc(d,e,"");Lw(a,d,new Map);b&&(d.id=b);if(c)for(a=new Zq(c),b=br(a);b;)Mw(d,b,[]),$q(a),b=br(a);return d}I("shaka.text.Mp4VttParser",Sw);Sw.prototype.parseMedia=Sw.prototype.parseMedia;Sw.prototype.setSequenceMode=Sw.prototype.setSequenceMode;Sw.prototype.parseInit=Sw.prototype.parseInit;Dd['application/mp4; codecs="wvtt"']=function(){return new Sw};function Vw(){}Vw.prototype.parseInit=function(){};Vw.prototype.setSequenceMode=function(){};Vw.prototype.parseMedia=function(a){var b=$c(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=r(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Zq(c[0]),e=Ww(d),f=ar(d,/,/g);d=Ww(d);if(null==e||null==f||null==d)throw new M(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new hc(e,d,c.slice(1).join("\n").trim()))}return a};
958
+ function Ww(a){a=ar(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)}I("shaka.text.SbvTextParser",Vw);Vw.prototype.parseMedia=Vw.prototype.parseMedia;Vw.prototype.setSequenceMode=Vw.prototype.setSequenceMode;Vw.prototype.parseInit=Vw.prototype.parseInit;Dd["text/x-subviewer"]=function(){return new Vw};function Xw(){this.g=new Iw}Xw.prototype.parseInit=function(){};Xw.prototype.setSequenceMode=function(){};Xw.prototype.parseMedia=function(a,b){a=$c(a);a=Yw(a);a=Fc(dd(a));return this.g.parseMedia(a,b)};function Yw(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=r(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}I("shaka.text.SrtTextParser",Xw);
959
959
  Xw.srt2webvtt=Yw;Xw.prototype.parseMedia=Xw.prototype.parseMedia;Xw.prototype.setSequenceMode=Xw.prototype.setSequenceMode;Xw.prototype.parseInit=Xw.prototype.parseInit;Dd["text/srt"]=function(){return new Xw};function Zw(){}Zw.prototype.parseInit=function(){};Zw.prototype.setSequenceMode=function(){};
960
960
  Zw.prototype.parseMedia=function(a){var b="",c="";a=$c(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=$w.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=r(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=ax.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(bx);else if("Style"==e){e=f.split(bx);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
961
961
  [];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={ee:e.ee},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=ax.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(bx);else if("Dialogue"==f){g=g.split(bx);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=cx(f.Start);var k=cx(f.End);g=new hc(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.ee=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.ee}}(e)))&&dx(g,f);d.push(g)}return d};
@@ -982,7 +982,7 @@ function ux(a){var b,c;return F(function(d){if(1==d.g){var e=a.keySystemConfigur
982
982
  navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}I("McEncryptionSchemePolyfill",px);px.install=rx;function ox(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
983
983
  ox.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=r(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=r(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};ox.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
984
984
  function mx(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function kx(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}
985
- function vx(){}function zu(){ix();rx()}I("EncryptionSchemePolyfills",vx);vx.install=zu;"undefined"!==typeof module&&module.exports&&(module.exports=vx);/*
985
+ function vx(){}function yu(){ix();rx()}I("EncryptionSchemePolyfills",vx);vx.install=yu;"undefined"!==typeof module&&module.exports&&(module.exports=vx);/*
986
986
  @license
987
987
  Copyright 2013 Ali Al Dallal
988
988
 
@@ -1028,7 +1028,7 @@ sw:{u:"Kiswahili",A:"Swahili"},"sw-KE":{u:"Kiswahili",A:"Swahili (Kenya)"},ta:{u
1028
1028
  A:"Thai"},"th-TH":{u:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",A:"Thai (Thailand)"},tl:{u:"Filipino",A:"Filipino"},"tl-PH":{u:"Filipino",A:"Filipino"},tlh:{u:"tlhIngan-Hol",A:"Klingon"},tr:{u:"T\u00fcrk\u00e7e",A:"Turkish"},"tr-TR":{u:"T\u00fcrk\u00e7e",A:"Turkish"},"tt-RU":{u:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",A:"Tatar"},uk:{u:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",A:"Ukrainian"},"uk-UA":{u:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
1029
1029
  A:"Ukrainian"},ur:{u:"\u0627\u0631\u062f\u0648",A:"Urdu"},"ur-PK":{u:"\u0627\u0631\u062f\u0648",A:"Urdu"},uz:{u:"O'zbek",A:"Uzbek"},"uz-UZ":{u:"O'zbek",A:"Uzbek"},vi:{u:"Ti\u1ebfng Vi\u1ec7t",A:"Vietnamese"},"vi-VN":{u:"Ti\u1ebfng Vi\u1ec7t",A:"Vietnamese"},"xh-ZA":{u:"isiXhosa",A:"Xhosa"},yi:{u:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",A:"Yiddish"},"yi-DE":{u:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",A:"Yiddish (German)"},zh:{u:"\u4e2d\u6587",A:"Chinese"},"zh-HANS":{u:"\u4e2d\u6587\u7b80\u4f53",
1030
1030
  A:"Chinese Simplified"},"zh-HANT":{u:"\u4e2d\u6587\u7e41\u9ad4",A:"Chinese Traditional"},"zh-CN":{u:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",A:"Chinese Simplified (China)"},"zh-HK":{u:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",A:"Chinese Traditional (Hong Kong)"},"zh-SG":{u:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",A:"Chinese Simplified (Singapore)"},"zh-TW":{u:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",A:"Chinese Traditional (Taiwan)"},"zu-ZA":{u:"isiZulu",A:"Zulu"}},xx=r(Object.keys(wx)),yx=xx.next();!yx.done;yx=
1031
- xx.next()){var zx=yx.value;wx[zx.toLowerCase()]=wx[zx]};function X(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new wf;this.localization=this.controls.ua;this.player=this.controls.dc();this.video=this.controls.Ab();this.adManager=this.player.td();this.ad=b.getAd();this.eventManager.o(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null})}
1031
+ xx.next()){var zx=yx.value;wx[zx.toLowerCase()]=wx[zx]};function X(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new wf;this.localization=this.controls.va;this.player=this.controls.dc();this.video=this.controls.Ab();this.adManager=this.player.td();this.ad=b.getAd();this.eventManager.o(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null})}
1032
1032
  X.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};I("shaka.ui.Element",X);X.prototype.release=X.prototype.release;function Ax(a){return Bx(a,"shaka-back-to-overflow-button")}function Bx(a,b){a=a.getElementsByClassName(b);return a.length?a[0]:null}function Cx(a){a&&(a=Bx(a,"shaka-chosen-item"))&&a.parentElement.focus()}function Dx(){var a=R("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function Y(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
1033
1033
  function Ex(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60);a=Math.floor(a%60);10>a&&(a="0"+a);a=d+":"+a;b&&(10>d&&(a="0"+a),a=c+":"+a);return a};function Fx(a,b){X.call(this,a,b);var c=this;this.i=R("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=R("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new N(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=Ex(e-d,!1)+" / "+Ex(e,!1),1<c.ad.getSequenceLength()?c.h.textContent=d:(e=c.localization.resolve("AD_TIME"),c.h.textContent=e.replace("[AD_TIME]",d))):(c.g.stop(),c.h.textContent=
1034
1034
  ""))});this.eventManager.o(this.localization,"locale-updated",function(){});this.eventManager.o(this.localization,"locale-changed",function(){});this.eventManager.o(this.adManager,"ad-started",function(){c.g.Aa();c.g.ka(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.Aa(),this.g.ka(.5))}pa(Fx,X);Fx.prototype.release=function(){this.g.stop();this.g=null;X.prototype.release.call(this)};I("shaka.ui.AdCounter",Fx);function Gx(a,b){X.call(this,a,b);var c=this;this.g=R("div");this.g.classList.add("shaka-ad-position");Y(this.g,!1);this.parent.appendChild(this.g);this.h=R("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.o(this.localization,"locale-updated",function(){c.ad&&Hx(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&Hx(c)});this.eventManager.o(this.adManager,"ad-started",function(){Hx(c)});this.eventManager.o(this.adManager,
@@ -1038,22 +1038,23 @@ I("shaka.ui.PlayButton",Ix);function Lx(a,b){Ix.call(this,a,b);this.button.class
1038
1038
  !1)});this.eventManager.o(window,"click",function(){Y(c.g,!1)});Nx(this)}pa(Mx,X);Mx.prototype.release=function(){this.h=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];X.prototype.release.call(this)};function Ox(a,b){Px.set(a,b)}function Nx(a){for(var b=r(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=Px.get(c);d?a.i.push(d.create(a.g,a.controls)):Ua("Unrecognized context menu element:",c)}}I("shaka.ui.ContextMenu",Mx);
1039
1039
  Mx.registerElement=Ox;var Px=new Map;function Qx(a,b,c,d){X.call(this,a,b);var e=this;this.container=R("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,ha(c));this.g=!1;this.bar=document.createElement("input");this.l=new N(function(){e.onChangeEnd();e.g=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,ha(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.container.appendChild(this.bar);
1040
1040
  this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(){e.controls.Mb()&&(e.g=!0,e.onChangeStart())});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.Mb()&&(e.g=!0,Rx(e,f),e.onChangeStart())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.g&&(Rx(e,f),e.onChange())});this.eventManager.o(this.bar,"touchend",function(f){e.g&&(e.g=!1,Rx(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,
1041
- "mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}pa(Qx,X);q=Qx.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);X.prototype.release.call(this)};q.setRange=function(a,b){this.bar.min=a;this.bar.max=b};q.onChangeStart=function(){};q.onChange=function(){};q.onChangeEnd=function(){};q.changeTo=function(a){this.g||(this.g=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.l.R(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
1042
- q.setValue=function(a){this.g||(this.bar.value=a)};function Rx(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect();b=parseFloat(a.bar.min);var e=parseFloat(a.bar.max);c=b+(e-b)/d.width*(c.clientX-d.left);c<b?c=b:c>e&&(c=e);a.bar.value=c}I("shaka.ui.RangeElement",Qx);Qx.prototype.setValue=Qx.prototype.setValue;Qx.prototype.getValue=Qx.prototype.getValue;Qx.prototype.changeTo=Qx.prototype.changeTo;Qx.prototype.onChangeEnd=Qx.prototype.onChangeEnd;
1043
- Qx.prototype.onChange=Qx.prototype.onChange;Qx.prototype.onChangeStart=Qx.prototype.onChangeStart;Qx.prototype.setRange=Qx.prototype.setRange;function Sx(a,b){Qx.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.j=R("div");this.j.classList.add("shaka-ad-markers");this.container.insertBefore(this.j,this.container.childNodes[0]);this.m=this.controls.i;this.h=new N(function(){c.video.currentTime=c.getValue()});this.s=new N(function(){Tx(c)});this.B=!1;this.i=[];this.eventManager.o(this.localization,"locale-updated",function(){return Ux(c)});this.eventManager.o(this.localization,
1044
- "locale-changed",function(){return Ux(c)});this.eventManager.o(this.adManager,"ad-started",function(){Vx(c)||Y(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){Vx(c)&&Y(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;Wx(c)});this.eventManager.o(this.player,"unloading",function(){c.i=[];Wx(c)});this.setValue(this.video.currentTime);this.update();Ux(this);this.ad&&Y(this.container,!1)}pa(Sx,Qx);q=Sx.prototype;
1045
- q.release=function(){this.h&&(this.h.stop(),this.h=null,this.s.stop(),this.s=null);Qx.prototype.release.call(this)};q.onChangeStart=function(){this.B=!this.video.paused;this.controls.Te(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.R(.125))};q.onChangeEnd=function(){this.h.Aa();this.controls.Te(!1);this.B&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
1041
+ "mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())});this.eventManager.o(this.bar,"contextmenu",function(f){f.preventDefault();f.stopPropagation()})}pa(Qx,X);q=Qx.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);X.prototype.release.call(this)};q.setRange=function(a,b){this.bar.min=a;this.bar.max=b};q.onChangeStart=function(){};q.onChange=function(){};q.onChangeEnd=function(){};
1042
+ q.changeTo=function(a){this.g||(this.g=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.l.R(.5)};q.getValue=function(){return parseFloat(this.bar.value)};q.setValue=function(a){this.g||(this.bar.value=a)};
1043
+ function Rx(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect();b=parseFloat(a.bar.min);var e=parseFloat(a.bar.max);c=b+(e-b)/d.width*(c.clientX-d.left);c<b?c=b:c>e&&(c=e);a.bar.value=c}I("shaka.ui.RangeElement",Qx);Qx.prototype.setValue=Qx.prototype.setValue;Qx.prototype.getValue=Qx.prototype.getValue;Qx.prototype.changeTo=Qx.prototype.changeTo;Qx.prototype.onChangeEnd=Qx.prototype.onChangeEnd;Qx.prototype.onChange=Qx.prototype.onChange;Qx.prototype.onChangeStart=Qx.prototype.onChangeStart;
1044
+ Qx.prototype.setRange=Qx.prototype.setRange;function Sx(a,b){Qx.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.j=R("div");this.j.classList.add("shaka-ad-markers");this.container.insertBefore(this.j,this.container.childNodes[0]);this.m=this.controls.i;this.h=new N(function(){var d=c.getValue();c.player.S()||d==c.video.duration&&(d-=.001);c.video.currentTime=d});this.s=new N(function(){Tx(c)});this.B=!1;this.i=[];this.eventManager.o(this.localization,"locale-updated",
1045
+ function(){return Ux(c)});this.eventManager.o(this.localization,"locale-changed",function(){return Ux(c)});this.eventManager.o(this.adManager,"ad-started",function(){Vx(c)||Y(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){Vx(c)&&Y(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;Wx(c)});this.eventManager.o(this.player,"unloading",function(){c.i=[];Wx(c)});this.setValue(this.video.currentTime);this.update();Ux(this);
1046
+ this.ad&&Y(this.container,!1)}pa(Sx,Qx);q=Sx.prototype;q.release=function(){this.h&&(this.h.stop(),this.h=null,this.s.stop(),this.s=null);Qx.prototype.release.call(this)};q.onChangeStart=function(){this.B=!this.video.paused;this.controls.Te(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.R(.125))};q.onChangeEnd=function(){this.h.Aa();this.controls.Te(!1);this.B&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
1046
1047
  q.update=function(){var a=this.m.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.Ja(),g=f.end-f.start;this.setRange(f.start,f.end);Vx(this)?(Y(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.m.showUnbufferedStart?
1047
1048
  a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.buffered+" "+100*b+"%",a.buffered+" "+100*e+"%",a.base+" "+100*e+"%"].join()+")")):Y(this.container,!1)};
1048
1049
  function Tx(a){if(a.i.length){for(var b=a.player.Ja(),c=b.end-b.start,d=["to right"],e=[],f=a.m.seekBarColors.adBreaks,g=!1,h=r(a.i),k=h.next();!k.done;k=h.next())if(k=k.value,-1!=k.start||k.end||(g=!0),k.start>=b.start&&k.start<b.end&&!(k.end&&k.end>b.end)){var l=(k.start-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}b=r(e);for(k=b.next();!k.done;k=b.next())c=k.value,d.push("transparent "+100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+
1049
1050
  100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.j.style.background="linear-gradient("+d.join(",")+")"}else a.j.style.background="transparent"}function Wx(a){Tx(a);var b=a.player.Ja();b=b.end-b.start;a.player.S()&&5<b&&a.s.ka(1)}function Vx(a){var b=a.player.Ja();b=b.end-b.start;return a.player.S()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function Ux(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}I("shaka.ui.SeekBar",Sx);function Xx(){}
1050
- Xx.prototype.create=function(a,b){return new Sx(a,b)};Sx.Factory=Xx;function Z(a,b,c,d){db.call(this);var e=this;this.P=!0;this.i=d;this.C=new uo(c,a,this.i.castReceiverAppId,this.i.castAndroidReceiverCompatible);this.Za=!0;this.s=this.C.Ab();this.B=c;this.F=this.C.dc();this.sa=a;this.j=b;this.Xa=this.F.td();this.l=this.m=null;this.X=!1;this.G=[];this.vb=[];this.gb=!1;this.Z=new N(function(){e.j.style.cursor="none";e.gb=!1;Yx(e)});this.aa=new N(function(){e.g.removeAttribute("shown");e.I.R(2)});this.I=new N(function(){for(var f=r(e.G),g=f.next();!g.done;g=f.next())Y(g.value,
1051
- !1)});this.La=new N(function(){e.Mb()&&Zx(e)});this.J=null;this.H=[];this.ua=$x();this.h=new wf;this.configure(this.i);ay(this);this.ba=new Set;by(this);this.La.ka(.125);this.h.o(this.ua,"locale-changed",function(f){e.Xa.setLocale(f.locales[0])})}pa(Z,db);q=Z.prototype;
1052
- q.destroy=function(){var a=this;return F(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.B){b.D(2);break}return u(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.Z&&(a.Z.stop(),a.Z=null);a.aa&&(a.aa.stop(),a.aa=null);a.I&&(a.I.stop(),a.I=null);a.La&&(a.La.stop(),a.La=null);cy(a);a.g&&(a.j.removeChild(a.g),a.g=null);if(!a.C){b.D(4);break}return u(b,a.C.destroy(),5);case 5:a.C=null;case 4:if(!a.sa){b.D(6);break}return u(b,a.sa.destroy(),7);case 7:a.sa=
1053
- null;case 6:a.F=null,a.B=null,a.s=null,a.ua=null,a.ba.clear(),db.prototype.release.call(a),B(b)}})};function cy(a){for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function dy(a,b){ey.set(a,b)}q.pg=function(a){this.Za=a;by(this)};q.kh=function(){Yx(this)};
1051
+ Xx.prototype.create=function(a,b){return new Sx(a,b)};Sx.Factory=Xx;function Z(a,b,c,d){db.call(this);var e=this;this.P=!0;this.i=d;this.C=new to(c,a,this.i.castReceiverAppId,this.i.castAndroidReceiverCompatible);this.Za=!0;this.s=this.C.Ab();this.B=c;this.F=this.C.dc();this.ua=a;this.j=b;this.Xa=this.F.td();this.l=this.m=null;this.X=!1;this.G=[];this.vb=[];this.gb=!1;this.Z=new N(function(){e.j.style.cursor="none";e.gb=!1;Yx(e)});this.aa=new N(function(){e.g.removeAttribute("shown");e.I.R(2)});this.I=new N(function(){for(var f=r(e.G),g=f.next();!g.done;g=f.next())Y(g.value,
1052
+ !1)});this.La=new N(function(){e.Mb()&&Zx(e)});this.J=null;this.H=[];this.va=$x();this.h=new wf;this.configure(this.i);ay(this);this.ba=new Set;by(this);this.La.ka(.125);this.h.o(this.va,"locale-changed",function(f){e.Xa.setLocale(f.locales[0])})}pa(Z,db);q=Z.prototype;
1053
+ q.destroy=function(){var a=this;return F(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.B){b.D(2);break}return u(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.Z&&(a.Z.stop(),a.Z=null);a.aa&&(a.aa.stop(),a.aa=null);a.I&&(a.I.stop(),a.I=null);a.La&&(a.La.stop(),a.La=null);cy(a);a.g&&(a.j.removeChild(a.g),a.g=null);if(!a.C){b.D(4);break}return u(b,a.C.destroy(),5);case 5:a.C=null;case 4:if(!a.ua){b.D(6);break}return u(b,a.ua.destroy(),7);case 7:a.ua=
1054
+ null;case 6:a.F=null,a.B=null,a.s=null,a.va=null,a.ba.clear(),db.prototype.release.call(a),B(b)}})};function cy(a){for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function dy(a,b){ey.set(a,b)}q.pg=function(a){this.Za=a;by(this)};q.kh=function(){Yx(this)};
1054
1055
  q.configure=function(a){this.i=a;this.C.Af(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.l&&(this.l=null);this.fb&&(this.fb=null);this.Ya&&(this.Ya=null);this.g?(dl(this.g),cy(this)):(fy(this),gy(this));this.j.classList.add("shaka-video-container");this.B.classList.add("shaka-video");hy(this);this.i.addBigPlayButton&&iy(this);this.i.customContextMenu&&(this.Ya=new Mx(this.V,this),this.H.push(this.Ya));this.$||jy(this);this.$a=R("div");this.$a.classList.add("shaka-server-side-ad-container");
1055
1056
  this.g.appendChild(this.$a);ky(this);this.G=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.G.push.apply(this.G,ha(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));ly(this);this.vb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));Yx(this);a=r(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.h.o(b,"click",c);this.h.o(b,"dblclick",
1056
- c)}};q.Pe=function(a){(this.P=a)?(this.j.setAttribute("shaka-controls","true"),this.B.tabIndex=-1,this.B.controls=!1):this.j.removeAttribute("shaka-controls");Yx(this)};q.Yf=function(a){this.B.controls=a;this.B.tabIndex=a?0:-1;a&&this.Pe(!1)};q.getAd=function(){return this.m};q.Cg=function(){return this.C};q.Og=function(){return this.ua};q.dh=function(){return this.j};q.Ab=function(){return this.s};q.Ng=function(){return this.B};q.dc=function(){return this.F};q.Mg=function(){return this.sa};
1057
+ c)}};q.Pe=function(a){(this.P=a)?(this.j.setAttribute("shaka-controls","true"),this.B.tabIndex=-1,this.B.controls=!1):this.j.removeAttribute("shaka-controls");Yx(this)};q.Yf=function(a){this.B.controls=a;this.B.tabIndex=a?0:-1;a&&this.Pe(!1)};q.getAd=function(){return this.m};q.Cg=function(){return this.C};q.Og=function(){return this.va};q.dh=function(){return this.j};q.Ab=function(){return this.s};q.Ng=function(){return this.B};q.dc=function(){return this.F};q.Mg=function(){return this.ua};
1057
1058
  q.Hg=function(){return this.g};q.Wg=function(){return this.$a};q.Eg=function(){return this.N};q.Fg=function(){return this.i};q.jh=function(){return this.X};q.Te=function(a){this.X=a};q.gh=function(){return this.Za};q.Jf=function(){return this.l?this.l.getValue():this.s.currentTime};q.Zf=function(a){this.J=a};q.nd=function(){return this.G.some(function(a){return!a.classList.contains("shaka-hidden")})};q.hc=function(){this.I.Aa()};
1058
1059
  q.yd=function(){return document.fullscreenEnabled||this.B.webkitSupportsFullscreen?!0:!1};q.jc=function(){if(document.fullscreenEnabled)return!!document.fullscreenElement;var a=this.B;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1};
1059
1060
  function my(a){var b,c;return F(function(d){switch(d.g){case 1:D(d,2);if(!document.fullscreenEnabled){b=a.B;b.webkitSupportsFullscreen&&b.webkitEnterFullscreen();d.D(4);break}if(!document.pictureInPictureElement){d.D(5);break}return u(d,document.exitPictureInPicture(),5);case 5:return u(d,a.j.requestFullscreen({navigationUI:"hide"}),7);case 7:if(!a.i.forceLandscapeOnFullscreen||!screen.orientation){d.D(4);break}D(d,9);return u(d,screen.orientation.lock("landscape"),11);case 11:va(d,4,2);break;case 9:wa(d,
@@ -1142,13 +1143,13 @@ d.stopPropagation()});this.eventManager.o(this.g,"click",function(){By(c)});Ay(t
1142
1143
  function zy(a){for(var b=r(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,Dy.get(c)?(c=Dy.get(c),a.i.push(c.create(a.h,a.controls))):Ua("Unrecognized overflow menu element requested:",c)}function By(a){if(a.controls.nd())a.controls.hc();else{Y(a.h,!0);Yx(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};gb(a.h.childNodes,b)&&hb(a.h.childNodes,b)[0].focus()}}function Ay(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
1143
1144
  I("shaka.ui.OverflowMenu",yy);yy.registerElement=Cy;function Ey(){}Ey.prototype.create=function(a,b){return new yy(a,b)};dy("overflow_menu",new Ey);var Dy=new Map;function Fy(a,b){X.call(this,a,b);var c=this;this.g=cl();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=R("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");a=R("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=R("span");a.appendChild(this.j);
1144
1145
  this.i=R("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);Gy(this);Hy(this);this.eventManager.o(this.localization,"locale-updated",function(){Gy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Gy(c)});this.eventManager.o(this.g,"click",function(){c.controls.Ab().webkitShowPlaybackTargetPicker()});a=this.controls.Ab();this.eventManager.o(a,"webkitplaybacktargetavailabilitychanged",function(d){var e=
1145
- c.player.pe()==cn;Y(c.g,"available"==d.availability&&e)});this.eventManager.o(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){Hy(c)})}pa(Fy,X);function Hy(a){var b=a.controls.Ab();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function Gy(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}I("shaka.ui.AirPlayButton",Fy);function Iy(){}Iy.prototype.create=function(a,b){return new Fy(a,b)};Cy("airplay",new Iy);
1146
+ c.player.pe()==bn;Y(c.g,"available"==d.availability&&e)});this.eventManager.o(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){Hy(c)})}pa(Fy,X);function Hy(a){var b=a.controls.Ab();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function Gy(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}I("shaka.ui.AirPlayButton",Fy);function Iy(){}Iy.prototype.create=function(a,b){return new Fy(a,b)};Cy("airplay",new Iy);
1146
1147
  dy("airplay",new Iy);function Jy(a,b,c){this.i=a;this.h=Ky(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.se()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,this.h);this.configure({});c.controls||a.We(b);b.ui=this;c.ui=this}q=Jy.prototype;q.destroy=function(){var a=this;return F(function(b){if(1==b.g)return a.g?u(b,a.g.destroy(),2):b.D(2);if(4!=b.g)return a.g=null,a.i?u(b,a.i.destroy(),4):b.D(4);a.i=null;B(b)})};q.se=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Uc()&&1<navigator.maxTouchPoints};
1147
1148
  q.getConfiguration=function(){var a=Ky(this);Il(a,this.h,Ky(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Jl(a,b));Il(this.h,a,Ky(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new L("uiupdated"))};q.Gg=function(){return this.g};q.Mh=function(a){this.g.Pe(a)};
1148
1149
  function Ky(a){var b={controlPanelElements:"play_pause time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:"captions quality language picture_in_picture cast playback_rate".split(" "),statisticsList:"width height corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent".split(" "),contextMenuElements:["loop",
1149
1150
  "picture_in_picture","statistics"],playbackRates:[.5,.75,1,1.25,1.5,1.75,2],fastForwardRates:[2,4,8,1],rewindRates:[-1,-2,-4,-8],addSeekBar:!0,addBigPlayButton:!1,customContextMenu:!1,castReceiverAppId:"",castAndroidReceiverCompatible:!1,clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",level:"rgb(255, 255, 255)"},
1150
1151
  trackLabelFormat:Ly,fadeDelay:0,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1,keyboardSeekDistance:5};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.se()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
1151
- function My(){var a,b,c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A;return F(function(E){switch(E.g){case 1:ou();if(!sm())return Ny("shaka-ui-load-failed",Oy),E.return();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");c=document.querySelectorAll("[data-shaka-player-canvas]");if(!b.length&&!a.length){E.D(2);break}if(b.length&&!a.length){d=r(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,!f.ui){g=document.createElement("div");h=f.parentElement;
1152
+ function My(){var a,b,c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A;return F(function(E){switch(E.g){case 1:nu();if(!sm())return Ny("shaka-ui-load-failed",Oy),E.return();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");c=document.querySelectorAll("[data-shaka-player-canvas]");if(!b.length&&!a.length){E.D(2);break}if(b.length&&!a.length){d=r(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,!f.ui){g=document.createElement("div");h=f.parentElement;
1152
1153
  h.replaceChild(g,f);g.appendChild(f);k=null;l=r(c);for(m=l.next();!m.done;m=l.next())if(p=m.value,p.parentElement==g){k=p;break}k||(k=document.createElement("canvas"),k.classList.add("shaka-canvas-container"),g.appendChild(k));Py(g,f,k)}E.D(2);break}n=r(a);t=n.next();case 4:if(t.done){E.D(2);break}v=t.value;if(v.ui){E.D(5);break}y=null;w=r(b);for(e=w.next();!e.done;e=w.next())if(x=e.value,x.parentElement==v){y=x;break}y||(y=document.createElement("video"),y.setAttribute("playsinline",""),v.appendChild(y));
1153
1154
  C=null;z=r(c);for(m=z.next();!m.done;m=z.next())if(A=m.value,A.parentElement==v){C=A;break}C||(C=document.createElement("canvas"),C.classList.add("shaka-canvas-container"),v.appendChild(C));D(E,7);return u(E,Py(v,y,C),9);case 9:va(E,5);break;case 7:return wa(E),Ny("shaka-ui-load-failed",Qy),E.return();case 5:t=n.next();E.D(4);break;case 2:Ny("shaka-ui-loaded"),B(E)}})}function Ny(a,b){var c=null;void 0!=b&&(c={reasonCode:b});a=new CustomEvent(a,{detail:c});document.dispatchEvent(a)}
1154
1155
  function Py(a,b,c){var d,e,f,g,h,k,l,m,p;return F(function(n){switch(n.g){case 1:d=new S(b);e=new Jy(d,a,b);d.tf(c);f="";g=!1;a.dataset&&a.dataset.shakaPlayerCastReceiverId?(f=a.dataset.shakaPlayerCastReceiverId,g="true"===a.dataset.shakaPlayerCastAndroidReceiverCompatible):b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(f=b.dataset.shakaPlayerCastReceiverId,g="true"===b.dataset.shakaPlayerCastAndroidReceiverCompatible);f.length&&e.configure({castReceiverAppId:f,castAndroidReceiverCompatible:g});
@@ -1182,7 +1183,7 @@ function Bz(a,b){var c=Bx(a.menu,"material-icons-round shaka-chosen-item");if(c)
1182
1183
  "x")}function Cz(a){for(var b={},c=r(a.g.keys()),d=c.next();!d.done;b={yc:b.yc},d=c.next()){b.yc=d.value;d=cl();var e=R("span");e.textContent=b.yc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.yc);a.video.defaultPlaybackRate=a.g.get(f.yc)}}(b));a.menu.appendChild(d)}Cx(a.menu)}I("shaka.ui.PlaybackRateSelection",zz);function Dz(){}Dz.prototype.create=function(a,b){return new zz(a,b)};Cy("playback_rate",new Dz);dy("playback_rate",new Dz);function Ez(a,b){X.call(this,a,b);var c=this;this.g=cl();this.g.classList.add("shaka-current-time");Fz(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.S()&&(c.video.currentTime=c.player.Ja().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.X,e=c.controls.Jf(),f=c.video.duration,g=c.player.Ja(),h=g.end-g.start;c.player.S()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(Fz(c,"- "+Ex(e,f)),c.g.disabled=
1183
1184
  !1):(Fz(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=Ex(e,d),f&&(e+=" / "+Ex(f,d)),Fz(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.S()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}pa(Ez,X);function Fz(a,b){b!=a.g.textContent&&(a.g.textContent=b)}I("shaka.ui.PresentationTimeTracker",Ez);function Gz(){}Gz.prototype.create=function(a,b){return new Ez(a,b)};dy("time_and_duration",new Gz);function Hz(a,b){Ty.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-resolutions");this.eventManager.o(this.localization,"locale-updated",function(){Iz(c)});this.eventManager.o(this.localization,"locale-changed",function(){Iz(c)});this.eventManager.o(this.player,"variantchanged",function(){Jz(c)});this.eventManager.o(this.player,"trackschanged",function(){Jz(c)});this.eventManager.o(this.player,
1184
1185
  "abrstatuschanged",function(){Jz(c)});Jz(this)}pa(Hz,Ty);
1185
- function Jz(a){var b=[];a.player.pe()!=cn&&(b=a.player.Qa());var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){return k.language==c.language&&k.channelsCount==c.channelsCount}));b=b.filter(function(k,l){return(a.player.ic()?b.findIndex(function(m){return m.bandwidth==k.bandwidth}):b.findIndex(function(m){return m.height==k.height}))==l});a.player.ic()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):b.sort(function(k,l){return l.height-k.height});var d=Ax(a.menu);dl(a.menu);
1186
+ function Jz(a){var b=[];a.player.pe()!=bn&&(b=a.player.Qa());var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){return k.language==c.language&&k.channelsCount==c.channelsCount}));b=b.filter(function(k,l){return(a.player.ic()?b.findIndex(function(m){return m.bandwidth==k.bandwidth}):b.findIndex(function(m){return m.height==k.height}))==l});a.player.ic()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):b.sort(function(k,l){return l.height-k.height});var d=Ax(a.menu);dl(a.menu);
1186
1187
  a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=r(b),g=f.next();!g.done;e={Zb:e.Zb},g=f.next()){e.Zb=g.value;g=cl();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.Zb;a.player.configure({abr:{enabled:!1}});a.player.Ne(l,a.controls.i.clearBufferOnQualityChange)}}(e));var h=R("span");h.textContent=a.player.ic()?Math.round(e.Zb.bandwidth/1E3)+" kbits/s":e.Zb.height+"p";g.appendChild(h);d||e.Zb!=c||(g.ariaSelected=
1187
1188
  "true",g.appendChild(Dx()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=cl();e.classList.add("shaka-enable-abr-button");a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});Jz(a)});a.g=R("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.ariaSelected="true",e.appendChild(Dx()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=
1188
1189
  a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",a.currentSelection.textContent);a.menu.appendChild(e);Cx(a.menu);a.controls.dispatchEvent(new L("resolutionselectionupdated"));Iz(a)}