shaka-player 3.3.9 → 3.3.11

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 (40) hide show
  1. package/.github/workflows/build-and-test.yaml +31 -16
  2. package/.github/workflows/custom-actions/set-commit-status/action.yaml +1 -5
  3. package/.github/workflows/deflake.yaml +28 -0
  4. package/.github/workflows/selenium-lab-tests.yaml +168 -54
  5. package/AUTHORS +3 -0
  6. package/CHANGELOG.md +22 -0
  7. package/CONTRIBUTORS +2 -0
  8. package/dist/controls.css +1 -1
  9. package/dist/controls.css.map +1 -1
  10. package/dist/locales.js +32 -32
  11. package/dist/shaka-player.compiled.debug.js +112 -111
  12. package/dist/shaka-player.compiled.debug.map +3 -3
  13. package/dist/shaka-player.compiled.js +548 -547
  14. package/dist/shaka-player.compiled.map +3 -3
  15. package/dist/shaka-player.ui.debug.js +176 -175
  16. package/dist/shaka-player.ui.debug.map +3 -3
  17. package/dist/shaka-player.ui.js +665 -664
  18. package/dist/shaka-player.ui.map +3 -3
  19. package/docs/jsdoc-template/publish.js +33 -0
  20. package/docs/jsdoc-template/tmpl/container.tmpl +4 -1
  21. package/docs/jsdoc.conf.json +1 -0
  22. package/lib/cast/cast_sender.js +39 -14
  23. package/lib/cea/cea608_memory.js +4 -0
  24. package/lib/media/streaming_engine.js +41 -4
  25. package/lib/player.js +7 -1
  26. package/lib/text/ttml_text_parser.js +6 -0
  27. package/lib/text/ui_text_displayer.js +8 -0
  28. package/lib/util/platform.js +34 -0
  29. package/lib/util/stream_utils.js +2 -1
  30. package/maintained-branches.md +2 -2
  31. package/package.json +1 -1
  32. package/test/cea/cea608_memory_unit.js +88 -0
  33. package/test/media/streaming_engine_integration.js +8 -7
  34. package/test/offline/offline_integration.js +3 -3
  35. package/test/player_src_equals_integration.js +2 -0
  36. package/test/test/assets/small.mp4 +0 -0
  37. package/test/test/util/ttml_utils.js +0 -2
  38. package/test/text/ttml_text_parser_unit.js +46 -0
  39. package/test/ui/text_displayer_layout_unit.js +17 -2
  40. package/ui/less/ad_controls.less +4 -0
@@ -16,7 +16,7 @@ fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(v
16
16
  function r(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ia(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 la="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ma;
17
17
  if("function"==typeof Object.setPrototypeOf)ma=Object.setPrototypeOf;else{var na;a:{var oa={a:!0},pa={};try{pa.__proto__=oa;na=pa.a;break a}catch(a){}na=!1}ma=na?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var qa=ma;
18
18
  function u(a,b){a.prototype=la(b.prototype);a.prototype.constructor=a;if(qa)qa(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.Li=b.prototype}function ra(){this.A=!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.A)throw new TypeError("Generator is already running");a.A=!0}ra.prototype.B=function(a){this.h=a};
19
- function ta(a,b){a.i={Ye:b,kf:!0};a.g=a.m||a.j}ra.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function z(a,b,c){a.g=c;return{value:b}}ra.prototype.D=function(a){this.g=a};function B(a){a.g=0}function E(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 I(a,b){a.m=b||0;var c=a.i.Ye;a.i=null;return c}function wa(a){a.C=[a.i];a.m=0;a.j=0}
19
+ function ta(a,b){a.i={Ye:b,kf:!0};a.g=a.m||a.j}ra.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function A(a,b,c){a.g=c;return{value:b}}ra.prototype.D=function(a){this.g=a};function C(a){a.g=0}function E(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 I(a,b){a.m=b||0;var c=a.i.Ye;a.i=null;return c}function wa(a){a.C=[a.i];a.m=0;a.j=0}
20
20
  function xa(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.kf?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 ya(a){this.g=new ra;this.h=a}function za(a,b){sa(a.g);var c=a.g.l;if(c)return Aa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Ba(a)}
21
21
  function Aa(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.A=!1,e;var f=e.value}catch(g){return a.g.l=null,ta(a.g,g),Ba(a)}a.g.l=null;d.call(a.g,f);return Ba(a)}
22
22
  function Ba(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.A=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ta(a.g,c)}a.g.A=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.kf)throw b.Ye;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
@@ -26,8 +26,8 @@ fa("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.A=!
26
26
  g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.H),reject:g(this.l)}};b.prototype.H=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.J(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.G(g):this.m(g)}};
27
27
  b.prototype.G=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.K(h,g):this.m(g)};b.prototype.l=function(g){this.B(2,g)};b.prototype.m=function(g){this.B(1,g)};b.prototype.B=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.I();this.C()};b.prototype.I=function(){var g=this;e(function(){if(g.F()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.F=
28
28
  function(){if(this.A)return!1;var g=da.CustomEvent,h=da.Event,k=da.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=da.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.C=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
29
- b.prototype.J=function(g){var h=this.j();g.Yc(h.resolve,h.reject)};b.prototype.K=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,t){return"function"==typeof p?function(v){try{l(p(v))}catch(y){m(y)}}:t}var l,m,n=new b(function(p,t){l=p;m=t});this.Yc(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.Yc=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
30
- break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.A=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=r(g),m=l.next();!m.done;m=l.next())d(m.value).Yc(h,k)})};b.all=function(g){var h=r(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(y){p[v]=y;t--;0==t&&l(p)}}var p=[],t=0;do p.push(void 0),t++,d(k.value).Yc(n(p.length-1),m),k=h.next();
29
+ b.prototype.J=function(g){var h=this.j();g.Yc(h.resolve,h.reject)};b.prototype.K=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,t){return"function"==typeof p?function(v){try{l(p(v))}catch(x){m(x)}}:t}var l,m,n=new b(function(p,t){l=p;m=t});this.Yc(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.Yc=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
30
+ break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.A=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=r(g),m=l.next();!m.done;m=l.next())d(m.value).Yc(h,k)})};b.all=function(g){var h=r(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(x){p[v]=x;t--;0==t&&l(p)}}var p=[],t=0;do p.push(void 0),t++,d(k.value).Yc(n(p.length-1),m),k=h.next();
31
31
  while(!k.done)})};return b});function Ga(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
32
32
  fa("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(!Ga(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({}),
33
33
  m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m["delete"](k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ga(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ga(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
@@ -64,10 +64,10 @@ var ib=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
64
64
  Copyright 2006 The Closure Library Authors
65
65
  SPDX-License-Identifier: Apache-2.0
66
66
  */
67
- function jb(a){var b;a instanceof jb?(kb(this,a.Va),this.Sb=a.Sb,this.Ya=a.Ya,mb(this,a.jc),this.Na=a.Na,nb(this,a.g.clone()),this.Hb=a.Hb):a&&(b=String(a).match(ib))?(kb(this,b[1]||"",!0),this.Sb=ob(b[2]||""),this.Ya=ob(b[3]||"",!0),mb(this,b[4]),this.Na=ob(b[5]||"",!0),nb(this,b[6]||"",!0),this.Hb=ob(b[7]||"")):this.g=new pb(null)}q=jb.prototype;q.Va="";q.Sb="";q.Ya="";q.jc=null;q.Na="";q.Hb="";
68
- q.toString=function(){var a=[],b=this.Va;b&&a.push(qb(b,rb,!0),":");if(b=this.Ya){a.push("//");var c=this.Sb;c&&a.push(qb(c,rb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.jc;null!=b&&a.push(":",String(b))}if(b=this.Na)this.Ya&&"/"!=b.charAt(0)&&a.push("/"),a.push(qb(b,"/"==b.charAt(0)?sb:tb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Hb)&&a.push("#",qb(b,ub));return a.join("")};
69
- q.resolve=function(a){var b=this.clone();"data"===b.Va&&(b=new jb);var c=!!a.Va;c?kb(b,a.Va):c=!!a.Sb;c?b.Sb=a.Sb:c=!!a.Ya;c?b.Ya=a.Ya:c=null!=a.jc;var d=a.Na;if(c)mb(b,a.jc);else if(c=!!a.Na){if("/"!=d.charAt(0))if(this.Ya&&!this.Na)d="/"+d;else{var e=b.Na.lastIndexOf("/");-1!=e&&(d=b.Na.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
70
- h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Na=d:c=""!==a.g.toString();c?nb(b,a.g.clone()):c=!!a.Hb;c&&(b.Hb=a.Hb);return b};q.clone=function(){return new jb(this)};function kb(a,b,c){a.Va=c?ob(b,!0):b;a.Va&&(a.Va=a.Va.replace(/:$/,""))}function mb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.jc=b}else a.jc=null}function nb(a,b,c){b instanceof pb?a.g=b:(c||(b=qb(b,vb)),a.g=new pb(b))}
67
+ function jb(a){var b;a instanceof jb?(kb(this,a.Wa),this.Tb=a.Tb,this.Za=a.Za,lb(this,a.jc),this.Na=a.Na,mb(this,a.g.clone()),this.Ib=a.Ib):a&&(b=String(a).match(ib))?(kb(this,b[1]||"",!0),this.Tb=ob(b[2]||""),this.Za=ob(b[3]||"",!0),lb(this,b[4]),this.Na=ob(b[5]||"",!0),mb(this,b[6]||"",!0),this.Ib=ob(b[7]||"")):this.g=new pb(null)}q=jb.prototype;q.Wa="";q.Tb="";q.Za="";q.jc=null;q.Na="";q.Ib="";
68
+ q.toString=function(){var a=[],b=this.Wa;b&&a.push(qb(b,rb,!0),":");if(b=this.Za){a.push("//");var c=this.Tb;c&&a.push(qb(c,rb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.jc;null!=b&&a.push(":",String(b))}if(b=this.Na)this.Za&&"/"!=b.charAt(0)&&a.push("/"),a.push(qb(b,"/"==b.charAt(0)?sb:tb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Ib)&&a.push("#",qb(b,ub));return a.join("")};
69
+ q.resolve=function(a){var b=this.clone();"data"===b.Wa&&(b=new jb);var c=!!a.Wa;c?kb(b,a.Wa):c=!!a.Tb;c?b.Tb=a.Tb:c=!!a.Za;c?b.Za=a.Za:c=null!=a.jc;var d=a.Na;if(c)lb(b,a.jc);else if(c=!!a.Na){if("/"!=d.charAt(0))if(this.Za&&!this.Na)d="/"+d;else{var e=b.Na.lastIndexOf("/");-1!=e&&(d=b.Na.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
70
+ h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Na=d:c=""!==a.g.toString();c?mb(b,a.g.clone()):c=!!a.Ib;c&&(b.Ib=a.Ib);return b};q.clone=function(){return new jb(this)};function kb(a,b,c){a.Wa=c?ob(b,!0):b;a.Wa&&(a.Wa=a.Wa.replace(/:$/,""))}function lb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.jc=b}else a.jc=null}function mb(a,b,c){b instanceof pb?a.g=b:(c||(b=qb(b,vb)),a.g=new pb(b))}
71
71
  function ob(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function qb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,wb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function wb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var rb=/[#\/\?@]/g,tb=/[#\?:]/g,sb=/[#\?]/g,vb=/[#\?@]/g,ub=/#/g;function pb(a){this.g=a||null}
72
72
  function xb(a){if(!a.Fa&&(a.Fa={},a.$c=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}q=pb.prototype;q.Fa=null;q.$c=null;q.add=function(a,b){xb(this);this.g=null;var c=this.Fa.hasOwnProperty(a)&&this.Fa[a];c||(this.Fa[a]=c=[]);c.push(b);this.$c++;return this};
73
73
  q.set=function(a,b){xb(this);this.g=null;this.Fa.hasOwnProperty(a)?this.Fa[a]=[b]:this.add(a,b);return this};q.toString=function(){if(this.g)return this.g;if(!this.Fa)return"";var a=[],b;for(b in this.Fa)for(var c=encodeURIComponent(b),d=this.Fa[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};q.clone=function(){var a=new pb;a.g=this.g;if(this.Fa){var b={},c;for(c in this.Fa)b[c]=this.Fa[c].concat();a.Fa=b;a.$c=this.$c}return a};function P(a,b,c){var d=Fa.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1}P.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};N("shaka.util.Error",P);P.Severity={RECOVERABLE:1,CRITICAL:2};P.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
@@ -79,7 +79,7 @@ CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033
79
79
  FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,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,
80
80
  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,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,
81
81
  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 yb(a,b){this.g=a;this.h=b}yb.prototype.toString=function(){return"v"+this.g+"."+this.h};function zb(a,b){var c=new yb(4,0),d=Ab,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Bb(a,b,c,d){Sa([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Cb(a,b,c,d){Ra([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Ab=null;function Db(a,b){return a.concat(b)}function Eb(){}function Fb(a){return null!=a}function Gb(a){var b=Object.create(a.prototype||Object.prototype);try{var c=a.call(b);c||(zb("Factories requiring new","Factories should be plain functions"),c=b)}catch(d){zb("Factories requiring new","Factories should be plain functions"),c=new a}return c};function Hb(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(Db,[]).map(function(d){return d.toString()})}function Ib(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
82
- function Jb(a,b){if(1==b.length)return b[0];var c=Kb(a,b);if(null!=c)return c;throw new P(2,4,4025,b);}function Kb(a,b){for(var c=r(Lb[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==Mb?"":null}var Mb="text",Nb={gb:"video",Fb:"audio",oa:Mb,wc:"image",nh:"application"},Lb={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Ob(){}function Pb(a,b){a=Qb(a);b=Qb(b);return a.split("-")[0]==b.split("-")[0]}function Rb(a,b){a=Qb(a);b=Qb(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function Sb(a,b){a=Qb(a);b=Qb(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function Qb(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Tb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Ub(a,b){var c=Vb(a),d=Vb(b);return a!=c&&b!=d&&c==d}
82
+ function Jb(a,b){if(1==b.length)return b[0];var c=Kb(a,b);if(null!=c)return c;throw new P(2,4,4025,b);}function Kb(a,b){for(var c=r(Lb[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==Mb?"":null}var Mb="text",Nb={gb:"video",Gb:"audio",oa:Mb,wc:"image",nh:"application"},Lb={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Ob(){}function Pb(a,b){a=Qb(a);b=Qb(b);return a.split("-")[0]==b.split("-")[0]}function Rb(a,b){a=Qb(a);b=Qb(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function Sb(a,b){a=Qb(a);b=Qb(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function Qb(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Tb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Ub(a,b){var c=Vb(a),d=Vb(b);return a!=c&&b!=d&&c==d}
83
83
  function Wb(a,b){a=Qb(a);b=Qb(b);return b==a?4:Rb(b,a)?3:Sb(b,a)?2:Rb(a,b)?1:0}function Vb(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=Tb.get(a)||a}function Xb(a){return a.language?Qb(a.language):a.audio&&a.audio.language?Qb(a.audio.language):a.video&&a.video.language?Qb(a.video.language):"und"}
84
84
  function Yb(a,b){for(var c=Qb(a),d=new Set,e=r(b),f=e.next();!f.done;f=e.next())d.add(Qb(f.value));e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,f==c)return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Rb(f,c))return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Sb(f,c))return f;d=r(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,Rb(c,f))return f;return null}N("shaka.util.LanguageUtils",Ob);Ob.findClosestLocale=Yb;Ob.getLocaleForVariant=Xb;
85
85
  Ob.getLocaleForText=function(a){return Qb(a.language||"und")};Ob.getBase=Vb;Ob.relatedness=Wb;Ob.areSiblings=Ub;Ob.normalize=Qb;Ob.isSiblingOf=Sb;Ob.isParentOf=Rb;Ob.areLanguageCompatible=Pb;Ob.areLocaleCompatible=function(a,b){a=Qb(a);b=Qb(b);return a==b};
@@ -93,8 +93,8 @@ q.Re=function(a){var b=this;this.g.clear();a=r(a);for(var c=a.next();!c.done;c=a
93
93
  q.ea=function(a,b,c){a=Qb(a);void 0===c&&(c=bc);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=bc||d.set(f,e)});this.h.set(a,d);$b(this);this.dispatchEvent(new O("locale-updated"));return this};q.Xg=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 O("unknown-localization",a));return""};
94
94
  function $b(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={Xb:f.Xb},h=g.next()){f.Xb=h.value;e.add(f.Xb);e.add(Vb(f.Xb));h=hb(b.keys(),function(l){return function(m){return Ub(m,l.Xb)}}(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 Vb(m)==l.Xb}}(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);
95
95
  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,cc(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new O("missing-localizations",d)))}function cc(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)}N("shaka.ui.Localization",Zb);Zb.prototype.resolve=Zb.prototype.resolve;
96
- Zb.prototype.resolveDictionary=Zb.prototype.Xg;Zb.prototype.insert=Zb.prototype.ea;Zb.prototype.changeLocale=Zb.prototype.Re;Zb.prototype.release=Zb.prototype.release;var bc=1;Zb.ConflictResolution={USE_OLD:0,USE_NEW:bc};Zb.UNKNOWN_LOCALES="unknown-locales";Zb.UNKNOWN_LOCALIZATION="unknown-localization";Zb.MISSING_LOCALIZATIONS="missing-localizations";Zb.LOCALE_CHANGED="locale-changed";Zb.LOCALE_UPDATED="locale-updated";var dc={ei:"REPLAY",Mh:"LOOP",Fi:"VOLUME",mh:"AIRPLAY",ii:"REWIND",Eh:"EXIT_LOOP_MODE",Xh:"ON",mi:"SKIP_TO_LIVE",oi:"STATISTICS",li:"SKIP_AD",Fh:"EXIT_PICTURE_IN_PICTURE",Wh:"OFF",Lh:"LANGUAGE",Bh:"ENTER_PICTURE_IN_PICTURE",Dh:"EXIT_FULL_SCREEN",Bi:"UNDETERMINED_LANGUAGE",lh:"AD_TIME",sh:"CAPTIONS",Rh:"MULTIPLE_LANGUAGES",Gf:"SUBTITLE_FORCED",Vh:"NOT_APPLICABLE",gi:"RESOLUTION",BACK:"BACK",Ne:"LIVE",Ah:"ENTER_LOOP_MODE",uh:"CAST",di:"PLAYBACK_RATE",Qh:"MORE_SETTINGS",oh:"AUTO_QUALITY",Di:"UNRECOGNIZED_LANGUAGE",
97
- bi:"PICTURE_IN_PICTURE",kh:"AD_DURATION",ki:"SEEK",Ci:"UNMUTE",Ih:"FAST_FORWARD",ci:"PLAY",AD_PROGRESS:"AD_PROGRESS",Jh:"FULL_SCREEN",ai:"PAUSE",Sh:"MUTE"};function ec(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}ec.prototype.sample=function(a,b){var c=Math.pow(this.g,a);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function fc(a){return a.h/(1-Math.pow(a.g,a.i))};function gc(){this.h=new ec(2);this.j=new ec(5);this.g=0;this.i=128E3;this.l=16E3}gc.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)};gc.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};gc.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(fc(this.h),fc(this.j))};function hc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function ic(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function jc(a,b,c){c||(c=hc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Fd:d.Fd},e=a.next()){d.Fd=e.value;e=b.findIndex(function(f){return function(g){return c(f.Fd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
96
+ Zb.prototype.resolveDictionary=Zb.prototype.Xg;Zb.prototype.insert=Zb.prototype.ea;Zb.prototype.changeLocale=Zb.prototype.Re;Zb.prototype.release=Zb.prototype.release;var bc=1;Zb.ConflictResolution={USE_OLD:0,USE_NEW:bc};Zb.UNKNOWN_LOCALES="unknown-locales";Zb.UNKNOWN_LOCALIZATION="unknown-localization";Zb.MISSING_LOCALIZATIONS="missing-localizations";Zb.LOCALE_CHANGED="locale-changed";Zb.LOCALE_UPDATED="locale-updated";var dc={Lh:"LANGUAGE",Rh:"MULTIPLE_LANGUAGES",di:"PLAYBACK_RATE",Ih:"FAST_FORWARD",oh:"AUTO_QUALITY",Bi:"UNDETERMINED_LANGUAGE",oi:"STATISTICS",Ne:"LIVE",ci:"PLAY",Mh:"LOOP",Ah:"ENTER_LOOP_MODE",Wh:"OFF",ii:"REWIND",AD_PROGRESS:"AD_PROGRESS",Di:"UNRECOGNIZED_LANGUAGE",Qh:"MORE_SETTINGS",ai:"PAUSE",mi:"SKIP_TO_LIVE",gi:"RESOLUTION",Jh:"FULL_SCREEN",Fi:"VOLUME",Vh:"NOT_APPLICABLE",Xh:"ON",ki:"SEEK",mh:"AIRPLAY",Bh:"ENTER_PICTURE_IN_PICTURE",Sh:"MUTE",Fh:"EXIT_PICTURE_IN_PICTURE",sh:"CAPTIONS",bi:"PICTURE_IN_PICTURE",
97
+ Dh:"EXIT_FULL_SCREEN",uh:"CAST",Ci:"UNMUTE",li:"SKIP_AD",kh:"AD_DURATION",Gf:"SUBTITLE_FORCED",ei:"REPLAY",Eh:"EXIT_LOOP_MODE",lh:"AD_TIME",BACK:"BACK"};function ec(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}ec.prototype.sample=function(a,b){var c=Math.pow(this.g,a);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function fc(a){return a.h/(1-Math.pow(a.g,a.i))};function gc(){this.h=new ec(2);this.j=new ec(5);this.g=0;this.i=128E3;this.l=16E3}gc.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)};gc.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};gc.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(fc(this.h),fc(this.j))};function hc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function ic(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function jc(a,b,c){c||(c=hc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Fd:d.Fd},e=a.next()){d.Fd=e.value;e=b.findIndex(function(f){return function(g){return c(f.Fd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
98
98
  function kc(a,b,c){c||(c=hc);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 lc(a,b,c){this.startTime=a;this.direction=mc;this.endTime=b;this.payload=c;this.region=new nc;this.position=null;this.positionAlign=oc;this.size=0;this.textAlign=pc;this.writingMode=qc;this.lineInterpretation=rc;this.line=null;this.lineHeight="";this.lineAlign=sc;this.displayAlign=tc;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=uc;this.fontStyle=vc;this.linePadding=this.letterSpacing=this.fontFamily=
99
99
  "";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}lc.prototype.clone=function(){var a=new lc(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
100
100
  function wc(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(!kc(a.nestedCues,b.nestedCues,wc))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(!kc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}N("shaka.text.Cue",lc);var oc="auto";
@@ -117,8 +117,8 @@ function wd(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video"
117
117
  function Ad(a){var b=Bd(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===a&&"b2"===b:return"dtsx";
118
118
  case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function Cd(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Bd(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}
119
119
  (new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Ed(a){this.l=null;this.i=a;this.j=this.C=0;this.m=Infinity;this.h=this.g=null;this.B="";this.A=new Map}function Fd(a){return Gd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}Ed.prototype.destroy=function(){this.i=this.l=null;this.A.clear();return Promise.resolve()};
120
- function Hd(a,b,c,d){var e,f,g;return M(function(h){if(1==h.g)return z(h,Promise.resolve(),2);if(!a.l||!a.i)return h["return"]();if(null==c||null==d)return a.l.parseInit(Ic(b)),h["return"]();e={periodStart:a.C,segmentStart:c,segmentEnd:d};f=a.l.parseMedia(Ic(b),e);g=f.filter(function(k){return k.startTime>=a.j&&k.startTime<a.m});a.i.append(g);null==a.g&&(a.g=Math.max(c,a.j));a.h=Math.min(d,a.m);B(h)})}
121
- Ed.prototype.remove=function(a,b){var c=this;return M(function(d){if(1==d.g)return z(d,Promise.resolve(),2);!c.i||!c.i.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));B(d)})};function Id(a,b,c){a.j=b;a.m=c}function Jd(a,b,c){a.B=b;if(b=a.A.get(b))for(var d=r(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.i.append(e)}
120
+ function Hd(a,b,c,d){var e,f,g;return M(function(h){if(1==h.g)return A(h,Promise.resolve(),2);if(!a.l||!a.i)return h["return"]();if(null==c||null==d)return a.l.parseInit(Ic(b)),h["return"]();e={periodStart:a.C,segmentStart:c,segmentEnd:d};f=a.l.parseMedia(Ic(b),e);g=f.filter(function(k){return k.startTime>=a.j&&k.startTime<a.m});a.i.append(g);null==a.g&&(a.g=Math.max(c,a.j));a.h=Math.min(d,a.m);C(h)})}
121
+ Ed.prototype.remove=function(a,b){var c=this;return M(function(d){if(1==d.g)return A(d,Promise.resolve(),2);!c.i||!c.i.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));C(d)})};function Id(a,b,c){a.j=b;a.m=c}function Jd(a,b,c){a.B=b;if(b=a.A.get(b))for(var d=r(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.i.append(e)}
122
122
  function Kd(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push({stream:c.stream,cue:new lc(c.startTime,c.endTime,c.text)});return b}function Ld(a,b,c){b.startTime+=c;b.endTime+=c;b=r(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Ld(a,d.value,c)}
123
123
  function Md(a,b,c,d,e){var f=c+" "+d,g=new Map;b=r(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);Ld(a,k,e);k.startTime>=a.j&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.B&&a.i.append([k]))}e=r(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.A.has(f)||a.A.set(f,new Map),b=r(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.A.get(f).set(h,k);a.g=null==a.g?Math.max(c,
124
124
  a.j):Math.min(a.g,Math.max(c,a.j));a.h=Math.max(a.h,Math.min(d,a.m))}N("shaka.text.TextEngine",Ed);Ed.prototype.destroy=Ed.prototype.destroy;Ed.findParser=function(a){return Gd[a]};Ed.unregisterParser=function(a){delete Gd[a]};Ed.registerParser=function(a,b){Gd[a]=b};var Gd={};function Nd(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=Od(f,b,c);f=Pd(f,d);b=Qd(f);b=Rd(b);var g=Sd(b,e);a.variants=a.variants.filter(function(h){return Td(h)==g?!0:!1})}function Qd(a){var b=new ab;a=r(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Td(c);b.push(d,c)}return b}
@@ -127,10 +127,10 @@ function Od(a,b,c){var d={};b=r(b);for(var e=b.next();!e.done;d={Qd:d.Qd},e=b.ne
127
127
  function Sd(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next())if(d=d.value,d==Ud||d==Vd){if(a=Wd(a,d),1==a.size())return a.keys()[0]}else if(d==Xd)break;return Yd(a)}function Wd(a,b){var c=0,d=new ab;bb(a,function(e,f){for(var g=0,h=0,k=r(f),l=k.next();!l.done;l=k.next())l=l.value,l.decodingInfos.length&&(g+=l.decodingInfos[0][b]?1:0,h++);g/=h;g>c?(d.g={},d.push(e,f),c=g):g==c&&d.push(e,f)});return d}
128
128
  function Yd(a){var b="",c=Infinity;bb(a,function(d,e){for(var f=0,g=0,h=r(e),k=h.next();!k.done;k=h.next())f+=k.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}function Td(a){var b="";a.video&&(b=Ad(a.video.codecs));var c="";a.audio&&(c=Ad(a.audio.codecs));return b+"-"+c}function Zd(a,b,c){a.variants=a.variants.filter(function(d){return $d(d,b,c)})}
129
129
  function $d(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
130
- function ae(a,b){return M(function(c){if(1==c.g)return z(c,be(b,0<b.offlineSessionIds.length),2);ce(a,b);de(b);ee(b);B(c)})}
131
- function be(a,b){return M(function(c){if(1==c.g)return z(c,fe(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=ge(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Jb("video",g);g=Jb("audio",g);g=zd(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(g))return!1}f=zd(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(f))return!1}if(f=d.audio)if(g=he(f.codecs),f=zd(f.mimeType,g,"audio"),!MediaSource.isTypeSupported(f))return!1;if(Wc()&&e&&(e.width&&
132
- 1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))return Wa(ie(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||Wa(ie(d));return e});B(c)})}
133
- function fe(a,b,c){var d,e,f,g,h,k,l,m,n,p,t;return M(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 M(function(D){if(1==D.g)return E(D,2),z(D,e.decodingInfo(w),4);if(2!=D.g)return x=D.h,y.decodingInfos.push(x),va(D,0);I(D);JSON.stringify(w);B(D)})};h=r(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=je(l,b,c),n=r(m),p=n.next();!p.done;p=n.next())t=p.value,f.push(g(l,t));return z(v,Promise.all(f),
130
+ function ae(a,b){return M(function(c){if(1==c.g)return A(c,be(b,0<b.offlineSessionIds.length),2);ce(a,b);de(b);ee(b);C(c)})}
131
+ function be(a,b){return M(function(c){if(1==c.g)return A(c,fe(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=ge(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Jb("video",g);g=Jb("audio",g);g=zd(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(g))return!1}f=zd(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(f))return!1}if(f=d.audio)if(g=he(f.codecs),f=zd(f.mimeType,g,"audio"),!MediaSource.isTypeSupported(f))return!1;if(Wc()&&e&&(e.width&&
132
+ 1920<e.width||e.height&&1080<e.height)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return Wa(ie(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||Wa(ie(d));return e});C(c)})}
133
+ function fe(a,b,c){var d,e,f,g,h,k,l,m,n,p,t;return M(function(v){if(d=a.some(function(x){return x.decodingInfos.length}))return v["return"]();e=navigator.mediaCapabilities;f=[];g=function(x,y){var w;return M(function(D){if(1==D.g)return E(D,2),A(D,e.decodingInfo(y),4);if(2!=D.g)return w=D.h,x.decodingInfos.push(w),va(D,0);I(D);JSON.stringify(y);C(D)})};h=r(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=je(l,b,c),n=r(m),p=n.next();!p.done;p=n.next())t=p.value,f.push(g(l,t));return A(v,Promise.all(f),
134
134
  0)})}
135
135
  function je(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=Jb("video",g);f=ge(f);g=Jb("audio",g);g=zd(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=ge(f);f=zd(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";
136
136
  break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=he(d.codecs),f=zd(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,[]);
@@ -160,7 +160,7 @@ function Ce(a,b){var c;if(!(c=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.lang
160
160
  function De(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(f){return Bd(f)[0]}),d=b.codecs.split(",").map(function(f){return Bd(f)[0]});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=0;e<c.length;e++)if(c[e]!=d[e])return!1;return!0}function Ee(a,b){var c=new Set(a),d=new Set(b);c["delete"]("main");d["delete"]("main");if(c.size!=d.size)return!1;c=r(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.value))return!1;return!0};function Fe(a){this.g=a;this.h=new Ge(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}Fe.prototype.create=function(a){var b=this,c=a.filter(function(d){return Ce(b.g,d)});return c.length?new Be(c[0],c):this.h.create(a)};function Ge(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
161
161
  Ge.prototype.create=function(a){var b=[];b=Ie(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Je(b,this.j);a.length&&(b=a);this.g&&(a=Pd(b,this.g),a.length&&(b=a));this.h&&(a=Ke(b,this.h),a.length&&(b=a));a=new Be(b[0]);b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,Ce(a.h,c)&&a.add(c);return a};function Ie(a,b){var c=Qb(b),d=Yb(c,a.map(function(e){return Xb(e)}));return d?a.filter(function(e){return d==Xb(e)}):[]}
162
162
  function Je(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Ke(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Le(){this.g=Me;this.h=(new Map).set(Me,2).set(Ne,1)}function Oe(a,b,c){a.h.set(Me,c).set(Ne,b)}var Ne=0,Me=1;function Pe(a,b){var c=Qe();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.A=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
163
- function Re(a){var b,c;return M(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new P(2,7,1010);b=a.g;a.g++;if(0==b)return d["return"]();c=a.h*(1+(2*Math.random()-1)*a.A);return z(d,new Promise(function(e){(new Q(e)).S(c/1E3)}),2)}a.h*=a.m;B(d)})}function Qe(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Se(a,b){this.promise=a;this.i=b;this.g=!1}function Te(a){return new Se(Promise.reject(a),function(){return Promise.resolve()})}function Ue(){var a=Promise.reject(new P(2,7,7001));a["catch"](function(){});return new Se(a,function(){return Promise.resolve()})}function Ve(a){return new Se(Promise.resolve(a),function(){return Promise.resolve()})}function We(a){return new Se(a,function(){return a["catch"](function(){})})}Se.prototype.abort=function(){this.g=!0;return this.i()};
163
+ function Re(a){var b,c;return M(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new P(2,7,1010);b=a.g;a.g++;if(0==b)return d["return"]();c=a.h*(1+(2*Math.random()-1)*a.A);return A(d,new Promise(function(e){(new Q(e)).S(c/1E3)}),2)}a.h*=a.m;C(d)})}function Qe(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Se(a,b){this.promise=a;this.i=b;this.g=!1}function Te(a){return new Se(Promise.reject(a),function(){return Promise.resolve()})}function Ue(){var a=Promise.reject(new P(2,7,7001));a["catch"](function(){});return new Se(a,function(){return Promise.resolve()})}function Ve(a){return new Se(Promise.resolve(a),function(){return Promise.resolve()})}function We(a){return new Se(a,function(){return a["catch"](function(){})})}Se.prototype.abort=function(){this.g=!0;return this.i()};
164
164
  function Xe(a){return new Se(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Se.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
165
165
  Se.prototype.qa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Ye(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Pc,g=new P(2,7,7001);this.promise.then(c(!0),c(!1));return new Se(f,function(){return d()})};
166
166
  function Ye(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}N("shaka.util.AbortableOperation",Se);Se.prototype.chain=Se.prototype.qa;Se.prototype["finally"]=Se.prototype["finally"];Se.all=Xe;Se.prototype.abort=Se.prototype.abort;Se.notAbortable=We;Se.completed=Ve;Se.aborted=Ue;Se.failed=Te;function Ze(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new Set;return b(a)}function $e(a){var b={},c;for(c in a)b[c]=a[c];return b};function af(){this.g=[]}function bf(a,b){a.g.push(b["finally"](function(){ic(a.g,b)}))}af.prototype.destroy=function(){for(var a=[],b=r(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise["catch"](function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function cf(a,b,c){cb.call(this);this.i=!1;this.m=new af;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.B=c||null;this.A=!1}u(cf,cb);q=cf.prototype;q.ue=function(a){this.A=a};function df(a,b,c,d){c=c||ef;var e=ff[a];if(!e||c>=e.priority)ff[a]={priority:c,Og:b,Pg:void 0===d?!1:d}}q.Qg=function(a){this.g.add(a)};q.fh=function(a){this.g["delete"](a)};q.Of=function(){this.g.clear()};q.Rg=function(a){this.h.add(a)};q.gh=function(a){this.h["delete"](a)};q.Pf=function(){this.h.clear()};
@@ -168,57 +168,57 @@ function gf(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSit
168
168
  q.request=function(a,b){var c=this,d=new hf;if(this.i){var e=Promise.reject(new P(2,7,7001));e["catch"](function(){});return new jf(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Ze(b.retryParameters):Qe();b.uris=Ze(b.uris);e=kf(this,a,b);var f=e.qa(function(){return lf(c,a,b,new Pe(b.retryParameters,!1),0,null,d)}),g=f.qa(function(n){return mf(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
169
169
  var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.qa(function(n){var p=Date.now()-l,t=n.response;t.timeMs+=k;t.timeMs+=p;n.Bg||!c.l||t.fromCache||a!=nf||c.l(t.timeMs,t.data.byteLength);return t},function(n){n&&(n.severity=2);throw n;});e=new jf(m.promise,function(){return m.abort()},d);bf(this.m,e);return e};
170
170
  function kf(a,b,c){var d=Ve(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={Ld:e.Ld},f=a.next())e.Ld=f.value,d=d.qa(function(g){return function(){c.body&&(c.body=Jc(c.body));return g.Ld(b,c)}}(e));return d.qa(void 0,function(g){if(g instanceof P&&7001==g.code)throw g;throw new P(2,1,1006,g);})}
171
- function lf(a,b,c,d,e,f,g){a.A&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new jb(c.uris[e]),k=h.Va,l=!1;k||(k=location.protocol,k=k.slice(0,-1),kb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=ff[k])?k.Og:null;if(!m)return Te(new P(2,1,1E3,h));var n=k.Pg,p=null,t=null,v=!1,y=!1,w;return We(Re(d)).qa(function(){if(a.i)return Ue();w=Date.now();var x=m(c.uris[e],c,b,function(A,F,G){p&&p.stop();t&&t.S(C/1E3);a.l&&b==nf&&(a.l(A,F),l=!0,g.g=G)},function(A){a.j&&a.j(A,c,b);y=!0});
172
- if(!n)return x;var D=c.retryParameters.connectionTimeout;D&&(p=new Q(function(){v=!0;x.abort()}),p.S(D/1E3));var C=c.retryParameters.stallTimeout;C&&(t=new Q(function(){v=!0;x.abort()}));return x}).qa(function(x){p&&p.stop();t&&t.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-w);var D={response:x,Bg:l};!y&&a.j&&a.j(x.headers,c,b);return D},function(x){p&&p.stop();t&&t.stop();if(a.B){var D=null,C=0;x instanceof P&&(D=x,1001==x.code&&(C=x.data[1]));a.B(c,D,C,v)}if(a.i)return Ue();v&&(x=new P(1,1,1003,
173
- c.uris[e],b));if(x instanceof P){if(7001==x.code)throw x;if(1010==x.code)throw f;if(1==x.severity)return D=(new Map).set("error",x),D=new O("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,lf(a,b,c,d,e,x,g)}throw x;})}
171
+ function lf(a,b,c,d,e,f,g){a.A&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new jb(c.uris[e]),k=h.Wa,l=!1;k||(k=location.protocol,k=k.slice(0,-1),kb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=ff[k])?k.Og:null;if(!m)return Te(new P(2,1,1E3,h));var n=k.Pg,p=null,t=null,v=!1,x=!1,y;return We(Re(d)).qa(function(){if(a.i)return Ue();y=Date.now();var w=m(c.uris[e],c,b,function(B,F,G){p&&p.stop();t&&t.S(z/1E3);a.l&&b==nf&&(a.l(B,F),l=!0,g.g=G)},function(B){a.j&&a.j(B,c,b);x=!0});
172
+ if(!n)return w;var D=c.retryParameters.connectionTimeout;D&&(p=new Q(function(){v=!0;w.abort()}),p.S(D/1E3));var z=c.retryParameters.stallTimeout;z&&(t=new Q(function(){v=!0;w.abort()}));return w}).qa(function(w){p&&p.stop();t&&t.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-y);var D={response:w,Bg:l};!x&&a.j&&a.j(w.headers,c,b);return D},function(w){p&&p.stop();t&&t.stop();if(a.B){var D=null,z=0;w instanceof P&&(D=w,1001==w.code&&(z=w.data[1]));a.B(c,D,z,v)}if(a.i)return Ue();v&&(w=new P(1,1,1003,
173
+ c.uris[e],b));if(w instanceof P){if(7001==w.code)throw w;if(1010==w.code)throw f;if(1==w.severity)return D=(new Map).set("error",w),D=new O("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,lf(a,b,c,d,e,w,g)}throw w;})}
174
174
  function mf(a,b,c){var d=Ve(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={Md:e.Md},f=a.next())e.Md=f.value,d=d.qa(function(g){return function(){var h=c.response;h.data&&(h.data=Jc(h.data));return g.Md(b,h)}}(e));return d.qa(function(){return c},function(g){var h=2;if(g instanceof P){if(7001==g.code)throw g;h=g.severity}throw new P(h,1,1007,g);})}N("shaka.net.NetworkingEngine",cf);cf.prototype.request=cf.prototype.request;cf.prototype.destroy=cf.prototype.destroy;cf.makeRequest=gf;
175
175
  cf.defaultRetryParameters=function(){return Qe()};cf.prototype.clearAllResponseFilters=cf.prototype.Pf;cf.prototype.unregisterResponseFilter=cf.prototype.gh;cf.prototype.registerResponseFilter=cf.prototype.Rg;cf.prototype.clearAllRequestFilters=cf.prototype.Of;cf.prototype.unregisterRequestFilter=cf.prototype.fh;cf.prototype.registerRequestFilter=cf.prototype.Qg;cf.unregisterScheme=function(a){delete ff[a]};cf.registerScheme=df;cf.prototype.setForceHTTPS=cf.prototype.ue;function hf(){this.g=0}
176
176
  cf.NumBytesRemainingClass=hf;function jf(a,b,c){Se.call(this,a,b);this.h=c}u(jf,Se);cf.PendingRequest=jf;var nf=1;cf.RequestType={MANIFEST:0,SEGMENT:nf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var ef=3;cf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:ef};var ff={};function of(a){this.g=!1;this.h=new Pc;this.i=a}of.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 pf(a,b){if(a.g){if(b instanceof P&&7003==b.code)throw b;throw new P(2,7,7003,b);}};function qf(){this.g=new ab}q=qf.prototype;q.release=function(){this.rb();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new rf(a,b,c,d),this.g.push(b,a))};q.Ga=function(a,b,c,d){function e(g){f.nc(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.nc=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.nc(),this.g.remove(b,e))}};
177
177
  q.rb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.nc();this.g.g={}}};N("shaka.util.EventManager",qf);qf.prototype.removeAll=qf.prototype.rb;qf.prototype.unlisten=qf.prototype.nc;qf.prototype.listenOnce=qf.prototype.Ga;qf.prototype.listen=qf.prototype.o;qf.prototype.release=qf.prototype.release;function rf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=sf(a,d);this.target.addEventListener(b,c,this.g)}
178
178
  rf.prototype.nc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function sf(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 tf(a)?b:b.capture||!1}
179
- function tf(a){var b=uf;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}uf=b}return b||!1}var uf=void 0;function vf(){}function wf(a){a=jd(a);return(new jb(a)).Ya}function xf(a,b,c){function d(h){Lc(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ic(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new P(2,6,6015);var e;"string"==typeof b?e=ld(b,!0):e=b;a=jd(a);a=ld(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}N("shaka.util.FairPlayUtils",vf);vf.initDataTransform=xf;vf.defaultGetContentId=wf;function yf(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 zf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function Af(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=r(a),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function Bf(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.H=new Set;this.l=this.B=null;this.aa=this.Z=!1;this.I=0;this.g=null;this.A=new qf;this.i=new Map;this.F=[];this.C=new Pc;this.h=null;this.m=function(d){c.C.reject(d);a.onError(d)};this.ba=new Map;this.$=new Map;this.R=new Q(function(){return Cf(c)});this.K=!1;this.J=[];this.N=!1;this.va=(new Q(function(){Df(c)})).ha(b);this.C["catch"](function(){});this.j=new of(function(){return Ef(c)});this.W=!1}q=Bf.prototype;q.destroy=function(){return this.j.destroy()};
180
- function Ef(a){return M(function(b){switch(b.g){case 1:return a.A.release(),a.A=null,a.C.reject(),a.va.stop(),a.va=null,a.R.stop(),a.R=null,z(b,Ff(a),2);case 2:if(!a.l){b.D(3);break}E(b,4);return z(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:I(b);case 5:a.l=null;case 3:a.g=null,a.H.clear(),a.B=null,a.F=[],a.h=null,a.m=function(){},a.G=null,a.W=!1,B(b)}})}q.configure=function(a){this.h=a};function Gf(a,b,c){a.aa=!0;a.F=[];a.K=c;return Hf(a,b)}
179
+ function tf(a){var b=uf;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}uf=b}return b||!1}var uf=void 0;function vf(){}function wf(a){a=jd(a);return(new jb(a)).Za}function xf(a,b,c){function d(h){Lc(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ic(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new P(2,6,6015);var e;"string"==typeof b?e=ld(b,!0):e=b;a=jd(a);a=ld(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}N("shaka.util.FairPlayUtils",vf);vf.initDataTransform=xf;vf.defaultGetContentId=wf;function yf(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 zf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function Af(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=r(a),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function Bf(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.H=new Set;this.l=this.B=null;this.aa=this.Z=!1;this.I=0;this.g=null;this.A=new qf;this.i=new Map;this.F=[];this.C=new Pc;this.h=null;this.m=function(d){c.C.reject(d);a.onError(d)};this.ba=new Map;this.$=new Map;this.R=new Q(function(){return Cf(c)});this.K=!1;this.J=[];this.N=!1;this.va=(new Q(function(){Df(c)})).ha(b);this.C["catch"](function(){});this.j=new of(function(){return Ef(c)});this.W=!1}q=Bf.prototype;q.destroy=function(){return this.j.destroy()};
180
+ function Ef(a){return M(function(b){switch(b.g){case 1:return a.A.release(),a.A=null,a.C.reject(),a.va.stop(),a.va=null,a.R.stop(),a.R=null,A(b,Ff(a),2);case 2:if(!a.l){b.D(3);break}E(b,4);return A(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:I(b);case 5:a.l=null;case 3:a.g=null,a.H.clear(),a.B=null,a.F=[],a.h=null,a.m=function(){},a.G=null,a.W=!1,C(b)}})}q.configure=function(a){this.h=a};function Gf(a,b,c){a.aa=!0;a.F=[];a.K=c;return Hf(a,b)}
181
181
  function If(a,b,c){a.F=c;a.K=0<c.length;return Hf(a,b)}function Jf(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 Kf(a,g,[])}
182
- function Hf(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y;return M(function(w){if(1==w.g){if(c=Lf(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(x){return x.video&&x.video.drmInfos.length||x.audio&&x.audio.drmInfos.length?!0:!1});g||(h=yf(a.h.servers),Mf(b,h));k=r(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Nf(l),n=r(m),p=n.next();!p.done;p=n.next())t=p.value,Of(t,yf(a.h.servers),yf(a.h.advanced||{}));return z(w,
183
- fe(b,a.K,a.W),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.Z=!0,w["return"](Promise.resolve());y=Kf(a,void 0,b);return w["return"](g?y:y["catch"](function(){}))})}
184
- q.xc=function(a){var b=this,c,d;return M(function(e){if(1==e.g){if(!b.B)return b.A.Ga(a,"encrypted",function(){b.m(new P(2,6,6010))}),e["return"]();b.l=a;b.A.Ga(b.l,"play",function(){for(var f=r(b.J),g=f.next();!g.done;g=f.next())Pf(b,g.value);b.N=!0;b.J=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.A.o(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Ff(b)});c=b.l.setMediaKeys(b.B);c=c["catch"](function(f){return Promise.reject(new P(2,6,6003,f.message))});return z(e,
185
- c,2)}pf(b.j);Qf(b);b.g.initData.length||b.F.length||(d=function(f){return Rf(b,f.initDataType,Ic(f.initData))},b.A.o(b.l,"encrypted",d));B(e)})};
186
- function Sf(a){var b,c,d,e,f;return M(function(g){switch(g.g){case 1:if(!a.B||!a.g)return g["return"]();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.D(2);break}b=gf([a.g.serverCertificateUri],a.h.retryParameters);E(g,3);c=a.G.Pb.request(5,b);return z(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Ic(d.data);va(g,4);break;case 3:throw e=I(g),new P(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"]();
187
- E(g,6);return z(g,a.B.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=I(g),new P(2,6,6004,f.message);}})}function Tf(a,b){var c,d,e;return M(function(f){if(1==f.g)return z(f,Uf(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 Pc,d.push(e.cb);d.push(c.remove());return z(f,Promise.all(d),3)}a.i["delete"](c);B(f)})}
182
+ function Hf(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,x;return M(function(y){if(1==y.g){if(c=Lf(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(w){return w.video&&w.video.drmInfos.length||w.audio&&w.audio.drmInfos.length?!0:!1});g||(h=yf(a.h.servers),Mf(b,h));k=r(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Nf(l),n=r(m),p=n.next();!p.done;p=n.next())t=p.value,Of(t,yf(a.h.servers),yf(a.h.advanced||{}));return A(y,
183
+ fe(b,a.K,a.W),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.Z=!0,y["return"](Promise.resolve());x=Kf(a,void 0,b);return y["return"](g?x:x["catch"](function(){}))})}
184
+ q.xc=function(a){var b=this,c,d;return M(function(e){if(1==e.g){if(!b.B)return b.A.Ga(a,"encrypted",function(){b.m(new P(2,6,6010))}),e["return"]();b.l=a;b.A.Ga(b.l,"play",function(){for(var f=r(b.J),g=f.next();!g.done;g=f.next())Pf(b,g.value);b.N=!0;b.J=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.A.o(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Ff(b)});c=b.l.setMediaKeys(b.B);c=c["catch"](function(f){return Promise.reject(new P(2,6,6003,f.message))});return A(e,
185
+ c,2)}pf(b.j);Qf(b);b.g.initData.length||b.F.length||(d=function(f){return Rf(b,f.initDataType,Ic(f.initData))},b.A.o(b.l,"encrypted",d));C(e)})};
186
+ function Sf(a){var b,c,d,e,f;return M(function(g){switch(g.g){case 1:if(!a.B||!a.g)return g["return"]();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.D(2);break}b=gf([a.g.serverCertificateUri],a.h.retryParameters);E(g,3);c=a.G.Qb.request(5,b);return A(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Ic(d.data);va(g,4);break;case 3:throw e=I(g),new P(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"]();
187
+ E(g,6);return A(g,a.B.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=I(g),new P(2,6,6004,f.message);}})}function Tf(a,b){var c,d,e;return M(function(f){if(1==f.g)return A(f,Uf(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 Pc,d.push(e.cb);d.push(c.remove());return A(f,Promise.all(d),3)}a.i["delete"](c);C(f)})}
188
188
  function Qf(a){for(var b=(a.g?a.g.initData:[])||[],c=r(b),d=c.next();!d.done;d=c.next())d=d.value,Rf(a,d.initDataType,d.initData);c=r(a.F);for(d=c.next();!d.done;d=c.next())Uf(a,d.value);b.length||a.F.length||a.C.resolve();return a.C}function Rf(a,b,c){var d=a.i.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(Gc(c,e.value.initData)&&!Xc("Tizen 2"))return;Vf(a,b,c,a.g.sessionType)}function Wf(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}
189
189
  function Xf(a){a=a.i.keys();a=db(a,function(b){return b.sessionId});return Array.from(a)}q.Cc=function(){var a=Infinity,b=this.i.keys();b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.dd=function(){return zf(this.$)};
190
- function Kf(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y;return M(function(w){switch(w.g){case 1:d=new Map;if(c.length){e=Yf(a,c,d);w.D(2);break}return z(w,Zf(a,b),3);case 3:e=w.h;case 2:f=e;if(!f)throw new P(2,6,6001);pf(a.j);E(w,4);a.H.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=r(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.H.add(n.contentType.toLowerCase());p=r(k);for(m=p.next();!m.done;m=p.next())t=m.value,a.H.add(t.contentType.toLowerCase());if(c.length){var x=
191
- f.keySystem;var D=d.get(f.keySystem);var C=[],A=[],F=[],G=[],H=new Set;$f(D,C,F,A,G,H);var K=a.K?"persistent-license":"temporary";x={keySystem:x,licenseServerUri:C[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||K,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:F[0],serverCertificateUri:A[0],initData:G,keyIds:H};D=r(D);for(C=D.next();!C.done;C=
192
- D.next())C=C.value,C.distinctiveIdentifierRequired&&(x.distinctiveIdentifierRequired=C.distinctiveIdentifierRequired),C.persistentStateRequired&&(x.persistentStateRequired=C.persistentStateRequired);D=x}else D=f.keySystem,x=b.get(f.keySystem),C=[],A=[],F=[],G=[],H=new Set,$f(x.drmInfos,C,F,A,G,H),D={keySystem:D,licenseServerUri:C[0],distinctiveIdentifierRequired:"required"==x.distinctiveIdentifier,persistentStateRequired:"required"==x.persistentState,sessionType:x.sessionTypes[0]||"temporary",audioRobustness:(x.audioCapabilities?
193
- x.audioCapabilities[0].robustness:"")||"",videoRobustness:(x.videoCapabilities?x.videoCapabilities[0].robustness:"")||"",serverCertificate:F[0],serverCertificateUri:A[0],initData:G,keyIds:H};a.g=D;if(!a.g.licenseServerUri)throw new P(2,6,6012,a.g.keySystem);return z(w,f.createMediaKeys(),6);case 6:return v=w.h,pf(a.j),a.B=v,a.Z=!0,z(w,Sf(a),7);case 7:pf(a.j);va(w,0);break;case 4:y=I(w);pf(a.j,y);a.g=null;a.H.clear();if(y instanceof P)throw y;throw new P(2,6,6002,y.message);}})}
190
+ function Kf(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,x;return M(function(y){switch(y.g){case 1:d=new Map;if(c.length){e=Yf(a,c,d);y.D(2);break}return A(y,Zf(a,b),3);case 3:e=y.h;case 2:f=e;if(!f)throw new P(2,6,6001);pf(a.j);E(y,4);a.H.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=r(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.H.add(n.contentType.toLowerCase());p=r(k);for(m=p.next();!m.done;m=p.next())t=m.value,a.H.add(t.contentType.toLowerCase());if(c.length){var w=
191
+ f.keySystem;var D=d.get(f.keySystem);var z=[],B=[],F=[],G=[],H=new Set;$f(D,z,F,B,G,H);var J=a.K?"persistent-license":"temporary";w={keySystem:w,licenseServerUri:z[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||J,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:F[0],serverCertificateUri:B[0],initData:G,keyIds:H};D=r(D);for(z=D.next();!z.done;z=
192
+ D.next())z=z.value,z.distinctiveIdentifierRequired&&(w.distinctiveIdentifierRequired=z.distinctiveIdentifierRequired),z.persistentStateRequired&&(w.persistentStateRequired=z.persistentStateRequired);D=w}else D=f.keySystem,w=b.get(f.keySystem),z=[],B=[],F=[],G=[],H=new Set,$f(w.drmInfos,z,F,B,G,H),D={keySystem:D,licenseServerUri:z[0],distinctiveIdentifierRequired:"required"==w.distinctiveIdentifier,persistentStateRequired:"required"==w.persistentState,sessionType:w.sessionTypes[0]||"temporary",audioRobustness:(w.audioCapabilities?
193
+ w.audioCapabilities[0].robustness:"")||"",videoRobustness:(w.videoCapabilities?w.videoCapabilities[0].robustness:"")||"",serverCertificate:F[0],serverCertificateUri:B[0],initData:G,keyIds:H};a.g=D;if(!a.g.licenseServerUri)throw new P(2,6,6012,a.g.keySystem);return A(y,f.createMediaKeys(),6);case 6:return v=y.h,pf(a.j),a.B=v,a.Z=!0,A(y,Sf(a),7);case 7:pf(a.j);va(y,0);break;case 4:x=I(y);pf(a.j,x);a.g=null;a.H.clear();if(x instanceof P)throw x;throw new P(2,6,6002,x.message);}})}
194
194
  function Yf(a,b,c){for(var d=r(b),e=d.next();!e.done;e=d.next()){var f=r(Nf(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new P(2,6,6E3);d={};a=r(a.h.preferredKeySystems);for(e=a.next();!e.done;d={Jd:d.Jd},e=a.next())for(d.Jd=e.value,f=r(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
195
195
  l.Jd}}(d)))return e.keySystemAccess;a=r([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=r(b),e=f.next();!e.done;e=f.next()){var g=r(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=r(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
196
- function Zf(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y,w;return M(function(x){switch(x.g){case 1:if(1==b.size&&b.has(""))throw new P(2,6,6E3);d=r(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=r(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){x.D(4);break}k=h.value;if(!b.has(k)){x.D(3);break}l=b.get(k);E(x,6);return z(x,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
197
- x.h,x["return"](c);case 6:I(x);case 7:pf(a.j);case 3:h=g.next();x.D(2);break;case 4:m=r([!0,!1]),n=m.next();case 9:if(n.done){x.D(11);break}p=n.value;t=r(b.keys());h=t.next();case 12:if(h.done){n=m.next();x.D(9);break}v=h.value;y=b.get(v);w=y.drmInfos.some(function(D){return!!D.licenseServerUri});if(w!=p){x.D(13);break}E(x,15);return z(x,navigator.requestMediaKeySystemAccess(v,[y]),17);case 17:return c=x.h,x["return"](c);case 15:I(x);case 16:pf(a.j);case 13:h=t.next();x.D(12);break;case 11:return x["return"](c)}})}
196
+ function Zf(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,x,y;return M(function(w){switch(w.g){case 1:if(1==b.size&&b.has(""))throw new P(2,6,6E3);d=r(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=r(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){w.D(4);break}k=h.value;if(!b.has(k)){w.D(3);break}l=b.get(k);E(w,6);return A(w,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
197
+ w.h,w["return"](c);case 6:I(w);case 7:pf(a.j);case 3:h=g.next();w.D(2);break;case 4:m=r([!0,!1]),n=m.next();case 9:if(n.done){w.D(11);break}p=n.value;t=r(b.keys());h=t.next();case 12:if(h.done){n=m.next();w.D(9);break}v=h.value;x=b.get(v);y=x.drmInfos.some(function(D){return!!D.licenseServerUri});if(y!=p){w.D(13);break}E(w,15);return A(w,navigator.requestMediaKeySystemAccess(v,[x]),17);case 17:return c=w.h,w["return"](c);case 15:I(w);case 16:pf(a.j);case 13:h=t.next();w.D(12);break;case 11:return w["return"](c)}})}
198
198
  function Lf(a){a=yf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=qd(f),h=qd(e);g={kty:"oct",kid:od(g,!1),k:od(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Ic(kd(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
199
199
  serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
200
- function Uf(a,b){var c,d,e,f,g;return M(function(h){switch(h.g){case 1:try{c=a.B.createSession("persistent-license")}catch(k){return d=new P(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.A.o(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.J.push(k):Pf(a,k)});a.A.o(c,"keystatuseschange",function(k){return ag(a,k)});e={initData:null,loaded:!1,ee:Infinity,cb:null,type:"persistent-license"};a.i.set(c,e);E(h,2);return z(h,c.load(b),4);case 4:f=h.h;pf(a.j);
200
+ function Uf(a,b){var c,d,e,f,g;return M(function(h){switch(h.g){case 1:try{c=a.B.createSession("persistent-license")}catch(k){return d=new P(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.A.o(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.J.push(k):Pf(a,k)});a.A.o(c,"keystatuseschange",function(k){return ag(a,k)});e={initData:null,loaded:!1,ee:Infinity,cb:null,type:"persistent-license"};a.i.set(c,e);E(h,2);return A(h,c.load(b),4);case 4:f=h.h;pf(a.j);
201
201
  if(!f)return a.i["delete"](c),a.m(new P(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;bg(a)&&a.C.resolve();return h["return"](c);case 2:g=I(h),pf(a.j,g),a.i["delete"](c),a.m(new P(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
202
202
  function Vf(a,b,c,d){try{var e=a.B.createSession(d)}catch(f){a.m(new P(2,6,6005,f.message));return}a.A.o(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.J.push(f):Pf(a,f)});a.A.o(e,"keystatuseschange",function(f){return ag(a,f)});a.i.set(e,{initData:c,loaded:!1,ee:Infinity,cb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof P||(b=new P(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&od(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
203
203
  var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.m(new P(2,6,6006,f.message,f,h))}})}function cg(a,b,c){"skd"==b&&(b=c.serverCertificate,c=wf(a),a=xf(a,c,b));return a}
204
- function Pf(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y;M(function(w){switch(w.g){case 1:return c=b.target,a.h.logLicenseExchange&&od(b.message),d=a.i.get(c),e=a.g.licenseServerUri,f=a.h.advanced[a.g.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=gf([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,Wf(a.g.keySystem)&&dg(g),h=Date.now(),E(w,2),l=a.G.Pb.request(2,g),z(w,
205
- l.promise,4);case 4:k=w.h;va(w,3);break;case 2:return m=I(w),n=new P(2,6,6007,m),a.m(n),d&&d.cb&&d.cb.reject(n),w["return"]();case 3:if(a.j.g)return w["return"]();a.I+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&od(k.data);E(w,5);return z(w,c.update(k.data),7);case 7:va(w,6);break;case 5:return p=I(w),t=new P(2,6,6008,p.message),a.m(t),d&&d.cb&&d.cb.reject(t),w["return"]();case 6:if(a.j.g)return w["return"]();v=new O("drmsessionupdate");a.G.onEvent(v);d&&(d.cb&&d.cb.resolve(),y=new Q(function(){d.loaded=
206
- !0;bg(a)&&a.C.resolve()}),y.S(eg));B(w)}})}function dg(a){var b=hd(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=r(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=pd(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
204
+ function Pf(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,x;M(function(y){switch(y.g){case 1:return c=b.target,a.h.logLicenseExchange&&od(b.message),d=a.i.get(c),e=a.g.licenseServerUri,f=a.h.advanced[a.g.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=gf([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,Wf(a.g.keySystem)&&dg(g),h=Date.now(),E(y,2),l=a.G.Qb.request(2,g),A(y,
205
+ l.promise,4);case 4:k=y.h;va(y,3);break;case 2:return m=I(y),n=new P(2,6,6007,m),a.m(n),d&&d.cb&&d.cb.reject(n),y["return"]();case 3:if(a.j.g)return y["return"]();a.I+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&od(k.data);E(y,5);return A(y,c.update(k.data),7);case 7:va(y,6);break;case 5:return p=I(y),t=new P(2,6,6008,p.message),a.m(t),d&&d.cb&&d.cb.reject(t),y["return"]();case 6:if(a.j.g)return y["return"]();v=new O("drmsessionupdate");a.G.onEvent(v);d&&(d.cb&&d.cb.resolve(),x=new Q(function(){d.loaded=
206
+ !0;bg(a)&&a.C.resolve()}),x.S(eg));C(y)}})}function dg(a){var b=hd(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=r(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=pd(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
207
207
  function ag(a,b){var c=b.target,d=a.i.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(Wf(a.g.keySystem)&&16==h.byteLength&&(navigator.userAgent.match(/Edge?\//)||bd())){k=Lc(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=rd(h);a.ba.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.cb&&(a.i["delete"](c),c.close()["catch"](function(){}));
208
208
  bg(a)&&(a.C.resolve(),a.R.S(fg))}function Cf(a){var b=a.ba,c=a.$;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new P(2,6,6014));a.G.qd(zf(c))}
209
209
  function gg(){var a,b,c,d,e,f,g,h;return M(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,
210
- c],f=new Map,g=function(l){var m,n,p;return M(function(t){switch(t.g){case 1:return E(t,2),z(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,Xc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),z(t,m.createMediaKeys(),5);case 5:va(t,0);break;case 2:I(t),f.set(l,null),B(t)}})},h=a.map(function(l){return g(l)}),z(k,Promise.all(h),2)):k["return"](zf(f))})}
211
- function hg(a){var b;return M(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Q(e)).S(ig)}),E(c,2),z(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);I(c);B(c)})}
212
- function Ff(a){var b;return M(function(c){b=Array.from(a.i.entries());a.i.clear();return z(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return M(function(g){if(1==g.g)return E(g,2),a.aa||a.F.includes(e.sessionId)||"persistent-license"!==f.type?z(g,hg(e),5):z(g,e.remove(),5);if(2!=g.g)return va(g,0);I(g);B(g)})})),0)})}
213
- function kg(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=r(b),h=g.next();!h.done;f={Ta:f.Ta},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Ta=[];f.Ta=f.Ta.concat(e.initData||[]);f.Ta=f.Ta.concat(h.initData||[]);f.Ta=f.Ta.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Ta.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ia(e.keyIds),ia(h.keyIds))):
210
+ c],f=new Map,g=function(l){var m,n,p;return M(function(t){switch(t.g){case 1:return E(t,2),A(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,Xc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),A(t,m.createMediaKeys(),5);case 5:va(t,0);break;case 2:I(t),f.set(l,null),C(t)}})},h=a.map(function(l){return g(l)}),A(k,Promise.all(h),2)):k["return"](zf(f))})}
211
+ function hg(a){var b;return M(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Q(e)).S(ig)}),E(c,2),A(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);I(c);C(c)})}
212
+ function Ff(a){var b;return M(function(c){b=Array.from(a.i.entries());a.i.clear();return A(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return M(function(g){if(1==g.g)return E(g,2),a.aa||a.F.includes(e.sessionId)||"persistent-license"!==f.type?A(g,hg(e),5):A(g,e.remove(),5);if(2!=g.g)return va(g,0);I(g);C(g)})})),0)})}
213
+ function jg(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=r(b),h=g.next();!h.done;f={Ua:f.Ua},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Ua=[];f.Ua=f.Ua.concat(e.initData||[]);f.Ua=f.Ua.concat(h.initData||[]);f.Ua=f.Ua.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Ua.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ia(e.keyIds),ia(h.keyIds))):
214
214
  e.keyIds||h.keyIds;c.push({keySystem:e.keySystem,licenseServerUri:e.licenseServerUri||h.licenseServerUri,distinctiveIdentifierRequired:e.distinctiveIdentifierRequired||h.distinctiveIdentifierRequired,persistentStateRequired:e.persistentStateRequired||h.persistentStateRequired,videoRobustness:e.videoRobustness||h.videoRobustness,audioRobustness:e.audioRobustness||h.audioRobustness,serverCertificate:e.serverCertificate||h.serverCertificate,serverCertificateUri:e.serverCertificateUri||h.serverCertificateUri,
215
- initData:f.Ta,keyIds:g});break}}return c}function Nf(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Df(a){a.i.forEach(function(b,c){var d=b.ee,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.ee=e)})}function bg(a){a=a.i.values();return eb(a,function(b){return b.loaded})}
215
+ initData:f.Ua,keyIds:g});break}}return c}function Nf(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Df(a){a.i.forEach(function(b,c){var d=b.ee,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.ee=e)})}function bg(a){a=a.i.values();return eb(a,function(b){return b.loaded})}
216
216
  function Mf(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});for(var d=r(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
217
217
  function $f(a,b,c,d,e,f){var g={};a=r(a);for(var h=a.next();!h.done;g={Ja:g.Ja},h=a.next()){g.Ja=h.value;b.includes(g.Ja.licenseServerUri)||b.push(g.Ja.licenseServerUri);d.includes(g.Ja.serverCertificateUri)||d.push(g.Ja.serverCertificateUri);g.Ja.serverCertificate&&(c.some(function(m){return function(n){return Gc(n,m.Ja.serverCertificate)}}(g))||c.push(g.Ja.serverCertificate));if(g.Ja.initData){h={};for(var k=r(g.Ja.initData),l=k.next();!l.done;h={Sc:h.Sc},l=k.next())h.Sc=l.value,e.some(function(m){return function(n){var p=
218
218
  m.Sc;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Gc(n.initData,p.initData)}}(h))||e.push(h.Sc)}if(g.Ja.keyIds)for(h=r(g.Ja.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
219
219
  function Of(a,b,c){if(a.keySystem&&("org.w3.clearkey"!=a.keySystem||!a.licenseServerUri)){b.size&&(b=b.get(a.keySystem)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(a.keySystem))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||
220
- (a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var ig=1,eg=5,fg=.5,lg=new Qc(function(){return Jc(new Uint8Array([0]))});function mg(){}function ng(a,b,c,d){var e,f,g,h;return M(function(k){if(1==k.g){if(d&&(e=og[d.toLowerCase()]))return k["return"](e);if(f=pg(a))if(g=qg[f])return k["return"](g);return d?k.D(2):z(k,rg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=og[d]))return k["return"](h);throw new P(2,4,4E3,a);})}
221
- function rg(a,b,c){var d,e,f;return M(function(g){if(1==g.g)return d=gf([a],c),d.method="HEAD",z(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function pg(a){a=(new jb(a)).Na.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}N("shaka.media.ManifestParser",mg);mg.unregisterParserByMime=function(a){delete og[a]};mg.registerParserByMime=function(a,b){og[a]=b};
220
+ (a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var ig=1,eg=5,fg=.5,lg=new Qc(function(){return Jc(new Uint8Array([0]))});function mg(){}function ng(a,b,c,d){var e,f,g,h;return M(function(k){if(1==k.g){if(d&&(e=og[d.toLowerCase()]))return k["return"](e);if(f=pg(a))if(g=qg[f])return k["return"](g);return d?k.D(2):A(k,rg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=og[d]))return k["return"](h);throw new P(2,4,4E3,a);})}
221
+ function rg(a,b,c){var d,e,f;return M(function(g){if(1==g.g)return d=gf([a],c),d.method="HEAD",A(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function pg(a){a=(new jb(a)).Na.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}N("shaka.media.ManifestParser",mg);mg.unregisterParserByMime=function(a){delete og[a]};mg.registerParserByMime=function(a,b){og[a]=b};
222
222
  mg.registerParserByExtension=function(a,b){qg[a]=b};var og={},qg={};function sg(a,b){this.U=Lc(a);this.h=b==tg;this.g=0}q=sg.prototype;q.Ea=function(){return this.g<this.U.byteLength};q.ia=function(){return this.g};q.gg=function(){return this.U.byteLength};q.ka=function(){try{var a=this.U.getUint8(this.g);this.g+=1;return a}catch(b){throw ug();}};q.kc=function(){try{var a=this.U.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw ug();}};q.P=function(){try{var a=this.U.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw ug();}};
223
223
  q.qf=function(){try{var a=this.U.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw ug();}};q.lc=function(){try{if(this.h){var a=this.U.getUint32(this.g,!0);var b=this.U.getUint32(this.g+4,!0)}else b=this.U.getUint32(this.g,!1),a=this.U.getUint32(this.g+4,!1)}catch(c){throw ug();}if(2097151<b)throw new P(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.Cb=function(a){if(this.g+a>this.U.byteLength)throw ug();var b=Ic(this.U,this.g,a);this.g+=a;return b};
224
224
  q.skip=function(a){if(this.g+a>this.U.byteLength)throw ug();this.g+=a};q.tf=function(a){if(this.g<a)throw ug();this.g-=a};q.seek=function(a){if(0>a||a>this.U.byteLength)throw ug();this.g=a};q.Lc=function(){for(var a=this.g;this.Ea()&&0!=this.U.getUint8(this.g);)this.g+=1;a=Ic(this.U,a,this.g-a);this.g+=1;return gd(a)};function ug(){return new P(2,3,3E3)}N("shaka.util.DataViewReader",sg);sg.prototype.readTerminatedString=sg.prototype.Lc;sg.prototype.seek=sg.prototype.seek;sg.prototype.rewind=sg.prototype.tf;
@@ -229,10 +229,10 @@ function wg(a){var b=0;a=r(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.val
229
229
  vg.prototype.fullBox=vg.prototype.X;vg.prototype.box=vg.prototype.box;var xg=0,yg=1;function Eg(a){function b(){d=!0}function c(l){f.push(l);zg(l)}a=Ic(a);var d=!1,e,f=[],g=[];(new vg).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).X("stsd",function(l){e=l;f.push(l);Bg(l)}).X("encv",b).X("enca",b).X("avc1",function(l){g.push({box:l,Jc:1701733238})}).X("avc3",function(l){g.push({box:l,Jc:1701733238})}).X("ac-3",function(l){g.push({box:l,Jc:1701733217})}).X("ec-3",function(l){g.push({box:l,Jc:1701733217})}).X("mp4a",function(l){g.push({box:l,Jc:1701733217})}).parse(a);
230
230
  if(d)return a;if(0==g.length||!e)throw Ya(rd(a)),new P(2,3,3019);g.reverse();for(var h=r(g),k=h.next();!k.done;k=h.next())k=k.value,a=Fg(a,e,k.box,f,k.Jc);return a}
231
231
  function Fg(a,b,c,d,e){var f=Gg.value(),g=a.subarray(c.start,c.start+c.size),h=Lc(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Lc(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Hg(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Wc()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=r(d);for(d=a.next();!d.done;d=a.next())d=d.value,Hg(e,d.start,d.size+k.byteLength);k=Lc(e,b.start);b=Ag(b);a=k.getUint32(b);
232
- k.setUint32(b,a+1);return e}function Hg(a,b,c){a=Lc(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var Gg=new Qc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Ig(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Jg(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],t=-1,v=-1,y=0;y<p.length;y++)if(null!=p[y]&&""!==p[y].g.trim()){t=y;break}for(y=p.length-1;0<=y;y--)if(null!=p[y]&&""!==p[y].g.trim()){v=y;break}if(-1===
233
- t||-1===v)p=Kg(d,e),a.nestedCues.push(p);else{for(;t<=v;t++)if(y=p[t]){var w=y.l,x=y.i,D=y.j,C=y.h;if(w!=h||x!=k||D!=l||C!=m)n.payload&&a.nestedCues.push(n),n=Jg(d,e,w,x,D,C),h=w,k=x,l=D,m=C;n.payload+=y.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Kg(d,e),a.nestedCues.push(n));n=Jg(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
232
+ k.setUint32(b,a+1);return e}function Hg(a,b,c){a=Lc(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var Gg=new Qc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Ig(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Jg(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],t=-1,v=-1,x=0;x<p.length;x++)if(null!=p[x]&&""!==p[x].g.trim()){t=x;break}for(x=p.length-1;0<=x;x--)if(null!=p[x]&&""!==p[x].g.trim()){v=x;break}if(-1===
233
+ t||-1===v)p=Kg(d,e),a.nestedCues.push(p);else{for(;t<=v;t++)if(x=p[t]){var y=x.l,w=x.i,D=x.j,z=x.h;if(y!=h||w!=k||D!=l||z!=m)n.payload&&a.nestedCues.push(n),n=Jg(d,e,y,w,D,z),h=y,k=w,l=D,m=z;n.payload+=x.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Kg(d,e),a.nestedCues.push(n));n=Jg(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
234
234
  function Jg(a,b,c,d,e,f){a=new lc(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Kg(a,b){var c=new lc(a,b,"");c.lineBreak=!0;return c}function Lg(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Mg(a,b){this.i=[];this.g=1;this.h=0;this.C=a;this.B=b;this.j=this.m=!1;this.l="white";this.A="black";Ng(this)}function Og(a,b,c){return Ig(new lc(b,c,""),"CC"+(a.C<<1|a.B+1),a.i,b,c)}function Ng(a){Pg(a,0,15);a.g=1}function Qg(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case Rg:d=Sg.has(c)?Sg.get(c):String.fromCharCode(c);break;case Tg:d=Ug.get(c);break;case Vg:a.i[a.g].pop();d=Wg.get(c);break;case Xg:a.i[a.g].pop(),d=Yg.get(c)}d&&a.i[a.g].push(new Lg(d,a.m,a.j,a.A,a.l))}}
235
- function Zg(a,b,c,d){if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Pg(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
235
+ function Zg(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Pg(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
236
236
  var Rg=0,Tg=1,Vg=2,Xg=3,Sg=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),Ug=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57,"\u2800"],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),Wg=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
237
237
  [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"]]),Yg=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
238
238
  [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 $g(a,b){this.h=ah;this.A=new Mg(a,b);this.i=new Mg(a,b);this.l=new Mg(a,b);this.g=this.i;this.j=0;this.m=null}function bh(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==ch&&a.h!==dh&&(e=Og(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,Pg(c,0,15),c=a.l,c.g=0<c.h?c.h:0,Pg(c,0,15),d.g=15);a.h=ch;d.h=b;return e}function eh(a){a.h=fh;a.g=a.l;a.g.h=0}function gh(a){Ta("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.A;a.h=dh}
@@ -248,35 +248,35 @@ function Hh(a,b){var c=b.type;if(16===(b.Qa&112)){var d=b.Qa>>3&1;0===c?a.m=d:a.
248
248
  d=1===(d&1);if(c.h!==dh){f=c.g;if(c.h===ch&&e!==f.g){var k=1+e-f.h;Zg(f,k,1+f.g-f.h,f.h);Pg(f,0,k-1);Pg(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.A="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Qg(c.g,Rg,32),g=!1,e=ih[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.m=1===(d&1),c.g.j=g,c.g.l=e;else if(16===(e&247)&&32===(d&240)||23===(e&247)&&45===(d&255))g="black",0===(e&7)&&(g=hh[(d&14)>>1]),c.g.A=g;else if(17===(e&247)&&48===(d&240))Qg(c.g,Tg,d);else if(18===
249
249
  (e&246)&&32===(d&224))Qg(c.g,e&1?Xg:Vg,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.kb){case 32:eh(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=bh(c,2,d);break;case 38:e=bh(c,3,d);break;case 39:e=bh(c,4,d);break;case 40:Qg(c.g,Rg,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:Ng(c.A);gh(c);break;case 43:gh(c);break;case 44:e=c.i;g=null;c.h!==dh&&(g=Og(e,c.j,d));Pg(e,0,15);e=g;break;case 45:e=c.g;c.h!==ch?e=null:(g=Og(e,c.j,d),h=e.g-e.h+1,Zg(e,h-1,h,e.h),Pg(e,
250
250
  0,h-1),Pg(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Pg(c.l,0,15);break;case 47:e=null,c.h!==dh&&(e=Og(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,eh(c),c.j=d}d=e;break a}d=null}else e=b.kb,Qg(c.g,Rg,b.Qa),Qg(c.g,Rg,e);return d}
251
- function Ih(a,b){var c=[];try{for(;b.Ea();){var d=vh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=vh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new wh(e));for(var g=a.j.get(e),h=b.ia();b.ia()-h<f;){e=b;var k=vh(e),l=k.value,m=k.pts;if(16===l){var n=vh(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!oh(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=ph(t,p,g.i));if(t.h+1>=t.H){p=t;for(var v=0,y=1;15>y;y++,
252
- v++)p.i[v]=p.i[y];for(y=0;1>y;y++,v++)p.i[v]=mh()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=ph(t,p,g.i));t.i[t.h]=mh();t.g=0;break;case 12:t.isVisible()&&(e=ph(t,p,g.i)),lh(t),p=t,p.h=0,p.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=xh(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?nh(g.g,"\u266a"):nh(g.g,
253
- String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&nh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Dh.has(e)){var x=Dh.get(e);nh(g.g,x)}else nh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?nh(g.g,"_"):nh(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(D){if(D instanceof P&&3E3===D.code)Ta("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function Jh(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Kh(a,b){var c=null,d=null,e=a.P();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.P());b&16&&(d=a.P());return{trackId:e,We:c,Rf:d}}function Lh(a,b){return{Rd:1==b?a.lc():a.P()}}function Mh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.P()}}
251
+ function Ih(a,b){var c=[];try{for(;b.Ea();){var d=vh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=vh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new wh(e));for(var g=a.j.get(e),h=b.ia();b.ia()-h<f;){e=b;var k=vh(e),l=k.value,m=k.pts;if(16===l){var n=vh(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!oh(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=ph(t,p,g.i));if(t.h+1>=t.H){p=t;for(var v=0,x=1;15>x;x++,
252
+ v++)p.i[v]=p.i[x];for(x=0;1>x;x++,v++)p.i[v]=mh()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=ph(t,p,g.i));t.i[t.h]=mh();t.g=0;break;case 12:t.isVisible()&&(e=ph(t,p,g.i)),lh(t),p=t,p.h=0,p.g=0}var y=e}else y=null}else if(128<=l&&159>=l)y=xh(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?nh(g.g,"\u266a"):nh(g.g,
253
+ String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&nh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Dh.has(e)){var w=Dh.get(e);nh(g.g,w)}else nh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?nh(g.g,"_"):nh(g.g,"[CC]"));y=null}(e=y)&&c.push(e)}}}}catch(D){if(D instanceof P&&3E3===D.code)Ta("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function Jh(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Kh(a,b){var c=null,d=null,e=a.P();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.P());b&16&&(d=a.P());return{trackId:e,We:c,Rf:d}}function Lh(a,b){return{Rd:1==b?a.lc():a.P()}}function Mh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.P()}}
254
254
  function Nh(a,b,c){var d=a.P(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={me:null,sampleSize:null,vd:null};c&256&&(g.me=a.P());c&512&&(g.sampleSize=a.P());c&1024&&a.skip(4);c&2048&&(g.vd=0==b?a.P():a.qf());e.push(g)}return{Ki:d,uf:e}};function Oh(){this.i=new Map;this.h=this.g=0}
255
255
  Oh.prototype.init=function(a){var b=this,c=[],d=[];(new vg).box("moov",zg).box("mvex",zg).X("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.P();f=f.P();b.g=e;b.h=f}).box("trak",zg).X("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.P();c.push(e)}).box("mdia",zg).X("mdhd",function(e){e=Mh(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new P(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
256
- Oh.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new vg).box("moof",zg).box("traf",zg).X("trun",function(k){f=Nh(k.reader,k.version,k.flags).uf}).X("tfhd",function(k){k=Kh(k.reader,k.flags);d=k.We||b.g;e=k.Rf||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).X("tfdt",function(k){g=Lh(k.reader,k.version).Rd}).box("mdat",function(k){if(null===g)throw new P(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,t=f,v=0,y=p;for(t.length&&(y=t[0].sampleSize||p);k.Ea();){var w=k.P();if(6==
257
- (k.ka()&31)){var x=0;t.length>v&&(x=t[v].vd||0);x=(l+x)/m;for(var D=[],C,A=k.Cb(w-1),F=C=0;F<A.length;)2==C&&3==A[F]?(C=0,A=[].concat(ia(A)),A.splice(F,1),A=new Uint8Array(A)):0==A[F]?C++:C=0,F++;C=A;for(F=0;F<C.length;){for(A=0;255==C[F];)A+=255,F++;A+=C[F++];for(var G=0;255==C[F];)G+=255,F++;G+=C[F++];4==A&&D.push(C.subarray(F,F+G));F+=G}D=r(D);for(C=D.next();!C.done;C=D.next())c.push({Ng:C.value,pts:x})}else try{k.skip(w-1)}catch(H){break}y-=w+4;0==y&&(l=t.length>v?l+(t[v].me||n):l+n,v++,y=t.length>
256
+ Oh.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new vg).box("moof",zg).box("traf",zg).X("trun",function(k){f=Nh(k.reader,k.version,k.flags).uf}).X("tfhd",function(k){k=Kh(k.reader,k.flags);d=k.We||b.g;e=k.Rf||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).X("tfdt",function(k){g=Lh(k.reader,k.version).Rd}).box("mdat",function(k){if(null===g)throw new P(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,t=f,v=0,x=p;for(t.length&&(x=t[0].sampleSize||p);k.Ea();){var y=k.P();if(6==
257
+ (k.ka()&31)){var w=0;t.length>v&&(w=t[v].vd||0);w=(l+w)/m;for(var D=[],z,B=k.Cb(y-1),F=z=0;F<B.length;)2==z&&3==B[F]?(z=0,B=[].concat(ia(B)),B.splice(F,1),B=new Uint8Array(B)):0==B[F]?z++:z=0,F++;z=B;for(F=0;F<z.length;){for(B=0;255==z[F];)B+=255,F++;B+=z[F++];for(var G=0;255==z[F];)G+=255,F++;G+=z[F++];4==B&&D.push(z.subarray(F,F+G));F+=G}D=r(D);for(z=D.next();!z.done;z=D.next())c.push({Ng:z.value,pts:w})}else try{k.skip(y-1)}catch(H){break}x-=y+4;0==x&&(l=t.length>v?l+(t[v].me||n):l+n,v++,x=t.length>
258
258
  v?t[v].sampleSize||p:p)}}).parse(a,!1);return c};function Ph(){this.h=new Oh;this.g=new Eh}Ph.prototype.init=function(a){this.h.init(a)};
259
259
  function Qh(a,b){var c=a.h.parse(b);c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Ic(e.Ng);if(0<f.length&&(d=a.g,e=e.pts,f=new sg(f,0),181===f.ka()&&49===f.kc()&&1195456820===f.P()&&3===f.ka())){var g=f.ka();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.ka(),l=(k&4)>>2,m=f.ka(),n=f.ka();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,Qa:m,kb:n,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:n,order:d.g.length})))}}}}return Gh(a.g)}
260
260
  ;function Rh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Sh(a,b,c){c=void 0===c?0:c;return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b+c>=a.start(0)}function Th(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=r(Uh(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}
261
261
  function Vh(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Uh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Uh(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function Wh(a,b,c,d){var e=this;this.j=a;this.l=c;this.h={};this.J={};this.I={};this.g=null;this.K=d||function(){};this.i={};this.A=new qf;this.B={};this.C=b;this.G=new Pc;this.m=Xh(this,this.G);this.F=new of(function(){return Yh(e)});this.H=""}function Xh(a,b){var c=new MediaSource;a.A.Ga(c,"sourceopen",function(){URL.revokeObjectURL(a.H);b.resolve()});a.H=Zh(c);a.j.src=a.H;return c}q=Wh.prototype;q.destroy=function(){return this.F.destroy()};
262
- function Yh(a){var b,c,d,e,f,g,h,k;return M(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"](Eb)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new P(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.l&&b.push(a.l.destroy());for(k in a.B)b.push(a.B[k].destroy());return z(l,Promise.all(b),2)}a.A&&(a.A.release(),a.A=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.m=null;a.g=null;a.l=null;a.h={};a.B={};a.C=null;a.i=
263
- {};B(l)})}
264
- q.init=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){if(1==m.g)return d=Nb,z(m,c.G,2);e={};f=r(a.keys());for(g=f.next();!g.done;e={Ia:e.Ia},g=f.next())e.Ia=g.value,h=a.get(e.Ia),k=yd(h.mimeType,h.codecs),e.Ia==d.oa?$h(c,k):(!b&&MediaSource.isTypeSupported(k)||!ud(k,e.Ia)||(c.B[e.Ia]=new td,k=wd(e.Ia,k)),l=c.m.addSourceBuffer(k),c.A.o(l,"error",function(n){return function(){c.i[n.Ia][0].p.reject(new P(2,3,3014,c.j.error?c.j.error.code:0))}}(e)),c.A.o(l,"updateend",function(n){return function(){return ai(c,n.Ia)}}(e)),
265
- c.h[e.Ia]=l,c.J[e.Ia]=k,c.i[e.Ia]=[],c.I[e.Ia]=!!h.drmInfos.length);B(m)})};function $h(a,b){a.g||(a.g=new Ed(a.l));"application/cea-608"!=b&&"application/cea-708"!=b&&(a.g.l=Gb(Gd[b]))}function bi(a){return a.m?"ended"==a.m.readyState:!0}function ci(a,b){if(b==Mb)var c=a.g.g;else c=di(a,b),c=!c||1==c.length&&1E-6>c.end(0)-c.start(0)?null:1==c.length&&0>c.start(0)?0:c.length?c.start(0):null;return c}function ei(a,b){return b==Mb?a.g.h:Rh(di(a,b))}
262
+ function Yh(a){var b,c,d,e,f,g,h,k;return M(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"](Eb)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new P(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.l&&b.push(a.l.destroy());for(k in a.B)b.push(a.B[k].destroy());return A(l,Promise.all(b),2)}a.A&&(a.A.release(),a.A=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.m=null;a.g=null;a.l=null;a.h={};a.B={};a.C=null;a.i=
263
+ {};C(l)})}
264
+ q.init=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){if(1==m.g)return d=Nb,A(m,c.G,2);e={};f=r(a.keys());for(g=f.next();!g.done;e={Ia:e.Ia},g=f.next())e.Ia=g.value,h=a.get(e.Ia),k=yd(h.mimeType,h.codecs),e.Ia==d.oa?$h(c,k):(!b&&MediaSource.isTypeSupported(k)||!ud(k,e.Ia)||(c.B[e.Ia]=new td,k=wd(e.Ia,k)),l=c.m.addSourceBuffer(k),c.A.o(l,"error",function(n){return function(){c.i[n.Ia][0].p.reject(new P(2,3,3014,c.j.error?c.j.error.code:0))}}(e)),c.A.o(l,"updateend",function(n){return function(){return ai(c,n.Ia)}}(e)),
265
+ c.h[e.Ia]=l,c.J[e.Ia]=k,c.i[e.Ia]=[],c.I[e.Ia]=!!h.drmInfos.length);C(m)})};function $h(a,b){a.g||(a.g=new Ed(a.l));"application/cea-608"!=b&&"application/cea-708"!=b&&(a.g.l=Gb(Gd[b]))}function bi(a){return a.m?"ended"==a.m.readyState:!0}function ci(a,b){if(b==Mb)var c=a.g.g;else c=di(a,b),c=!c||1==c.length&&1E-6>c.end(0)-c.start(0)?null:1==c.length&&0>c.start(0)?0:c.length?c.start(0):null;return c}function ei(a,b){return b==Mb?a.g.h:Rh(di(a,b))}
266
266
  function fi(a,b,c){if(b==Mb)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=di(a,b);return Th(a,c)}q.zb=function(){var a={total:Uh(this.j.buffered),audio:Uh(di(this,"audio")),video:Uh(di(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 di(a,b){try{return a.h[b].buffered}catch(c){return null}}
267
- function gi(a,b,c,d,e,f){var g,h,k,l,m,n,p,t;return M(function(v){if(1==v.g){g=Nb;if(b==g.oa)return z(v,Hd(a.g,c,d,e),0);if(a.B[b])return z(v,xd(a.B[b],c),10);if(f)return a.g||$h(a,"text/vtt"),null==d&&null==e?a.C.init(c):(h=Qh(a.C,c),h.length&&(k=a.h[g.gb].timestampOffset,Md(a.g,h,d,e,k))),c=hi(a,c,d,b),z(v,ii(a,b,function(){a.h[b].appendBuffer(c)}),0);c=hi(a,c,d,b);return z(v,ii(a,b,function(){a.h[b].appendBuffer(c)}),0)}l=v.h;a.g||$h(a,"text/vtt");l.metadata&&(m=a.h[b].timestampOffset,a.K(l.metadata,
268
- m,e));l.captions&&l.captions.length&&(n=a.h[g.gb].timestampOffset,p=Kd(l.captions),Md(a.g,p,d,e,n));t=l.data;t=hi(a,t,d,b);return z(v,ii(a,b,function(){a.h[b].appendBuffer(t)}),0)})}function ji(a,b){var c=ei(a,"video")||0;Jd(a.g,b,c)}function ki(a){a.g&&Jd(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return M(function(f){e=Nb;return a==e.oa?z(f,d.g.remove(b,c),0):z(f,ii(d,a,function(){c<=b?ai(d,a):d.h[a].remove(b,c)}),0)})};
269
- function li(a,b){var c;return M(function(d){c=Nb;return b==c.oa?a.g?z(d,a.g.remove(0,Infinity),0):d["return"]():z(d,ii(a,b,function(){var e=a.m.duration;0>=e?ai(a,b):a.h[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return M(function(d){c=Nb;return a==c.oa?d["return"]():z(d,ii(b,a,function(){b.j.currentTime-=.001;ai(b,a)}),0)})};
270
- function mi(a,b,c,d,e){var f;return M(function(g){f=Nb;return b==f.oa?(a.g.C=c,Id(a.g,d,e),g["return"]()):z(g,Promise.all([ii(a,b,function(){var h=a.h[b].appendWindowStart,k=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=h;a.h[b].appendWindowEnd=k;ai(a,b)}),ii(a,b,function(){var h=c;0>h&&(h+=.001);a.h[b].timestampOffset=h;ai(a,b)}),ii(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;ai(a,b)})]),0)})}
271
- q.endOfStream=function(a){var b=this;return M(function(c){return z(c,ni(b,function(){bi(b)||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};q.bb=function(a){var b=this;return M(function(c){return z(c,ni(b,function(){b.m.duration=a}),0)})};q.getDuration=function(){return this.m.duration};function ai(a,b){var c=a.i[b][0];c&&(c.p.resolve(),oi(a,b))}function ii(a,b,c){pf(a.F);c={start:c,p:new Pc};a.i[b].push(c);1==a.i[b].length&&pi(a,b);return c.p}
272
- function ni(a,b){var c,d,e,f,g,h;return M(function(k){switch(k.g){case 1:pf(a.F);c=[];d={};for(e in a.h)d.tc=new Pc,f={start:function(l){return function(){return l.tc.resolve()}}(d),p:d.tc},a.i[e].push(f),c.push(d.tc),1==a.i[e].length&&f.start(),d={tc:d.tc};E(k,2);return z(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=I(k),g;case 3:try{b()}catch(l){throw new P(2,3,3015,l);}finally{for(h in a.h)oi(a,h)}B(k)}})}function oi(a,b){a.i[b].shift();pi(a,b)}
267
+ function gi(a,b,c,d,e,f){var g,h,k,l,m,n,p,t;return M(function(v){if(1==v.g){g=Nb;if(b==g.oa)return A(v,Hd(a.g,c,d,e),0);if(a.B[b])return A(v,xd(a.B[b],c),10);if(f)return a.g||$h(a,"text/vtt"),null==d&&null==e?a.C.init(c):(h=Qh(a.C,c),h.length&&(k=a.h[g.gb].timestampOffset,Md(a.g,h,d,e,k))),c=hi(a,c,d,b),A(v,ii(a,b,function(){a.h[b].appendBuffer(c)}),0);c=hi(a,c,d,b);return A(v,ii(a,b,function(){a.h[b].appendBuffer(c)}),0)}l=v.h;a.g||$h(a,"text/vtt");l.metadata&&(m=a.h[b].timestampOffset,a.K(l.metadata,
268
+ m,e));l.captions&&l.captions.length&&(n=a.h[g.gb].timestampOffset,p=Kd(l.captions),Md(a.g,p,d,e,n));t=l.data;t=hi(a,t,d,b);return A(v,ii(a,b,function(){a.h[b].appendBuffer(t)}),0)})}function ji(a,b){var c=ei(a,"video")||0;Jd(a.g,b,c)}function ki(a){a.g&&Jd(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return M(function(f){e=Nb;return a==e.oa?A(f,d.g.remove(b,c),0):A(f,ii(d,a,function(){c<=b?ai(d,a):d.h[a].remove(b,c)}),0)})};
269
+ function li(a,b){var c;return M(function(d){c=Nb;return b==c.oa?a.g?A(d,a.g.remove(0,Infinity),0):d["return"]():A(d,ii(a,b,function(){var e=a.m.duration;0>=e?ai(a,b):a.h[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return M(function(d){c=Nb;return a==c.oa?d["return"]():A(d,ii(b,a,function(){b.j.currentTime-=.001;ai(b,a)}),0)})};
270
+ function mi(a,b,c,d,e){var f;return M(function(g){f=Nb;return b==f.oa?(a.g.C=c,Id(a.g,d,e),g["return"]()):A(g,Promise.all([ii(a,b,function(){var h=a.h[b].appendWindowStart,k=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=h;a.h[b].appendWindowEnd=k;ai(a,b)}),ii(a,b,function(){var h=c;0>h&&(h+=.001);a.h[b].timestampOffset=h;ai(a,b)}),ii(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;ai(a,b)})]),0)})}
271
+ q.endOfStream=function(a){var b=this;return M(function(c){return A(c,ni(b,function(){bi(b)||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};q.bb=function(a){var b=this;return M(function(c){return A(c,ni(b,function(){b.m.duration=a}),0)})};q.getDuration=function(){return this.m.duration};function ai(a,b){var c=a.i[b][0];c&&(c.p.resolve(),oi(a,b))}function ii(a,b,c){pf(a.F);c={start:c,p:new Pc};a.i[b].push(c);1==a.i[b].length&&pi(a,b);return c.p}
272
+ function ni(a,b){var c,d,e,f,g,h;return M(function(k){switch(k.g){case 1:pf(a.F);c=[];d={};for(e in a.h)d.tc=new Pc,f={start:function(l){return function(){return l.tc.resolve()}}(d),p:d.tc},a.i[e].push(f),c.push(d.tc),1==a.i[e].length&&f.start(),d={tc:d.tc};E(k,2);return A(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=I(k),g;case 3:try{b()}catch(l){throw new P(2,3,3015,l);}finally{for(h in a.h)oi(a,h)}C(k)}})}function oi(a,b){a.i[b].shift();pi(a,b)}
273
273
  function pi(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new P(2,3,3017,b)):c.p.reject(new P(2,3,3015,d)),oi(a,b)}}function hi(a,b,c,d){var e=a.I[d];null==c&&e&&(Yc()||Wc())&&"mp4"==a.J[d].split(";")[0].split("/")[1]&&(b=Eg(b));return b}var Zh=window.URL.createObjectURL;function qi(a,b,c,d){this.Ka=a;this.Ha=b;this.wa=c;this.Zd=void 0===d?null:d}qi.prototype.Fc=function(){return this.Ha};qi.prototype.Bc=function(){return this.wa};function ri(a,b){return a&&b?a.Fc()==b.Fc()&&a.Bc()==b.Bc()&&kc(a.Ka(),b.Ka()):a==b}N("shaka.media.InitSegmentReference",qi);qi.prototype.getEndByte=qi.prototype.Bc;qi.prototype.getStartByte=qi.prototype.Fc;
274
274
  function si(a,b,c,d,e,f,g,h,k,l,m,n){l=void 0===l?[]:l;this.startTime=a;this.l=this.endTime=b;this.j=c;this.Ha=d;this.wa=e;this.g=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.i=void 0===n?null:n}q=si.prototype;q.Ka=function(){return this.j()};q.getStartTime=function(){return this.startTime};q.eg=function(){return this.endTime};q.Fc=function(){return this.Ha};q.Bc=function(){return this.wa};q.yg=function(){return this.tilesLayout};
275
275
  q.xg=function(){return this.i};N("shaka.media.SegmentReference",si);si.prototype.getTileDuration=si.prototype.xg;si.prototype.getTilesLayout=si.prototype.yg;si.prototype.getEndByte=si.prototype.Bc;si.prototype.getStartByte=si.prototype.Fc;si.prototype.getEndTime=si.prototype.eg;si.prototype.getStartTime=si.prototype.getStartTime;si.prototype.getUris=si.prototype.Ka;function R(a,b,c){this.l=a;this.td=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.A=0;this.B=!0;this.C=0;this.F=void 0===c?!0:c;this.G=0;this.H=!1}q=R.prototype;q.getDuration=function(){return this.i};q.mg=function(){return this.g};q.bb=function(a){this.i=a};q.qg=function(){return this.l};q.xf=function(a){this.A=a};q.Pc=function(a){this.B=a};q.ye=function(a){this.m=a};q.dh=function(a){this.td=a};q.dg=function(){return this.td};
276
276
  q.hc=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.ce(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.l&&this.F&&!this.H&&(this.l=(Date.now()+this.A)/1E3-this.h-this.g)}};q.Yd=function(){this.H=!0};q.ce=function(a){this.j=null==this.j?a:Math.min(this.j,a)};q.be=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};
277
- q.T=function(){return Infinity==this.i&&!this.B};q.Mb=function(){return Infinity!=this.i&&!this.B};q.ob=function(){return Math.max(this.C,this.Jb()-this.m)};q.Af=function(a){this.C=a};q.Jb=function(){return this.T()||this.Mb()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.l)+this.G,this.i):this.h?Math.min(this.h,this.i):this.i};q.Ec=function(a){var b=Math.max(this.j,this.C);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Jb()-this.m+a,this.mb()))};q.bc=function(){return this.Ec(0)};
278
- q.mb=function(){return Math.max(0,this.Jb()-(this.T()||this.Mb()?this.td:0))};q.Ef=function(){return null==this.l||null!=this.h&&this.F?!1:!0};q.wf=function(a){this.G=a};N("shaka.media.PresentationTimeline",R);R.prototype.setAvailabilityTimeOffset=R.prototype.wf;R.prototype.usingPresentationStartTime=R.prototype.Ef;R.prototype.getSeekRangeEnd=R.prototype.mb;R.prototype.getSeekRangeStart=R.prototype.bc;R.prototype.getSafeSeekRangeStart=R.prototype.Ec;R.prototype.getSegmentAvailabilityEnd=R.prototype.Jb;
279
- R.prototype.setUserSeekStart=R.prototype.Af;R.prototype.getSegmentAvailabilityStart=R.prototype.ob;R.prototype.isInProgress=R.prototype.Mb;R.prototype.isLive=R.prototype.T;R.prototype.offset=R.prototype.offset;R.prototype.notifyMaxSegmentDuration=R.prototype.be;R.prototype.notifyMinSegmentStartTime=R.prototype.ce;R.prototype.lockStartTime=R.prototype.Yd;R.prototype.notifySegments=R.prototype.hc;R.prototype.getDelay=R.prototype.dg;R.prototype.setDelay=R.prototype.dh;
277
+ q.T=function(){return Infinity==this.i&&!this.B};q.Nb=function(){return Infinity!=this.i&&!this.B};q.ob=function(){return Math.max(this.C,this.Kb()-this.m)};q.Af=function(a){this.C=a};q.Kb=function(){return this.T()||this.Nb()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.l)+this.G,this.i):this.h?Math.min(this.h,this.i):this.i};q.Ec=function(a){var b=Math.max(this.j,this.C);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Kb()-this.m+a,this.mb()))};q.bc=function(){return this.Ec(0)};
278
+ q.mb=function(){return Math.max(0,this.Kb()-(this.T()||this.Nb()?this.td:0))};q.Ef=function(){return null==this.l||null!=this.h&&this.F?!1:!0};q.wf=function(a){this.G=a};N("shaka.media.PresentationTimeline",R);R.prototype.setAvailabilityTimeOffset=R.prototype.wf;R.prototype.usingPresentationStartTime=R.prototype.Ef;R.prototype.getSeekRangeEnd=R.prototype.mb;R.prototype.getSeekRangeStart=R.prototype.bc;R.prototype.getSafeSeekRangeStart=R.prototype.Ec;R.prototype.getSegmentAvailabilityEnd=R.prototype.Kb;
279
+ R.prototype.setUserSeekStart=R.prototype.Af;R.prototype.getSegmentAvailabilityStart=R.prototype.ob;R.prototype.isInProgress=R.prototype.Nb;R.prototype.isLive=R.prototype.T;R.prototype.offset=R.prototype.offset;R.prototype.notifyMaxSegmentDuration=R.prototype.be;R.prototype.notifyMinSegmentStartTime=R.prototype.ce;R.prototype.lockStartTime=R.prototype.Yd;R.prototype.notifySegments=R.prototype.hc;R.prototype.getDelay=R.prototype.dg;R.prototype.setDelay=R.prototype.dh;
280
280
  R.prototype.setSegmentAvailabilityDuration=R.prototype.ye;R.prototype.setStatic=R.prototype.Pc;R.prototype.setClockOffset=R.prototype.xf;R.prototype.getPresentationStartTime=R.prototype.qg;R.prototype.setDuration=R.prototype.bb;R.prototype.getMaxSegmentDuration=R.prototype.mg;R.prototype.getDuration=R.prototype.getDuration;function ti(a,b){this.j=a;this.m=ui(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.A=b;this.i=function(){}}ti.prototype.release=function(){this.j=null;this.i=function(){}};function vi(a,b){a.i=b}function wi(a){this.g=a}function ui(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(Uh(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 xi(a,b,c,d,e){var f=this;this.g=a;this.F=b;this.l=c;this.C=e;this.i=new qf;this.B=!1;this.G=a.readyState;this.j=!1;this.h=d;this.A=!1;this.i.o(a,"waiting",function(){return yi(f)});this.m=(new Q(function(){yi(f)})).ha(.25)}xi.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.F=this.C=null};xi.prototype.fe=function(){this.A=!0;yi(this)};
281
281
  function yi(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.B)return}else a.B=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.G&&(a.j=!1,a.G=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=ui(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.h=!1;e=f-b.l;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}if(b){e=a.l.smallGapLimit;var g=a.g.currentTime;b=a.g.buffered;c=Vh(b,g,a.l.gapDetectionThreshold);if(!(null==
282
282
  c||0==c&&!a.A||(d=b.start(c),d>=a.F.mb()))){var h=d-g;e=h<=e;f=!1;.001>h||(e||a.j||(a.j=!0,g=(new Map).set("currentTime",g).set("gapSize",h),g=new O("largegap",g),g.cancelable=!0,a.C(g),a.l.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function zi(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Ai.value().get(b),c.Ga(a,b,d))}var Ai=new Qc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Bi(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new qf;this.i=new Ci(a);zi(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Di(d,d.j)})}Bi.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 Ei(a){return a.m?a.g.currentTime:a.j}function Fi(a,b){0<a.g.readyState?Gi(a.i,b):zi(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Di(a,a.j)})}
@@ -287,47 +287,47 @@ l-3);h<k&&(h=Li(g,h),g.i.currentTime=h)}})).ha(.25)}Ji.prototype.release=functio
287
287
  function Mi(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.bc():a.g.mb():0>b&&(b=a.g.mb()+b);return Oi(a,Ni(a,b))}Ji.prototype.G=function(){this.j.fe()};function Oi(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Li(a,b){var c=Math.max(a.H,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.bc(),f=a.g.mb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Ec(c),k=a.g.Ec(d);c=a.g.Ec(c+d);return b>=g?Oi(a,b):b>f?f:b<e?Sh(a.i.buffered,k)?k:c:b>=h||Sh(a.i.buffered,b)?b:c}
288
288
  function Ni(a,b){var c=a.g.bc();if(b<c)return c;c=a.g.mb();return b>c?c:b}function Ki(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new ti(new wi(a),b.stallThreshold);vi(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function Pi(a){this.O=a;this.g=null;this.h=0;this.i=!1}q=Pi.prototype;q.destroy=function(){zb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};q.release=function(){this.i||(this.O=[],this.g&&this.g.stop(),this.g=null)};q.Hg=function(){this.i=!0};
289
289
  q.find=function(a){for(var b=this.O.length-1,c=b;0<=c;--c){var d=this.O[c],e=c<b?this.O[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.O.length&&a<this.O[0].startTime?this.h:null};q.get=function(a){if(0==this.O.length)return null;a-=this.h;return 0>a||a>=this.O.length?null:this.O[a]};q.offset=function(a){if(!this.i)for(var b=r(this.O),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};
290
- q.ec=function(a){!this.i&&a.length&&(this.O=this.O.filter(function(b){return b.startTime<a[0].startTime}),this.O.push.apply(this.O,ia(a)))};q.fc=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.O.length||d.endTime>c.O[0].startTime)});this.ec(a);this.Gb(b)};q.Gb=function(a){if(!this.i){var b=this.O.length;this.O=this.O.filter(function(c){return c.endTime>a});this.h+=b-this.O.length}};
290
+ q.ec=function(a){!this.i&&a.length&&(this.O=this.O.filter(function(b){return b.startTime<a[0].startTime}),this.O.push.apply(this.O,ia(a)))};q.fc=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.O.length||d.endTime>c.O[0].startTime)});this.ec(a);this.Hb(b)};q.Hb=function(a){if(!this.i){var b=this.O.length;this.O=this.O.filter(function(c){return c.endTime>a});this.h+=b-this.O.length}};
291
291
  q.yb=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.O.length;)if(this.O[this.O.length-1].startTime>=b)this.O.pop();else break;for(;this.O.length;)if(this.O[0].endTime<=a)this.O.shift(),c||this.h++;else break;0!=this.O.length&&(a=this.O[this.O.length-1],this.O[this.O.length-1]=new si(a.startTime,b,a.j,a.Ha,a.wa,a.g,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.i))}};
292
- q.xd=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new Q(function(){var d=b();d?c.O.push.apply(c.O,ia(d)):(c.g.stop(),c.g=null)}),this.g.ha(a))};Pi.prototype[Symbol.iterator]=function(){return this.Ib(0)};Pi.prototype.Ib=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Qi(this,b,d)};
293
- function Ri(a,b,c){return new Pi([new si(a,a+b,function(){return c},0,null,null,a,a,a+b)])}N("shaka.media.SegmentIndex",Pi);Pi.forSingleSegment=Ri;Pi.prototype.getIteratorForTime=Pi.prototype.Ib;Pi.prototype.updateEvery=Pi.prototype.xd;Pi.prototype.fit=Pi.prototype.yb;Pi.prototype.evict=Pi.prototype.Gb;Pi.prototype.mergeAndEvict=Pi.prototype.fc;Pi.prototype.merge=Pi.prototype.ec;Pi.prototype.offset=Pi.prototype.offset;Pi.prototype.get=Pi.prototype.get;Pi.prototype.find=Pi.prototype.find;
294
- Pi.prototype.markImmutable=Pi.prototype.Hg;Pi.prototype.release=Pi.prototype.release;Pi.prototype.destroy=Pi.prototype.destroy;function Qi(a,b,c){this.i=a;this.h=b;this.g=c}Qi.prototype.seek=function(a){zb("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");(a=this.i.Ib(a))?(this.h=a.h,this.g=a.g):(this.h=Number.MAX_VALUE,this.g=0);return this.next().value};
292
+ q.xd=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new Q(function(){var d=b();d?c.O.push.apply(c.O,ia(d)):(c.g.stop(),c.g=null)}),this.g.ha(a))};Pi.prototype[Symbol.iterator]=function(){return this.Jb(0)};Pi.prototype.Jb=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Qi(this,b,d)};
293
+ function Ri(a,b,c){return new Pi([new si(a,a+b,function(){return c},0,null,null,a,a,a+b)])}N("shaka.media.SegmentIndex",Pi);Pi.forSingleSegment=Ri;Pi.prototype.getIteratorForTime=Pi.prototype.Jb;Pi.prototype.updateEvery=Pi.prototype.xd;Pi.prototype.fit=Pi.prototype.yb;Pi.prototype.evict=Pi.prototype.Hb;Pi.prototype.mergeAndEvict=Pi.prototype.fc;Pi.prototype.merge=Pi.prototype.ec;Pi.prototype.offset=Pi.prototype.offset;Pi.prototype.get=Pi.prototype.get;Pi.prototype.find=Pi.prototype.find;
294
+ Pi.prototype.markImmutable=Pi.prototype.Hg;Pi.prototype.release=Pi.prototype.release;Pi.prototype.destroy=Pi.prototype.destroy;function Qi(a,b,c){this.i=a;this.h=b;this.g=c}Qi.prototype.seek=function(a){zb("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");(a=this.i.Jb(a))?(this.h=a.h,this.g=a.g):(this.h=Number.MAX_VALUE,this.g=0);return this.next().value};
295
295
  Qi.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.h.length&&a.Ka().length&&this.g>=a.h.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.h.length?a.h[this.g]:a};Qi.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.h.length?(this.g++,a.Ka().length&&this.g==a.h.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};N("shaka.media.SegmentIterator",Qi);Qi.prototype.next=Qi.prototype.next;Qi.prototype.current=Qi.prototype.current;
296
296
  Qi.prototype.seek=Qi.prototype.seek;function Si(){Pi.call(this,[]);this.j=[]}u(Si,Pi);q=Si.prototype;q.clone=function(){var a=new Si;a.j=this.j.slice();return a};q.release=function(){for(var a=r(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};q.find=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.O.length}return null};
297
- q.get=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.O.length}return null};q.offset=function(){};q.ec=function(){};q.Gb=function(){};q.fc=function(){};q.yb=function(){};q.xd=function(){};N("shaka.media.MetaSegmentIndex",Si);Si.prototype.updateEvery=Si.prototype.xd;Si.prototype.fit=Si.prototype.yb;Si.prototype.mergeAndEvict=Si.prototype.fc;Si.prototype.evict=Si.prototype.Gb;Si.prototype.merge=Si.prototype.ec;
298
- Si.prototype.offset=Si.prototype.offset;Si.prototype.get=Si.prototype.get;Si.prototype.find=Si.prototype.find;Si.prototype.release=Si.prototype.release;function Ti(a){var b=this;this.g=a;this.j=!1;this.i=this.g.fd();this.h=new Q(function(){b.g.nf(.25*b.i)})}Ti.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Ti.prototype.set=function(a){this.i=a;Ui(this)};Ti.prototype.cd=function(){return this.g.cd()};function Ui(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.fd()!=b&&a.g.we(b);return}catch(c){}a.h.ha(.25);0!=a.g.fd()&&a.g.we(0)};function Vi(a){var b=this;this.h=a;this.g=new Set;this.i=(new Q(function(){Wi(b,!1)})).ha(.25)}Vi.prototype.release=function(){this.i.stop();for(var a=r(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Wi(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Xi(a){cb.call(this);this.g=new Map;this.h=a}u(Xi,cb);Xi.prototype.release=function(){this.g.clear();cb.prototype.release.call(this)};function Yi(a,b){var c=a.g.get(b);c||(c={Kc:[],Ue:null,contentType:b},a.g.set(b,c));return c}function aj(a,b,c){var d=Yi(a,b.contentType);bj(a,d);a={Zd:b,position:c};d=d.Kc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
297
+ q.get=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.O.length}return null};q.offset=function(){};q.ec=function(){};q.Hb=function(){};q.fc=function(){};q.yb=function(){};q.xd=function(){};N("shaka.media.MetaSegmentIndex",Si);Si.prototype.updateEvery=Si.prototype.xd;Si.prototype.fit=Si.prototype.yb;Si.prototype.mergeAndEvict=Si.prototype.fc;Si.prototype.evict=Si.prototype.Hb;Si.prototype.merge=Si.prototype.ec;
298
+ Si.prototype.offset=Si.prototype.offset;Si.prototype.get=Si.prototype.get;Si.prototype.find=Si.prototype.find;Si.prototype.release=Si.prototype.release;function Ti(a){var b=this;this.g=a;this.j=!1;this.i=this.g.fd();this.h=new Q(function(){b.g.nf(.25*b.i)})}Ti.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Ti.prototype.set=function(a){this.i=a;Ui(this)};Ti.prototype.cd=function(){return this.g.cd()};function Ui(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.fd()!=b&&a.g.we(b);return}catch(c){}a.h.ha(.25);0!=a.g.fd()&&a.g.we(0)};function Vi(a){var b=this;this.h=a;this.g=new Set;this.i=(new Q(function(){Wi(b,!1)})).ha(.25)}Vi.prototype.release=function(){this.i.stop();for(var a=r(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Wi(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Xi(a){cb.call(this);this.g=new Map;this.h=a}u(Xi,cb);Xi.prototype.release=function(){this.g.clear();cb.prototype.release.call(this)};function Yi(a,b){var c=a.g.get(b);c||(c={Kc:[],Ue:null,contentType:b},a.g.set(b,c));return c}function Zi(a,b,c){var d=Yi(a,b.contentType);$i(a,d);a={Zd:b,position:c};d=d.Kc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
299
299
  Xi.prototype.j=function(a){for(var b=r(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.Kc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Zd;break a}}d=null}if(e=d)e=c.Ue,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
300
- if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.Ue=d,JSON.stringify(d),c=new O("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function bj(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.Kc;b.Kc=f.filter(function(g,h){return g.position<=d&&h+1<f.length&&f[h+1].position<=d||g.position>=e?!1:!0})}else b.Kc=[]};function cj(a){cb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Q(function(){for(var c=b.i(),d=r(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g["delete"](e),e=new O("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).ha(2)}u(cj,cb);cj.prototype.release=function(){this.g.clear();this.h.stop();cb.prototype.release.call(this)};function dj(a){cb.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{Vb:null,Ub:ej,Lb:function(c,d){return fj(b,"enter",c,d)}},{Vb:gj,Ub:ej,Lb:function(c,d){return fj(b,"enter",c,d)}},{Vb:hj,Ub:ej,Lb:function(c,d){return fj(b,"enter",c,d)}},{Vb:ej,Ub:gj,Lb:function(c,d){return fj(b,"exit",c,d)}},{Vb:ej,Ub:hj,Lb:function(c,d){return fj(b,"exit",c,d)}},{Vb:gj,Ub:hj,Lb:function(c,d){return fj(b,"skip",c,d)}},{Vb:hj,Ub:gj,Lb:function(c,d){return fj(b,"skip",c,d)}}];this.h=new qf;this.h.o(this.i,"regionremove",
301
- function(c){b.g["delete"](c.region)})}u(dj,cb);dj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;cb.prototype.release.call(this)};dj.prototype.j=function(a,b){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?gj:a>d.endTime?hj:ej;this.g.set(d,f);for(var g=r(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.Vb==e&&h.Ub==f&&h.Lb(d,b)}};
302
- function fj(a,b,c,d){b=new O(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var gj=1,ej=2,hj=3;function ij(a,b,c,d,e){a=gf(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function jj(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.C=1;this.A=this.l=null;this.i=new Map;this.F=!1;this.G=null;this.B=!1;this.j=new of(function(){return kj(c)})}jj.prototype.destroy=function(){return this.j.destroy()};function kj(a){var b,c,d,e;return M(function(f){if(1==f.g){b=[];c=r(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,lj(e),b.push(mj(e));return z(f,Promise.all(b),2)}a.i.clear();a.g=null;a.m=null;a.h=null;B(f)})}
303
- jj.prototype.configure=function(a){this.h=a;this.G=new Pe({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)};jj.prototype.start=function(){var a=this;return M(function(b){if(1==b.g)return z(b,nj(a),2);pf(a.j);a.F=!0;B(b)})};
304
- function oj(a,b){var c,d,e,f,g,h;M(function(k){switch(k.g){case 1:return c=Nb,E(k,2),z(k,li(a.g.V,c.oa),4);case 4:va(k,3);break;case 2:if(d=I(k),a.g)a.g.onError(d);case 3:e=yd(b.mimeType,b.codecs);$h(a.g.V,e);f=a.g.V.l;if(g=f.isTextVisible()||a.h.alwaysStreamText)h=pj(b),a.i.set(c.oa,h),qj(a,h,0);B(k)}})}function rj(a){var b=a.i.get(Mb);b&&(lj(b),mj(b)["catch"](function(){}),a.i["delete"](Mb));a.A=null}
305
- function sj(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.Rb&&(tj(a,e,!1,0,!1),c.Rb=d)}else if(d=c.Rb)c.Rb=null,tj(a,d,!0,0,!1)}}function uj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.l=b;a.F&&(b.video&&tj(a,b.video,c,d,e),b.audio&&tj(a,b.audio,c,d,e))}function vj(a,b){a.A=b;a.F&&tj(a,b,!0,0,!1)}
306
- function tj(a,b,c,d,e){var f=a.i.get(b.type);f||b.type!=Mb?f&&(f.Rb&&(b.trickModeVideo?(f.Rb=b,b=b.trickModeVideo):f.Rb=null),f.stream!=b||e)&&(b.type==Mb&&$h(a.g.V,yd(b.mimeType,b.codecs)),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.ua=null,c&&(f.yc?f.Bd=!0:f.ab?(f.Tb=!0,f.Zc=d,f.Bd=!0):(lj(f),wj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),xj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):oj(a,b)}
307
- function xj(a,b){var c,d;return M(function(e){if(1==e.g){if(!b.Ma)return e["return"]();c=b.stream;d=b.Ma;return c.segmentIndex?e.D(2):z(e,c.createSegmentIndex(),2)}if(b.Ma!=d||b.stream!=c)return e["return"]();var f=a.g.ed();var g=ei(a.g.V,b.type),h=b.stream.segmentIndex.find(b.Ra?b.Ra.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.wa?k.wa-k.Ha:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.g)&&(h+=(k.wa?k.wa-k.Ha:null)||0),k=a.g.getBandwidthEstimate(),
308
- f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.Ma.h.g>h?!0:!1):f=!1;f&&b.Ma.abort();B(e)})}function yj(a,b){b.yc||b.Tb||(b.ab?(b.Tb=!0,b.Zc=0):null==ci(a.g.V,b.type)?null==b.eb&&qj(a,b,0):(lj(b),wj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
309
- function nj(a){var b,c,d,e,f,g,h,k,l,m;return M(function(n){if(1==n.g){b=Nb;if(!a.l)throw new P(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.Fb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.gb,a.l.video),d.add(a.l.video));a.A&&(c.set(b.oa,a.A),d.add(a.A));e=a.g.V;f=a.h.forceTransmuxTS;return z(n,e.init(c,f),2)}pf(a.j);var p=a.m.presentationTimeline.getDuration();Infinity>p?a.g.V.bb(p):a.g.V.bb(Math.pow(2,32));g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.i.has(k)||
310
- (m=pj(l),a.i.set(k,m),qj(a,m,0));B(n)})}function pj(a){return{stream:a,type:a.type,ua:null,Ra:null,kd:null,Xd:null,Wd:null,Vd:null,Rb:null,endOfStream:!1,ab:!1,eb:null,Tb:!1,Zc:0,Bd:!1,yc:!1,je:!1,Gc:!1,Ma:null}}
311
- function zj(a,b){var c,d,e,f,g;return M(function(h){switch(h.g){case 1:pf(a.j);if(b.ab||null==b.eb||b.yc)return h["return"]();b.eb=null;if(!b.Tb){h.D(2);break}return z(h,wj(a,b,b.Bd,b.Zc),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.D(4);break}c=b.stream;return z(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),null==b.eb&&qj(a,b,0),h["return"]();case 4:E(h,6);d=Aj(a,b);null!=d&&(qj(a,b,d),b.Gc=!1);va(h,7);break;case 6:return e=
312
- I(h),z(h,Bj(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.i.values());if(!a.F||!f.every(function(k){return k.endOfStream})){h.D(0);break}return z(h,a.g.V.endOfStream(),10);case 10:pf(a.j),g=a.g.V.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.bb(g),B(h)}})}
313
- function Aj(a,b){if(Cj(b))return ji(a.g.V,b.stream.originalId||""),null;b.type==Mb&&ki(a.g.V);var c=a.g.ed(),d=b.Ra?b.Ra.endTime:c,e=fi(a.g.V,b.type,c),f=Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.C;if(1E-6>a.m.presentationTimeline.getDuration()-d)return b.endOfStream=!0,"video"==b.type&&(c=a.i.get(Mb))&&Cj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=ei(a.g.V,b.type);e=Dj(a,b,c,e);if(!e)return a.h.updateIntervalSeconds;f=Infinity;
314
- var g=Array.from(a.i.values());g=r(g);for(var h=g.next();!h.done;h=g.next())h=h.value,Cj(h)||h.ua&&!h.ua.current()||(f=Math.min(f,h.Ra?h.Ra.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;Ej(a,b,c,e)["catch"](function(){});return null}
315
- function Dj(a,b,c,d){if(b.ua)return b.ua.current();if(b.Ra||d)return b.ua=b.stream.segmentIndex.Ib(b.Ra?b.Ra.endTime:d),b.ua&&b.ua.next().value;a=a.h.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ua=b.stream.segmentIndex.Ib(d),e=b.ua&&b.ua.next().value);e||(b.ua=b.stream.segmentIndex.Ib(c),e=b.ua&&b.ua.next().value);return e}
316
- function Ej(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,v,y;return M(function(w){switch(w.g){case 1:return e=Nb,f=b.stream,g=b.ua,b.ab=!0,E(w,2),z(w,Fj(a,b,d),4);case 4:pf(a.j);if(a.B)return w["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h)return n=new Uint8Array(0),p=function(x){var D,C,A;return M(function(F){pf(a.j);if(a.B)return F["return"]();n=Gj(n,x);D=!1;C=0;(new vg).box("mdat",function(G){C=G.size+G.start;D=!0}).parse(n,!1,!0);if(!D)return F.D(0);
317
- A=n.subarray(0,C);n=n.subarray(C);return z(F,Hj(a,b,c,f,d,A),0)})},z(w,Ij(a,b,d,p),6);l=Ij(a,b,d);return z(w,l,7);case 7:return m=w.h,pf(a.j),a.B?w["return"]():b.Tb?(b.ab=!1,qj(a,b,0),w["return"]()):z(w,Hj(a,b,c,f,d,m),6);case 6:pf(a.j);if(a.B)return w["return"]();b.Ra=d;g.next();b.ab=!1;b.je=!1;t=a.g.V.zb();v=t[b.type];Xa(JSON.stringify(v));b.Tb||a.g.fe();qj(a,b,0);va(w,0);break;case 2:y=I(w);pf(a.j,y);if(a.B)return w["return"]();b.ab=!1;if(7001==y.code)b.ab=!1,b.eb=null,qj(a,b,0),w.D(0);else if(b.type==
318
- e.oa&&a.h.ignoreTextStreamFailures)a.i["delete"](e.oa),w.D(0);else if(3017==y.code)Jj(a,b,y),w.D(0);else if(1001==y.code&&y.data&&404==y.data[1])b.ab=!1,b.eb=null,qj(a,b,1),w.D(0);else return b.Gc=!0,y.severity=2,z(w,Bj(a,y),0)}})}function Gj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
319
- function Jj(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.je})){var d=Math.round(100*a.C);if(20<d)a.C-=.2;else if(4<d)a.C-=.04;else{b.Gc=!0;a.B=!0;a.g.onError(c);return}b.je=!0}qj(a,b,4)}
320
- function Fj(a,b,c){var d,e,f,g,h,k,l;return M(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.Xd||e!=b.Wd||f!=b.Vd)h=function(){var n;return M(function(p){if(1==p.g)return E(p,2),b.Wd=e,b.Vd=f,b.Xd=g,z(p,mi(a.g.V,b.type,g,e,f),4);if(2!=p.g)return va(p,0);n=I(p);b.Wd=null;b.Vd=null;b.Xd=null;throw n;})},d.push(h());!ri(c.g,b.kd)&&(b.kd=c.g)&&(k=Ij(a,b,c.g),l=function(){var n,p,t;return M(function(v){switch(v.g){case 1:return E(v,2),z(v,k,4);
321
- case 4:return n=v.h,pf(a.j),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,z(v,gi(a.g.V,b.type,n,null,null,p),5);case 5:va(v,0);break;case 2:throw t=I(v),b.kd=null,t;}})},a.g.Lg(c.startTime,c.g),d.push(l()));return z(m,Promise.all(d),0)})}
322
- function Hj(a,b,c,d,e,f){var g;return M(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,(null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes)&&(new vg).X("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.Lc();var n=k.reader.Lc();var p=k.reader.P();var t=k.reader.P();var v=k.reader.P();var y=k.reader.P();var w=e.startTime+t/p}else p=k.reader.P(),w=k.reader.lc()/p+e.timestampOffset,t=w-e.startTime,v=k.reader.P(),y=k.reader.P(),
323
- m=k.reader.Lc(),n=k.reader.Lc();k=k.reader.Cb(k.reader.U.byteLength-k.reader.ia());if(l&&l.includes(m)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==m?a.g.Mg():(l=(new Map).set("detail",{startTime:w,endTime:w+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:t,eventDuration:v,id:y,messageData:k}),l=new O(Kj,l),a.g.onEvent(l))}).parse(f),z(h,Lj(a,b,c),2);if(3!=h.g)return pf(a.j),z(h,gi(a.g.V,b.type,f,e.startTime,e.endTime,g),3);pf(a.j);B(h)})}
324
- function Lj(a,b,c){var d,e,f,g;return M(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=ci(a.g.V,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():z(h,a.g.V.remove(b.type,e,e+g),2)}pf(a.j);B(h)})}function Cj(a){return a&&a.type==Mb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
325
- function Ij(a,b,c,d){var e,f,g,h,k;return M(function(l){if(1==l.g)return e=nf,f=ij(c.Ka(),c.Ha,c.wa,a.h.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof qi,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.Pb.request(e,f),b.Ma=h,z(l,h.promise,2);k=l.h;b.Ma=null;return l["return"](k.data)})}
326
- function wj(a,b,c,d){var e,f;return M(function(g){if(1==g.g)return b.Tb=!1,b.Bd=!1,b.Zc=0,b.yc=!0,b.Ra=null,b.kd=null,b.ua=null,d?(e=a.g.ed(),f=a.g.V.getDuration(),z(g,a.g.V.remove(b.type,e+d,f),3)):z(g,li(a.g.V,b.type),4);if(3!=g.g)return pf(a.j),c?z(g,a.g.V.flush(b.type),3):g.D(3);pf(a.j);b.yc=!1;b.endOfStream=!1;qj(a,b,0);B(g)})}
327
- function qj(a,b,c){var d=b.type;if(d!=Mb||a.i.has(d))b.eb=(new Rc(function(){var e;return M(function(f){if(1==f.g)return E(f,2),z(f,zj(a,b),4);if(2!=f.g)return va(f,0);e=I(f);if(a.g)a.g.onError(e);B(f)})})).S(c)}function lj(a){null!=a.eb&&(a.eb.stop(),a.eb=null)}function mj(a){return M(function(b){return a.Ma?z(b,a.Ma.abort(),0):b.D(0)})}function Bj(a,b){return M(function(c){if(1==c.g)return z(c,Re(a.G),2);pf(a.j);a.g.onError(b);b.handled||a.h.failureCallback(b);B(c)})};function Mj(a,b){var c=Nj(),d=this;this.j=b;this.i=a;this.l=c;this.A=null;this.m=[];this.h=this.g=null;this.C=Promise.resolve().then(function(){return Oj(d)});this.B=new of(function(){return Pj(d)})}Mj.prototype.destroy=function(){return this.B.destroy()};function Pj(a){var b,c,d;return M(function(e){if(1==e.g)return a.h&&a.h.abort(),Qj(a),z(e,a.C,2);a.g&&a.g.$a.Qb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.$a.Qb();a.g=null;a.m=[];a.j=null;B(e)})}
328
- function Rj(a,b){var c={ic:function(){},pd:function(){},Qb:function(){},onError:function(){},rd:function(){},Ji:function(){}};a.m.push({create:b,$a:c});a.h&&a.h.abort();Qj(a);return c}
329
- function Oj(a){return M(function(b){if(a.B.g)b=b.D(0);else{if(0==a.m.length||a.g&&!a.g.Kb)var c=!1;else{a.g&&(a.g.$a.Qb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.$a.ic(),a.g={node:d.node,payload:d.payload,Kb:d.Kb,$a:c.$a}):c.$a.rd();c=!0}c?c=Promise.resolve():a.g?c=Sj(a):(a.j.Kg(a.i),a.A=new Pc,c=a.A);b=z(b,c,1)}return b})}
330
- function Sj(a){var b,c;return M(function(d){switch(d.g){case 1:return a.i=a.j.og(a.i,a.l,a.g.node,a.g.payload),E(d,2),a.h=a.j.Tf(a.i,a.l,a.g.payload),z(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.$a.pd(),a.g=null);va(d,0);break;case 2:b=I(d);if(7001==b.code)a.g.$a.Qb();else a.g.$a.onError(b);a.g=null;a.h=null;c=a;return z(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,B(d)}})}function Qj(a){a.A&&(a.A.resolve(),a.A=null)};function Tj(a){this.g=null;for(var b=r(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}q=Tj.prototype;q.remove=function(a,b){if(!this.g)return!1;Uj(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
300
+ if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.Ue=d,JSON.stringify(d),c=new O("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function $i(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.Kc;b.Kc=f.filter(function(g,h){return g.position<=d&&h+1<f.length&&f[h+1].position<=d||g.position>=e?!1:!0})}else b.Kc=[]};function cj(a){cb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Q(function(){for(var c=b.i(),d=r(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g["delete"](e),e=new O("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).ha(2)}u(cj,cb);cj.prototype.release=function(){this.g.clear();this.h.stop();cb.prototype.release.call(this)};function dj(a){cb.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{Vb:null,Ub:ej,Mb:function(c,d){return fj(b,"enter",c,d)}},{Vb:gj,Ub:ej,Mb:function(c,d){return fj(b,"enter",c,d)}},{Vb:hj,Ub:ej,Mb:function(c,d){return fj(b,"enter",c,d)}},{Vb:ej,Ub:gj,Mb:function(c,d){return fj(b,"exit",c,d)}},{Vb:ej,Ub:hj,Mb:function(c,d){return fj(b,"exit",c,d)}},{Vb:gj,Ub:hj,Mb:function(c,d){return fj(b,"skip",c,d)}},{Vb:hj,Ub:gj,Mb:function(c,d){return fj(b,"skip",c,d)}}];this.h=new qf;this.h.o(this.i,"regionremove",
301
+ function(c){b.g["delete"](c.region)})}u(dj,cb);dj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;cb.prototype.release.call(this)};dj.prototype.j=function(a,b){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?gj:a>d.endTime?hj:ej;this.g.set(d,f);for(var g=r(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.Vb==e&&h.Ub==f&&h.Mb(d,b)}};
302
+ function fj(a,b,c,d){b=new O(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var gj=1,ej=2,hj=3;function ij(a,b,c,d,e){a=gf(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function jj(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.C=1;this.A=this.l=null;this.j=new Map;this.F=!1;this.G=null;this.B=!1;this.i=new of(function(){return kj(c)})}jj.prototype.destroy=function(){return this.i.destroy()};function kj(a){var b,c,d,e;return M(function(f){if(1==f.g){b=[];c=r(a.j.values());for(d=c.next();!d.done;d=c.next())e=d.value,lj(e),b.push(mj(e));return A(f,Promise.all(b),2)}a.j.clear();a.g=null;a.m=null;a.h=null;C(f)})}
303
+ jj.prototype.configure=function(a){this.h=a;this.G=new Pe({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)};jj.prototype.start=function(){var a=this;return M(function(b){if(1==b.g)return A(b,nj(a),2);pf(a.i);a.F=!0;C(b)})};
304
+ function oj(a,b){var c,d,e,f,g,h;M(function(k){switch(k.g){case 1:return c=Nb,E(k,2),A(k,li(a.g.V,c.oa),4);case 4:va(k,3);break;case 2:if(d=I(k),a.g)a.g.onError(d);case 3:e=yd(b.mimeType,b.codecs);$h(a.g.V,e);f=a.g.V.l;if(g=f.isTextVisible()||a.h.alwaysStreamText)h=pj(b),a.j.set(c.oa,h),qj(a,h,0);C(k)}})}function rj(a){var b=a.j.get(Mb);b&&(lj(b),mj(b)["catch"](function(){}),a.j["delete"](Mb));a.A=null}
305
+ function sj(a,b){var c=a.j.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.Sb&&(tj(a,e,!1,0,!1),c.Sb=d)}else if(d=c.Sb)c.Sb=null,tj(a,d,!0,0,!1)}}function uj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.l=b;a.F&&(b.video&&tj(a,b.video,c,d,e),b.audio&&tj(a,b.audio,c,d,e))}function vj(a,b){a.A=b;a.F&&tj(a,b,!0,0,!1)}
306
+ function tj(a,b,c,d,e){var f=a.j.get(b.type);f||b.type!=Mb?f&&(f.Sb&&(b.trickModeVideo?(f.Sb=b,b=b.trickModeVideo):f.Sb=null),f.stream!=b||e)&&(b.type==Mb&&$h(a.g.V,yd(b.mimeType,b.codecs)),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.ua=null,c&&(f.yc?f.Bd=!0:f.Ta?(f.Eb=!0,f.Zc=d,f.Bd=!0):(lj(f),wj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),xj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):oj(a,b)}
307
+ function xj(a,b){var c,d;return M(function(e){if(1==e.g){if(!b.Ma)return e["return"]();c=b.stream;d=b.Ma;return c.segmentIndex?e.D(2):A(e,c.createSegmentIndex(),2)}if(b.Ma!=d||b.stream!=c)return e["return"]();var f=a.g.ed();var g=ei(a.g.V,b.type),h=b.stream.segmentIndex.find(b.Ra?b.Ra.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.wa?k.wa-k.Ha:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.g)&&(h+=(k.wa?k.wa-k.Ha:null)||0),k=a.g.getBandwidthEstimate(),
308
+ f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.Ma.h.g>h?!0:!1):f=!1;f&&b.Ma.abort();C(e)})}function yj(a,b){b.yc||b.Eb||(b.Ta?(b.Eb=!0,b.Zc=0):null==ci(a.g.V,b.type)?null==b.eb&&qj(a,b,0):(lj(b),wj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
309
+ function nj(a){var b,c,d,e,f,g,h,k,l,m;return M(function(n){if(1==n.g){b=Nb;if(!a.l)throw new P(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.Gb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.gb,a.l.video),d.add(a.l.video));a.A&&(c.set(b.oa,a.A),d.add(a.A));e=a.g.V;f=a.h.forceTransmuxTS;return A(n,e.init(c,f),2)}pf(a.i);var p=a.m.presentationTimeline.getDuration();Infinity>p?a.g.V.bb(p):a.g.V.bb(Math.pow(2,32));g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.j.has(k)||
310
+ (m=pj(l),a.j.set(k,m),qj(a,m,0));C(n)})}function pj(a){return{stream:a,type:a.type,ua:null,Ra:null,kd:null,Xd:null,Wd:null,Vd:null,Sb:null,endOfStream:!1,Ta:!1,eb:null,Eb:!1,Zc:0,Bd:!1,yc:!1,je:!1,Gc:!1,Ma:null}}
311
+ function zj(a,b){var c,d,e,f,g;return M(function(h){switch(h.g){case 1:pf(a.i);if(b.Ta||null==b.eb||b.yc)return h["return"]();b.eb=null;if(!b.Eb){h.D(2);break}return A(h,wj(a,b,b.Bd,b.Zc),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.D(4);break}c=b.stream;return A(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),null==b.eb&&qj(a,b,0),h["return"]();case 4:E(h,6);d=Aj(a,b);null!=d&&(qj(a,b,d),b.Gc=!1);va(h,7);break;case 6:return e=
312
+ I(h),A(h,Bj(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.j.values());if(!a.F||!f.every(function(k){return k.endOfStream})){h.D(0);break}return A(h,a.g.V.endOfStream(),10);case 10:pf(a.i),g=a.g.V.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.bb(g),C(h)}})}
313
+ function Aj(a,b){if(Cj(b))return ji(a.g.V,b.stream.originalId||""),null;b.type==Mb&&ki(a.g.V);var c=a.g.ed(),d=b.Ra?b.Ra.endTime:c,e=fi(a.g.V,b.type,c),f=Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.C,g=a.m.presentationTimeline.getDuration()-d,h=ei(a.g.V,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(c=a.j.get(Mb))&&Cj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Dj(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;
314
+ f=Infinity;g=Array.from(a.j.values());g=r(g);for(h=g.next();!h.done;h=g.next())h=h.value,Cj(h)||h.ua&&!h.ua.current()||(f=Math.min(f,h.Ra?h.Ra.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;Ej(a,b,c,e)["catch"](function(){});return null}
315
+ function Dj(a,b,c,d){if(b.ua)return b.ua.current();if(b.Ra||d)return b.ua=b.stream.segmentIndex.Jb(b.Ra?b.Ra.endTime:d),b.ua&&b.ua.next().value;a=a.h.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ua=b.stream.segmentIndex.Jb(d),e=b.ua&&b.ua.next().value);e||(b.ua=b.stream.segmentIndex.Jb(c),e=b.ua&&b.ua.next().value);return e}
316
+ function Ej(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,v,x,y,w,D;return M(function(z){switch(z.g){case 1:return e=Nb,f=b.stream,g=b.ua,b.Ta=!0,E(z,2),A(z,Fj(a,b,d),4);case 4:pf(a.i);if(a.B)return z["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h)return n=new Uint8Array(0),t=p=!1,v=function(B){var F,G,H;return M(function(J){if(p)return J["return"]();t=!0;pf(a.i);if(a.B)return J["return"]();n=Gj(n,B);F=!1;G=0;(new vg).box("mdat",function(K){G=
317
+ K.size+K.start;F=!0}).parse(n,!1,!0);if(!F)return J.D(0);H=n.subarray(0,G);n=n.subarray(G);return A(J,Hj(a,b,c,f,d,H),0)})},A(z,Ij(a,b,d,v),9);l=Ij(a,b,d);return A(z,l,7);case 7:return m=z.h,pf(a.i),a.B?z["return"]():b.Eb?(b.Ta=!1,qj(a,b,0),z["return"]()):A(z,Hj(a,b,c,f,d,m),6);case 9:x=z.h;if(t){z.D(6);break}p=!0;pf(a.i);return a.B?z["return"]():b.Eb?(b.Ta=!1,qj(a,b,0),z["return"]()):A(z,Hj(a,b,c,f,d,x),6);case 6:pf(a.i);if(a.B)return z["return"]();b.Ra=d;g.next();b.Ta=!1;b.je=!1;y=a.g.V.zb();w=
318
+ y[b.type];Xa(JSON.stringify(w));b.Eb||a.g.fe();qj(a,b,0);va(z,0);break;case 2:D=I(z);pf(a.i,D);if(a.B)return z["return"]();b.Ta=!1;if(7001==D.code)b.Ta=!1,b.eb=null,qj(a,b,0),z.D(0);else if(b.type==e.oa&&a.h.ignoreTextStreamFailures)a.j["delete"](e.oa),z.D(0);else if(3017==D.code)Jj(a,b,D),z.D(0);else if(1001==D.code&&D.data&&404==D.data[1])b.Ta=!1,b.eb=null,qj(a,b,1),z.D(0);else return b.Gc=!0,D.severity=2,A(z,Bj(a,D),0)}})}
319
+ function Gj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}function Jj(a,b,c){if(!Array.from(a.j.values()).some(function(e){return e!=b&&e.je})){var d=Math.round(100*a.C);if(20<d)a.C-=.2;else if(4<d)a.C-=.04;else{b.Gc=!0;a.B=!0;a.g.onError(c);return}b.je=!0}qj(a,b,4)}
320
+ function Fj(a,b,c){var d,e,f,g,h,k,l;return M(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.Xd||e!=b.Wd||f!=b.Vd)h=function(){var n;return M(function(p){if(1==p.g)return E(p,2),b.Wd=e,b.Vd=f,b.Xd=g,A(p,mi(a.g.V,b.type,g,e,f),4);if(2!=p.g)return va(p,0);n=I(p);b.Wd=null;b.Vd=null;b.Xd=null;throw n;})},d.push(h());!ri(c.g,b.kd)&&(b.kd=c.g)&&(k=Ij(a,b,c.g),l=function(){var n,p,t;return M(function(v){switch(v.g){case 1:return E(v,2),A(v,k,4);
321
+ case 4:return n=v.h,pf(a.i),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,A(v,gi(a.g.V,b.type,n,null,null,p),5);case 5:va(v,0);break;case 2:throw t=I(v),b.kd=null,t;}})},a.g.Lg(c.startTime,c.g),d.push(l()));return A(m,Promise.all(d),0)})}
322
+ function Hj(a,b,c,d,e,f){var g;return M(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,(null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes)&&(new vg).X("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.Lc();var n=k.reader.Lc();var p=k.reader.P();var t=k.reader.P();var v=k.reader.P();var x=k.reader.P();var y=e.startTime+t/p}else p=k.reader.P(),y=k.reader.lc()/p+e.timestampOffset,t=y-e.startTime,v=k.reader.P(),x=k.reader.P(),
323
+ m=k.reader.Lc(),n=k.reader.Lc();k=k.reader.Cb(k.reader.U.byteLength-k.reader.ia());if(l&&l.includes(m)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==m?a.g.Mg():(l=(new Map).set("detail",{startTime:y,endTime:y+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:t,eventDuration:v,id:x,messageData:k}),l=new O(Kj,l),a.g.onEvent(l))}).parse(f),A(h,Lj(a,b,c),2);if(3!=h.g)return pf(a.i),A(h,gi(a.g.V,b.type,f,e.startTime,e.endTime,g),3);pf(a.i);C(h)})}
324
+ function Lj(a,b,c){var d,e,f,g;return M(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=ci(a.g.V,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():A(h,a.g.V.remove(b.type,e,e+g),2)}pf(a.i);C(h)})}function Cj(a){return a&&a.type==Mb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
325
+ function Ij(a,b,c,d){var e,f,g,h,k;return M(function(l){if(1==l.g)return e=nf,f=ij(c.Ka(),c.Ha,c.wa,a.h.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof qi,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.Qb.request(e,f),b.Ma=h,A(l,h.promise,2);k=l.h;b.Ma=null;return l["return"](k.data)})}
326
+ function wj(a,b,c,d){var e,f;return M(function(g){if(1==g.g)return b.Eb=!1,b.Bd=!1,b.Zc=0,b.yc=!0,b.Ra=null,b.kd=null,b.ua=null,d?(e=a.g.ed(),f=a.g.V.getDuration(),A(g,a.g.V.remove(b.type,e+d,f),3)):A(g,li(a.g.V,b.type),4);if(3!=g.g)return pf(a.i),c?A(g,a.g.V.flush(b.type),3):g.D(3);pf(a.i);b.yc=!1;b.endOfStream=!1;qj(a,b,0);C(g)})}
327
+ function qj(a,b,c){var d=b.type;if(d!=Mb||a.j.has(d))b.eb=(new Rc(function(){var e;return M(function(f){if(1==f.g)return E(f,2),A(f,zj(a,b),4);if(2!=f.g)return va(f,0);e=I(f);if(a.g)a.g.onError(e);C(f)})})).S(c)}function lj(a){null!=a.eb&&(a.eb.stop(),a.eb=null)}function mj(a){return M(function(b){return a.Ma?A(b,a.Ma.abort(),0):b.D(0)})}function Bj(a,b){return M(function(c){if(1==c.g)return A(c,Re(a.G),2);pf(a.i);a.g.onError(b);b.handled||a.h.failureCallback(b);C(c)})};function Mj(a,b){var c=Nj(),d=this;this.j=b;this.i=a;this.l=c;this.A=null;this.m=[];this.h=this.g=null;this.C=Promise.resolve().then(function(){return Oj(d)});this.B=new of(function(){return Pj(d)})}Mj.prototype.destroy=function(){return this.B.destroy()};function Pj(a){var b,c,d;return M(function(e){if(1==e.g)return a.h&&a.h.abort(),Qj(a),A(e,a.C,2);a.g&&a.g.ab.Rb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.ab.Rb();a.g=null;a.m=[];a.j=null;C(e)})}
328
+ function Rj(a,b){var c={ic:function(){},pd:function(){},Rb:function(){},onError:function(){},rd:function(){},Ji:function(){}};a.m.push({create:b,ab:c});a.h&&a.h.abort();Qj(a);return c}
329
+ function Oj(a){return M(function(b){if(a.B.g)b=b.D(0);else{if(0==a.m.length||a.g&&!a.g.Lb)var c=!1;else{a.g&&(a.g.ab.Rb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.ab.ic(),a.g={node:d.node,payload:d.payload,Lb:d.Lb,ab:c.ab}):c.ab.rd();c=!0}c?c=Promise.resolve():a.g?c=Sj(a):(a.j.Kg(a.i),a.A=new Pc,c=a.A);b=A(b,c,1)}return b})}
330
+ function Sj(a){var b,c;return M(function(d){switch(d.g){case 1:return a.i=a.j.og(a.i,a.l,a.g.node,a.g.payload),E(d,2),a.h=a.j.Tf(a.i,a.l,a.g.payload),A(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.ab.pd(),a.g=null);va(d,0);break;case 2:b=I(d);if(7001==b.code)a.g.ab.Rb();else a.g.ab.onError(b);a.g=null;a.h=null;c=a;return A(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,C(d)}})}function Qj(a){a.A&&(a.A.resolve(),a.A=null)};function Tj(a){this.g=null;for(var b=r(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}q=Tj.prototype;q.remove=function(a,b){if(!this.g)return!1;Uj(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
331
331
  q.append=function(a){function b(h,k){for(var l=r(h),m=l.next();!m.done;m=l.next())if(m=m.value,m.isContainer)b(m.nestedCues,k);else{var n=m.clone();n.nestedCues=[];n.payload=c(m);k.push(n)}return k}function c(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,t){return p+"<"+t+">"},"");k=k.reduceRight(function(p,t){return p+"</"+t+">"},"");return h.lineBreak||h.spacer?(h.spacer&&zb("shaka.extern.Cue",
332
332
  "Please use lineBreak instead of spacer."),"\n"):h.nestedCues.length?h.nestedCues.map(c).join(""):l+h.payload+k}var d=b(a,[]),e=[];a=this.g.cues?Array.from(this.g.cues):[];var f={};d=r(d);for(var g=d.next();!g.done;f={Wb:f.Wb},g=d.next())f.Wb=g.value,a.some(function(h){return function(k){return k.startTime==h.Wb.startTime&&k.endTime==h.Wb.endTime&&k.text==h.Wb.payload?!0:!1}}(f))||(g=Vj(f.Wb))&&e.push(g);a=e.slice().sort(function(h,k){return h.startTime!=k.startTime?h.startTime-k.startTime:h.endTime!=
333
333
  k.endTime?h.endTime-k.startTime:"line"in VTTCue.prototype?e.indexOf(k)-e.indexOf(h):e.indexOf(h)-e.indexOf(k)});a=r(a);for(f=a.next();!f.done;f=a.next())this.g.addCue(f.value)};q.destroy=function(){this.g&&(Uj(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
@@ -340,17 +340,17 @@ p.startTime-t.startTime:p.endTime-t.endTime});h=r(h);for(k=h.next();!k.done;k=h.
340
340
  function ck(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&zb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=S(e);"br"!=e&&dk(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,a.A.has(c.id))c=a.A.get(c.id);else{e=S("span");var g=c.heightUnits==Dc?"%":"px",h=c.widthUnits==Dc?"%":"px",k=c.viewportAnchorUnits==Dc?"%":"px";e.id="shaka-text-region---"+c.id;e.classList.add("shaka-text-region");e.style.height=c.height+
341
341
  g;e.style.width=c.width+h;e.style.position="absolute";e.style.top=c.viewportAnchorY+k;e.style.left=c.viewportAnchorX+k;e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.A.set(c.id,e);c=e}e=f;d&&(e=S("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,f.appendChild(e));a.h.set(b,{Sd:f,Ff:e,Mc:c})}
342
342
  function dk(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=ek(c.linePadding,c,a.m);f.paddingRight=ek(c.linePadding,c,a.m);if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize=
343
- "contain",f.backgroundPosition="center";else{if(c.nestedCues.length)var l=b;else l=S("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=fk(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");
344
- g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=ek(c.fontSize,c,a.m);c.line&&1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==qc?(f.width="100%",c.lineAlign==sc?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==sc?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=c.line+"%")):(f.height="100%",c.lineAlign==
345
- sc?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=c.line+"%")));f.lineHeight=c.lineHeight;c.position&&(c.writingMode==qc?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==c.positionAlign&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==
346
- qc?f.width=c.size+"%":f.height=c.size+"%")}function ek(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function fk(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}N("shaka.text.UITextDisplayer",Zj);
347
- Zj.prototype.setTextVisibility=Zj.prototype.setTextVisibility;Zj.prototype.isTextVisible=Zj.prototype.isTextVisible;Zj.prototype.remove=Zj.prototype.remove;Zj.prototype.destroy=Zj.prototype.destroy;Zj.prototype.append=Zj.prototype.append;function gk(a,b){function c(h){for(var k=h,l=r(b),m=l.next();!m.done;m=l.next())m=m.value,m.end&&m.start<h&&(k+=m.end-m.start);h=Math.floor(k/3600);l=Math.floor(k/60%60);m=Math.floor(k%60);k=Math.floor(1E3*k%1E3);return(10>h?"0":"")+h+":"+(10>l?"0":"")+l+":"+(10>m?"0":"")+m+"."+(100>k?10>k?"00":"0":"")+k}function d(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,t){return p+"<"+t+">"},
343
+ "contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=S("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=fk(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==
344
+ c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=ek(c.fontSize,c,a.m);c.line&&1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==qc?(f.width="100%",c.lineAlign==sc?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==sc?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=
345
+ c.line+"%")):(f.height="100%",c.lineAlign==sc?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=c.line+"%")));f.lineHeight=c.lineHeight;c.position&&(c.writingMode==qc?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==c.positionAlign&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=
346
+ c.writingMode);c.size&&(c.writingMode==qc?f.width=c.size+"%":f.height=c.size+"%")}function ek(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function fk(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}
347
+ N("shaka.text.UITextDisplayer",Zj);Zj.prototype.setTextVisibility=Zj.prototype.setTextVisibility;Zj.prototype.isTextVisible=Zj.prototype.isTextVisible;Zj.prototype.remove=Zj.prototype.remove;Zj.prototype.destroy=Zj.prototype.destroy;Zj.prototype.append=Zj.prototype.append;function gk(a,b){function c(h){for(var k=h,l=r(b),m=l.next();!m.done;m=l.next())m=m.value,m.end&&m.start<h&&(k+=m.end-m.start);h=Math.floor(k/3600);l=Math.floor(k/60%60);m=Math.floor(k%60);k=Math.floor(1E3*k%1E3);return(10>h?"0":"")+h+":"+(10>l?"0":"")+l+":"+(10>m?"0":"")+m+"."+(100>k?10>k?"00":"0":"")+k}function d(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,t){return p+"<"+t+">"},
348
348
  "");k=k.reduceRight(function(p,t){return p+"</"+t+">"},"");return h.lineBreak||h.spacer?(h.spacer&&zb("shaka.text.Cue","Please use lineBreak instead of spacer."),"\n"):h.nestedCues.length?h.nestedCues.map(d).join(""):l+h.payload+k}var e=a.map(function(h){if(h.nestedCues.length){var k=h.clone();k.nestedCues=[];k.payload=d(h);return k}return h}),f="WEBVTT\n\n";e=r(e);for(var g=e.next();!g.done;g=e.next())g=g.value,f+=c(g.startTime)+" --\x3e "+c(g.endTime)+function(h){var k=[];switch(h.textAlign){case "left":k.push("align:left");
349
349
  break;case "right":k.push("align:right");break;case pc:k.push("align:middle");break;case "start":k.push("align:start");break;case "end":k.push("align:end")}switch(h.writingMode){case "vertical-lr":k.push("vertical:lr");break;case "vertical-rl":k.push("vertical:rl")}return k.length?" "+k.join(" "):""}(g)+"\n",f+=g.payload+"\n\n";return f}N("shaka.text.WebVttGenerator",function(){});function hk(a,b){this.h=a;this.g=b;this.j="";this.A=void 0;this.i=!1;this.m=!0;this.l=!1}function ik(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.T()?jk:kk};d.ot=lk(c);var e=d.ot===mk||d.ot===nk||d.ot===ok||d.ot===pk;e&&(d.bl=qk(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==pk&&(d.tb=rk(a,d.ot)/1E3);sk(a,b,d)}}catch(f){Ta("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
350
350
  function tk(a,b,c){try{if(!a.g.enabled)return b;var d=uk(a);a:{switch(c){case "video/webm":case "video/mp4":var e=ok;break a;case "application/x-mpegurl":e=vk;break a}e=void 0}d.ot=e;d.su=!0;var f=wk(d);return xk(b,f)}catch(g){return Ta("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function yk(a,b){try{if(!a.g.enabled)return b;var c=uk(a);c.ot=zk;c.su=!0;var d=wk(c);return xk(b,d)}catch(e){return Ta("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),b}}
351
351
  function uk(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.A,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}function sk(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,uk(a));c.pr=a.h.Ab();var e=c.ot===mk||c.ot===ok;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=Ak(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=wk(c);f&&(b.uris=b.uris.map(function(g){return xk(g,f)}))}}}
352
352
  function lk(a){var b=a.type;if(a.init)return Bk;if("video"==b)return a.codecs.includes(",")?ok:mk;if("audio"==b)return nk;if("text"==b)return"application/mp4"===a.mimeType?pk:zk}function qk(a,b){var c=a.h.zb()[b];if(!c.length)return NaN;var d=a.h.getCurrentTime();return(c=c.find(function(e){return e.start<=d&&e.end>=d}))?1E3*(c.end-d):NaN}
353
- function rk(a,b){var c=a.h.Za();if(!c.length)return NaN;var d=c[0];c=r(c);for(var e=c.next();!e.done;e=c.next())e=e.value,"variant"===e.type&&e.bandwidth>d.bandwidth&&(d=e);switch(b){case mk:return d.videoBandwidth||NaN;case nk:return d.audioBandwidth||NaN;default:return d.bandwidth}}
353
+ function rk(a,b){var c=a.h.$a();if(!c.length)return NaN;var d=c[0];c=r(c);for(var e=c.next();!e.done;e=c.next())e=e.value,"variant"===e.type&&e.bandwidth>d.bandwidth&&(d=e);switch(b){case mk:return d.videoBandwidth||NaN;case nk:return d.audioBandwidth||NaN;default:return d.bandwidth}}
354
354
  function wk(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=r(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
355
355
  l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Ak(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=r(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=wk(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
356
356
  function xk(a,b){if(!b||a.includes("offline:"))return a;var c=new jb(a);c.g.set("CMCD",b);return c.toString()}var vk="m",nk="a",mk="v",ok="av",Bk="i",zk="c",pk="tt",kk="v",jk="l";N("shaka.util.CmcdManager.StreamingFormat",{vh:"d",Kh:"h",ni:"s",Yh:"o"});function Ck(){}
@@ -360,129 +360,129 @@ function Hk(){var a=Infinity;navigator.connection&&navigator.connection.saveData
360
360
  ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},
361
361
  manifestPreprocessor:function(g){return Fk([g],g)}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,useFullSegmentsForStartTime:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E"}},d={retryParameters:Qe(),failureCallback:function(g){return Fk([g],void 0)},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,
362
362
  safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1};if(navigator.userAgent.match(/Edge\//)||Yc()||$c())d.gapDetectionThreshold=.5;if(Zc()||Yc()||$c())d.stallSkip=0;var e={trackSelectionCallback:function(g){return M(function(h){return h["return"](g)})},downloadSizeCallback:function(g){var h;
363
- return M(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?z(k,navigator.storage.estimate(),3):k["return"](!0);h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return Fk([g,h],void 0)},usePersistentLicense:!0},f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new ye},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,
363
+ return M(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?A(k,navigator.storage.estimate(),3):k["return"](!0);h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return Fk([g,h],void 0)},usePersistentLicense:!0},f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new ye},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,
364
364
  maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,
365
365
  maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=function(g){return M(function(h){return h["return"](Ik(g,f.preferredAudioLanguage))})};return f}
366
366
  function Jk(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return Dk(a,b,c||Hk(),d,"")}
367
367
  function Ik(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=Yb(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return Qb(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/
368
368
  2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=r(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=Mb&&"image"!=g.type||c.push(g);return c}N("shaka.util.PlayerConfiguration",Gk);Gk.mergeConfigObjects=Jk;function Kk(){this.g=null;this.h=[]}function Lk(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 Mk(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=r(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
369
- function Nk(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 Ok(){this.i=this.h=null;this.g=[]}function Pk(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 Qk(){this.A=this.B=this.H=this.F=this.m=this.j=this.G=this.l=this.i=this.I=this.J=this.K=this.C=this.N=NaN;this.g=new Kk;this.h=new Ok};function T(a,b){cb.call(this);var c=this;this.l=Rk;this.gd=this.g=null;this.ba=!1;this.ld=new qf;this.ib=new qf;this.A=new qf;this.ge=this.B=this.hb=this.i=this.md=this.J=this.j=this.ma=this.W=this.od=this.K=this.hd=this.I=this.Wa=this.G=this.N=this.m=this.H=null;this.Ke=1E9;this.h=Sk(this);this.Je={width:Infinity,height:Infinity};this.C=null;this.Aa=new Ge(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Ba=this.h.preferredTextLanguage;this.wb=this.h.preferredTextRole;
370
- this.jb=this.h.preferForcedSubs;this.fb=[];this.Ac=null;b&&b(this);this.H=Tk(this);this.H.ue(this.h.streaming.forceHTTPS);this.F=null;Uk&&(this.F=Gb(Uk));this.ld.o(window,"online",function(){c.ke()});this.R={name:"detach"};this.Z={name:"attach"};this.aa={name:"unload"};this.Le={name:"manifest-parser"};this.Ge={name:"manifest"};this.Oa={name:"media-source"};this.ie={name:"drm-engine"};this.$={name:"load"};this.Me={name:"src-equals-drm-engine"};this.Xa={name:"src-equals"};var d=new Map;d.set(this.Z,
369
+ function Nk(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 Ok(){this.i=this.h=null;this.g=[]}function Pk(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 Qk(){this.C=this.F=this.I=this.G=this.B=this.j=this.H=this.m=this.i=this.J=this.K=this.N=this.l=this.A=NaN;this.g=new Kk;this.h=new Ok};function T(a,b){cb.call(this);var c=this;this.l=Rk;this.gd=this.g=null;this.ba=!1;this.ld=new qf;this.ib=new qf;this.A=new qf;this.ge=this.C=this.hb=this.i=this.md=this.J=this.j=this.ma=this.W=this.od=this.K=this.hd=this.I=this.Xa=this.G=this.N=this.m=this.H=null;this.Ke=1E9;this.h=Sk(this);this.Je={width:Infinity,height:Infinity};this.B=null;this.Aa=new Ge(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Ba=this.h.preferredTextLanguage;this.wb=this.h.preferredTextRole;
370
+ this.jb=this.h.preferForcedSubs;this.fb=[];this.Ac=null;b&&b(this);this.H=Tk(this);this.H.ue(this.h.streaming.forceHTTPS);this.F=null;Uk&&(this.F=Gb(Uk));this.ld.o(window,"online",function(){c.ke()});this.R={name:"detach"};this.Z={name:"attach"};this.aa={name:"unload"};this.Le={name:"manifest-parser"};this.Ge={name:"manifest"};this.Oa={name:"media-source"};this.ie={name:"drm-engine"};this.$={name:"load"};this.Me={name:"src-equals-drm-engine"};this.Ya={name:"src-equals"};var d=new Map;d.set(this.Z,
371
371
  function(e,f){return We(Vk(c,e,f))});d.set(this.R,function(e){e.M&&(c.ib.rb(),e.M=null);c.F&&c.F.release();c.g=null;e=Promise.resolve();return We(e)});d.set(this.aa,function(e){return We(Wk(c,e))});d.set(this.Oa,function(e){e=Xk(c,e);return We(e)});d.set(this.Le,function(e,f){var g=Yk(c,e,f);return We(g)});d.set(this.Ge,function(e){return Zk(c,e)});d.set(this.ie,function(e){e=$k(c,e);return We(e)});d.set(this.$,function(e,f){return We(al(c,e,f))});d.set(this.Me,function(e,f){var g=bl(c,e,f);return We(g)});
372
- d.set(this.Xa,function(e,f){return cl(c,e,f)});this.na=new Mj(this.R,{og:function(e,f,g,h){var k=null;e==c.R&&(k=g==c.R?c.R:c.Z);e==c.Z&&(k=g==c.R||f.M!=h.M?c.R:g==c.Z?c.Z:g==c.Oa||g==c.$?c.Oa:g==c.Xa?c.Me:null);e==c.Oa&&(k=g==c.$&&f.M==h.M?c.Le:c.aa);e==c.Le&&(k=dl(c.$,c.Ge,c.aa,g,f,h));e==c.Ge&&(k=dl(c.$,c.ie,c.aa,g,f,h));e==c.ie&&(k=dl(c.$,c.$,c.aa,g,f,h));e==c.Me&&(k=g==c.Xa&&f.M==h.M?c.Xa:c.aa);if(e==c.$||e==c.Xa)k=c.aa;e==c.aa&&(k=h.M&&f.M==h.M?c.Z:c.R);return k},Tf:function(e,f,g){c.dispatchEvent(el(fl,
373
- (new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return M(function(f){return 1==f.g?z(f,Wk(c,e),2):f["return"](e.M?c.Z:c.R)})},Kg:function(e){c.dispatchEvent(el(gl,(new Map).set("state",e.name)))}});a&&this.xc(a,!0)}u(T,cb);function el(a,b){return new O(a,b)}q=T.prototype;
374
- q.destroy=function(){var a=this,b;return M(function(c){switch(c.g){case 1:if(a.l==hl)return c["return"]();a.l=hl;b=Rj(a.na,function(){return{node:a.R,payload:Nj(),Kb:!1}});return z(c,new Promise(function(d){b.ic=function(){};b.pd=function(){d()};b.Qb=function(){d()};b.onError=function(){d()};b.rd=function(){d()}}),2);case 2:return z(c,a.na.destroy(),3);case 3:a.ld&&(a.ld.release(),a.ld=null);a.ib&&(a.ib.release(),a.ib=null);a.A&&(a.A.release(),a.A=null);a.ge=null;a.B=null;a.h=null;a.C=null;a.gd=null;
375
- a.W=null;if(!a.H){c.D(4);break}return z(c,a.H.destroy(),5);case 5:a.H=null;case 4:cb.prototype.release.call(a),B(c)}})};
372
+ d.set(this.Ya,function(e,f){return cl(c,e,f)});this.na=new Mj(this.R,{og:function(e,f,g,h){var k=null;e==c.R&&(k=g==c.R?c.R:c.Z);e==c.Z&&(k=g==c.R||f.M!=h.M?c.R:g==c.Z?c.Z:g==c.Oa||g==c.$?c.Oa:g==c.Ya?c.Me:null);e==c.Oa&&(k=g==c.$&&f.M==h.M?c.Le:c.aa);e==c.Le&&(k=dl(c.$,c.Ge,c.aa,g,f,h));e==c.Ge&&(k=dl(c.$,c.ie,c.aa,g,f,h));e==c.ie&&(k=dl(c.$,c.$,c.aa,g,f,h));e==c.Me&&(k=g==c.Ya&&f.M==h.M?c.Ya:c.aa);if(e==c.$||e==c.Ya)k=c.aa;e==c.aa&&(k=h.M&&f.M==h.M?c.Z:c.R);return k},Tf:function(e,f,g){c.dispatchEvent(el(fl,
373
+ (new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return M(function(f){return 1==f.g?A(f,Wk(c,e),2):f["return"](e.M?c.Z:c.R)})},Kg:function(e){c.dispatchEvent(el(gl,(new Map).set("state",e.name)))}});a&&this.xc(a,!0)}u(T,cb);function el(a,b){return new O(a,b)}q=T.prototype;
374
+ q.destroy=function(){var a=this,b;return M(function(c){switch(c.g){case 1:if(a.l==hl)return c["return"]();a.l=hl;b=Rj(a.na,function(){return{node:a.R,payload:Nj(),Lb:!1}});return A(c,new Promise(function(d){b.ic=function(){};b.pd=function(){d()};b.Rb=function(){d()};b.onError=function(){d()};b.rd=function(){d()}}),2);case 2:return A(c,a.na.destroy(),3);case 3:a.ld&&(a.ld.release(),a.ld=null);a.ib&&(a.ib.release(),a.ib=null);a.A&&(a.A.release(),a.A=null);a.ge=null;a.C=null;a.h=null;a.B=null;a.gd=null;
375
+ a.W=null;if(!a.H){c.D(4);break}return A(c,a.H.destroy(),5);case 5:a.H=null;case 4:cb.prototype.release.call(a),C(c)}})};
376
376
  function il(){window.Promise||Sa("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Xc("Trident/"))return!1;var a=cd();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Sc()?!0:Uc("application/x-mpegurl")}
377
- q.xc=function(a,b){b=void 0===b?!0:b;if(this.l==hl)return Promise.reject(jl());var c=Nj();c.M=a;Sc()||(b=!1);var d=b?this.Oa:this.Z,e=Rj(this.na,function(){return{node:d,payload:c,Kb:!1}});e.ic=function(){};return kl(e)};q.detach=function(){var a=this;if(this.l==hl)return Promise.reject(jl());var b=Rj(this.na,function(){return{node:a.R,payload:Nj(),Kb:!1}});b.ic=function(){};return kl(b)};
378
- q.He=function(a){var b=this;a=void 0===a?!0:a;if(this.l==hl)return Promise.reject(jl());Sc()||(a=!1);var c=Nj(),d=Rj(this.na,function(e){var f=e.M&&a?b.Oa:e.M?b.Z:b.R;c.M=e.M;return{node:f,payload:c,Kb:!1}});d.ic=function(){};return kl(d)};q.jh=function(a){this.Ac=a};
379
- q.load=function(a,b,c){var d=this;this.Ac=null;if(this.l==hl)return Promise.reject(jl());this.dispatchEvent(el(ll));var e=Nj();e.uri=a;e.Be=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=ml(this,e)?this.Xa:this.$,g=Rj(this.na,function(h){if(null==h.M)return null;e.M=h.M;return{node:f,payload:e,Kb:!0}});this.C=new Qk;this.W=nl(this);g.ic=function(){};return new Promise(function(h,k){g.rd=function(){return k(new P(2,7,7002))};g.pd=function(){h();d.dispatchEvent(el(ol))};g.Qb=function(){return k(jl())};
377
+ q.xc=function(a,b){b=void 0===b?!0:b;if(this.l==hl)return Promise.reject(jl());var c=Nj();c.M=a;Sc()||(b=!1);var d=b?this.Oa:this.Z,e=Rj(this.na,function(){return{node:d,payload:c,Lb:!1}});e.ic=function(){};return kl(e)};q.detach=function(){var a=this;if(this.l==hl)return Promise.reject(jl());var b=Rj(this.na,function(){return{node:a.R,payload:Nj(),Lb:!1}});b.ic=function(){};return kl(b)};
378
+ q.He=function(a){var b=this;a=void 0===a?!0:a;if(this.l==hl)return Promise.reject(jl());Sc()||(a=!1);var c=Nj(),d=Rj(this.na,function(e){var f=e.M&&a?b.Oa:e.M?b.Z:b.R;c.M=e.M;return{node:f,payload:c,Lb:!1}});d.ic=function(){};return kl(d)};q.jh=function(a){this.Ac=a};
379
+ q.load=function(a,b,c){var d=this;this.Ac=null;if(this.l==hl)return Promise.reject(jl());this.dispatchEvent(el(ll));var e=Nj();e.uri=a;e.Be=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=ml(this,e)?this.Ya:this.$,g=Rj(this.na,function(h){if(null==h.M)return null;e.M=h.M;return{node:f,payload:e,Lb:!0}});this.B=new Qk;this.W=nl(this);g.ic=function(){};return new Promise(function(h,k){g.rd=function(){return k(new P(2,7,7002))};g.pd=function(){h();d.dispatchEvent(el(ol))};g.Rb=function(){return k(jl())};
380
380
  g.onError=function(l){return k(l)}})};function ml(a,b){if(!Sc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=pg(d),c=pl[c]);if(c){if(""==(b.M||Vc()).canPlayType(c))return!1;if(!Sc()||!(c in og||pg(d)in qg)||a.h.streaming.preferNativeHls)return!0;if(ad())return a.h.streaming.useNativeHlsOnSafari}return!1}function Vk(a,b,c){null==b.M&&(b.M=c.M,a.ib.o(b.M,"error",function(){var d=ql(a);d&&rl(a,d)}));a.g=b.M;return Promise.resolve()}
381
- function Wk(a,b){var c,d,e,f,g,h,k,l,m;return M(function(n){switch(n.g){case 1:return a.l!=hl&&(a.l=Rk),c=a.fb.map(function(p){return p()}),a.fb=[],z(n,Promise.all(c),2);case 2:a.dispatchEvent(el(sl));b.mimeType=null;b.startTime=null;b.uri=null;b.M&&a.A.rb();a.Wa&&(a.Wa.release(),a.Wa=null);a.hd&&(a.hd.stop(),a.hd=null);if(!a.J){n.D(3);break}return z(n,a.J.stop(),4);case 4:a.J=null,a.md=null;case 3:if(!a.B){n.D(5);break}return z(n,a.B.stop(),5);case 5:if(!a.j){n.D(7);break}return z(n,a.j.destroy(),
382
- 8);case 8:a.j=null;case 7:a.I&&(a.I.release(),a.I=null);a.G&&(a.G.release(),a.G=null);if(!a.N){n.D(9);break}return z(n,a.N.destroy(),10);case 10:a.N=null;case 9:if(a.F)a.F.onAssetUnload();if(!b.M||!b.M.src){n.D(11);break}return z(n,new Promise(function(p){return(new Q(p)).S(.1)}),12);case 12:for(b.M.removeAttribute("src"),b.M.load();b.M.lastChild;)b.M.removeChild(b.M.firstChild);case 11:if(!a.m){n.D(13);break}return z(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.hb=null;a.K=null;if(a.i){d=r(a.i.variants);
383
- 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.C=new Qk;a.le=null;tl(a);B(n)}})}
384
- function Xk(a,b){var c,d,e,f;return M(function(g){if(1==g.g)return c=new Ph,d=a.h.textDisplayFactory,e=Gb(d),a.le=d,f=ul(b.M,c,e,function(h,k,l){h=r(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,p=l,t=r(m.frames),v=t.next();!v.done;v=t.next())vl(a,n,p,"ID3",v.value);if(a.F)a.F.onHlsTimedMetadata(m,n)}}),z(g,f.G,2);a.N=f;B(g)})}
385
- function Yk(a,b,c){var d,e,f,g;return M(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.H,a.hb=d,f=a,z(h,ng(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.md=h.h;a.J=Gb(a.md);g=Ze(a.h.manifest);c.M&&"AUDIO"===c.M.nodeName&&(g.disableVideo=!0);a.J.configure(g);B(h)})}
381
+ function Wk(a,b){var c,d,e,f,g,h,k,l,m;return M(function(n){switch(n.g){case 1:return a.l!=hl&&(a.l=Rk),c=a.fb.map(function(p){return p()}),a.fb=[],A(n,Promise.all(c),2);case 2:a.dispatchEvent(el(sl));b.mimeType=null;b.startTime=null;b.uri=null;b.M&&a.A.rb();a.Xa&&(a.Xa.release(),a.Xa=null);a.hd&&(a.hd.stop(),a.hd=null);if(!a.J){n.D(3);break}return A(n,a.J.stop(),4);case 4:a.J=null,a.md=null;case 3:if(!a.C){n.D(5);break}return A(n,a.C.stop(),5);case 5:if(!a.j){n.D(7);break}return A(n,a.j.destroy(),
382
+ 8);case 8:a.j=null;case 7:a.I&&(a.I.release(),a.I=null);a.G&&(a.G.release(),a.G=null);if(!a.N){n.D(9);break}return A(n,a.N.destroy(),10);case 10:a.N=null;case 9:if(a.F)a.F.onAssetUnload();if(!b.M||!b.M.src){n.D(11);break}return A(n,new Promise(function(p){return(new Q(p)).S(.1)}),12);case 12:for(b.M.removeAttribute("src"),b.M.load();b.M.lastChild;)b.M.removeChild(b.M.firstChild);case 11:if(!a.m){n.D(13);break}return A(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.hb=null;a.K=null;if(a.i){d=r(a.i.variants);
383
+ 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.B=new Qk;a.le=null;tl(a);C(n)}})}
384
+ function Xk(a,b){var c,d,e,f;return M(function(g){if(1==g.g)return c=new Ph,d=a.h.textDisplayFactory,e=Gb(d),a.le=d,f=ul(b.M,c,e,function(h,k,l){h=r(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,p=l,t=r(m.frames),v=t.next();!v.done;v=t.next())vl(a,n,p,"ID3",v.value);if(a.F)a.F.onHlsTimedMetadata(m,n)}}),A(g,f.G,2);a.N=f;C(g)})}
385
+ function Yk(a,b,c){var d,e,f,g;return M(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.H,a.hb=d,f=a,A(h,ng(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.md=h.h;a.J=Gb(a.md);g=Ze(a.h.manifest);c.M&&"AUDIO"===c.M.nodeName&&(g.disableVideo=!0);a.J.configure(g);C(h)})}
386
386
  function Zk(a,b){var c=b.uri,d=a.H;a.od=new cj(function(){return a.La()});a.od.addEventListener("regionadd",function(g){g=g.region;wl(a,xl,g);if(a.F)a.F.onDashTimedMetadata(g)});a.ma=null;a.h.streaming.observeQualityChanges&&(a.ma=new Xi(function(){return a.zb()}),a.ma.addEventListener("qualitychange",function(g){var h=g.quality;g=g.position;h=(new Map).set("mediaQuality",{bandwidth:h.bandwidth,audioSamplingRate:h.audioSamplingRate,codecs:h.codecs,contentType:h.contentType,frameRate:h.frameRate,height:h.height,
387
387
  mimeType:h.mimeType,channelsCount:h.channelsCount,pixelAspectRatio:h.pixelAspectRatio,width:h.width}).set("position",g);a.dispatchEvent(el(yl,h))}));var e={networkingEngine:d,modifyManifestRequest:function(g,h){var k=a.W;try{k.g.enabled&&(k.A=h.format,sk(k,g,{ot:vk,su:!k.i}))}catch(l){Ta("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",l)}},modifySegmentRequest:function(g,h){ik(a.W,g,h)},filter:function(g){return zl(a,g)},makeTextStreamsForClosedCaptions:function(g){return Al(a,g)},
388
388
  onTimelineRegionAdded:function(g){var h=a.od;a:{var k=r(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=l;break a}k=null}null==k&&(h.g.add(g),g=new O("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return rl(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
389
- enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Se(function(){var g,h,k,l;return M(function(m){if(1==m.g)return g=a,z(m,a.J.start(c,e),2);g.i=m.h;h=el(Bl);a.dispatchEvent(h);if(0==a.i.variants.length)throw new P(2,4,4036);Cl(a.i);k=Date.now()/1E3;l=k-f;a.C.G=l;B(m)})}(),function(){return a.J.stop()})}
390
- function $k(a,b){var c,d;return M(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Dl(a,{Pb:a.H,onError:function(f){rl(a,f)},qd:function(f){El(a,f)},onExpirationUpdated:function(f,g){Fl(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==Gl&&d&&(d=!1,a.C.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),z(e,If(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?z(e,a.m.xc(b.M),3):z(e,zl(a,a.i),0)})}
391
- function al(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v;return M(function(y){switch(y.g){case 1:b.startTime=c.startTime;null!=a.Ac&&(b.startTime=a.Ac,a.Ac=null);d=b.M;e=b.uri;a.hb=e;a.I=new Ti({fd:function(){return d.playbackRate},cd:function(){return d.defaultPlaybackRate},we:function(w){d.playbackRate=w},nf:function(w){d.currentTime+=w}});f=function(){return Hl(a)};g=function(){return Il(a)};a.A.o(d,"playing",f);a.A.o(d,"pause",f);a.A.o(d,"ended",f);a.A.o(d,"ratechange",g);h=a.h.abrFactory;a.B&&a.ge==h||
392
- (a.ge=h,a.B=Gb(h),"function"!=typeof a.B.playbackRateChanged&&(zb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.B.playbackRateChanged=function(){}),a.B.configure(a.h.abr));a.Aa=new Ge(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Ba=a.h.preferredTextLanguage;a.wb=a.h.preferredTextRole;a.jb=a.h.preferForcedSubs;Jl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.B.init(function(w,x,D){a.j&&w!=a.j.l&&Kl(a,w,!0,void 0===
393
- x?!1:x,void 0===D?0:D)});a.G=Ll(a,b.startTime);a.Wa=Ml(a);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Nl(a,k);Nd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Ol(a);a.j.configure(a.h.streaming);a.l=Pl;d.textTracks&&a.A.o(d.textTracks,"addtrack",function(w){if(w.track)switch(w=w.track,w.kind){case "chapters":Ql(a,w)}});a.dispatchEvent(el(Rl));l=null;if(m=a.Za().find(function(w){return w.active})){y.D(2);break}l=
394
- Sl(a)?a.B.chooseVariant():null;Kl(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.D(3);break}n=a.G.m();return z(y,Tl(l,n),4);case 4:p=y.h,a.G.A(p);case 3:Ul(a,null,le(l));case 2:return t=a.pb().find(function(w){return w.active}),t||((v=ve(a.i.textStreams,a.Ba,a.wb,a.jb)[0]||null)&&Pk(a.C.h,v,!0),l&&(v?(l.audio&&Vl(a,l.audio,v)&&(a.ba=!0),a.ba&&a.N.l.setTextVisibility(!0),Wl(a)):a.ba=!1),v&&(a.h.streaming.alwaysStreamText||a.Ob())&&vj(a.j,v)),z(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.B.enable(),
395
- Xl(a)),ce(a.j?a.j.l:null,a.i),Yl(a.i),Zl(a),Sl(a),a.i.variants.some(function(w){return w.primary}),a.A.Ga(d,"loadedmetadata",function(){a.C.l=Date.now()/1E3-c.Be}),B(y)}})}
396
- function bl(a,b,c){var d,e,f,g,h,k,l;return M(function(m){return 1==m.g?(d=Nb,e=Date.now()/1E3,f=!0,a.m=Dl(a,{Pb:a.H,onError:function(n){rl(a,n)},qd:function(n){El(a,n)},onExpirationUpdated:function(n,p){Fl(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==Gl&&f&&(f=!1,a.C.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=pg(g),k=pl[h],"application/x-mpegurl"==k&&ad()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
397
- createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Cd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.gb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.W=!0,z(m,If(a.m,[l],[]),2)):z(m,a.m.xc(b.M),
389
+ enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Se(function(){var g,h,k,l;return M(function(m){if(1==m.g)return g=a,A(m,a.J.start(c,e),2);g.i=m.h;h=el(Bl);a.dispatchEvent(h);if(0==a.i.variants.length)throw new P(2,4,4036);Cl(a.i);k=Date.now()/1E3;l=k-f;a.B.H=l;C(m)})}(),function(){return a.J.stop()})}
390
+ function $k(a,b){var c,d;return M(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Dl(a,{Qb:a.H,onError:function(f){rl(a,f)},qd:function(f){El(a,f)},onExpirationUpdated:function(f,g){Fl(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==Gl&&d&&(d=!1,a.B.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),A(e,If(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?A(e,a.m.xc(b.M),3):A(e,zl(a,a.i),0)})}
391
+ function al(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v;return M(function(x){switch(x.g){case 1:b.startTime=c.startTime;null!=a.Ac&&(b.startTime=a.Ac,a.Ac=null);d=b.M;e=b.uri;a.hb=e;a.I=new Ti({fd:function(){return d.playbackRate},cd:function(){return d.defaultPlaybackRate},we:function(y){d.playbackRate=y},nf:function(y){d.currentTime+=y}});f=function(){return Hl(a)};g=function(){return Il(a)};a.A.o(d,"playing",f);a.A.o(d,"pause",f);a.A.o(d,"ended",f);a.A.o(d,"ratechange",g);h=a.h.abrFactory;a.C&&a.ge==h||
392
+ (a.ge=h,a.C=Gb(h),"function"!=typeof a.C.playbackRateChanged&&(zb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.C.playbackRateChanged=function(){}),a.C.configure(a.h.abr));a.Aa=new Ge(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Ba=a.h.preferredTextLanguage;a.wb=a.h.preferredTextRole;a.jb=a.h.preferForcedSubs;Jl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.C.init(function(y,w,D){a.j&&y!=a.j.l&&Kl(a,y,!0,void 0===
393
+ w?!1:w,void 0===D?0:D)});a.G=Ll(a,b.startTime);a.Xa=Ml(a);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Nl(a,k);Nd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Ol(a);a.j.configure(a.h.streaming);a.l=Pl;d.textTracks&&a.A.o(d.textTracks,"addtrack",function(y){if(y.track)switch(y=y.track,y.kind){case "chapters":Ql(a,y)}});a.dispatchEvent(el(Rl));l=null;if(m=a.$a().find(function(y){return y.active})){x.D(2);break}l=
394
+ Sl(a)?a.C.chooseVariant():null;Kl(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){x.D(3);break}n=a.G.m();return A(x,Tl(l,n),4);case 4:p=x.h,a.G.A(p);case 3:Ul(a,null,le(l));case 2:return t=a.pb().find(function(y){return y.active}),t||((v=ve(a.i.textStreams,a.Ba,a.wb,a.jb)[0]||null)&&Pk(a.B.h,v,!0),l&&(v?(l.audio&&Vl(a,l.audio,v)&&(a.ba=!0),a.ba&&a.N.l.setTextVisibility(!0),Wl(a)):a.ba=!1),v&&(a.h.streaming.alwaysStreamText||a.Pb())&&vj(a.j,v)),A(x,a.j.start(),5);case 5:a.h.abr.enabled&&(a.C.enable(),
395
+ Xl(a)),ce(a.j?a.j.l:null,a.i),Yl(a.i),Zl(a),Sl(a),a.i.variants.some(function(y){return y.primary}),a.A.Ga(d,"loadedmetadata",function(){a.B.m=Date.now()/1E3-c.Be}),C(x)}})}
396
+ function bl(a,b,c){var d,e,f,g,h,k,l;return M(function(m){return 1==m.g?(d=Nb,e=Date.now()/1E3,f=!0,a.m=Dl(a,{Qb:a.H,onError:function(n){rl(a,n)},qd:function(n){El(a,n)},onExpirationUpdated:function(n,p){Fl(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==Gl&&f&&(f=!1,a.B.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=pg(g),k=pl[h],"application/x-mpegurl"==k&&ad()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
397
+ createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Cd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.gb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.W=!0,A(m,If(a.m,[l],[]),2)):A(m,a.m.xc(b.M),
398
398
  0)})}
399
399
  function cl(a,b,c){function d(){return Hl(a)}b.uri=c.uri;b.startTime=c.startTime;a.hb=b.uri;var e=b.M;a.G=new Ii(e);var f=!1;a.fb.push(function(){f=!0});null!=b.startTime&&a.G.A(b.startTime);a.I=new Ti({fd:function(){return e.playbackRate},cd:function(){return e.defaultPlaybackRate},we:function(k){e.playbackRate=k},nf:function(k){e.currentTime+=k}});Nl(a,a.h.streaming.rebufferingGoal);a.A.o(e,"playing",d);a.A.o(e,"pause",d);a.A.o(e,"ended",d);a.A.o(e,"ratechange",function(){return Il(a)});"none"!=e.preload&&
400
- a.A.Ga(e,"loadedmetadata",function(){a.C.l=Date.now()/1E3-c.Be});e.audioTracks&&(a.A.o(e.audioTracks,"addtrack",function(){return Zl(a)}),a.A.o(e.audioTracks,"removetrack",function(){return Zl(a)}),a.A.o(e.audioTracks,"change",function(){return Zl(a)}));e.textTracks&&(a.A.o(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":$l(a,k);break;case "chapters":Ql(a,k);break;default:Zl(a)}}),a.A.o(e.textTracks,"removetrack",function(){return Zl(a)}),a.A.o(e.textTracks,
401
- "change",function(){return Zl(a)}));var g=pg(b.uri);e.src=tk(a.W,b.uri,pl[g]);(Yc()||Zc())&&e.load();a.l=am;a.dispatchEvent(el(Rl));var h=new Pc;zi(e,HTMLMediaElement.HAVE_METADATA,a.A,function(){h.resolve()});zi(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.A,function(){var k;return M(function(l){if(1==l.g)return bm(a),k=cm(a),k.find(function(m){return"disabled"!=m.mode})?l.D(2):z(l,new Promise(function(m){a.A.Ga(e.textTracks,"change",m);(new Q(m)).S(1)}),2);if(f)return l["return"]();dm(a);B(l)})});e.error?
400
+ a.A.Ga(e,"loadedmetadata",function(){a.B.m=Date.now()/1E3-c.Be});e.audioTracks&&(a.A.o(e.audioTracks,"addtrack",function(){return Zl(a)}),a.A.o(e.audioTracks,"removetrack",function(){return Zl(a)}),a.A.o(e.audioTracks,"change",function(){return Zl(a)}));e.textTracks&&(a.A.o(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":$l(a,k);break;case "chapters":Ql(a,k);break;default:Zl(a)}}),a.A.o(e.textTracks,"removetrack",function(){return Zl(a)}),a.A.o(e.textTracks,
401
+ "change",function(){return Zl(a)}));var g=pg(b.uri);e.src=tk(a.W,b.uri,pl[g]);(Yc()||Zc())&&e.load();a.l=am;a.dispatchEvent(el(Rl));var h=new Pc;zi(e,HTMLMediaElement.HAVE_METADATA,a.A,function(){h.resolve()});zi(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.A,function(){var k;return M(function(l){if(1==l.g)return bm(a),k=cm(a),k.find(function(m){return"disabled"!=m.mode})?l.D(2):A(l,new Promise(function(m){a.A.Ga(e.textTracks,"change",m);(new Q(m)).S(1)}),2);if(f)return l["return"]();dm(a);C(l)})});e.error?
402
402
  h.reject(ql(a)):"none"==e.preload&&(Sa('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.A.Ga(e,"error",function(){h.reject(ql(a))});return new Se(h,function(){h.reject(new P(2,7,7001));return Promise.resolve()})}
403
403
  function bm(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.wd(b);var c=a.h.preferredVariantRole;""!=c&&a.wd(b,c)}}function dm(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.oe(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.oe(b,d,c)}}
404
404
  function $l(a,b){if("metadata"==b.kind){b.mode="hidden";a.A.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,vl(a,e.startTime,e.endTime,e.type,e.value),a.F)a.F.onCueMetadataChange(e.value)});var c=(new Q(function(){var d=em(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).za().S(.5);a.fb.push(function(){c.stop()})}}
405
405
  function vl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(el(fm,b))}function Ql(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Q(function(){b.mode="hidden"})).za().S(.5);a.fb.push(function(){c.stop()})}}function Cl(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 Dl(a,b){return new Bf(b,a.h.drm.updateExpirationTime)}
406
- function Tk(a){return new cf(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(el(gm,b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(el(hm,b))})}
407
- function Ll(a,b){return new Ji(a.g,a.i,a.h.streaming,b,function(){a.Wa&&Wi(a.Wa,!0);if(a.j)for(var c=a.j,d=c.g.ed(),e=c.h.smallGapLimit,f=r(c.i.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.i.get(g);h.ua=null;var k=c.g.V;g==Mb?(k=k.g,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=di(k,g),k=Sh(k,d,e));if(!k&&((null!=ei(c.g.V,g)||h.ab)&&yj(c,h),h.Ma&&(h.Ma.abort(),h.Ma=null),g===Mb))for(g=c.g.V.C.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,Fh(g),g=r(g.j.values()),h=g.next();!h.done;h=g.next())Ah(h.value)}a.K&&
406
+ function Tk(a){return new cf(function(b,c){a.C&&a.C.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(el(gm,b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(el(hm,b))})}
407
+ function Ll(a,b){return new Ji(a.g,a.i,a.h.streaming,b,function(){a.Xa&&Wi(a.Xa,!0);if(a.j)for(var c=a.j,d=c.g.ed(),e=c.h.smallGapLimit,f=r(c.j.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.j.get(g);h.ua=null;var k=c.g.V;g==Mb?(k=k.g,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=di(k,g),k=Sh(k,d,e));if(!k&&((null!=ei(c.g.V,g)||h.Ta)&&yj(c,h),h.Ma&&(h.Ma.abort(),h.Ma=null),g===Mb))for(g=c.g.V.C.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,Fh(g),g=r(g.j.values()),h=g.next();!h.done;h=g.next())Ah(h.value)}a.K&&
408
408
  im(a)},function(c){return a.dispatchEvent(c)})}function Ml(a){var b=new dj(a.od);b.addEventListener("enter",function(d){wl(a,jm,d.region)});b.addEventListener("exit",function(d){wl(a,km,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(wl(a,jm,e),wl(a,km,e))});var c=new Vi(a.g);c.g.add(b);a.ma&&c.g.add(a.ma);return c}function Nl(a,b){a.K=new Le;a.K.g=Ne;Oe(a.K,b,Math.min(.5,b/2));tl(a);a.hd=(new Q(function(){im(a)})).ha(.25)}
409
- function im(a){switch(a.l){case am:if(a.g.ended)var b=!0;else{var c=Rh(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Pl:a:if(a.g.ended||bi(a.N))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.Jb();var d=Rh(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Th(a.g.buffered,a.g.currentTime);c=a.K;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Me:Ne;c.g=d;b!=d&&tl(a)}function ul(a,b,c,d){return new Wh(a,b,c,d)}
410
- function nl(a){return new hk({getBandwidthEstimate:function(){return a.B?a.B.getBandwidthEstimate():NaN},zb:function(){return a.zb()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Za:function(){return a.Za()},Ab:function(){return a.Ab()},T:function(){return a.T()}},a.h.cmcd)}
411
- function Ol(a){return new jj(a.i,{ed:function(){return a.G.m()},getBandwidthEstimate:function(){return a.B.getBandwidthEstimate()},modifySegmentRequest:function(b,c){ik(a.W,b,c)},V:a.N,Pb:a.H,onError:function(b){return rl(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Mg:function(){a.J&&a.J.update&&a.J.update()},fe:function(){a.G&&a.G.G();im(a)},Lg:function(b,c){var d=c.Zd;d&&a.ma&&aj(a.ma,d,b)}})}
409
+ function im(a){switch(a.l){case am:if(a.g.ended)var b=!0;else{var c=Rh(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Pl:a:if(a.g.ended||bi(a.N))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.Kb();var d=Rh(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Th(a.g.buffered,a.g.currentTime);c=a.K;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Me:Ne;c.g=d;b!=d&&tl(a)}function ul(a,b,c,d){return new Wh(a,b,c,d)}
410
+ function nl(a){return new hk({getBandwidthEstimate:function(){return a.C?a.C.getBandwidthEstimate():NaN},zb:function(){return a.zb()},getCurrentTime:function(){return a.g?a.g.currentTime:0},$a:function(){return a.$a()},Ab:function(){return a.Ab()},T:function(){return a.T()}},a.h.cmcd)}
411
+ function Ol(a){return new jj(a.i,{ed:function(){return a.G.m()},getBandwidthEstimate:function(){return a.C.getBandwidthEstimate()},modifySegmentRequest:function(b,c){ik(a.W,b,c)},V:a.N,Qb:a.H,onError:function(b){return rl(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Mg:function(){a.J&&a.J.update&&a.J.update()},fe:function(){a.G&&a.G.G();im(a)},Lg:function(b,c){var d=c.Zd;d&&a.ma&&Zi(a.ma,d,b)}})}
412
412
  q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Ek(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(zb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=
413
413
  0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=Jk(this.h,a,Sk(this));lm(this);return c};
414
- function lm(a){if(a.J){var b=Ze(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{mm(a,a.i)}catch(f){rl(a,f)}a.B&&Sl(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||nm(a)}a.H&&a.H.ue(a.h.streaming.forceHTTPS);if(a.N&&(b=a.h.textDisplayFactory,a.le!=b)){var c=Gb(b),d=a.N,e=d.l;d.l=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=c);a.le=b;a.j&&(b=a.j,(c=b.i.get(Mb))&&
415
- tj(b,c.stream,!0,0,!0))}a.B&&(a.B.configure(a.h.abr),a.h.abr.enabled?a.B.enable():a.B.disable(),Xl(a));a.K&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Oe(a.K,b,Math.min(.5,b/2)));a.i&&Jl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=Sk(this);Jk(a,this.h,Sk(this));return a};
414
+ function lm(a){if(a.J){var b=Ze(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{mm(a,a.i)}catch(f){rl(a,f)}a.C&&Sl(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||nm(a)}a.H&&a.H.ue(a.h.streaming.forceHTTPS);if(a.N&&(b=a.h.textDisplayFactory,a.le!=b)){var c=Gb(b),d=a.N,e=d.l;d.l=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=c);a.le=b;a.j&&(b=a.j,(c=b.j.get(Mb))&&
415
+ tj(b,c.stream,!0,0,!0))}a.C&&(a.C.configure(a.h.abr),a.h.abr.enabled?a.C.enable():a.C.disable(),Xl(a));a.K&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Oe(a.K,b,Math.min(.5,b/2)));a.i&&Jl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=Sk(this);Jk(a,this.h,Sk(this));return a};
416
416
  q.Wf=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.La().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.Wg=function(){for(var a in this.h)delete this.h[a];Jk(this.h,Sk(this),Sk(this));lm(this)};q.cf=function(){return this.l};q.ng=function(){return this.g};q.Dc=function(){return this.H};q.Td=function(){return this.hb};
417
- q.bd=function(){return this.F?this.F:null};q.T=function(){return this.i?this.i.presentationTimeline.T():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Mb=function(){return this.i?this.i.presentationTimeline.Mb():!1};q.jf=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};
417
+ q.bd=function(){return this.F?this.F:null};q.T=function(){return this.i?this.i.presentationTimeline.T():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Nb=function(){return this.i?this.i.presentationTimeline.Nb():!1};q.jf=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};
418
418
  q.La=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.bc(),end:a.mb()}}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.Ag=function(){this.T()&&(this.g.currentTime=this.La().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.Cc=function(){return this.m?this.m.Cc():Infinity};q.dd=function(){return this.m?this.m.dd():{}};
419
- q.Ic=function(){return this.K?this.K.g==Ne:!1};q.Ab=function(){return this.g?this.I?this.I.i:1:0};q.Fe=function(a){0==a?Sa("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.I.set(a),this.l==Pl&&(this.B.playbackRateChanged(a),sj(this.j,1<Math.abs(a))))};q.Pe=function(){var a=this.I.cd();this.l==am&&this.I.set(a);this.l==Pl&&(this.I.set(a),this.B.playbackRateChanged(a),sj(this.j,!1))};
420
- q.Za=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,te(e)){var f=le(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 se(g)}):[]};
419
+ q.Ic=function(){return this.K?this.K.g==Ne:!1};q.Ab=function(){return this.g?this.I?this.I.i:1:0};q.Fe=function(a){0==a?Sa("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.I.set(a),this.l==Pl&&(this.C.playbackRateChanged(a),sj(this.j,1<Math.abs(a))))};q.Pe=function(){var a=this.I.cd();this.l==am&&this.I.set(a);this.l==Pl&&(this.I.set(a),this.C.playbackRateChanged(a),sj(this.j,!1))};
420
+ q.$a=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,te(e)){var f=le(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 se(g)}):[]};
421
421
  q.pb=function(){if(this.i){for(var a=this.j?this.j.A:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=me(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?cm(this).map(function(f){return qe(f)}):[]};q.fg=function(){return this.i?this.i.imageStreams.map(function(a){return ne(a)}):[]};
422
- q.wg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,D,C,A;return M(function(F){if(1==F.g)return c.i?(d=c.i.imageStreams.find(function(G){return G.id==a}))?d.segmentIndex?F.D(3):z(F,d.createSegmentIndex(),3):F["return"](null):F.D(2);if(2!=F.g){e=d.segmentIndex.find(b);if(null==e)return F["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return F["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;t=l/n;
423
- v=m*n;y=f.l-f.startTime;w=f.i||y/v;x=f.startTime;C=D=0;1<v&&(A=Math.floor((b-f.startTime)/w),x=f.startTime+A*w,D=A%m*p,C=Math.floor(A/m)*t);return F["return"]({imageHeight:l,imageWidth:k,height:t,positionX:D,positionY:C,startTime:x,duration:w,uris:f.Ka(),width:p})}return F["return"](null)})};
424
- q.pe=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.A&&(Pk(this.C.h,b,!1),vj(this.j,b),om(this),this.Ba=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=cm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,oe(c)==a.id?c.mode=this.ba?"showing":"hidden":c.mode="disabled";om(this)}};
422
+ q.wg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,t,v,x,y,w,D,z,B;return M(function(F){if(1==F.g)return c.i?(d=c.i.imageStreams.find(function(G){return G.id==a}))?d.segmentIndex?F.D(3):A(F,d.createSegmentIndex(),3):F["return"](null):F.D(2);if(2!=F.g){e=d.segmentIndex.find(b);if(null==e)return F["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return F["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;t=l/n;
423
+ v=m*n;x=f.l-f.startTime;y=f.i||x/v;w=f.startTime;z=D=0;1<v&&(B=Math.floor((b-f.startTime)/y),w=f.startTime+B*y,D=B%m*p,z=Math.floor(B/m)*t);return F["return"]({imageHeight:l,imageWidth:k,height:t,positionX:D,positionY:z,startTime:w,duration:y,uris:f.Ka(),width:p})}return F["return"](null)})};
424
+ q.pe=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.A&&(Pk(this.B.h,b,!1),vj(this.j,b),om(this),this.Ba=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=cm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,oe(c)==a.id?c.mode=this.ba?"showing":"hidden":c.mode="disabled";om(this)}};
425
425
  q.qe=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&&Sa("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&&te(d)&&(Kl(this,d,!1,b,c),this.Aa=new Fe(d),Sl(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,
426
- oe(c)==a.id){pm(this,c);break}};q.Vf=function(){return qm(this.Za())};q.vg=function(){return qm(this.pb())};q.Uf=function(){return Array.from(rm(this.Za()))};q.ug=function(){return Array.from(rm(this.pb()))};
426
+ oe(c)==a.id){pm(this,c);break}};q.Vf=function(){return qm(this.$a())};q.vg=function(){return qm(this.pb())};q.Uf=function(){return Array.from(rm(this.$a()))};q.ug=function(){return Array.from(rm(this.pb()))};
427
427
  q.wd=function(a,b){if(this.i&&this.G){this.Aa=new Ge(a,b||"",0,"");var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.j.l,e=this.Aa.create(this.i.variants),f=null;e=r(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;f?(c=le(f),this.qe(c,!0)):nm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=Qb(a);f=d=null;e=
428
428
  r(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=se(g);Qb(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?pm(this,f):d&&pm(this,d)}};
429
- q.oe=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.G){if(this.Ba=a,this.wb=b||"",this.jb=c,(a=ve(this.i.textStreams,this.Ba,this.wb,this.jb)[0]||null)&&a!=this.j.A&&(Pk(this.C.h,a,!1),this.h.streaming.alwaysStreamText||this.Ob()))vj(this.j,a),om(this)}else{var d=Qb(a);(a=this.pb().find(function(e){return Qb(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.pe(a)}};
430
- q.Yg=function(a){if(this.i&&this.G){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.Aa=new Ge(b.language,"",0,a),nm(this))}};q.Ob=function(){var a=this.ba;return this.N?this.N.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?cm(this).some(function(b){return"showing"==b.mode}):a};q.$e=function(){return this.g&&this.g.src&&this.g.textTracks?sm(this).map(function(a){return qe(a)}):[]};
429
+ q.oe=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.G){if(this.Ba=a,this.wb=b||"",this.jb=c,(a=ve(this.i.textStreams,this.Ba,this.wb,this.jb)[0]||null)&&a!=this.j.A&&(Pk(this.B.h,a,!1),this.h.streaming.alwaysStreamText||this.Pb()))vj(this.j,a),om(this)}else{var d=Qb(a);(a=this.pb().find(function(e){return Qb(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.pe(a)}};
430
+ q.Yg=function(a){if(this.i&&this.G){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.Aa=new Ge(b.language,"",0,a),nm(this))}};q.Pb=function(){var a=this.ba;return this.N?this.N.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?cm(this).some(function(b){return"showing"==b.mode}):a};q.$e=function(){return this.g&&this.g.src&&this.g.textTracks?sm(this).map(function(a){return qe(a)}):[]};
431
431
  q.Yf=function(a){var b=Qb(a),c=sm(this).filter(function(f){return Qb(f.language)==b});if(!c||!c.length)return[];a=[];c=r(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=r(d.cues);for(var e=d.next();!e.done;e=d.next())e=e.value,a.push({title:e.text,startTime:e.startTime,endTime:e.endTime})}return a};function cm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}
432
432
  function em(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function sm(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
433
433
  q.ze=function(a){a=!!a;if(this.ba!=a){this.ba=a;if(this.l==Pl)this.N.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.A||(a=ve(this.i.textStreams,this.Ba,this.wb,this.jb),0<a.length&&(vj(this.j,a[0]),om(this))):rj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=cm(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")}Wl(this)}};
434
434
  q.pg=function(){if(!this.T())return null;var a=this.na.l,b=0;if(this.G)b=this.G.m();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
435
435
  q.df=function(){if(!this.T())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.zb=function(){if(this.l==Pl)return this.N.zb();var a={total:[],audio:[],video:[],text:[]};this.l==am&&(a.total=Uh(this.g.buffered));return a};
436
- q.getStats=function(){if(this.l!=Pl&&this.l!=am)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Hl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.C;b=Math.round(100*b);c.i=isNaN(c.i)?
437
- b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.C,b=Number(a.totalVideoFrames),c.K=Number(a.droppedVideoFrames),c.J=b,this.C.I=Number(a.corruptedVideoFrames));this.m?(a=this.m,a=a.I?a.I:NaN):a=NaN;this.C.m=a;if(this.l==Pl){if(a=this.j.l)this.C.B=(this.I?this.I.i:1)*a.bandwidth;a&&a.video&&(c=this.C,b=a.video.height||NaN,c.N=a.video.width||NaN,c.C=b);this.T()&&(a=this.df().valueOf()+1E3*this.La().end,this.C.F=(Date.now()-a)/1E3);this.i&&this.i.presentationTimeline&&
438
- (this.C.H=this.i.presentationTimeline.g);a=this.B.getBandwidthEstimate();this.C.A=a}var d=this.C;a=d.N;c=d.C;b=d.B;var e=d.J,f=d.K,g=d.I,h=d.A,k=d.i,l=d.l,m=d.G,n=d.j,p=Mk(d.g,"playing"),t=Mk(d.g,"paused"),v=Mk(d.g,"buffering"),y=d.m,w=d.F,x=d.H,D=Nk(d.g),C=[];d=r(d.h.g);for(var A=d.next();!A.done;A=d.next())A=A.value,C.push({timestamp:A.timestamp,id:A.id,type:A.type,fromAdaptation:A.fromAdaptation,bandwidth:A.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:e,droppedFrames:f,corruptedFrames:g,
439
- estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:t,bufferingTime:v,licenseTime:y,liveLatency:w,maxSegmentDuration:x,stateHistory:D,switchHistory:C}};
436
+ q.getStats=function(){if(this.l!=Pl&&this.l!=am)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Hl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.B;b=Math.round(100*b);c.i=isNaN(c.i)?
437
+ b:Math.max(c.i,b)}if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.B;var d=Number(c.totalVideoFrames);b.N=Number(c.droppedVideoFrames);b.K=d;this.B.J=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.I?c.I:NaN):c=NaN;this.B.B=c;if(this.l==Pl){if(c=this.j.l)this.B.F=(this.I?this.I.i:1)*c.bandwidth;c&&c.video&&(b=this.B,d=c.video.height||NaN,b.A=c.video.width||NaN,b.l=d);this.T()&&(c=this.df().valueOf()+1E3*this.La().end,this.B.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&
438
+ (this.B.I=this.i.presentationTimeline.g);c=this.C.getBandwidthEstimate();this.B.C=c}this.l==am&&(c=this.B,b=a.videoHeight||NaN,c.A=a.videoWidth||NaN,c.l=b);var e=this.B;a=e.A;c=e.l;b=e.F;d=e.K;var f=e.N,g=e.J,h=e.C,k=e.i,l=e.m,m=e.H,n=e.j,p=Mk(e.g,"playing"),t=Mk(e.g,"paused"),v=Mk(e.g,"buffering"),x=e.B,y=e.G,w=e.I,D=Nk(e.g),z=[];e=r(e.h.g);for(var B=e.next();!B.done;B=e.next())B=B.value,z.push({timestamp:B.timestamp,id:B.id,type:B.type,fromAdaptation:B.fromAdaptation,bandwidth:B.bandwidth});return{width:a,
439
+ height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:t,bufferingTime:v,licenseTime:x,liveLatency:y,maxSegmentDuration:w,stateHistory:D,switchHistory:z}};
440
440
  q.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;zb("addTextTrack","Please use an addTextTrackAsync.");if(this.l!=Pl&&this.l!=am)throw new P(1,7,7004);if(!d){var h=pg(a);d=tm[h];if(!d)throw new P(1,2,2011,h);}if(this.l==am){if("text/vtt"!=d)throw new P(1,2,2013,d);g&&(c="forced");d=document.createElement("track");d.src=yk(this.W,a);d.label=f||"";d.kind=c;d.srclang=b;this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous");this.g.appendChild(d);if(a=this.pb().find(function(k){return k.language==
441
441
  b&&k.label==(f||"")&&k.kind==c}))return Zl(this),a;throw new P(1,2,2012);}h=this.i.presentationTimeline.getDuration();if(Infinity==h)throw new P(1,4,4033);a={id:this.Ke++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ri(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:Mb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
442
442
  closedCaptions:null};if(!Fd(yd(a.mimeType,a.codecs)))throw new P(2,2,2014,d);this.i.textStreams.push(a);Zl(this);return me(a)};
443
- q.Kf=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,t,v,y,w,x,D;return M(function(C){switch(C.g){case 1:if(h.l!=Pl&&h.l!=am)throw new P(1,7,7004);if(d){C.D(2);break}return z(C,um(h,a),3);case 3:d=C.h;case 2:k=[];if(h.F)try{k=h.F.getServerSideCuePoints()}catch(A){}if(h.l!=am){C.D(4);break}g&&(c="forced");return z(C,vm(h,a,b,c,d,f||"",k),5);case 5:l=h.pb();if(m=l.find(function(A){return A.language==b&&A.label==(f||"")&&A.kind==c}))return Zl(h),C["return"](m);throw new P(1,2,2012);case 4:n=
444
- Nb;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new P(1,4,4033);if(!k.length){C.D(6);break}return z(C,wm(h,a,h.H,h.h.streaming.retryParameters),7);case 7:t=C.h,v=xm(h,t,d,k),y=new Blob([v],{type:"text/vtt"}),a=Zh(y),d="text/vtt";case 6:w={id:h.Ke++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ri(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.oa,primary:!1,trickModeVideo:null,
445
- emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};x=yd(w.mimeType,w.codecs);D=Fd(x);if(!D)throw new P(2,2,2014,d);h.i.textStreams.push(w);Zl(h);return C["return"](me(w))}})};
446
- q.Jf=function(a,b,c){var d=this,e,f,g,h;return M(function(k){switch(k.g){case 1:if(d.l!=Pl&&d.l!=am)throw new P(1,7,7004);if(c){k.D(2);break}return z(k,um(d,a),3);case 3:c=k.h;case 2:e=[];if(d.F)try{e=d.F.getServerSideCuePoints()}catch(l){}return z(k,vm(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.$e();h=g.find(function(l){return l.language==b});if(!h){k.D(5);break}return z(k,new Promise(function(l,m){d.A.Ga(f,"load",l);d.A.Ga(f,"error",function(){m(new P(1,2,2015))})}),6);case 6:return k["return"](h);
447
- case 5:throw new P(1,2,2012);}})};function um(a,b){var c,d;return M(function(e){switch(e.g){case 1:c=pg(b);if(d=tm[c])return e["return"](d);E(e,2);return z(e,rg(b,a.H,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:I(e);case 3:if(d)return e["return"](d);throw new P(1,2,2011,c);}})}
448
- function vm(a,b,c,d,e,f,g){var h,k,l,m;return M(function(n){if(1==n.g)return"text/vtt"!=e||g.length?z(n,wm(a,b,a.H,a.h.streaming.retryParameters),3):n.D(2);2!=n.g&&(h=n.h,k=xm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Zh(l),e="text/vtt");m=document.createElement("track");m.src=yk(a.W,b);m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n["return"](m)})}
449
- function wm(a,b,c,d){var e,f,g;return M(function(h){if(1==h.g){e=nf;f=gf([b],d);f.method="GET";var k=a.W;try{k.g.enabled&&sk(k,f,{ot:zk,su:!0})}catch(l){Ta("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return z(h,c.request(e,f).promise,2)}g=h.h;return h["return"](g.data)})}function xm(a,b,c,d){var e=Gd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration},b=Ic(b),b=c.parseMedia(b,a),gk(b,d);throw new P(2,2,2014,c);}
450
- q.ve=function(a,b){this.Je.width=a;this.Je.height=b};q.ke=function(){if(this.l==Pl){var a=this.j;if(a.j.g)a=!1;else if(a.B)a=!1;else{for(var b=r(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,c.Gc&&(c.Gc=!1,qj(a,c,.1));a=!0}}else a=!1;return a};q.kg=function(){Sa("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};
443
+ q.Kf=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,t,v,x,y,w,D;return M(function(z){switch(z.g){case 1:if(h.l!=Pl&&h.l!=am)throw new P(1,7,7004);if(d){z.D(2);break}return A(z,um(h,a),3);case 3:d=z.h;case 2:k=[];if(h.F)try{k=h.F.getServerSideCuePoints()}catch(B){}if(h.l!=am){z.D(4);break}g&&(c="forced");return A(z,vm(h,a,b,c,d,f||"",k),5);case 5:l=h.pb();if(m=l.find(function(B){return B.language==b&&B.label==(f||"")&&B.kind==c}))return Zl(h),z["return"](m);throw new P(1,2,2012);case 4:n=
444
+ Nb;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new P(1,4,4033);if(!k.length){z.D(6);break}return A(z,wm(h,a,h.H,h.h.streaming.retryParameters),7);case 7:t=z.h,v=xm(h,t,d,k),x=new Blob([v],{type:"text/vtt"}),a=Zh(x),d="text/vtt";case 6:y={id:h.Ke++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ri(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.oa,primary:!1,trickModeVideo:null,
445
+ emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=yd(y.mimeType,y.codecs);D=Fd(w);if(!D)throw new P(2,2,2014,d);h.i.textStreams.push(y);Zl(h);return z["return"](me(y))}})};
446
+ q.Jf=function(a,b,c){var d=this,e,f,g,h;return M(function(k){switch(k.g){case 1:if(d.l!=Pl&&d.l!=am)throw new P(1,7,7004);if(c){k.D(2);break}return A(k,um(d,a),3);case 3:c=k.h;case 2:e=[];if(d.F)try{e=d.F.getServerSideCuePoints()}catch(l){}return A(k,vm(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.$e();h=g.find(function(l){return l.language==b});if(!h){k.D(5);break}return A(k,new Promise(function(l,m){d.A.Ga(f,"load",l);d.A.Ga(f,"error",function(){m(new P(1,2,2015))})}),6);case 6:return k["return"](h);
447
+ case 5:throw new P(1,2,2012);}})};function um(a,b){var c,d;return M(function(e){switch(e.g){case 1:c=pg(b);if(d=tm[c])return e["return"](d);E(e,2);return A(e,rg(b,a.H,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:I(e);case 3:if(d)return e["return"](d);throw new P(1,2,2011,c);}})}
448
+ function vm(a,b,c,d,e,f,g){var h,k,l,m;return M(function(n){if(1==n.g)return"text/vtt"!=e||g.length?A(n,wm(a,b,a.H,a.h.streaming.retryParameters),3):n.D(2);2!=n.g&&(h=n.h,k=xm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Zh(l),e="text/vtt");m=document.createElement("track");m.src=yk(a.W,b);m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n["return"](m)})}
449
+ function wm(a,b,c,d){var e,f,g;return M(function(h){if(1==h.g){e=nf;f=gf([b],d);f.method="GET";var k=a.W;try{k.g.enabled&&sk(k,f,{ot:zk,su:!0})}catch(l){Ta("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return A(h,c.request(e,f).promise,2)}g=h.h;return h["return"](g.data)})}function xm(a,b,c,d){var e=Gd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration},b=Ic(b),b=c.parseMedia(b,a),gk(b,d);throw new P(2,2,2014,c);}
450
+ q.ve=function(a,b){this.Je.width=a;this.Je.height=b};q.ke=function(){if(this.l==Pl){var a=this.j;if(a.i.g)a=!1;else if(a.B)a=!1;else{for(var b=r(a.j.values()),c=b.next();!c.done;c=b.next())c=c.value,c.Gc&&(c.Gc=!1,qj(a,c,.1));a=!0}}else a=!1;return a};q.kg=function(){Sa("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};
451
451
  q.lg=function(){return this.md};function Sk(a){var b=Hk();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.T()&&d.includes(c.code)&&(c.severity=1,a.ke())};b.textDisplayFactory=function(){return a.gd?new Zj(a.g,a.gd):new Tj(a.g)};return b}q.Ae=function(a){this.gd=a};
452
452
  function Al(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 Si;h={id:a.Ke++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
453
- segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Mb,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 zl(a,b){return M(function(c){if(1==c.g)return z(c,ym(a,b),2);mm(a,b);B(c)})}
454
- function ym(a,b){var c;return M(function(d){if(1==d.g)return c=a.j?a.j.l:null,z(d,ae(c,b),2);Yl(b);B(d)})}
453
+ segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Mb,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 zl(a,b){return M(function(c){if(1==c.g)return A(c,ym(a,b),2);mm(a,b);C(c)})}
454
+ function ym(a,b){var c;return M(function(d){if(1==d.g)return c=a.j?a.j.l:null,A(d,ae(c,b),2);Yl(b);C(d)})}
455
455
  function mm(a,b){if(a.l!=hl){for(var c=a.h.restrictions,d=a.Je,e=!1,f=r(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=$d(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.j&&Zl(a);if((c=a.m?a.m.g:null)&&a.m.B)for(d=r(b.variants),e=d.next();!e.done;e=d.next())for(e=e.value,e=r((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])),f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem)for(f=r(f.initData||[]),g=f.next();!g.done;g=
456
456
  f.next())g=g.value,Rf(a.m,g.initDataType,g.initData);zm(a,b)}}
457
- function Tl(a,b){var c,d,e,f,g;return M(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return M(function(t){if(1==t.g)return k?z(t,k.createSegmentIndex(),2):t["return"](null);n=(m=k.segmentIndex.Ib(l))?m.next().value:null;if(!n)return t["return"](null);p=n.startTime;return t["return"](p)})},z(h,e(c,b),2);if(3!=h.g)return f=h.h,z(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)})}
458
- function tl(a){var b=a.Ic();if(a.C&&a.K&&a.G){var c=a.I;c.j=b;Ui(c);a.W&&(c=a.W,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);Hl(a)}b=(new Map).set("buffering",b);a.dispatchEvent(el(Am,b))}function Il(a){var b=a.g.playbackRate;0!=b&&(a.I&&a.I.set(b),b=el(Bm),a.dispatchEvent(b))}function Hl(a){if(a.C&&a.K){var b=a.C.g;a.K.g==Ne?Lk(b,"buffering"):a.g.paused?Lk(b,"paused"):a.g.ended?Lk(b,"ended"):Lk(b,"playing")}}
459
- function Sl(a){try{zm(a,a.i)}catch(c){return rl(a,c),!1}var b=a.i.variants.filter(function(c){return te(c)});b=a.Aa.create(b);a.B.setVariants(Array.from(b.values()));return!0}function nm(a){var b;(b=Sl(a)?a.B.chooseVariant():null)&&Kl(a,b,!0,!0,0)}
460
- function Kl(a,b,c,d,e){var f=a.j.l;if(b==f)d&&uj(a.j,b,d,e,!0);else{var g=a.C.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));uj(a.j,b,d,e);d=null;f&&(d=le(f));b=le(b);c?Ul(a,d,b):Cm(a,d,b)}}function pm(a,b){var c=Array.from(a.g.audioTracks).find(function(e){return e.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=se(c);var d=se(b);Cm(a,c,d)}
457
+ function Tl(a,b){var c,d,e,f,g;return M(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return M(function(t){if(1==t.g)return k?A(t,k.createSegmentIndex(),2):t["return"](null);n=(m=k.segmentIndex.Jb(l))?m.next().value:null;if(!n)return t["return"](null);p=n.startTime;return t["return"](p)})},A(h,e(c,b),2);if(3!=h.g)return f=h.h,A(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)})}
458
+ function tl(a){var b=a.Ic();if(a.B&&a.K&&a.G){var c=a.I;c.j=b;Ui(c);a.W&&(c=a.W,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);Hl(a)}b=(new Map).set("buffering",b);a.dispatchEvent(el(Am,b))}function Il(a){var b=a.g.playbackRate;0!=b&&(a.I&&a.I.set(b),b=el(Bm),a.dispatchEvent(b))}function Hl(a){if(a.B&&a.K){var b=a.B.g;a.K.g==Ne?Lk(b,"buffering"):a.g.paused?Lk(b,"paused"):a.g.ended?Lk(b,"ended"):Lk(b,"playing")}}
459
+ function Sl(a){try{zm(a,a.i)}catch(c){return rl(a,c),!1}var b=a.i.variants.filter(function(c){return te(c)});b=a.Aa.create(b);a.C.setVariants(Array.from(b.values()));return!0}function nm(a){var b;(b=Sl(a)?a.C.chooseVariant():null)&&Kl(a,b,!0,!0,0)}
460
+ function Kl(a,b,c,d,e){var f=a.j.l;if(b==f)d&&uj(a.j,b,d,e,!0);else{var g=a.B.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));uj(a.j,b,d,e);d=null;f&&(d=le(f));b=le(b);c?Ul(a,d,b):Cm(a,d,b)}}function pm(a,b){var c=Array.from(a.g.audioTracks).find(function(e){return e.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=se(c);var d=se(b);Cm(a,c,d)}
461
461
  function Vl(a,b,c){a=Qb(a.h.preferredTextLanguage);b=Qb(b.language);c=Qb(c.language);return Pb(c,a)&&!Pb(b,c)}function Ul(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=el(Dm,b);Em(a,b)}function Zl(a){var b=el(Fm);Em(a,b)}function Cm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=el(Gm,b);Em(a,b)}function om(a){var b=el(Hm);Em(a,b)}function Wl(a){var b=el(Im);Em(a,b)}function Xl(a){var b=(new Map).set("newStatus",a.h.abr.enabled);Em(a,el(Jm,b))}
462
462
  function rl(a,b){if(a.l!=hl){var c=el(Km,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function wl(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(el(b,c))}
463
463
  function ql(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 P(2,3,3016,b,c,a.g.error.message)}
464
464
  function El(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&&!Lm.includes(l)}h!=f.allowedByKeySystem&&
465
465
  (e=!0)}}}if(!e||Sl(a))(d=a.j.l)&&!d.allowedByKeySystem&&nm(a),e&&Zl(a)}}function Fl(a,b,c){if(a.J&&a.J.onExpirationUpdated)a.J.onExpirationUpdated(b,c);b=el(Mm);a.dispatchEvent(b)}function Jl(a,b,c){0<b&&(a.T()||a.Af(b));b=a.getDuration();c<b&&(a.T()||a.bb(c))}
466
466
  function zm(a,b){var c=a.m?a.m.dd():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=r(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=r(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=r(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var t=c[d?"00":p];t?Lm.includes(t)&&h.add(t):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
467
- missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new P(2,4,4012,c);}function Yl(a){if(!a.variants.some(te))throw new P(2,4,4032);}function Em(a,b){M(function(c){if(1==c.g)return z(c,Promise.resolve(),2);a.l!=hl&&a.dispatchEvent(b);B(c)})}function rm(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(Qb(c.language)):b.add("und");return b}
467
+ missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new P(2,4,4012,c);}function Yl(a){if(!a.variants.some(te))throw new P(2,4,4032);}function Em(a,b){M(function(c){if(1==c.g)return A(c,Promise.resolve(),2);a.l!=hl&&a.dispatchEvent(b);C(c)})}function rm(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(Qb(c.language)):b.add("und");return b}
468
468
  function qm(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=Qb(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){for(var m=r(k),n=m.next();!n.done;n=m.next()){n=n.value;var p=null;c.has(l)&&c.get(l).has(n)&&(p=c.get(l).get(n));
469
- h.push({language:l,role:n,label:p})}});return h}function jl(){return new P(2,7,7E3)}function dl(a,b,c,d,e,f){return d==a&&e.M==f.M&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Nj(){return{M:null,mimeType:null,startTime:null,Be:NaN,uri:null}}function kl(a){return new Promise(function(b,c){a.Qb=function(){return c(jl())};a.pd=function(){return b()};a.onError=function(d){return c(d)};a.rd=function(){return c(jl())}})}N("shaka.Player",T);T.prototype.setVideoContainer=T.prototype.Ae;
469
+ h.push({language:l,role:n,label:p})}});return h}function jl(){return new P(2,7,7E3)}function dl(a,b,c,d,e,f){return d==a&&e.M==f.M&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Nj(){return{M:null,mimeType:null,startTime:null,Be:NaN,uri:null}}function kl(a){return new Promise(function(b,c){a.Rb=function(){return c(jl())};a.pd=function(){return b()};a.onError=function(d){return c(d)};a.rd=function(){return c(jl())}})}N("shaka.Player",T);T.prototype.setVideoContainer=T.prototype.Ae;
470
470
  T.prototype.getManifestParserFactory=T.prototype.lg;T.prototype.getManifest=T.prototype.kg;T.prototype.retryStreaming=T.prototype.ke;T.prototype.setMaxHardwareResolution=T.prototype.ve;T.prototype.addChaptersTrack=T.prototype.Jf;T.prototype.addTextTrackAsync=T.prototype.Kf;T.prototype.addTextTrack=T.prototype.addTextTrack;T.prototype.getStats=T.prototype.getStats;T.prototype.getBufferedInfo=T.prototype.zb;T.prototype.getPresentationStartTimeAsDate=T.prototype.df;
471
- T.prototype.getPlayheadTimeAsDate=T.prototype.pg;T.prototype.setTextTrackVisibility=T.prototype.ze;T.prototype.getChapters=T.prototype.Yf;T.prototype.getChaptersTracks=T.prototype.$e;T.prototype.isTextTrackVisible=T.prototype.Ob;T.prototype.selectVariantsByLabel=T.prototype.Yg;T.prototype.selectTextLanguage=T.prototype.oe;T.prototype.selectAudioLanguage=T.prototype.wd;T.prototype.getTextLanguages=T.prototype.ug;T.prototype.getAudioLanguages=T.prototype.Uf;T.prototype.getTextLanguagesAndRoles=T.prototype.vg;
472
- T.prototype.getAudioLanguagesAndRoles=T.prototype.Vf;T.prototype.selectVariantTrack=T.prototype.qe;T.prototype.selectTextTrack=T.prototype.pe;T.prototype.getThumbnails=T.prototype.wg;T.prototype.getImageTracks=T.prototype.fg;T.prototype.getTextTracks=T.prototype.pb;T.prototype.getVariantTracks=T.prototype.Za;T.prototype.cancelTrickPlay=T.prototype.Pe;T.prototype.trickPlay=T.prototype.Fe;T.prototype.getPlaybackRate=T.prototype.Ab;T.prototype.isBuffering=T.prototype.Ic;T.prototype.getKeyStatuses=T.prototype.dd;
473
- T.prototype.getExpiration=T.prototype.Cc;T.prototype.drmInfo=T.prototype.drmInfo;T.prototype.keySystem=T.prototype.keySystem;T.prototype.goToLive=T.prototype.Ag;T.prototype.seekRange=T.prototype.La;T.prototype.isAudioOnly=T.prototype.jf;T.prototype.isInProgress=T.prototype.Mb;T.prototype.isLive=T.prototype.T;T.prototype.getAdManager=T.prototype.bd;T.prototype.getAssetUri=T.prototype.Td;T.prototype.getNetworkingEngine=T.prototype.Dc;T.prototype.getMediaElement=T.prototype.ng;
471
+ T.prototype.getPlayheadTimeAsDate=T.prototype.pg;T.prototype.setTextTrackVisibility=T.prototype.ze;T.prototype.getChapters=T.prototype.Yf;T.prototype.getChaptersTracks=T.prototype.$e;T.prototype.isTextTrackVisible=T.prototype.Pb;T.prototype.selectVariantsByLabel=T.prototype.Yg;T.prototype.selectTextLanguage=T.prototype.oe;T.prototype.selectAudioLanguage=T.prototype.wd;T.prototype.getTextLanguages=T.prototype.ug;T.prototype.getAudioLanguages=T.prototype.Uf;T.prototype.getTextLanguagesAndRoles=T.prototype.vg;
472
+ T.prototype.getAudioLanguagesAndRoles=T.prototype.Vf;T.prototype.selectVariantTrack=T.prototype.qe;T.prototype.selectTextTrack=T.prototype.pe;T.prototype.getThumbnails=T.prototype.wg;T.prototype.getImageTracks=T.prototype.fg;T.prototype.getTextTracks=T.prototype.pb;T.prototype.getVariantTracks=T.prototype.$a;T.prototype.cancelTrickPlay=T.prototype.Pe;T.prototype.trickPlay=T.prototype.Fe;T.prototype.getPlaybackRate=T.prototype.Ab;T.prototype.isBuffering=T.prototype.Ic;T.prototype.getKeyStatuses=T.prototype.dd;
473
+ T.prototype.getExpiration=T.prototype.Cc;T.prototype.drmInfo=T.prototype.drmInfo;T.prototype.keySystem=T.prototype.keySystem;T.prototype.goToLive=T.prototype.Ag;T.prototype.seekRange=T.prototype.La;T.prototype.isAudioOnly=T.prototype.jf;T.prototype.isInProgress=T.prototype.Nb;T.prototype.isLive=T.prototype.T;T.prototype.getAdManager=T.prototype.bd;T.prototype.getAssetUri=T.prototype.Td;T.prototype.getNetworkingEngine=T.prototype.Dc;T.prototype.getMediaElement=T.prototype.ng;
474
474
  T.prototype.getLoadMode=T.prototype.cf;T.prototype.resetConfiguration=T.prototype.Wg;T.prototype.getBufferFullness=T.prototype.Wf;T.prototype.getConfiguration=T.prototype.getConfiguration;T.prototype.configure=T.prototype.configure;T.prototype.load=T.prototype.load;T.prototype.updateStartTime=T.prototype.jh;T.prototype.unload=T.prototype.He;T.prototype.detach=T.prototype.detach;T.prototype.attach=T.prototype.xc;
475
- T.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return M(function(h){if(1==h.g)return b={},a?z(h,gg(),3):h.D(2);2!=h.g&&(b=h.h);var k={};if(Sc()){for(var l in og)k[l]=!0;for(var m in qg)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 n=m.next();!n.done;n=m.next())n=n.value,k[n]=Sc()?!!og[n]:Uc(n);for(var p in l)k[p]=
475
+ T.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return M(function(h){if(1==h.g)return b={},a?A(h,gg(),3):h.D(2);2!=h.g&&(b=h.h);var k={};if(Sc()){for(var l in og)k[l]=!0;for(var m in qg)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 n=m.next();!n.done;n=m.next())n=n.value,k[n]=Sc()?!!og[n]:Uc(n);for(var p in l)k[p]=
476
476
  Sc()?!!qg[p]:Uc(l[p]);c=k;k={};p=r('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(","));
477
477
  for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=Sc()?Fd(l)?!0:MediaSource.isTypeSupported(l)||ud(l):Uc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Nm;for(g in f)e[g]=f[g]();return h["return"](e)})};T.isBrowserSupported=il;T.setAdManagerFactory=function(a){Uk=a};T.registerSupportPlugin=function(a,b){Nm[a]=b};T.prototype.destroy=T.prototype.destroy;
478
478
  var Jm="abrstatuschanged",Dm="adaptation",Am="buffering",hm="downloadfailed",gm="downloadheadersreceived",Gl="drmsessionupdate",Kj="emsg",Km="error",Mm="expirationupdated",ol="loaded",ll="loading",Bl="manifestparsed",yl="mediaqualitychanged",fm="metadata",fl="onstatechange",gl="onstateidle",Bm="ratechange",Rl="streaming",Hm="textchanged",Im="texttrackvisibility",xl="timelineregionadded",jm="timelineregionenter",km="timelineregionexit",Fm="trackschanged",sl="unloading",Gm="variantchanged",Om={ph:Jm,
479
- qh:Dm,rh:Am,wh:hm,xh:gm,yh:Gl,Gh:Kj,Error:Km,Hh:Mm,Nh:"largegap",Oh:ol,Ph:ll,Th:Bl,Uh:yl,Metadata:fm,Zh:fl,$h:gl,ji:Bm,pi:"sessiondata",ri:Rl,si:Hm,ti:Im,wi:xl,xi:jm,zi:km,Ai:Fm,Ei:sl,Gi:Gm},hl=0,Rk=1,Pl=2,am=3;T.LoadMode={DESTROYED:hl,NOT_LOADED:Rk,MEDIA_SOURCE:Pl,SRC_EQUALS:am};T.version="v3.3.9";var Pm=["3","3"];Ab=new function(a){this.g=a;this.i=Bb;this.h=Cb}(new yb(Number(Pm[0]),Number(Pm[1])));
479
+ qh:Dm,rh:Am,wh:hm,xh:gm,yh:Gl,Gh:Kj,Error:Km,Hh:Mm,Nh:"largegap",Oh:ol,Ph:ll,Th:Bl,Uh:yl,Metadata:fm,Zh:fl,$h:gl,ji:Bm,pi:"sessiondata",ri:Rl,si:Hm,ti:Im,wi:xl,xi:jm,zi:km,Ai:Fm,Ei:sl,Gi:Gm},hl=0,Rk=1,Pl=2,am=3;T.LoadMode={DESTROYED:hl,NOT_LOADED:Rk,MEDIA_SOURCE:Pl,SRC_EQUALS:am};T.version="v3.3.11";var Pm=["3","3"];Ab=new function(a){this.g=a;this.i=Bb;this.h=Cb}(new yb(Number(Pm[0]),Number(Pm[1])));
480
480
  var Lm=["output-restricted","internal-error"],Nm={},Uk=null,pl={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"},tm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
481
481
  ssa:"text/x-ssa",ass:"text/x-ssa"};function Qm(){this.h=[];this.j=this.i=this.g=0};function Rm(a,b){var c=this;this.h=a;this.g=b;this.i=!1;this.l=this.g.getVolume();this.j=new qf;this.j.o(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.i=!0});this.j.o(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.i=!1})}q=Rm.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};
482
482
  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()};
483
483
  q.isLinear=function(){return this.h.isLinear()};q.resize=function(a,b){this.g.resize(a,b,document.fullscreenElement?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()};q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=null};
484
484
  N("shaka.ads.ClientSideAd",Rm);Rm.prototype.release=Rm.prototype.release;Rm.prototype.getPositionInSequence=Rm.prototype.getPositionInSequence;Rm.prototype.getSequenceLength=Rm.prototype.getSequenceLength;Rm.prototype.setMuted=Rm.prototype.setMuted;Rm.prototype.resize=Rm.prototype.resize;Rm.prototype.isLinear=Rm.prototype.isLinear;Rm.prototype.isMuted=Rm.prototype.isMuted;Rm.prototype.setVolume=Rm.prototype.setVolume;Rm.prototype.getVolume=Rm.prototype.getVolume;Rm.prototype.play=Rm.prototype.play;
485
- Rm.prototype.pause=Rm.prototype.pause;Rm.prototype.skip=Rm.prototype.skip;Rm.prototype.canSkipNow=Rm.prototype.canSkipNow;Rm.prototype.getTimeUntilSkippable=Rm.prototype.getTimeUntilSkippable;Rm.prototype.isSkippable=Rm.prototype.isSkippable;Rm.prototype.isPaused=Rm.prototype.isPaused;Rm.prototype.getRemainingTime=Rm.prototype.getRemainingTime;Rm.prototype.getMinSuggestedDuration=Rm.prototype.getMinSuggestedDuration;Rm.prototype.getDuration=Rm.prototype.getDuration;function Sm(a,b,c,d){var e=this;this.A=a;this.i=b;this.B=null;this.C=NaN;this.l=d;this.j=null;this.h=new qf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.A,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v3.3.9");this.g=null;this.h.Ga(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Tm(e,f)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
485
+ Rm.prototype.pause=Rm.prototype.pause;Rm.prototype.skip=Rm.prototype.skip;Rm.prototype.canSkipNow=Rm.prototype.canSkipNow;Rm.prototype.getTimeUntilSkippable=Rm.prototype.getTimeUntilSkippable;Rm.prototype.isSkippable=Rm.prototype.isSkippable;Rm.prototype.isPaused=Rm.prototype.isPaused;Rm.prototype.getRemainingTime=Rm.prototype.getRemainingTime;Rm.prototype.getMinSuggestedDuration=Rm.prototype.getMinSuggestedDuration;Rm.prototype.getDuration=Rm.prototype.getDuration;function Sm(a,b,c,d){var e=this;this.A=a;this.i=b;this.B=null;this.C=NaN;this.l=d;this.j=null;this.h=new qf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.A,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v3.3.11");this.g=null;this.h.Ga(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Tm(e,f)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
486
486
  function(f){Um(e,f)});this.i.onended=function(){e.m.contentComplete()}}Sm.prototype.stop=function(){this.g&&this.g.stop();this.A&&Yj(this.A)};Sm.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function Um(a,b){b.getError();Vm(a,null);a.l(new O("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
487
487
  function Tm(a,b){a.l(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.C)));a.g=b.getAdsManager(a.i);a.l(new O("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){var d=[];c=r(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.l(new O("ad-cue-points-changed",(new Map).set("cuepoints",d)))}Wm(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
488
488
  a.h.o(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.i)),a.g.start()}catch(f){Vm(a,null)}}
@@ -503,8 +503,8 @@ f;e.i(new O("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Zm.prototyp
503
503
  function $m(a,b){a.i(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.H||a.h.o(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.A=d,a.l.currentTime=e.start)}})};function U(){cb.call(this);this.g=this.i=null;this.h=new Qm;this.j=navigator.language}u(U,cb);q=U.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 P(2,10,1E4);this.i&&this.i.release();this.i=new Sm(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)})};
504
504
  q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);cb.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new O("ad-stopped"));this.h=new Qm};q.requestClientSideAds=function(a){if(!this.i)throw new P(1,10,10001);var b=this.i;b.C=Date.now()/1E3;b.m.requestAds(a)};
505
505
  q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new P(2,10,10002);this.g&&this.g.release();this.g=new Zm(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)})};
506
- q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v3.3.9";c=this.g;var d=b;c.j?c=Promise.reject(new P(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
507
- (c.H=!0),c.j=new Pc,c.g.requestStream(a),c.F=d||"",c.I=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(1,10,10003);(a.mpt||a.mpv)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v3.3.9";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new P(1,10,10003);return this.g.G};
506
+ q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v3.3.11";c=this.g;var d=b;c.j?c=Promise.reject(new P(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
507
+ (c.H=!0),c.j=new Pc,c.g.requestStream(a),c.F=d||"",c.I=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(1,10,10003);(a.mpt||a.mpv)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v3.3.11";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new P(1,10,10003);return this.g.G};
508
508
  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)};N("shaka.ads.AdManager",U);
509
509
  U.prototype.onCueMetadataChange=U.prototype.onCueMetadataChange;U.prototype.onHlsTimedMetadata=U.prototype.onHlsTimedMetadata;U.prototype.onDashTimedMetadata=U.prototype.onDashTimedMetadata;U.prototype.getStats=U.prototype.getStats;U.prototype.getServerSideCuePoints=U.prototype.getServerSideCuePoints;U.prototype.replaceServerSideAdTagParameters=U.prototype.replaceServerSideAdTagParameters;U.prototype.requestServerSideStream=U.prototype.requestServerSideStream;U.prototype.initServerSide=U.prototype.initServerSide;
510
510
  U.prototype.requestClientSideAds=U.prototype.requestClientSideAds;U.prototype.onAssetUnload=U.prototype.onAssetUnload;U.prototype.release=U.prototype.release;U.prototype.initClientSide=U.prototype.initClientSide;U.prototype.setLocale=U.prototype.setLocale;U.ADS_LOADED="ads-loaded";U.AD_STARTED="ad-started";U.AD_FIRST_QUARTILE="ad-first-quartile";U.AD_MIDPOINT="ad-midpoint";U.AD_THIRD_QUARTILE="ad-third-quartile";U.AD_COMPLETE="ad-complete";U.AD_STOPPED="ad-stopped";U.AD_SKIPPED="ad-skipped";
@@ -518,402 +518,403 @@ getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,is
518
518
  nn=["attach","detach","load","unload"];function on(a,b,c,d,e,f){var g=this;this.I=a;this.j=new Q(b);this.R=c;this.C=!1;this.B=d;this.H=e;this.K=f;this.h=this.m=!1;this.N="";this.A=null;this.F=function(){return pn(g)};this.G=function(h,k){var l=bn(k);switch(l.type){case "event":var m=l.targetName;l=Oa(l.event);g.B(m,l);break;case "update":m=l.update;for(var n in m){l=g.g[n]||{};for(var p in m[n])l[p]=m[n][p]}g.C&&(g.R(),g.C=!1);break;case "asyncComplete":if(n=l.id,l=l.error,p=g.i[n],delete g.i[n],p)if(l){n=new P(l.severity,l.category,l.code);
519
519
  for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;qn.add(this)}q=on.prototype;q.destroy=function(){qn["delete"](this);rn(this);sn&&tn(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.A=null;return Promise.resolve()};q.ra=function(){return this.h};q.ud=function(){return this.N};
520
520
  q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.za();var a=new chrome.cast.SessionRequest(this.I);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(qn),d=c.next();!d.done;d=c.next())un(d.value,b)},function(b){for(var c=r(qn),d=c.next();!d.done;d=c.next())d=d.value,vn="available"==b,d.j.za()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});vn&&this.j.S(wn);(a=sn)&&a.status!=chrome.cast.SessionStatus.STOPPED?un(this,
521
- a):sn=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=xn),window.__onGCastApiAvailable!=xn&&Sa("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};q.re=function(a){this.A=a;this.h&&yn(this,{type:"appData",appData:this.A})};
522
- q.cast=function(a){var b=this;return M(function(c){if(!b.m)throw new P(1,8,8E3);if(!vn)throw new P(1,8,8001);if(b.h)throw new P(1,8,8002);b.l=new Pc;chrome.cast.requestSession(function(d){return zn(b,a,d)},function(d){return An(b,d)});return z(c,b.l,0)})};function Bn(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return zn(a,b,c)},function(c){return An(a,c)})}}q.Zb=function(){if(this.h){rn(this);if(sn){tn(this);try{sn.stop(function(){},function(){})}catch(a){}sn=null}pn(this)}};
521
+ a):sn=null}else window.__onGCastApiAvailable!==xn&&(yn=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=xn)};q.re=function(a){this.A=a;this.h&&zn(this,{type:"appData",appData:this.A})};q.cast=function(a){var b=this;return M(function(c){if(!b.m)throw new P(1,8,8E3);if(!vn)throw new P(1,8,8001);if(b.h)throw new P(1,8,8002);b.l=new Pc;chrome.cast.requestSession(function(d){return An(b,a,d)},function(d){return Bn(b,d)});return A(c,b.l,0)})};
522
+ function Cn(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return An(a,b,c)},function(c){return Bn(a,c)})}}q.Zb=function(){if(this.h){rn(this);if(sn){tn(this);try{sn.stop(function(){},function(){})}catch(a){}sn=null}pn(this)}};
523
523
  q.get=function(a,b){var c=this;if("video"==a){if(gn.includes(b))return function(){return c.rf.apply(c,[a,b].concat(ia(Fa.apply(0,arguments))))}}else if("player"==a){if(jn[b]&&!this.get("player","isLive")())return function(){};if(mn.includes(b))return function(){return c.rf.apply(c,[a,b].concat(ia(Fa.apply(0,arguments))))};if(nn.includes(b))return function(){return c.Tg.apply(c,[a,b].concat(ia(Fa.apply(0,arguments))))};if(hn[b])return function(){return c.g[a][b]}}return this.g[a][b]};
524
- q.set=function(a,b,c){this.g[a][b]=c;yn(this,{type:"set",targetName:a,property:b,value:c})};function zn(a,b,c){sn=c;c.addUpdateListener(a.F);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);pn(a);yn(a,{type:"init",initState:b,appData:a.A});a.l.resolve()}function An(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 P(2,8,c,b))}
525
- q.rf=function(a,b){yn(this,{type:"call",targetName:a,methodName:b,args:Fa.apply(2,arguments)})};q.Tg=function(a,b){var c=Fa.apply(2,arguments),d=new Pc,e=this.J.toString();this.J++;this.i[e]=d;try{yn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function un(a,b){var c=a.K();a.l=new Pc;a.C=!0;zn(a,c,b)}function tn(a){var b=sn;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
526
- function pn(a){var b=sn?"connected"==sn.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};rn(a)}a.h=b;a.N=b?sn.receiver.friendlyName:"";a.j.za()}function rn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new P(1,7,7E3))}}function yn(a,b){var c=an(b),d=sn;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Va)}catch(e){throw c=new P(2,8,8005,e),d=new O("error",(new Map).set("detail",c)),a.B("player",d),a.Zb(),c;}}var wn=.02,vn=!1,sn=null,qn=new Set;
527
- function xn(a){if(a){a=r(qn);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function Cn(a,b,c){cb.call(this);var d=this;this.i=a;this.h=b;this.m=this.A=this.j=this.B=this.l=null;this.F=c;this.C=new Map;this.g=new on(c,function(){return Dn(d)},function(){return En(d)},function(e,f){return Fn(d,e,f)},function(){return Gn(d)},function(){return Hn(d)});In(this)}u(Cn,cb);q=Cn.prototype;
524
+ q.set=function(a,b,c){this.g[a][b]=c;zn(this,{type:"set",targetName:a,property:b,value:c})};function An(a,b,c){sn=c;c.addUpdateListener(a.F);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);pn(a);zn(a,{type:"init",initState:b,appData:a.A});a.l.resolve()}function Bn(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 P(2,8,c,b))}
525
+ q.rf=function(a,b){zn(this,{type:"call",targetName:a,methodName:b,args:Fa.apply(2,arguments)})};q.Tg=function(a,b){var c=Fa.apply(2,arguments),d=new Pc,e=this.J.toString();this.J++;this.i[e]=d;try{zn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function un(a,b){var c=a.K();a.l=new Pc;a.C=!0;An(a,c,b)}function tn(a){var b=sn;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
526
+ function pn(a){var b=sn?"connected"==sn.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};rn(a)}a.h=b;a.N=b?sn.receiver.friendlyName:"";a.j.za()}function rn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new P(1,7,7E3))}}function zn(a,b){var c=an(b),d=sn;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Va)}catch(e){throw c=new P(2,8,8005,e),d=new O("error",(new Map).set("detail",c)),a.B("player",d),a.Zb(),c;}}var wn=.02,vn=!1,sn=null,yn=null,qn=new Set;
527
+ function xn(a){yn?window.__onGCastApiAvailable=yn:delete window.__onGCastApiAvailable;yn=null;if(a)for(var b=r(qn),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Dn(a,b,c){cb.call(this);var d=this;this.i=a;this.h=b;this.m=this.A=this.j=this.B=this.l=null;this.F=c;this.C=new Map;this.g=new on(c,function(){return En(d)},function(){return Fn(d)},function(e,f){return Gn(d,e,f)},function(){return Hn(d)},function(){return In(d)});Jn(this)}u(Dn,cb);q=Dn.prototype;
528
528
  q.destroy=function(a){a&&this.g.Zb();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;cb.prototype.release.call(this);return Promise.all(a)};q.Bb=function(){return this.l};q.ac=function(){return this.B};q.Oe=function(){return this.g.m&&vn};q.ra=function(){return this.g.ra()};q.ud=function(){return this.g.ud()};
529
- q.cast=function(){var a=this,b;return M(function(c){return 1==c.g?(b=Hn(a),z(c,a.g.cast(b),2)):a.h?z(c,a.h.He(),0):c["return"]()})};q.re=function(a){this.g.re(a)};q.Cf=function(){Bn(this.g)};q.Zb=function(){this.g.Zb()};
530
- q.Se=function(a){var b=this;return M(function(c){if(1==c.g){if(a==b.F)return c["return"]();b.F=a;b.g.Zb();return z(c,b.g.destroy(),2)}b.g=null;b.g=new on(a,function(){return Dn(b)},function(){return En(b)},function(d,e){return Fn(b,d,e)},function(){return Gn(b)},function(){return Hn(b)});b.g.init();B(c)})};
531
- function In(a){a.g.init();a.m=new qf;for(var b=r(dn),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.ra()||(f=Oa(f),a.j.dispatchEvent(f))});for(var d in Om)a.m.o(a.h,Om[d],function(f){a.g.ra()||a.A.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.pc=e,Object.defineProperty(a.l,b.pc,{configurable:!1,enumerable:!0,get:function(f){return function(){return Jn(a,f.pc)}}(b),set:function(f){return function(g){var h=f.pc;a.g.ra()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={pc:b.pc};a.B={};Kn(a,
532
- function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return Ln(a,f)}})});Mn(a);a.j=new cb;a.j.jd=a.l;a.A=new cb;a.A.jd=a.B}function Mn(a){var b=new Map;Kn(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.C.set(c,e):a.C.set(e,c)}else b.set(d,c)})}
533
- function Kn(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.h,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=r(Object.getOwnPropertyNames(f)),k=h.next();!k.done;k=h.next())k=k.value,c(k)&&(e.add(k),b(k,d[k]));f=Object.getPrototypeOf(f)}}
534
- function Hn(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Td(),startTime:null};a.i.pause();for(var c=r(fn),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(kn);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(ln);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 Dn(a){var b=new O("caststatuschanged");a.dispatchEvent(b)}
535
- function En(a){var b=new O(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
536
- function Gn(a){for(var b=r(kn),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(fn);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(fn),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=r(ln);for(k=
529
+ q.cast=function(){var a=this,b;return M(function(c){return 1==c.g?(b=In(a),A(c,a.g.cast(b),2)):a.h?A(c,a.h.He(),0):c["return"]()})};q.re=function(a){this.g.re(a)};q.Cf=function(){Cn(this.g)};q.Zb=function(){this.g.Zb()};
530
+ q.Se=function(a){var b=this;return M(function(c){if(1==c.g){if(a==b.F)return c["return"]();b.F=a;b.g.Zb();return A(c,b.g.destroy(),2)}b.g=null;b.g=new on(a,function(){return En(b)},function(){return Fn(b)},function(d,e){return Gn(b,d,e)},function(){return Hn(b)},function(){return In(b)});b.g.init();C(c)})};
531
+ function Jn(a){a.g.init();a.m=new qf;for(var b=r(dn),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.ra()||(f=Oa(f),a.j.dispatchEvent(f))});for(var d in Om)a.m.o(a.h,Om[d],function(f){a.g.ra()||a.A.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.pc=e,Object.defineProperty(a.l,b.pc,{configurable:!1,enumerable:!0,get:function(f){return function(){return Kn(a,f.pc)}}(b),set:function(f){return function(g){var h=f.pc;a.g.ra()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={pc:b.pc};a.B={};Ln(a,
532
+ function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return Mn(a,f)}})});Nn(a);a.j=new cb;a.j.jd=a.l;a.A=new cb;a.A.jd=a.B}function Nn(a){var b=new Map;Ln(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.C.set(c,e):a.C.set(e,c)}else b.set(d,c)})}
533
+ function Ln(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.h,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=r(Object.getOwnPropertyNames(f)),k=h.next();!k.done;k=h.next())k=k.value,c(k)&&(e.add(k),b(k,d[k]));f=Object.getPrototypeOf(f)}}
534
+ function In(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Td(),startTime:null};a.i.pause();for(var c=r(fn),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(kn);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(ln);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 En(a){var b=new O("caststatuschanged");a.dispatchEvent(b)}
535
+ function Fn(a){var b=new O(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
536
+ function Hn(a){for(var b=r(kn),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(fn);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(fn),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=r(ln);for(k=
537
537
  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 O(Km,h);a.h.dispatchEvent(h)})}
538
- function Jn(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.ra()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.ra()?a.g.get("video",b):(c=a.i[b],"function"==typeof c&&(c=c.bind(a.i)),c)}
539
- function Ln(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.A.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.A.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Dc()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.bd()};
540
- if("setVideoContainer"==b)return function(c){return a.h.Ae(c)};if(a.g.ra()){if("getManifest"==b||"drmInfo"==b)return function(){Sa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Sa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.ra()&&0==Object.keys(a.g.g.video).length&&hn[b]||!a.g.ra()?a.h[b].bind(a.h):a.g.get("player",b)}function Fn(a,b,c){a.g.ra()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.A.dispatchEvent(c))}
541
- N("shaka.cast.CastProxy",Cn);Cn.prototype.changeReceiverId=Cn.prototype.Se;Cn.prototype.forceDisconnect=Cn.prototype.Zb;Cn.prototype.suggestDisconnect=Cn.prototype.Cf;Cn.prototype.setAppData=Cn.prototype.re;Cn.prototype.cast=Cn.prototype.cast;Cn.prototype.receiverName=Cn.prototype.ud;Cn.prototype.isCasting=Cn.prototype.ra;Cn.prototype.canCast=Cn.prototype.Oe;Cn.prototype.getPlayer=Cn.prototype.ac;Cn.prototype.getVideo=Cn.prototype.Bb;Cn.prototype.destroy=Cn.prototype.destroy;function Nn(a,b,c,d){cb.call(this);var e=this;this.g=a;this.h=b;this.j=new qf;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.A=!0;this.m=0;this.F=!1;this.C=!0;this.B=this.l=null;this.I=new Q(function(){On(e)});Pn(this)}u(Nn,cb);q=Nn.prototype;q.isConnected=function(){return this.H};q.Dg=function(){return this.A};q.ah=function(a){this.i=a};q.Qf=function(){this.i=null};
538
+ function Kn(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.ra()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.ra()?a.g.get("video",b):(c=a.i[b],"function"==typeof c&&(c=c.bind(a.i)),c)}
539
+ function Mn(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.A.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.A.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Dc()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.bd()};
540
+ if("setVideoContainer"==b)return function(c){return a.h.Ae(c)};if(a.g.ra()){if("getManifest"==b||"drmInfo"==b)return function(){Sa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Sa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.ra()&&0==Object.keys(a.g.g.video).length&&hn[b]||!a.g.ra()?a.h[b].bind(a.h):a.g.get("player",b)}function Gn(a,b,c){a.g.ra()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.A.dispatchEvent(c))}
541
+ N("shaka.cast.CastProxy",Dn);Dn.prototype.changeReceiverId=Dn.prototype.Se;Dn.prototype.forceDisconnect=Dn.prototype.Zb;Dn.prototype.suggestDisconnect=Dn.prototype.Cf;Dn.prototype.setAppData=Dn.prototype.re;Dn.prototype.cast=Dn.prototype.cast;Dn.prototype.receiverName=Dn.prototype.ud;Dn.prototype.isCasting=Dn.prototype.ra;Dn.prototype.canCast=Dn.prototype.Oe;Dn.prototype.getPlayer=Dn.prototype.ac;Dn.prototype.getVideo=Dn.prototype.Bb;Dn.prototype.destroy=Dn.prototype.destroy;function On(a,b,c,d){cb.call(this);var e=this;this.g=a;this.h=b;this.j=new qf;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.A=!0;this.m=0;this.F=!1;this.C=!0;this.B=this.l=null;this.I=new Q(function(){Pn(e)});Qn(this)}u(On,cb);q=On.prototype;q.isConnected=function(){return this.H};q.Dg=function(){return this.A};q.ah=function(a){this.i=a};q.Qf=function(){this.i=null};
542
542
  q.bh=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.$g=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.Zg=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
543
- q.destroy=function(){var a=this,b,c;return M(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.A=!0,a.l=null,a.B=null,cb.prototype.release.call(a),z(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();B(d)})};
544
- function Pn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Qn(a)};b.onSenderDisconnected=function(){return Qn(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Rn(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Rn(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 Sn(a,
545
- e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Tn(a,e)};b.start();b=r(dn);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return Un(a,"video",e)});for(var d in Om)a.j.o(a.h,Om[d],function(e){return Un(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.ve(3840,2160):a.h.ve(1920,1080);a.j.o(a.g,"loadeddata",function(){a.F=!0});a.j.o(a.h,"loading",function(){a.A=
546
- !1;Vn(a)});a.j.o(a.g,"playing",function(){a.A=!1;Vn(a)});a.j.o(a.g,"pause",function(){Vn(a)});a.j.o(a.h,"unloading",function(){a.A=!0;Vn(a)});a.j.o(a.g,"ended",function(){(new Q(function(){a.g&&a.g.ended&&(a.A=!0,Vn(a))})).S(Wn)})}function Qn(a){a.m=0;a.C=!0;a.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Vn(a)}
547
- function Vn(a){var b;M(function(c){if(1==c.g)return z(c,Promise.resolve(),2);if(!a.h)return c["return"]();b=new O("caststatuschanged");a.dispatchEvent(b);Xn(a)||Yn(a);B(c)})}
548
- function Zn(a,b,c){var d,e,f,g,h,k,l,m,n,p,t;M(function(v){switch(v.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,E(v,5),z(v,a.h.load(b.manifest,b.startTime),7)):z(v,Promise.resolve(),3);case 7:va(v,3);break;case 5:return g=I(v),h=Km,k=(new Map).set("detail",g),l=new O(h,k),a.h&&a.h.dispatchEvent(l),v["return"]();case 3:if(!a.h)return v["return"]();for(m in b.video)n=b.video[m],a.g[m]=n;for(p in b.playerAfterLoad)t=b.playerAfterLoad[p],
549
- a.h[p](t);a.g.autoplay=f;b.manifest&&(a.g.play(),Yn(a));B(v)}})}function Un(a,b,c){a.h&&(On(a),Rn(a,{type:"event",targetName:b,event:c},a.l))}
550
- function On(a){a.I.S($n);for(var b={video:{},player:{}},c=r(en),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.T())for(var e in jn)0==a.m%jn[e]&&(b.player[e]=a.h[e]());for(var f in hn)0==a.m%hn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.F&&(a.m+=1);Rn(a,{type:"update",update:b},a.l);Xn(a)}function Xn(a){return a.C&&(a.g.duration||a.h.T())?(ao(a),a.C=!1,!0):!1}
551
- function ao(a,b){var c={contentId:a.h.Td(),streamType:a.h.T()?"LIVE":"BUFFERED",contentType:""};a.h.T()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Yn(a,void 0===b?0:b,c)}
552
- function Tn(a,b){var c=bn(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.C=!0;Zn(a,c.initState,c.appData);On(a);break;case "appData":a.G(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d){var f=cast.receiver.CastReceiverManager.getInstance();if("volume"==e){f.setSystemVolumeLevel(c);break}else if("muted"==e){f.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=
553
- c.methodName;"player"==d&&"load"==e&&(a.m=0,a.F=!1);var g=c.id,h=b.senderId;f=a.J[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.C=!0}));c.then(function(){return bo(a,h,g,null)},function(k){return bo(a,h,g,k)})}}
554
- function Sn(a,b){var c=bn(b.data);switch(c.type){case "PLAY":a.g.play();Yn(a);break;case "PAUSE":a.g.pause();Yn(a);break;case "SEEK":var d=c.currentTime,e=c.resumeState;null!=d&&(a.g.currentTime=Number(d));e&&"PLAYBACK_START"==e?(a.g.play(),Yn(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),Yn(a));break;case "STOP":a.h.He().then(function(){a.h&&Yn(a)});break;case "GET_STATUS":ao(a,Number(c.requestId));break;case "VOLUME":e=c.volume;d=e.level;e=e.muted;var f=a.g.volume,g=a.g.muted;null!=d&&(a.g.volume=Number(d));
555
- null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||Yn(a);break;case "LOAD":a.m=0;a.F=!1;a.C=!1;d=c.media;e=c.currentTime;f=a.K(d.contentId);g=c.autoplay||!0;a.G(d.customData);g&&(a.g.autoplay=!0);a.h.load(f,e).then(function(){a.h&&ao(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");Rn(a,{requestId:Number(c.requestId),type:k},a.B)});break;default:Rn(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.B)}}
556
- function bo(a,b,c,d){a.h&&Rn(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Rn(a,b,c,d){a.H&&(a=an(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Yn(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.A?co:a.h.Ic()?eo:a.g.paused?fo:go,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Rn(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.B)}
557
- N("shaka.cast.CastReceiver",Nn);Nn.prototype.destroy=Nn.prototype.destroy;Nn.prototype.setContentArtist=Nn.prototype.Zg;Nn.prototype.setContentImage=Nn.prototype.$g;Nn.prototype.setContentTitle=Nn.prototype.bh;Nn.prototype.clearContentMetadata=Nn.prototype.Qf;Nn.prototype.setContentMetadata=Nn.prototype.ah;Nn.prototype.isIdle=Nn.prototype.Dg;Nn.prototype.isConnected=Nn.prototype.isConnected;var $n=.5,Wn=5,co="IDLE",go="PLAYING",eo="BUFFERING",fo="PAUSED";function ho(a){var b=this;this.g=[];this.h=[];this.data=[];(new vg).box("moov",zg).X("pssh",function(c){if(!(1<c.version)){var d=Ic(c.reader.U,-12,c.size);b.data.push(d);b.g.push(rd(c.reader.Cb(16)));if(0<c.version){d=c.reader.P();for(var e=0;e<d;e++){var f=rd(c.reader.Cb(16));b.h.push(f)}}}}).parse(a)}
558
- function io(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=Lc(e),g=0;f.setUint32(g,d);g+=4;f.setUint32(g,1886614376);g+=4;f.setUint32(g,0);g+=4;e.set(b,g);g+=b.length;f.setUint32(g,c);e.set(a,g+4);return e}function jo(a){if(!a)return a;var b=new ho(a);if(1>=b.data.length)return a;a=[];var c={};b=r(b.data);for(var d=b.next();!d.done;c={Rc:c.Rc},d=b.next())c.Rc=d.value,a.some(function(e){return function(f){return Gc(f,e.Rc)}}(c))||a.push(c.Rc);return sd.apply(md,ia(a))};function ko(a,b){var c=lo(a,b);return 1!=c.length?null:c[0]}function mo(a,b,c){a=no(a,b,c);return 1!=a.length?null:a[0]}function lo(a,b){for(var c=[],d=r(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,e instanceof Element&&e.tagName==b&&c.push(e);return c}function oo(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
559
- function no(a,b,c){var d=[];a=r(a.childNodes);for(var e=a.next();!e.done;e=a.next())e=e.value,e instanceof Element&&e.localName==c&&e.namespaceURI==b&&d.push(e);return d}function po(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function qo(a,b,c){b=r(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,a.hasAttributeNS(d,c))return a.getAttributeNS(d,c);return null}function ro(a){return Array.from(a.childNodes).every(so)?a.textContent.trim():null}
560
- function so(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function to(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}function uo(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:Math.floor(a/1E3)}
561
- function vo(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}
562
- function wo(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 xo(a){a=Number(a);return 0===a%1?a:null}function yo(a){a=Number(a);return 0===a%1&&0<a?a:null}function zo(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Ao(a){a=Number(a);return isNaN(a)?null:a}function Bo(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
563
- function Co(a,b){var c=new DOMParser,d=null;try{d=c.parseFromString(a,"text/xml")}catch(e){return null}c=d.documentElement;return!c||c.getElementsByTagName("parsererror").length||d.documentElement.tagName!=b?null:c}function Do(a,b){try{var c=gd(a);return Co(c,b)}catch(d){return null}};function Eo(a,b,c){var d=Fo(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g["delete"](null);if(1<g.size)throw new P(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.vf?(e=h.init||e,!1):!0}),f.length&&(a=Go(e,f,c),0==a.length&&(a=[Ib("",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(Ib(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
564
- r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Ve:g,Hi:e,drmInfos:a,Ze:!0}}function Ho(a,b,c,d){var e=Eo(a,c,d);if(b.Ze){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.Ze=!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 P(2,4,4008);return e.Ve||b.Ve}
565
- function Io(a){var b=0,c=Lc(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=Ic(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
566
- function Jo(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 Ko(a){a=mo(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=pd(a.textContent);a=Io(a).filter(function(b){return b.type===Lo})[0];if(!a)return"";a=hd(a.value,!0);return(a=Co(a,"WRMHEADER"))?Jo(a):""}
567
- function Go(a,b,c){var d=[];b=r(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=c[e.vf];if(f){var g;if(g=mo(e.node,"urn:microsoft:playready","pro")){g=pd(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);g=[{initData:io(g,h),initDataType:"cenc",keyId:e.keyId}]}else g=null;g=Ib(f,e.init||a||g);if(f=Mo.get(f))g.licenseServerUri=f(e);d.push(g)}}return d}
568
- function Fo(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=No(c.value))&&b.push(c);return b}
569
- function No(a){var b=a.getAttribute("schemeIdUri"),c=po(a,"urn:mpeg:cenc:2013","default_KID"),d=no(a,"urn:mpeg:cenc:2013","pssh").map(ro);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new P(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:pd(f),keyId:null}})}catch(f){throw new P(2,4,4007);}return{node:a,vf:b,keyId:c,init:0<e.length?e:null}}
570
- var Lo=1,Mo=(new Map).set("com.widevine.alpha",function(a){return(a=mo(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Ko).set("com.microsoft.playready.recommendation",Ko).set("com.microsoft.playready.software",Ko).set("com.microsoft.playready.hardware",Ko);function Oo(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(g,h,k,l){if("$$"==g)return"$";var m=f[h];if(null==m)return g;"RepresentationID"==h&&k&&(k=void 0);"Time"==h&&(m=Math.round(m));switch(l){case void 0:case "d":case "i":case "u":g=m.toString();break;case "o":g=m.toString(8);break;case "x":g=m.toString(16);break;case "X":g=m.toString(16).toUpperCase();break;default:g=m.toString()}k=
543
+ q.destroy=function(){var a=this,b,c;return M(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.A=!0,a.l=null,a.B=null,cb.prototype.release.call(a),A(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();C(d)})};
544
+ function Qn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Rn(a)};b.onSenderDisconnected=function(){return Rn(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Sn(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Sn(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 Tn(a,
545
+ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Un(a,e)};b.start();b=r(dn);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return Vn(a,"video",e)});for(var d in Om)a.j.o(a.h,Om[d],function(e){return Vn(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.ve(3840,2160):a.h.ve(1920,1080);a.j.o(a.g,"loadeddata",function(){a.F=!0});a.j.o(a.h,"loading",function(){a.A=
546
+ !1;Wn(a)});a.j.o(a.g,"playing",function(){a.A=!1;Wn(a)});a.j.o(a.g,"pause",function(){Wn(a)});a.j.o(a.h,"unloading",function(){a.A=!0;Wn(a)});a.j.o(a.g,"ended",function(){(new Q(function(){a.g&&a.g.ended&&(a.A=!0,Wn(a))})).S(Xn)})}function Rn(a){a.m=0;a.C=!0;a.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Wn(a)}
547
+ function Wn(a){var b;M(function(c){if(1==c.g)return A(c,Promise.resolve(),2);if(!a.h)return c["return"]();b=new O("caststatuschanged");a.dispatchEvent(b);Yn(a)||Zn(a);C(c)})}
548
+ function $n(a,b,c){var d,e,f,g,h,k,l,m,n,p,t;M(function(v){switch(v.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,E(v,5),A(v,a.h.load(b.manifest,b.startTime),7)):A(v,Promise.resolve(),3);case 7:va(v,3);break;case 5:return g=I(v),h=Km,k=(new Map).set("detail",g),l=new O(h,k),a.h&&a.h.dispatchEvent(l),v["return"]();case 3:if(!a.h)return v["return"]();for(m in b.video)n=b.video[m],a.g[m]=n;for(p in b.playerAfterLoad)t=b.playerAfterLoad[p],
549
+ a.h[p](t);a.g.autoplay=f;b.manifest&&(a.g.play(),Zn(a));C(v)}})}function Vn(a,b,c){a.h&&(Pn(a),Sn(a,{type:"event",targetName:b,event:c},a.l))}
550
+ function Pn(a){a.I.S(ao);for(var b={video:{},player:{}},c=r(en),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.T())for(var e in jn)0==a.m%jn[e]&&(b.player[e]=a.h[e]());for(var f in hn)0==a.m%hn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.F&&(a.m+=1);Sn(a,{type:"update",update:b},a.l);Yn(a)}function Yn(a){return a.C&&(a.g.duration||a.h.T())?(bo(a),a.C=!1,!0):!1}
551
+ function bo(a,b){var c={contentId:a.h.Td(),streamType:a.h.T()?"LIVE":"BUFFERED",contentType:""};a.h.T()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Zn(a,void 0===b?0:b,c)}
552
+ function Un(a,b){var c=bn(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.C=!0;$n(a,c.initState,c.appData);Pn(a);break;case "appData":a.G(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d){var f=cast.receiver.CastReceiverManager.getInstance();if("volume"==e){f.setSystemVolumeLevel(c);break}else if("muted"==e){f.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=
553
+ c.methodName;"player"==d&&"load"==e&&(a.m=0,a.F=!1);var g=c.id,h=b.senderId;f=a.J[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.C=!0}));c.then(function(){return co(a,h,g,null)},function(k){return co(a,h,g,k)})}}
554
+ function Tn(a,b){var c=bn(b.data);switch(c.type){case "PLAY":a.g.play();Zn(a);break;case "PAUSE":a.g.pause();Zn(a);break;case "SEEK":var d=c.currentTime,e=c.resumeState;null!=d&&(a.g.currentTime=Number(d));e&&"PLAYBACK_START"==e?(a.g.play(),Zn(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),Zn(a));break;case "STOP":a.h.He().then(function(){a.h&&Zn(a)});break;case "GET_STATUS":bo(a,Number(c.requestId));break;case "VOLUME":e=c.volume;d=e.level;e=e.muted;var f=a.g.volume,g=a.g.muted;null!=d&&(a.g.volume=Number(d));
555
+ null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||Zn(a);break;case "LOAD":a.m=0;a.F=!1;a.C=!1;d=c.media;e=c.currentTime;f=a.K(d.contentId);g=c.autoplay||!0;a.G(d.customData);g&&(a.g.autoplay=!0);a.h.load(f,e).then(function(){a.h&&bo(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");Sn(a,{requestId:Number(c.requestId),type:k},a.B)});break;default:Sn(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.B)}}
556
+ function co(a,b,c,d){a.h&&Sn(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Sn(a,b,c,d){a.H&&(a=an(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Zn(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.A?eo:a.h.Ic()?fo:a.g.paused?go:ho,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Sn(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.B)}
557
+ N("shaka.cast.CastReceiver",On);On.prototype.destroy=On.prototype.destroy;On.prototype.setContentArtist=On.prototype.Zg;On.prototype.setContentImage=On.prototype.$g;On.prototype.setContentTitle=On.prototype.bh;On.prototype.clearContentMetadata=On.prototype.Qf;On.prototype.setContentMetadata=On.prototype.ah;On.prototype.isIdle=On.prototype.Dg;On.prototype.isConnected=On.prototype.isConnected;var ao=.5,Xn=5,eo="IDLE",ho="PLAYING",fo="BUFFERING",go="PAUSED";function io(a){var b=this;this.g=[];this.h=[];this.data=[];(new vg).box("moov",zg).X("pssh",function(c){if(!(1<c.version)){var d=Ic(c.reader.U,-12,c.size);b.data.push(d);b.g.push(rd(c.reader.Cb(16)));if(0<c.version){d=c.reader.P();for(var e=0;e<d;e++){var f=rd(c.reader.Cb(16));b.h.push(f)}}}}).parse(a)}
558
+ function jo(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=Lc(e),g=0;f.setUint32(g,d);g+=4;f.setUint32(g,1886614376);g+=4;f.setUint32(g,0);g+=4;e.set(b,g);g+=b.length;f.setUint32(g,c);e.set(a,g+4);return e}function ko(a){if(!a)return a;var b=new io(a);if(1>=b.data.length)return a;a=[];var c={};b=r(b.data);for(var d=b.next();!d.done;c={Rc:c.Rc},d=b.next())c.Rc=d.value,a.some(function(e){return function(f){return Gc(f,e.Rc)}}(c))||a.push(c.Rc);return sd.apply(md,ia(a))};function lo(a,b){var c=mo(a,b);return 1!=c.length?null:c[0]}function no(a,b,c){a=oo(a,b,c);return 1!=a.length?null:a[0]}function mo(a,b){for(var c=[],d=r(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,e instanceof Element&&e.tagName==b&&c.push(e);return c}function po(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
559
+ function oo(a,b,c){var d=[];a=r(a.childNodes);for(var e=a.next();!e.done;e=a.next())e=e.value,e instanceof Element&&e.localName==c&&e.namespaceURI==b&&d.push(e);return d}function qo(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function ro(a,b,c){b=r(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,a.hasAttributeNS(d,c))return a.getAttributeNS(d,c);return null}function so(a){return Array.from(a.childNodes).every(to)?a.textContent.trim():null}
560
+ function to(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function uo(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}function vo(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:Math.floor(a/1E3)}
561
+ function wo(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}
562
+ function xo(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 yo(a){a=Number(a);return 0===a%1?a:null}function zo(a){a=Number(a);return 0===a%1&&0<a?a:null}function Ao(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Bo(a){a=Number(a);return isNaN(a)?null:a}function Co(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
563
+ function Do(a,b){var c=new DOMParser,d=null;try{d=c.parseFromString(a,"text/xml")}catch(e){return null}c=d.documentElement;return!c||c.getElementsByTagName("parsererror").length||d.documentElement.tagName!=b?null:c}function Eo(a,b){try{var c=gd(a);return Do(c,b)}catch(d){return null}};function Fo(a,b,c){var d=Go(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 P(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.vf?(e=h.init||e,!1):!0}),f.length&&(a=Ho(e,f,c),0==a.length&&(a=[Ib("",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(Ib(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
564
+ r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Ve:g,Hi:e,drmInfos:a,Ze:!0}}function Io(a,b,c,d){var e=Fo(a,c,d);if(b.Ze){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.Ze=!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 P(2,4,4008);return e.Ve||b.Ve}
565
+ function Jo(a){var b=0,c=Lc(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=Ic(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
566
+ function Ko(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 Lo(a){a=no(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=pd(a.textContent);a=Jo(a).filter(function(b){return b.type===Mo})[0];if(!a)return"";a=hd(a.value,!0);return(a=Do(a,"WRMHEADER"))?Ko(a):""}
567
+ function Ho(a,b,c){var d=[];b=r(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=c[e.vf];if(f){var g;if(g=no(e.node,"urn:microsoft:playready","pro")){g=pd(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);g=[{initData:jo(g,h),initDataType:"cenc",keyId:e.keyId}]}else g=null;g=Ib(f,e.init||a||g);if(f=No.get(f))g.licenseServerUri=f(e);d.push(g)}}return d}
568
+ function Go(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=Oo(c.value))&&b.push(c);return b}
569
+ function Oo(a){var b=a.getAttribute("schemeIdUri"),c=qo(a,"urn:mpeg:cenc:2013","default_KID"),d=oo(a,"urn:mpeg:cenc:2013","pssh").map(so);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new P(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:pd(f),keyId:null}})}catch(f){throw new P(2,4,4007);}return{node:a,vf:b,keyId:c,init:0<e.length?e:null}}
570
+ var Mo=1,No=(new Map).set("com.widevine.alpha",function(a){return(a=no(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Lo).set("com.microsoft.playready.recommendation",Lo).set("com.microsoft.playready.software",Lo).set("com.microsoft.playready.hardware",Lo);function Po(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(g,h,k,l){if("$$"==g)return"$";var m=f[h];if(null==m)return g;"RepresentationID"==h&&k&&(k=void 0);"Time"==h&&(m=Math.round(m));switch(l){case void 0:case "d":case "i":case "u":g=m.toString();break;case "o":g=m.toString(8);break;case "x":g=m.toString(16);break;case "X":g=m.toString(16).toUpperCase();break;default:g=m.toString()}k=
571
571
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
572
- function Po(a,b){var c=Qo(a,b,"timescale"),d=1;c&&(d=yo(c)||1);var e=Qo(a,b,"duration");c=yo(e||"");"image"==a.L.contentType&&(c=Ao(e||""));c&&(c/=d);var f=Qo(a,b,"startNumber");e=Number(Qo(a,b,"presentationTimeOffset"))||0;var g=zo(f||"");if(null==f||null==g)g=1;var h=Ro(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.Y.duration||Infinity;h=lo(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],t=h[n+1],v=to(p,"t",zo),y=to(p,"d",zo);p=to(p,"r",xo);null!=v&&(v-=e);if(!y)break;v=null!=v?v:m;p=
573
- p||0;if(0>p)if(t){t=to(t,"t",zo);if(null==t)break;else if(v>=t)break;p=Math.ceil((t-v)/y)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/y)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(t=0;t<=p;++t)m=v+y,l.push({start:v/f,end:m/f,hh:v}),v=m}f=l}return{timescale:d,ya:c,mc:g,sb:e/d||0,Ie:e,timeline:f}}function Qo(a,b,c){return[b(a.L),b(a.Ca),b(a.sa)].filter(Fb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
574
- function Ro(a,b,c){return[b(a.L),b(a.Ca),b(a.sa)].filter(Fb).map(function(d){return ko(d,c)}).reduce(function(d,e){return d||e})}
575
- function So(a,b,c,d,e,f){for(var g=po(a,"http://www.w3.org/1999/xlink","href"),h=po(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 Te(new P(2,4,4028));if("onLoad"!=h)return Te(new P(2,4,4027));var m=Hb([d],[g]);return e.request(0,gf(m,b)).qa(function(n){n=Do(n.data,a.tagName);if(!n)return Te(new P(2,4,4001,g));
576
- for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=r(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return To(a,b,c,m[0],e,f+1)})}
577
- function To(a,b,c,d,e,f){f=void 0===f?0:f;if(po(a,"http://www.w3.org/1999/xlink","href")){var g=So(a,b,c,d,e,f);c&&(g=g.qa(void 0,function(){return To(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"==po(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(To(k,b,c,d,e,f)));return Xe(g).qa(function(){return a})};function Uo(a,b,c,d,e,f,g){var h,k=(new vg).X("sidx",function(l){h=Vo(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new P(2,3,3004);}
578
- function Vo(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.P();if(0==k)throw new P(2,3,3005);if(0==g.version){var l=g.reader.P();var m=g.reader.P()}else l=g.reader.lc(),m=g.reader.lc();g.reader.skip(2);var n=g.reader.kc();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.P(),t=(p&2147483648)>>>31;p&=2147483647;var v=g.reader.P();g.reader.skip(4);if(1==t)throw new P(2,3,3006);h.push(new si(l/k+c,(l+v)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=v;a+=p}g.parser.stop();return h};function Wo(a){this.h=Lc(a);this.g=new sg(this.h,0)}Wo.prototype.Ea=function(){return this.g.Ea()};
579
- function Xo(a){var b=Yo(a);if(7<b.length)throw new P(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=Yo(a);a:{d=r(Zo);for(var e=d.next();!e.done;e=d.next())if(Gc(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.ia();else{if(8==b.length&&b[1]&224)throw new P(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.ia()+b<=a.h.byteLength?b:a.h.byteLength-a.g.ia();d=Lc(a.h,a.g.ia(),b);a.g.skip(b);return new $o(c,
580
- d)}function Yo(a){var b=a.g.ia(),c=a.g.ka();if(0==c)throw new P(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Ic(a.h,b,c)}var Zo=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function $o(a,b){this.id=a;this.g=b}
581
- function ap(a){if(8<a.g.byteLength)throw new P(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new P(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function bp(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Wo(a.g);for(var n=null,p=null;a.Ea();){var t=Xo(a);if(187==t.id){var v=cp(t);v&&(t=c*v.ih,v=b+v.Sg,null!=n&&m.push(new si(n+g,t+g,l,p,v-1,f,g,h,k)),n=t,p=v)}}null!=n&&m.push(new si(n+g,d+g,l,p,null,f,g,h,k));return m}
582
- function cp(a){var b=new Wo(a.g);a=Xo(b);if(179!=a.id)throw new P(2,3,3013);a=ap(a);b=Xo(b);if(183!=b.id)throw new P(2,3,3012);b=new Wo(b.g);for(var c=0;b.Ea();){var d=Xo(b);if(241==d.id){c=ap(d);break}}return{ih:a,Sg:c}};function dp(a,b){var c=Ro(a,b,"Initialization");if(!c)return null;var d=a.L.Pa,e=c.getAttribute("sourceURL");e&&(d=Hb(a.L.Pa,[e]));e=0;var f=null;if(c=to(c,"range",wo))e=c.start,f=c.end;return new qi(function(){return d},e,f,ep(a))}
583
- function fp(a,b){var c=Number(Qo(a,gp,"presentationTimeOffset"))||0,d=Qo(a,gp,"timescale"),e=1;d&&(e=yo(d)||1);var f=c/e||0,g=dp(a,gp);hp(a,g);var h=$e(a);return{$b:function(){var k=Ro(h,gp,"RepresentationIndex"),l=h.L.Pa;k&&(k=k.getAttribute("sourceURL"))&&(l=Hb(h.L.Pa,[k]));k=ip(h);return jp(h,b,g,l,k.start,k.end,f)}}}
584
- function jp(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,y,w,x,D,C,A,F;return M(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.xb||!a.Y.lf,l=a.Y.start,m=a.Y.duration,n=a.L.mimeType.split("/")[1],p=b,t=null,v=[p(d,e,f),"webm"==n?p(c.Ka(),c.Ha,c.wa):null],p=null,z(G,Promise.all(v),2);y=G.h;w=y[0];x=y[1]||null;D=null;C=l-g;A=l;F=m?l+m:Infinity;if("mp4"==n)var H=Uo(w,e,d,c,C,A,F);else{H=new Wo(x);if(440786851!=Xo(H).id)throw new P(2,3,3008);var K=Xo(H);if(408125543!=K.id)throw new P(2,3,3009);H=K.g.byteOffset;
585
- K=new Wo(K.g);for(var J=null;K.Ea();){var L=Xo(K);if(357149030==L.id){J=L;break}}if(!J)throw new P(2,3,3010);J=new Wo(J.g);L=1E6;for(K=null;J.Ea();){var W=Xo(J);if(2807729==W.id)L=ap(W);else if(17545==W.id)if(4==W.g.byteLength)K=W.g.getFloat32(0);else if(8==W.g.byteLength)K=W.g.getFloat64(0);else throw new P(2,3,3003);}if(null==K)throw new P(2,3,3011);J=L/1E9;K*=J;L=Xo(new Wo(w));if(475249515!=L.id)throw new P(2,3,3007);H=bp(L,H,J,K,d,c,C,A,F)}D=H;h.hc(D);t=new Pi(D);k&&t.yb(A,F,!0);return G["return"](t)})}
586
- function gp(a){return a.Nc}function ip(a){var b=Ro(a,gp,"RepresentationIndex");a=Qo(a,gp,"indexRange");a=wo(a||"");b&&(a=to(b,"range",wo,a));return a}function hp(a,b){kp(a,b);if(!ip(a))throw new P(2,4,4002);}function kp(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=Mb&&"mp4"!=c&&"webm"!=c)throw new P(2,4,4006);if("webm"==c&&!b)throw new P(2,4,4005);}
587
- function ep(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.nd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function lp(a,b){var c=dp(a,mp),d=np(a);if(!d.ya&&!d.timeline&&1<d.dc.length)throw new P(2,4,4002);if(!d.ya&&!a.Y.duration&&!d.timeline&&1==d.dc.length)throw new P(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new P(2,4,4002);var e=null,f=null;a.sa.id&&a.L.id&&(f=b[a.sa.id+","+a.L.id])&&(e=f.segmentIndex);var g=op(a.Y.start,a.Y.duration,a.L.Pa,d,c);c=!e;e?e.fc(g,a.presentationTimeline.ob()):e=new Pi(g);a.presentationTimeline.hc(g);a.xb&&a.Y.lf||e.yb(a.Y.start,a.Y.duration?a.Y.start+a.Y.duration:
588
- Infinity,c);f&&(f.segmentIndex=e);return{$b:function(){e&&0!=e.O.length||e.ec(g);return Promise.resolve(e)}}}function mp(a){return a.Db}function np(a){var b=xp(a);a=Po(a,mp);var c=a.mc;0==c&&(c=1);var d=0;a.ya?d=a.ya*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ya:a.ya,startTime:d,mc:c,sb:a.sb,timeline:a.timeline,dc:b}}
589
- function op(a,b,c,d,e){var f=d.dc.length;d.timeline&&d.timeline.length!=d.dc.length&&(f=Math.min(d.timeline.length,d.dc.length));for(var g=a-d.sb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={Hd:m.Hd},n++){var p=d.dc[n];m.Hd=Hb(c,[p.Jg]);var t=void 0;t=null!=d.ya?l+d.ya:d.timeline?d.timeline[n].end:l+b;k.push(new si(a+l,a+t,function(v){return function(){return v.Hd}}(m),p.start,p.end,e,g,a,h));l=t}return k}
590
- function xp(a){return[a.L.Db,a.Ca.Db,a.sa.Db].filter(Fb).map(function(b){return lo(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.hf&&(a.hf=!0);var c=b.getAttribute("media");b=to(b,"mediaRange",wo,{start:0,end:null});return{Jg:c,start:b.start,end:b.end}})};function yp(a,b,c,d,e,f){var g=zp(a),h=Ap(a);Bp(h);var k=$e(a);if(h.Hc)return kp(a,g),{$b:function(){var t=Oo(h.Hc,k.L.id,null,k.bandwidth||null,null);t=Hb(k.L.Pa,[t]);return jp(k,b,g,t,0,null,h.sb)}};if(h.ya)return d||(a.presentationTimeline.be(h.ya),a.presentationTimeline.ce(a.Y.start)),{$b:function(){return Cp(k,h,e,g,f)}};var l=null;d=d=null;a.sa.id&&a.L.id&&(d=a.sa.id+","+a.L.id,d=c[d])&&(l=d.segmentIndex);var m=Dp(k,h,g);c=a.Y.start;var n=a.Y.duration?a.Y.start+a.Y.duration:Infinity,p=Infinity!=
591
- n;l?(p&&(new Pi(m)).yb(c,n,!0),l.fc(m,a.presentationTimeline.ob())):l=new Pi(m);a.presentationTimeline.hc(m);p&&l.yb(c,n);d&&a.xb&&(d.segmentIndex=l);return{$b:function(){l&&0!=l.O.length||l.ec(m);return Promise.resolve(l)}}}function Ep(a){return a.Oc}function Ap(a){var b=Po(a,Ep),c=Qo(a,Ep,"media");a=Qo(a,Ep,"index");return{ya:b.ya,timescale:b.timescale,mc:b.mc,sb:b.sb,Ie:b.Ie,timeline:b.timeline,ae:c,Hc:a}}
592
- function Bp(a){var b=a.Hc?1:0;b+=a.timeline?1:0;b+=a.ya?1:0;if(0==b)throw new P(2,4,4002);1!=b&&(a.Hc&&(a.timeline=null),a.ya=null);if(!a.Hc&&!a.ae)throw new P(2,4,4002);}
593
- function Cp(a,b,c,d,e){function f(J){var L=(J-t)*p,W=L+b.sb,Z=L+l;L=Z+p;var ka=Math.min(L,h());Z=new si(Z,ka,function(){var ja=Oo(y,x,J,w,W*v);return Hb(D,[ja])},0,null,d,C,l,h());Z.l=L;return Z}function g(){var J=[Math.max(k.ob(),l),Math.min(k.Jb(),h())].map(function(L){return L-l});return[Math.ceil(J[0]/p),Math.ceil(J[1]/p)-1].map(function(L){return L+t})}function h(){var J=null!=m&&e[m]||n;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.Y.start,m=a.sa.id,n=a.Y.duration,p=b.ya,t=b.mc,v=b.timescale,
594
- y=b.ae,w=a.bandwidth||null,x=a.L.id,D=a.L.Pa,C=l-b.sb,A=g();a=a.xb?Math.max(A[0],A[1]-c+1):A[0];A=A[1];c=[];for(var F=a;F<=A;++F){var G=f(F);c.push(G)}var H=new Pi(c);c=k.Jb()<h();F=k.T();if(c||F){var K=Math.max(a,A+1);H.xd(p,function(){var J=k.ob();H.Gb(J);var L=r(g());L.next();L=L.next().value;for(var W=[];K<=L;){var Z=f(K);W.push(Z);K++}return J>h()&&!W.length?null:W})}return Promise.resolve(H)}
595
- function Dp(a,b,c){var d=a.Y.start,e=a.Y.duration,f=d-b.sb;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={Gd:h.Gd,Kd:h.Kd,Nd:h.Nd,Dd:h.Dd,Pd:h.Pd,Ed:h.Ed},k++){var l=b.timeline[k],m=l.start,n=l.hh;l=l.end;h.Nd=k+b.mc;h.Pd=n+b.Ie;h.Kd=a.L.id;h.Dd=a.bandwidth||null;h.Gd=b.ae;h.Ed=a.L.Pa;g.push(new si(d+m,d+l,function(p){return function(){var t=Oo(p.Gd,p.Kd,p.Nd,p.Dd||null,p.Pd);return Hb(p.Ed,[t]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
596
- function zp(a){var b=Qo(a,Ep,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.Pa;return new qi(function(){var f=Oo(b,c,null,d,null);return Hb(e,[f])},0,null,ep(a))};function Fp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Fp.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=[]};
597
- function Gp(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,D,C,A,F,G,H,K,J,L,W,Z,ka,ja,ea,Ia;return M(function(Ma){switch(Ma.g){case 1:d=Nb;Hp(b);Ip(b);Jp(b);Kp(b);if(!c&&1==b.length){e=b[0];a.g=e.Xc;a.h=e.zd;a.j=e.textStreams;a.i=e.imageStreams;Ma.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 Ma["return"]();k=b.map(function(Da){return Da.Xc});l=b.map(function(Da){return Da.zd});m=b.map(function(Da){return Da.textStreams});n=b.map(function(Da){return Da.imageStreams});
598
- p=r(m);for(t=p.next();!t.done;t=p.next())v=t.value,v.push(Lp(d.oa));y=r(n);for(w=y.next();!w.done;w=y.next())x=w.value,x.push(Lp(d.wc));return z(Ma,Mp(a.g,k,f,Np,Op),3);case 3:return z(Ma,Mp(a.h,l,f,Np,Op),4);case 4:return z(Ma,Mp(a.j,m,f,Np,Op),5);case 5:return z(Ma,Mp(a.i,n,f,Np,Op),2);case 2:D=0;C=[];if(a.h.length&&a.g.length)for(J=r(a.g),L=J.next();!L.done;L=J.next())for(W=L.value,Z=r(a.h),ka=Z.next();!ka.done;ka=Z.next())ja=ka.value,ea=kg(W.drmInfos,ja.drmInfos),W.drmInfos.length&&ja.drmInfos.length&&
599
- !ea.length||(Ia=D++,C.push({id:Ia,language:W.language,primary:W.primary,audio:W,video:ja,bandwidth:(W.bandwidth||0)+(ja.bandwidth||0),drmInfos:ea,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(A=a.h.concat(a.g),F=r(A),G=F.next();!G.done;G=F.next())H=G.value,K=D++,C.push({id:K,language:H.language,primary:H.primary,audio:H.type==d.Fb?H:null,video:H.type==d.gb?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
600
- a.l=C;B(Ma)}})}function Hp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Xc),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&&jc(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.Xc=c}}
601
- function Jp(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&&jc(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
602
- function Ip(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.zd),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&&jc(e.roles,h.roles)&&Af(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.zd=c}}
603
- function Kp(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}}
604
- function Pp(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,D,C,A,F,G,H,K,J,L,W;return M(function(Z){switch(Z.g){case 1:b=Nb;if(1==a.length)return Z["return"](a[0]);c=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.Fb})});d=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.gb})});e=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.oa})});f=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.wc})});g=r(e);for(h=g.next();!h.done;h=g.next())k=
605
- h.value,k.push(Qp(b.oa));l=r(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Qp(b.wc));return z(Z,Mp([],c,0,Rp,Sp),2);case 2:return p=Z.h,z(Z,Mp([],d,0,Rp,Sp),3);case 3:return t=Z.h,z(Z,Mp([],e,0,Rp,Sp),4);case 4:return v=Z.h,z(Z,Mp([],f,0,Rp,Sp),5);case 5:y=Z.h;w=0;if(t.length&&p.length)for(F=r(p),G=F.next();!G.done;G=F.next())for(H=G.value,K=r(t),J=K.next();!J.done;J=K.next())L=J.value,W=w++,L.variantIds.push(W),H.variantIds.push(W);else for(x=t.concat(p),D=r(x),C=D.next();!C.done;C=D.next())A=
606
- C.value,A.variantIds=[w++];return Z["return"](t.concat(p).concat(v).concat(y))}})}
607
- function Mp(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,y,w,x,D,C,A,F,G,H,K,J;return M(function(L){switch(L.g){case 1:f=Nb;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){L.D(4);break}m=l.value;return z(L,Tp(m,b,c,e,g),5);case 5:n=L.h;if(!n)throw new P(2,4,4037);l=k.next();L.D(2);break;case 4:p=r(g);for(t=p.next();!t.done;t=p.next())for(v=t.value,y=r(v),w=y.next();!w.done;w=y.next())x=w.value,(D=Up(x,b,d,e,g))&&a.push(D);C=r(g);for(t=C.next();!t.done;t=
608
- C.next())for(A=t.value,F={},G=r(A),w=G.next();!w.done;F={vb:F.vb},w=G.next())if(F.vb=w.value,H=F.vb.type==f.oa&&!F.vb.language,K=F.vb.type==f.wc&&!F.vb.tilesLayout,!H&&!K&&(J=a.some(function(W){return function(Z){return Z.mimeType==W.vb.mimeType&&Ad(Z.codecs)==Ad(W.vb.codecs)}}(F))))throw new P(2,4,4037);return L["return"](a)}})}
609
- function Tp(a,b,c,d,e){return M(function(f){if(1==f.g)return Vp(b,a),a.matchedStreams?a.segmentIndex?z(f,Wp(a,c),2):f.D(2):f["return"](!1);Xp(a,c,d,e);return f["return"](!0)})}
610
- function Wp(a,b){var c,d,e,f,g,h,k;return M(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 z(l,Promise.all(c),2)}if(a.segmentIndex instanceof Si)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.j.push(k.segmentIndex);B(l)})}
611
- function Up(a,b,c,d,e){var f=c(a);Vp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return M(function(g){if(f.segmentIndex)return g.D(0);f.segmentIndex=new Si;return z(g,Wp(f,0),0)})});if(!f.matchedStreams)return null;Xp(f,0,d,e);return f}function Xp(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==Wb(a.language,g.language)&&(h=!1);h&&d[f]["delete"](g)}}
612
- function Np(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}
613
- function Rp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
614
- function Op(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(ia(f),ia(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=kg(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new P(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
615
- (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=Np(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),Op(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Op(a.trickModeVideo,b)}
616
- function Sp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ia(a.keyIds),ia(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ia(b.segments));if(b.closedCaptions){a.closedCaptions||(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)}}}
617
- function Vp(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:Yp,video:Yp,text:Zp,image:$p}[f.type],h={audio:aq,video:bq,text:cq,image:dq}[f.type],k=null;e=r(e.value);for(var l=e.next();!l.done;l=e.next())l=l.value,!g(f,l)||k&&!h(f,k,l)||(k=l);f=k;if(!f)return;c.push(f)}b.matchedStreams=c}function Yp(a,b){var c;if(!(c=b.mimeType!=a.mimeType||Ad(b.codecs)!=Ad(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<kg(c,d).length:1)}return c?!1:!0}
618
- function Zp(a,b){return a.language?b.language?0==Wb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function $p(a){return a.tilesLayout?!0:!1}
619
- function aq(a,b,c){if(a.id==c.id)return!0;var d=Wb(a.language,b.language),e=Wb(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)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;
620
- d=eq(a.channelsCount,b.channelsCount,c.channelsCount);if(d==fq)return!0;if(d==gq)return!1;d=eq(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==fq?!0:d==gq?!1:a.bandwidth&&hq(a.bandwidth,b.bandwidth,c.bandwidth)==fq?!0:!1}
621
- function bq(a,b,c){if(a.id==c.id)return!0;var d=eq(a.width*a.height,b.width*b.height,c.width*c.height);if(d==fq)return!0;if(d==gq)return!1;if(a.frameRate){d=eq(a.frameRate,b.frameRate,c.frameRate);if(d==fq)return!0;if(d==gq)return!1}return a.bandwidth&&hq(a.bandwidth,b.bandwidth,c.bandwidth)==fq?!0:!1}
622
- function cq(a,b,c){if(a.id==c.id)return!0;var d=Wb(a.language,b.language),e=Wb(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!=
623
- a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function dq(a,b,c){return a.id==c.id?!0:eq(a.width*a.height,b.width*b.height,c.width*c.height)==fq?!0:!1}function Qp(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
624
- function Lp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Pi([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
625
- function eq(a,b,c){if(b==a&&a!=c)return gq;if(c==a&&a!=b)return fq;if(b>a){if(c<=a||c-a<b-a)return fq;if(c-a>b-a)return gq}else{if(c>a)return gq;if(a-c<a-b)return fq;if(a-c>a-b)return gq}return iq}function hq(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?fq:b<a?gq:iq}var fq=1,iq=0,gq=-1;function jq(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.I=1;this.l={};this.N={};this.j=new Fp;this.H=0;this.J=new ec(5);this.G=new Q(function(){kq(a)});this.A=new af;this.B=null;this.K=[];this.C=Infinity;this.F=!1}q=jq.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return M(function(e){if(1==e.g)return c.F=b.isLowLatencyMode(),c.m=[a],c.h=b,z(e,lq(c),2);d=e.h;c.h&&mq(c,d);if(!c.h)throw new P(2,7,7001);return e["return"](c.i)})};
626
- 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.A.destroy()};q.update=function(){var a=this,b;return M(function(c){if(1==c.g)return E(c,2),z(c,lq(a),4);if(2!=c.g)return va(c,0);b=I(c);if(!a.h||!b)return c["return"]();a.h.onError(b);B(c)})};q.onExpirationUpdated=function(){};
627
- function lq(a){var b,c,d,e,f,g,h;return M(function(k){if(1==k.g)return b=gf(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),bf(a.A,e),z(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 z(k,nq(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.J.sample(1,h);return k["return"](h)})}
628
- function nq(a,b,c){var d,e,f,g,h;return M(function(k){if(1==k.g){d=Do(b,"MPD");if(!d)throw new P(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](oq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=To(d,a.g.retryParameters,f,c,a.h.networkingEngine);bf(a.A,g);return z(k,g.promise,2)}h=k.h;return k["return"](oq(a,h,c))})}
629
- function oq(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,D,C,A,F,G,H,K,J,L,W,Z,ka,ja,ea,Ia,Ma,Da;return M(function(Qa){switch(Qa.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=lo(b,"Location").map(ro).filter(Fb);0<f.length&&(g=Hb(e,f),e=a.m=g);h=lo(b,"BaseURL");k=h.map(ro);l=Hb(e,k);m=0;h&&h.length&&(m=to(h[0],"availabilityTimeOffset",Ao)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=to(b,"minBufferTime",vo)||0);a.H=to(b,"minimumUpdatePeriod",vo,-1);t=to(b,"availabilityStartTime",uo);v=to(b,
630
- "timeShiftBufferDepth",vo);y=a.g.dash.ignoreSuggestedPresentationDelay;w=null;y||(w=to(b,"suggestedPresentationDelay",vo));x=a.g.dash.ignoreMaxSegmentDuration;D=null;x||(D=to(b,"maxSegmentDuration",vo));C=b.getAttribute("type")||"static";if(a.i)for(A=a.i.presentationTimeline,F=r(Object.values(a.l)),G=F.next();!G.done;G=F.next())H=G.value,H.segmentIndex&&H.segmentIndex.Gb(A.ob());else K=a.g.defaultPresentationDelay||1.5*p,J=null!=w?w:K,A=new R(t,J,a.g.dash.autoCorrectDrift);A.Pc("static"==C);(L=A.T())&&
631
- !isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);A.ye(v);W=b.getAttribute("profiles")||"";Z={xb:"static"!=C,presentationTimeline:A,sa:null,Y:null,Ca:null,L:null,bandwidth:0,hf:!1,Yb:m,profiles:W.split(",")};ka=pq(a,Z,l,b);ja=ka.duration;ea=ka.periods;"static"!=C&&ka.Xe||A.bb(ja||Infinity);a.C&&!a.F&&(Ia=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.F=a.h.isLowLatencyMode());a.F?A.wf(a.C):a.C&&Sa("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
632
- A.be(D||1);return z(Qa,Gp(a.j,ea,Z.xb),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);Qa.D(3);break}a.i={presentationTimeline:A,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0};if(!A.Ef()){Qa.D(4);break}Ma=lo(b,"UTCTiming");return z(Qa,qq(a,l,Ma),5);case 5:Da=Qa.h;if(!a.h)return Qa["return"]();A.xf(Da);case 4:A.Yd();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),B(Qa)}})}
633
- function pq(a,b,c,d){var e=to(d,"mediaPresentationDuration",vo),f=[],g=0;d=lo(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=to(k,"start",vo,g),n=k.id,p=to(k,"duration",vo),t=null;if(l){var v=to(l,"start",vo);null!=v&&(t=v-m)}else null!=e&&(t=e-m);null==t&&(t=p);if(!(null!==a.B&&null!==n&&null!==m&&m<a.B)||a.K.includes(n)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=rq(a,b,c,{start:m,duration:t,node:k,lf:null==t||!l});f.push(g);b.sa.id&&t&&(a.N[b.sa.id]=t);if(null==t){g=
634
- null;break}g=m+t}}a.K=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,Xe:!1}:{periods:f,duration:g,Xe:!0}}
635
- function rq(a,b,c,d){b.sa=sq(d.node,null,c);b.Y=d;b.sa.Yb=b.Yb;b.sa.id||(b.sa.id="__shaka_period_"+d.start);var e=lo(d.node,"EventStream");c=b.presentationTimeline.ob();e=r(e);for(var f=e.next();!f.done;f=e.next())tq(a,d.start,d.duration,f.value,c);c=lo(d.node,"AdaptationSet").map(function(m){return uq(a,b,m)}).filter(Fb);if(b.xb){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.Vg);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new P(2,4,4018);
636
- }d=c.filter(function(m){return!m.Ee});c=c.filter(function(m){return m.Ee});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Ee.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={Vc:h.Vc},l=k.next())h.Vc=l.value,h.Vc.trickModeVideo=e.streams.find(function(m){return function(n){return Ad(m.Vc.codecs)==Ad(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:vq(d,"audio");g=a.g.disableVideo?[]:vq(d,"video");f=a.g.disableText?
637
- []:vq(d,Mb);c=a.g.disableThumbnails?[]:vq(d,"image");if(!g.length&&!e.length)throw new P(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ia(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.sa.id,Xc:d,zd:e,textStreams:g,imageStreams:f}}
638
- function vq(a,b){return a.filter(function(c){return c.contentType==b})}
639
- function uq(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.Ca=sq(c,b.sa,null);var e=!1,f=lo(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Fb),h=void 0,k=b.Ca.contentType==Mb;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=
640
- l}}var n;m=lo(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var t=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=lo(c,"SupplementalProperty");m=r(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),
641
- 10)));m=lo(c,"Accessibility");var v=new Map;m=r(m);for(p=m.next();!p.done;p=m.next())if(t=p.value,p=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=t){t=t.split(";");for(var y=r(t),w=y.next();!w.done;w=y.next()){var x=w.value,D=w=void 0;x.includes("=")?(x=x.split("="),w=x[0].startsWith("CC")?x[0]:"CC"+x[0],D=x[1]||"und"):(w="CC"+p,2==t.length?p+=2:p++,D=x);v.set(w,Qb(D))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
642
- 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"+p,p++,x=w),v.set(y,Qb(x));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=lo(c,"ContentProtection");var C=Eo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),A=Qb(c.getAttribute("lang")||"und"),F=c.getAttribute("label");(l=lo(c,"Label"))&&l.length&&
643
- (l=l[0],l.textContent&&(F=l.textContent));l=lo(c,"Representation");c=l.map(function(G){if(G=wq(a,b,C,h,A,F,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.Ca.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new P(2,4,4003);}if(!b.Ca.contentType||"application"==b.Ca.contentType)for(b.Ca.contentType=xq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.Ca.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=
644
- m.value,p=r(C.drmInfos),t=p.next();!t.done;t=p.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ia(t.keyIds),ia(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Fb);return{id:b.Ca.id||"__fake__"+a.I++,contentType:b.Ca.contentType,language:A,Ii:e,streams:c,drmInfos:C.drmInfos,Ee:f,Vg:k}}
645
- function wq(a,b,c,d,e,f,g,h,k,l){b.L=sq(l,b.Ca,null);a.C=Math.min(a.C,b.L.Yb);if(!yq(b.L))return null;var m=b.Y.start;b.bandwidth=to(l,"bandwidth",yo)||0;var n=b.L.contentType,p=n==Mb||"application"==n;n="image"==n;try{var t=function(H,K,J){return zq(a,H,K,J)};if(b.L.Nc)var v=fp(b,t);else if(b.L.Db)v=lp(b,a.l);else if(b.L.Oc)v=yp(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.N);else{var y=b.L.Pa,w=b.Y.duration||0;v={$b:function(){return Promise.resolve(Ri(m,w,y))}}}}catch(H){if((p||n)&&4002==H.code)return null;
646
- throw H;}t=lo(l,"ContentProtection");t=Ho(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var x=!1;lo(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(x=!0);var D=!1;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var C;if(n&&((l=lo(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
647
- (C=l.getAttribute("value")),!C))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");var F=b.L.id?b.sa.id+","+b.L.id:"",G={id:a.I++,originalId:b.L.id,createSegmentIndex:function(){var H,K,J;return M(function(L){if(1==L.g){K=(H=F&&b.xb&&a.l[F])?a.l[F]:G;if(K.segmentIndex)return L.D(0);J=K;return z(L,v.$b(),3)}J.segmentIndex=L.h;B(L)})},closeSegmentIndex:function(){G.segmentIndex&&
648
- (G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.L.mimeType,codecs:b.L.codecs,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.Ca.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.L.nd,audioSamplingRate:b.L.audioSamplingRate,spatialAudio:x,closedCaptions:k,
649
- hdr:A,tilesLayout:C,matchedStreams:[]};F&&b.xb&&!a.l[F]&&(a.l[F]=G);return G}function kq(a){var b,c;M(function(d){switch(d.g){case 1:return b=0,E(d,2),z(d,lq(a),4);case 4:b=d.h;va(d,3);break;case 2:c=I(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();mq(a,b);B(d)}})}function mq(a,b){0>a.H||a.G.S(Math.max(3,a.H-b,fc(a.J)))}
650
- function sq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,nd:null,audioSamplingRate:null,Yb:0};c=c||b.Pa;var d=lo(a,"BaseURL"),e=d.map(ro),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=to(a,"frameRate",Bo)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=lo(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=r(m);for(var p=m.next();!p.done;p=
651
- m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=lo(a,"AudioChannelConfiguration");m=Aq(m)||b.nd;p=to(a,"audioSamplingRate",zo)||b.audioSamplingRate;f||(f=xq(g,h));var t=ko(a,"SegmentBase"),v=ko(a,"SegmentTemplate"),y=t?to(t,"availabilityTimeOffset",Ao)||0:0,w=v?to(v,"availabilityTimeOffset",Ao)||0:0;d=d&&d.length?to(d[0],"availabilityTimeOffset",Ao)||0:0;d=b.Yb+d+y+w;return{Pa:Hb(c,e),Nc:t||b.Nc,Db:ko(a,"SegmentList")||b.Db,Oc:v||b.Oc,width:to(a,"width",zo)||b.width,height:to(a,
652
- "height",zo)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),nd:m,audioSamplingRate:p,Yb:d}}
653
- function Aq(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=
654
- 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 yq(a){var b=a.Nc?1:0;b+=a.Db?1:0;b+=a.Oc?1:0;if(0==b)return a.contentType==Mb||"application"==a.contentType?!0:!1;1!=b&&(a.Nc&&(a.Db=null),a.Oc=null);return!0}
655
- function Bq(a,b,c,d){var e,f,g,h,k,l;return M(function(m){if(1==m.g)return e=Hb(b,[c]),f=gf(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),bf(a.A,g),z(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=gd(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
656
- function qq(a,b,c){var d,e,f,g,h,k,l,m;return M(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=r(d),g=f.next();case 2:if(g.done){n.D(4);break}h=g.value;E(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.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 n.D(8);
657
- case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n["return"](isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Sa("NTP UTCTiming scheme is not supported");break;default:Sa("Unrecognized scheme in UTCTiming element",k)}n.D(9);break;case 7:return z(n,Bq(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return z(n,Bq(a,b,l,"GET"),11);case 11:return n["return"](n.h);
572
+ function Qo(a,b){var c=Ro(a,b,"timescale"),d=1;c&&(d=zo(c)||1);var e=Ro(a,b,"duration");c=zo(e||"");"image"==a.L.contentType&&(c=Bo(e||""));c&&(c/=d);var f=Ro(a,b,"startNumber");e=Number(Ro(a,b,"presentationTimeOffset"))||0;var g=Ao(f||"");if(null==f||null==g)g=1;var h=So(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.Y.duration||Infinity;h=mo(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],t=h[n+1],v=uo(p,"t",Ao),x=uo(p,"d",Ao);p=uo(p,"r",yo);null!=v&&(v-=e);if(!x)break;v=null!=v?v:m;p=
573
+ p||0;if(0>p)if(t){t=uo(t,"t",Ao);if(null==t)break;else if(v>=t)break;p=Math.ceil((t-v)/x)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/x)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(t=0;t<=p;++t)m=v+x,l.push({start:v/f,end:m/f,hh:v}),v=m}f=l}return{timescale:d,ya:c,mc:g,sb:e/d||0,Ie:e,timeline:f}}function Ro(a,b,c){return[b(a.L),b(a.Ca),b(a.sa)].filter(Fb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
574
+ function So(a,b,c){return[b(a.L),b(a.Ca),b(a.sa)].filter(Fb).map(function(d){return lo(d,c)}).reduce(function(d,e){return d||e})}
575
+ function To(a,b,c,d,e,f){for(var g=qo(a,"http://www.w3.org/1999/xlink","href"),h=qo(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 Te(new P(2,4,4028));if("onLoad"!=h)return Te(new P(2,4,4027));var m=Hb([d],[g]);return e.request(0,gf(m,b)).qa(function(n){n=Eo(n.data,a.tagName);if(!n)return Te(new P(2,4,4001,g));
576
+ for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=r(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return Uo(a,b,c,m[0],e,f+1)})}
577
+ function Uo(a,b,c,d,e,f){f=void 0===f?0:f;if(qo(a,"http://www.w3.org/1999/xlink","href")){var g=To(a,b,c,d,e,f);c&&(g=g.qa(void 0,function(){return Uo(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"==qo(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Uo(k,b,c,d,e,f)));return Xe(g).qa(function(){return a})};function Vo(a,b,c,d,e,f,g){var h,k=(new vg).X("sidx",function(l){h=Wo(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new P(2,3,3004);}
578
+ function Wo(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.P();if(0==k)throw new P(2,3,3005);if(0==g.version){var l=g.reader.P();var m=g.reader.P()}else l=g.reader.lc(),m=g.reader.lc();g.reader.skip(2);var n=g.reader.kc();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.P(),t=(p&2147483648)>>>31;p&=2147483647;var v=g.reader.P();g.reader.skip(4);if(1==t)throw new P(2,3,3006);h.push(new si(l/k+c,(l+v)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=v;a+=p}g.parser.stop();return h};function Xo(a){this.h=Lc(a);this.g=new sg(this.h,0)}Xo.prototype.Ea=function(){return this.g.Ea()};
579
+ function Yo(a){var b=Zo(a);if(7<b.length)throw new P(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=Zo(a);a:{d=r($o);for(var e=d.next();!e.done;e=d.next())if(Gc(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.ia();else{if(8==b.length&&b[1]&224)throw new P(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.ia()+b<=a.h.byteLength?b:a.h.byteLength-a.g.ia();d=Lc(a.h,a.g.ia(),b);a.g.skip(b);return new ap(c,
580
+ d)}function Zo(a){var b=a.g.ia(),c=a.g.ka();if(0==c)throw new P(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Ic(a.h,b,c)}var $o=[[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 ap(a,b){this.id=a;this.g=b}
581
+ function bp(a){if(8<a.g.byteLength)throw new P(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new P(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 cp(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Xo(a.g);for(var n=null,p=null;a.Ea();){var t=Yo(a);if(187==t.id){var v=dp(t);v&&(t=c*v.ih,v=b+v.Sg,null!=n&&m.push(new si(n+g,t+g,l,p,v-1,f,g,h,k)),n=t,p=v)}}null!=n&&m.push(new si(n+g,d+g,l,p,null,f,g,h,k));return m}
582
+ function dp(a){var b=new Xo(a.g);a=Yo(b);if(179!=a.id)throw new P(2,3,3013);a=bp(a);b=Yo(b);if(183!=b.id)throw new P(2,3,3012);b=new Xo(b.g);for(var c=0;b.Ea();){var d=Yo(b);if(241==d.id){c=bp(d);break}}return{ih:a,Sg:c}};function ep(a,b){var c=So(a,b,"Initialization");if(!c)return null;var d=a.L.Pa,e=c.getAttribute("sourceURL");e&&(d=Hb(a.L.Pa,[e]));e=0;var f=null;if(c=uo(c,"range",xo))e=c.start,f=c.end;return new qi(function(){return d},e,f,fp(a))}
583
+ function gp(a,b){var c=Number(Ro(a,hp,"presentationTimeOffset"))||0,d=Ro(a,hp,"timescale"),e=1;d&&(e=zo(d)||1);var f=c/e||0,g=ep(a,hp);ip(a,g);var h=$e(a);return{$b:function(){var k=So(h,hp,"RepresentationIndex"),l=h.L.Pa;k&&(k=k.getAttribute("sourceURL"))&&(l=Hb(h.L.Pa,[k]));k=jp(h);return kp(h,b,g,l,k.start,k.end,f)}}}
584
+ function kp(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,x,y,w,D,z,B,F;return M(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.xb||!a.Y.lf,l=a.Y.start,m=a.Y.duration,n=a.L.mimeType.split("/")[1],p=b,t=null,v=[p(d,e,f),"webm"==n?p(c.Ka(),c.Ha,c.wa):null],p=null,A(G,Promise.all(v),2);x=G.h;y=x[0];w=x[1]||null;D=null;z=l-g;B=l;F=m?l+m:Infinity;if("mp4"==n)var H=Vo(y,e,d,c,z,B,F);else{H=new Xo(w);if(440786851!=Yo(H).id)throw new P(2,3,3008);var J=Yo(H);if(408125543!=J.id)throw new P(2,3,3009);H=J.g.byteOffset;
585
+ J=new Xo(J.g);for(var K=null;J.Ea();){var L=Yo(J);if(357149030==L.id){K=L;break}}if(!K)throw new P(2,3,3010);K=new Xo(K.g);L=1E6;for(J=null;K.Ea();){var W=Yo(K);if(2807729==W.id)L=bp(W);else if(17545==W.id)if(4==W.g.byteLength)J=W.g.getFloat32(0);else if(8==W.g.byteLength)J=W.g.getFloat64(0);else throw new P(2,3,3003);}if(null==J)throw new P(2,3,3011);K=L/1E9;J*=K;L=Yo(new Xo(y));if(475249515!=L.id)throw new P(2,3,3007);H=cp(L,H,K,J,d,c,z,B,F)}D=H;h.hc(D);t=new Pi(D);k&&t.yb(B,F,!0);return G["return"](t)})}
586
+ function hp(a){return a.Nc}function jp(a){var b=So(a,hp,"RepresentationIndex");a=Ro(a,hp,"indexRange");a=xo(a||"");b&&(a=uo(b,"range",xo,a));return a}function ip(a,b){lp(a,b);if(!jp(a))throw new P(2,4,4002);}function lp(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=Mb&&"mp4"!=c&&"webm"!=c)throw new P(2,4,4006);if("webm"==c&&!b)throw new P(2,4,4005);}
587
+ function fp(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.nd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function mp(a,b){var c=ep(a,np),d=op(a);if(!d.ya&&!d.timeline&&1<d.dc.length)throw new P(2,4,4002);if(!d.ya&&!a.Y.duration&&!d.timeline&&1==d.dc.length)throw new P(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new P(2,4,4002);var e=null,f=null;a.sa.id&&a.L.id&&(f=b[a.sa.id+","+a.L.id])&&(e=f.segmentIndex);var g=pp(a.Y.start,a.Y.duration,a.L.Pa,d,c);c=!e;e?e.fc(g,a.presentationTimeline.ob()):e=new Pi(g);a.presentationTimeline.hc(g);a.xb&&a.Y.lf||e.yb(a.Y.start,a.Y.duration?a.Y.start+a.Y.duration:
588
+ Infinity,c);f&&(f.segmentIndex=e);return{$b:function(){e&&0!=e.O.length||e.ec(g);return Promise.resolve(e)}}}function np(a){return a.Db}function op(a){var b=yp(a);a=Qo(a,np);var c=a.mc;0==c&&(c=1);var d=0;a.ya?d=a.ya*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ya:a.ya,startTime:d,mc:c,sb:a.sb,timeline:a.timeline,dc:b}}
589
+ function pp(a,b,c,d,e){var f=d.dc.length;d.timeline&&d.timeline.length!=d.dc.length&&(f=Math.min(d.timeline.length,d.dc.length));for(var g=a-d.sb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={Hd:m.Hd},n++){var p=d.dc[n];m.Hd=Hb(c,[p.Jg]);var t=void 0;t=null!=d.ya?l+d.ya:d.timeline?d.timeline[n].end:l+b;k.push(new si(a+l,a+t,function(v){return function(){return v.Hd}}(m),p.start,p.end,e,g,a,h));l=t}return k}
590
+ function yp(a){return[a.L.Db,a.Ca.Db,a.sa.Db].filter(Fb).map(function(b){return mo(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.hf&&(a.hf=!0);var c=b.getAttribute("media");b=uo(b,"mediaRange",xo,{start:0,end:null});return{Jg:c,start:b.start,end:b.end}})};function zp(a,b,c,d,e,f){var g=Ap(a),h=Bp(a);Cp(h);var k=$e(a);if(h.Hc)return lp(a,g),{$b:function(){var t=Po(h.Hc,k.L.id,null,k.bandwidth||null,null);t=Hb(k.L.Pa,[t]);return kp(k,b,g,t,0,null,h.sb)}};if(h.ya)return d||(a.presentationTimeline.be(h.ya),a.presentationTimeline.ce(a.Y.start)),{$b:function(){return Dp(k,h,e,g,f)}};var l=null;d=d=null;a.sa.id&&a.L.id&&(d=a.sa.id+","+a.L.id,d=c[d])&&(l=d.segmentIndex);var m=Ep(k,h,g);c=a.Y.start;var n=a.Y.duration?a.Y.start+a.Y.duration:Infinity,p=Infinity!=
591
+ n;l?(p&&(new Pi(m)).yb(c,n,!0),l.fc(m,a.presentationTimeline.ob())):l=new Pi(m);a.presentationTimeline.hc(m);p&&l.yb(c,n);d&&a.xb&&(d.segmentIndex=l);return{$b:function(){l&&0!=l.O.length||l.ec(m);return Promise.resolve(l)}}}function Fp(a){return a.Oc}function Bp(a){var b=Qo(a,Fp),c=Ro(a,Fp,"media");a=Ro(a,Fp,"index");return{ya:b.ya,timescale:b.timescale,mc:b.mc,sb:b.sb,Ie:b.Ie,timeline:b.timeline,ae:c,Hc:a}}
592
+ function Cp(a){var b=a.Hc?1:0;b+=a.timeline?1:0;b+=a.ya?1:0;if(0==b)throw new P(2,4,4002);1!=b&&(a.Hc&&(a.timeline=null),a.ya=null);if(!a.Hc&&!a.ae)throw new P(2,4,4002);}
593
+ function Dp(a,b,c,d,e){function f(K){var L=(K-t)*p,W=L+b.sb,Z=L+l;L=Z+p;var ka=Math.min(L,h());Z=new si(Z,ka,function(){var ja=Po(x,w,K,y,W*v);return Hb(D,[ja])},0,null,d,z,l,h());Z.l=L;return Z}function g(){var K=[Math.max(k.ob(),l),Math.min(k.Kb(),h())].map(function(L){return L-l});return[Math.ceil(K[0]/p),Math.ceil(K[1]/p)-1].map(function(L){return L+t})}function h(){var K=null!=m&&e[m]||n;return K?l+K:Infinity}var k=a.presentationTimeline,l=a.Y.start,m=a.sa.id,n=a.Y.duration,p=b.ya,t=b.mc,v=b.timescale,
594
+ x=b.ae,y=a.bandwidth||null,w=a.L.id,D=a.L.Pa,z=l-b.sb,B=g();a=a.xb?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var F=a;F<=B;++F){var G=f(F);c.push(G)}var H=new Pi(c);c=k.Kb()<h();F=k.T();if(c||F){var J=Math.max(a,B+1);H.xd(p,function(){var K=k.ob();H.Hb(K);var L=r(g());L.next();L=L.next().value;for(var W=[];J<=L;){var Z=f(J);W.push(Z);J++}return K>h()&&!W.length?null:W})}return Promise.resolve(H)}
595
+ function Ep(a,b,c){var d=a.Y.start,e=a.Y.duration,f=d-b.sb;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={Gd:h.Gd,Kd:h.Kd,Nd:h.Nd,Dd:h.Dd,Pd:h.Pd,Ed:h.Ed},k++){var l=b.timeline[k],m=l.start,n=l.hh;l=l.end;h.Nd=k+b.mc;h.Pd=n+b.Ie;h.Kd=a.L.id;h.Dd=a.bandwidth||null;h.Gd=b.ae;h.Ed=a.L.Pa;g.push(new si(d+m,d+l,function(p){return function(){var t=Po(p.Gd,p.Kd,p.Nd,p.Dd||null,p.Pd);return Hb(p.Ed,[t]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
596
+ function Ap(a){var b=Ro(a,Fp,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.Pa;return new qi(function(){var f=Po(b,c,null,d,null);return Hb(e,[f])},0,null,fp(a))};function Gp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Gp.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=[]};
597
+ function Hp(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,x,y,w,D,z,B,F,G,H,J,K,L,W,Z,ka,ja,ea,Ia;return M(function(Ma){switch(Ma.g){case 1:d=Nb;Ip(b);Jp(b);Kp(b);Lp(b);if(!c&&1==b.length){e=b[0];a.g=e.Xc;a.h=e.zd;a.j=e.textStreams;a.i=e.imageStreams;Ma.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 Ma["return"]();k=b.map(function(Da){return Da.Xc});l=b.map(function(Da){return Da.zd});m=b.map(function(Da){return Da.textStreams});n=b.map(function(Da){return Da.imageStreams});
598
+ p=r(m);for(t=p.next();!t.done;t=p.next())v=t.value,v.push(Mp(d.oa));x=r(n);for(y=x.next();!y.done;y=x.next())w=y.value,w.push(Mp(d.wc));return A(Ma,Np(a.g,k,f,Op,Pp),3);case 3:return A(Ma,Np(a.h,l,f,Op,Pp),4);case 4:return A(Ma,Np(a.j,m,f,Op,Pp),5);case 5:return A(Ma,Np(a.i,n,f,Op,Pp),2);case 2:D=0;z=[];if(a.h.length&&a.g.length)for(K=r(a.g),L=K.next();!L.done;L=K.next())for(W=L.value,Z=r(a.h),ka=Z.next();!ka.done;ka=Z.next())ja=ka.value,ea=jg(W.drmInfos,ja.drmInfos),W.drmInfos.length&&ja.drmInfos.length&&
599
+ !ea.length||(Ia=D++,z.push({id:Ia,language:W.language,primary:W.primary,audio:W,video:ja,bandwidth:(W.bandwidth||0)+(ja.bandwidth||0),drmInfos:ea,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(B=a.h.concat(a.g),F=r(B),G=F.next();!G.done;G=F.next())H=G.value,J=D++,z.push({id:J,language:H.language,primary:H.primary,audio:H.type==d.Gb?H:null,video:H.type==d.gb?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
600
+ a.l=z;C(Ma)}})}function Ip(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Xc),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&&jc(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.Xc=c}}
601
+ function Kp(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&&jc(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
602
+ function Jp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.zd),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&&jc(e.roles,h.roles)&&Af(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.zd=c}}
603
+ function Lp(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}}
604
+ function Qp(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,x,y,w,D,z,B,F,G,H,J,K,L,W;return M(function(Z){switch(Z.g){case 1:b=Nb;if(1==a.length)return Z["return"](a[0]);c=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.Gb})});d=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.gb})});e=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.oa})});f=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.wc})});g=r(e);for(h=g.next();!h.done;h=g.next())k=
605
+ h.value,k.push(Rp(b.oa));l=r(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Rp(b.wc));return A(Z,Np([],c,0,Sp,Tp),2);case 2:return p=Z.h,A(Z,Np([],d,0,Sp,Tp),3);case 3:return t=Z.h,A(Z,Np([],e,0,Sp,Tp),4);case 4:return v=Z.h,A(Z,Np([],f,0,Sp,Tp),5);case 5:x=Z.h;y=0;if(t.length&&p.length)for(F=r(p),G=F.next();!G.done;G=F.next())for(H=G.value,J=r(t),K=J.next();!K.done;K=J.next())L=K.value,W=y++,L.variantIds.push(W),H.variantIds.push(W);else for(w=t.concat(p),D=r(w),z=D.next();!z.done;z=D.next())B=
606
+ z.value,B.variantIds=[y++];return Z["return"](t.concat(p).concat(v).concat(x))}})}
607
+ function Np(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,x,y,w,D,z,B,F,G,H,J,K;return M(function(L){switch(L.g){case 1:f=Nb;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){L.D(4);break}m=l.value;return A(L,Up(m,b,c,e,g),5);case 5:n=L.h;if(!n)throw new P(2,4,4037);l=k.next();L.D(2);break;case 4:p=r(g);for(t=p.next();!t.done;t=p.next())for(v=t.value,x=r(v),y=x.next();!y.done;y=x.next())w=y.value,(D=Vp(w,b,d,e,g))&&a.push(D);z=r(g);for(t=z.next();!t.done;t=
608
+ z.next())for(B=t.value,F={},G=r(B),y=G.next();!y.done;F={vb:F.vb},y=G.next())if(F.vb=y.value,H=F.vb.type==f.oa&&!F.vb.language,J=F.vb.type==f.wc&&!F.vb.tilesLayout,!H&&!J&&(K=a.some(function(W){return function(Z){return Z.mimeType==W.vb.mimeType&&Ad(Z.codecs)==Ad(W.vb.codecs)}}(F))))throw new P(2,4,4037);return L["return"](a)}})}
609
+ function Up(a,b,c,d,e){return M(function(f){if(1==f.g)return Wp(b,a),a.matchedStreams?a.segmentIndex?A(f,Xp(a,c),2):f.D(2):f["return"](!1);Yp(a,c,d,e);return f["return"](!0)})}
610
+ function Xp(a,b){var c,d,e,f,g,h,k;return M(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 A(l,Promise.all(c),2)}if(a.segmentIndex instanceof Si)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.j.push(k.segmentIndex);C(l)})}
611
+ function Vp(a,b,c,d,e){var f=c(a);Wp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return M(function(g){if(f.segmentIndex)return g.D(0);f.segmentIndex=new Si;return A(g,Xp(f,0),0)})});if(!f.matchedStreams)return null;Yp(f,0,d,e);return f}function Yp(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==Wb(a.language,g.language)&&(h=!1);h&&d[f]["delete"](g)}}
612
+ function Op(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}
613
+ function Sp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
614
+ function Pp(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(ia(f),ia(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=jg(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new P(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
615
+ (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=Op(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),Pp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Pp(a.trickModeVideo,b)}
616
+ function Tp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ia(a.keyIds),ia(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ia(b.segments));if(b.closedCaptions){a.closedCaptions||(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)}}}
617
+ function Wp(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:Zp,video:Zp,text:$p,image:aq}[f.type],h={audio:bq,video:cq,text:dq,image:eq}[f.type],k=null;e=r(e.value);for(var l=e.next();!l.done;l=e.next())l=l.value,!g(f,l)||k&&!h(f,k,l)||(k=l);f=k;if(!f)return;c.push(f)}b.matchedStreams=c}function Zp(a,b){var c;if(!(c=b.mimeType!=a.mimeType||Ad(b.codecs)!=Ad(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<jg(c,d).length:1)}return c?!1:!0}
618
+ function $p(a,b){return a.language?b.language?0==Wb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function aq(a){return a.tilesLayout?!0:!1}
619
+ function bq(a,b,c){if(a.id==c.id)return!0;var d=Wb(a.language,b.language),e=Wb(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)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;
620
+ d=fq(a.channelsCount,b.channelsCount,c.channelsCount);if(d==gq)return!0;if(d==hq)return!1;d=fq(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==gq?!0:d==hq?!1:a.bandwidth&&iq(a.bandwidth,b.bandwidth,c.bandwidth)==gq?!0:!1}
621
+ function cq(a,b,c){if(a.id==c.id)return!0;var d=fq(a.width*a.height,b.width*b.height,c.width*c.height);if(d==gq)return!0;if(d==hq)return!1;if(a.frameRate){d=fq(a.frameRate,b.frameRate,c.frameRate);if(d==gq)return!0;if(d==hq)return!1}return a.bandwidth&&iq(a.bandwidth,b.bandwidth,c.bandwidth)==gq?!0:!1}
622
+ function dq(a,b,c){if(a.id==c.id)return!0;var d=Wb(a.language,b.language),e=Wb(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!=
623
+ a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function eq(a,b,c){return a.id==c.id?!0:fq(a.width*a.height,b.width*b.height,c.width*c.height)==gq?!0:!1}function Rp(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
624
+ function Mp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Pi([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
625
+ function fq(a,b,c){if(b==a&&a!=c)return hq;if(c==a&&a!=b)return gq;if(b>a){if(c<=a||c-a<b-a)return gq;if(c-a>b-a)return hq}else{if(c>a)return hq;if(a-c<a-b)return gq;if(a-c>a-b)return hq}return jq}function iq(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?gq:b<a?hq:jq}var gq=1,jq=0,hq=-1;function kq(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.I=1;this.l={};this.N={};this.j=new Gp;this.H=0;this.J=new ec(5);this.G=new Q(function(){lq(a)});this.A=new af;this.B=null;this.K=[];this.C=Infinity;this.F=!1}q=kq.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return M(function(e){if(1==e.g)return c.F=b.isLowLatencyMode(),c.m=[a],c.h=b,A(e,mq(c),2);d=e.h;c.h&&nq(c,d);if(!c.h)throw new P(2,7,7001);return e["return"](c.i)})};
626
+ 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.A.destroy()};q.update=function(){var a=this,b;return M(function(c){if(1==c.g)return E(c,2),A(c,mq(a),4);if(2!=c.g)return va(c,0);b=I(c);if(!a.h||!b)return c["return"]();a.h.onError(b);C(c)})};q.onExpirationUpdated=function(){};
627
+ function mq(a){var b,c,d,e,f,g,h;return M(function(k){if(1==k.g)return b=gf(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),bf(a.A,e),A(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 A(k,oq(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.J.sample(1,h);return k["return"](h)})}
628
+ function oq(a,b,c){var d,e,f,g,h;return M(function(k){if(1==k.g){d=Eo(b,"MPD");if(!d)throw new P(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](pq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Uo(d,a.g.retryParameters,f,c,a.h.networkingEngine);bf(a.A,g);return A(k,g.promise,2)}h=k.h;return k["return"](pq(a,h,c))})}
629
+ function pq(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,x,y,w,D,z,B,F,G,H,J,K,L,W,Z,ka,ja,ea,Ia,Ma,Da;return M(function(Qa){switch(Qa.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=mo(b,"Location").map(so).filter(Fb);0<f.length&&(g=Hb(e,f),e=a.m=g);h=mo(b,"BaseURL");k=h.map(so);l=Hb(e,k);m=0;h&&h.length&&(m=uo(h[0],"availabilityTimeOffset",Bo)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=uo(b,"minBufferTime",wo)||0);a.H=uo(b,"minimumUpdatePeriod",wo,-1);t=uo(b,"availabilityStartTime",vo);v=uo(b,
630
+ "timeShiftBufferDepth",wo);x=a.g.dash.ignoreSuggestedPresentationDelay;y=null;x||(y=uo(b,"suggestedPresentationDelay",wo));w=a.g.dash.ignoreMaxSegmentDuration;D=null;w||(D=uo(b,"maxSegmentDuration",wo));z=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,F=r(Object.values(a.l)),G=F.next();!G.done;G=F.next())H=G.value,H.segmentIndex&&H.segmentIndex.Hb(B.ob());else J=a.g.defaultPresentationDelay||1.5*p,K=null!=y?y:J,B=new R(t,K,a.g.dash.autoCorrectDrift);B.Pc("static"==z);(L=B.T())&&
631
+ !isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);B.ye(v);W=b.getAttribute("profiles")||"";Z={xb:"static"!=z,presentationTimeline:B,sa:null,Y:null,Ca:null,L:null,bandwidth:0,hf:!1,Yb:m,profiles:W.split(",")};ka=qq(a,Z,l,b);ja=ka.duration;ea=ka.periods;"static"!=z&&ka.Xe||B.bb(ja||Infinity);a.C&&!a.F&&(Ia=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.F=a.h.isLowLatencyMode());a.F?B.wf(a.C):a.C&&Sa("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
632
+ B.be(D||1);return A(Qa,Hp(a.j,ea,Z.xb),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);Qa.D(3);break}a.i={presentationTimeline:B,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0};if(!B.Ef()){Qa.D(4);break}Ma=mo(b,"UTCTiming");return A(Qa,rq(a,l,Ma),5);case 5:Da=Qa.h;if(!a.h)return Qa["return"]();B.xf(Da);case 4:B.Yd();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),C(Qa)}})}
633
+ function qq(a,b,c,d){var e=uo(d,"mediaPresentationDuration",wo),f=[],g=0;d=mo(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=uo(k,"start",wo,g),n=k.id,p=uo(k,"duration",wo),t=null;if(l){var v=uo(l,"start",wo);null!=v&&(t=v-m)}else null!=e&&(t=e-m);null==t&&(t=p);if(!(null!==a.B&&null!==n&&null!==m&&m<a.B)||a.K.includes(n)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=sq(a,b,c,{start:m,duration:t,node:k,lf:null==t||!l});f.push(g);b.sa.id&&t&&(a.N[b.sa.id]=t);if(null==t){g=
634
+ null;break}g=m+t}}a.K=f.map(function(x){return x.id});return null!=e?{periods:f,duration:e,Xe:!1}:{periods:f,duration:g,Xe:!0}}
635
+ function sq(a,b,c,d){b.sa=tq(d.node,null,c);b.Y=d;b.sa.Yb=b.Yb;b.sa.id||(b.sa.id="__shaka_period_"+d.start);var e=mo(d.node,"EventStream");c=b.presentationTimeline.ob();e=r(e);for(var f=e.next();!f.done;f=e.next())uq(a,d.start,d.duration,f.value,c);c=mo(d.node,"AdaptationSet").map(function(m){return vq(a,b,m)}).filter(Fb);if(b.xb){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.Vg);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new P(2,4,4018);
636
+ }d=c.filter(function(m){return!m.Ee});c=c.filter(function(m){return m.Ee});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Ee.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={Vc:h.Vc},l=k.next())h.Vc=l.value,h.Vc.trickModeVideo=e.streams.find(function(m){return function(n){return Ad(m.Vc.codecs)==Ad(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:wq(d,"audio");g=a.g.disableVideo?[]:wq(d,"video");f=a.g.disableText?
637
+ []:wq(d,Mb);c=a.g.disableThumbnails?[]:wq(d,"image");if(!g.length&&!e.length)throw new P(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ia(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.sa.id,Xc:d,zd:e,textStreams:g,imageStreams:f}}
638
+ function wq(a,b){return a.filter(function(c){return c.contentType==b})}
639
+ function vq(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.Ca=tq(c,b.sa,null);var e=!1,f=mo(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Fb),h=void 0,k=b.Ca.contentType==Mb;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=
640
+ l}}var n;m=mo(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var t=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=mo(c,"SupplementalProperty");m=r(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),
641
+ 10)));m=mo(c,"Accessibility");var v=new Map;m=r(m);for(p=m.next();!p.done;p=m.next())if(t=p.value,p=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=t){t=t.split(";");for(var x=r(t),y=x.next();!y.done;y=x.next()){var w=y.value,D=y=void 0;w.includes("=")?(w=w.split("="),y=w[0].startsWith("CC")?w[0]:"CC"+w[0],D=w[1]||"und"):(y="CC"+p,2==t.length?p+=2:p++,D=w);v.set(y,Qb(D))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
642
+ 1,null!=t)for(t=r(t.split(";")),y=t.next();!y.done;y=t.next())y=y.value,w=x=void 0,y.includes("=")?(y=y.split("="),x="svc"+y[0],w=y[1].split(",")[0].split(":").pop()):(x="svc"+p,p++,w=y),v.set(x,Qb(w));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=mo(c,"ContentProtection");var z=Fo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),B=Qb(c.getAttribute("lang")||"und"),F=c.getAttribute("label");(l=mo(c,"Label"))&&l.length&&
643
+ (l=l[0],l.textContent&&(F=l.textContent));l=mo(c,"Representation");c=l.map(function(G){if(G=xq(a,b,z,h,B,F,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.Ca.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new P(2,4,4003);}if(!b.Ca.contentType||"application"==b.Ca.contentType)for(b.Ca.contentType=yq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.Ca.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=
644
+ m.value,p=r(z.drmInfos),t=p.next();!t.done;t=p.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ia(t.keyIds),ia(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Fb);return{id:b.Ca.id||"__fake__"+a.I++,contentType:b.Ca.contentType,language:B,Ii:e,streams:c,drmInfos:z.drmInfos,Ee:f,Vg:k}}
645
+ function xq(a,b,c,d,e,f,g,h,k,l){b.L=tq(l,b.Ca,null);a.C=Math.min(a.C,b.L.Yb);if(!zq(b.L))return null;var m=b.Y.start;b.bandwidth=uo(l,"bandwidth",zo)||0;var n=b.L.contentType,p=n==Mb||"application"==n;n="image"==n;try{var t=function(H,J,K){return Aq(a,H,J,K)};if(b.L.Nc)var v=gp(b,t);else if(b.L.Db)v=mp(b,a.l);else if(b.L.Oc)v=zp(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.N);else{var x=b.L.Pa,y=b.Y.duration||0;v={$b:function(){return Promise.resolve(Ri(m,y,x))}}}}catch(H){if((p||n)&&4002==H.code)return null;
646
+ throw H;}t=mo(l,"ContentProtection");t=Io(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var w=!1;mo(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(w=!0);var D=!1;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(n&&((l=mo(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
647
+ (z=l.getAttribute("value")),!z))return null;var B;l=b.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"))&&(B="PQ");var F=b.L.id?b.sa.id+","+b.L.id:"",G={id:a.I++,originalId:b.L.id,createSegmentIndex:function(){var H,J,K;return M(function(L){if(1==L.g){J=(H=F&&b.xb&&a.l[F])?a.l[F]:G;if(J.segmentIndex)return L.D(0);K=J;return A(L,v.$b(),3)}K.segmentIndex=L.h;C(L)})},closeSegmentIndex:function(){G.segmentIndex&&
648
+ (G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.L.mimeType,codecs:b.L.codecs,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.Ca.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.L.nd,audioSamplingRate:b.L.audioSamplingRate,spatialAudio:w,closedCaptions:k,
649
+ hdr:B,tilesLayout:z,matchedStreams:[]};F&&b.xb&&!a.l[F]&&(a.l[F]=G);return G}function lq(a){var b,c;M(function(d){switch(d.g){case 1:return b=0,E(d,2),A(d,mq(a),4);case 4:b=d.h;va(d,3);break;case 2:c=I(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();nq(a,b);C(d)}})}function nq(a,b){0>a.H||a.G.S(Math.max(3,a.H-b,fc(a.J)))}
650
+ function tq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,nd:null,audioSamplingRate:null,Yb:0};c=c||b.Pa;var d=mo(a,"BaseURL"),e=d.map(so),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=uo(a,"frameRate",Co)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=mo(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=r(m);for(var p=m.next();!p.done;p=
651
+ m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=mo(a,"AudioChannelConfiguration");m=Bq(m)||b.nd;p=uo(a,"audioSamplingRate",Ao)||b.audioSamplingRate;f||(f=yq(g,h));var t=lo(a,"SegmentBase"),v=lo(a,"SegmentTemplate"),x=t?uo(t,"availabilityTimeOffset",Bo)||0:0,y=v?uo(v,"availabilityTimeOffset",Bo)||0:0;d=d&&d.length?uo(d[0],"availabilityTimeOffset",Bo)||0:0;d=b.Yb+d+x+y;return{Pa:Hb(c,e),Nc:t||b.Nc,Db:lo(a,"SegmentList")||b.Db,Oc:v||b.Oc,width:uo(a,"width",Ao)||b.width,height:uo(a,
652
+ "height",Ao)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),nd:m,audioSamplingRate:p,Yb:d}}
653
+ function Bq(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=
654
+ 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 zq(a){var b=a.Nc?1:0;b+=a.Db?1:0;b+=a.Oc?1:0;if(0==b)return a.contentType==Mb||"application"==a.contentType?!0:!1;1!=b&&(a.Nc&&(a.Db=null),a.Oc=null);return!0}
655
+ function Cq(a,b,c,d){var e,f,g,h,k,l;return M(function(m){if(1==m.g)return e=Hb(b,[c]),f=gf(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),bf(a.A,g),A(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=gd(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
656
+ function rq(a,b,c){var d,e,f,g,h,k,l,m;return M(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=r(d),g=f.next();case 2:if(g.done){n.D(4);break}h=g.value;E(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.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 n.D(8);
657
+ case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n["return"](isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Sa("NTP UTCTiming scheme is not supported");break;default:Sa("Unrecognized scheme in UTCTiming element",k)}n.D(9);break;case 7:return A(n,Cq(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return A(n,Cq(a,b,l,"GET"),11);case 11:return n["return"](n.h);
658
658
  case 9:va(n,3);break;case 5:I(n);case 3:g=f.next();n.D(2);break;case 4:return Sa("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n["return"](0)}})}
659
- function tq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=to(d,"timescale",zo)||1;d=r(lo(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=to(k,"presentationTime",zo)||0,m=to(k,"duration",zo)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.h.onTimelineRegionAdded(k))}}
660
- function zq(a,b,c,d){var e,f,g,h,k;return M(function(l){if(1==l.g)return e=nf,f=ij(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),bf(a.A,h),z(l,h.promise,2);k=l.h;return l["return"](k.data)})}function xq(a,b){return Fd(yd(a,b))?Mb:a.split("/")[0]}N("shaka.dash.DashParser",jq);qg.mpd=function(){return new jq};og["application/dash+xml"]=function(){return new jq};og["video/vnd.mpeg.dash.mpd"]=function(){return new jq};function Cq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function Dq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Dq.prototype.toString=function(){function a(d){return d.name+"="+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}var b="#"+this.name,c=this.g?this.g.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b};
661
- Dq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Eq(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Fq(a,b){var c=a.getAttribute(b);if(!c)throw new P(2,4,4023,b);return c.value}function Gq(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.i=c}function Hq(a,b){this.name=a;this.value=b};function Iq(a,b){return a.filter(function(c){return c.name==b})}function Jq(a,b){return a.filter(function(c){return Fq(c,"TYPE")==b})}function Kq(a,b){var c=Iq(a,b);return c.length?c[0]:null}function Lq(a,b,c){c=void 0===c?0:c;return(a=Kq(a,b))?Number(a.value):c};function Mq(a){this.h=a;this.g=0}function Nq(a){Oq(a,/[ \t]+/gm)}function Oq(a,b){b.lastIndex=a.g;var c=b.exec(a.h);c=null==c?null:{position:c.index,length:c[0].length,results:c};if(a.g==a.h.length||null==c||c.position!=a.g)return null;a.g+=c.length;return c.results}function Pq(a){return a.g==a.h.length?null:(a=Oq(a,/[^ \t\n]*/gm))?a[0]:null};function Qq(){this.g=0}
662
- function Rq(a,b,c){b=gd(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 P(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=Sq(a,g),--a.g,Tq.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=Sq(a,h);if(Uq.includes(h.name)){if(1!=b)throw new P(2,4,4017);
663
- 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=Sq(a,m),Tq.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"==Eq(m,"TYPE")?k.push(m):"MAP"==Eq(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Hb([d],[m.trim()])[0],h&&g.push(h),e.push(new Gq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new Gq("",g,k)));return new Cq(c,b,f,
664
- e)}f.push(h);"EXT-X-STREAM-INF"==h.name&&(h.g.push(new Hq("URI",k)),e=!0)}}return new Cq(c,b,f)}function Sq(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new P(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new Mq(f);var h;(h=Oq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=Oq(f,k);)d.push(new Hq(h[1],h[2]||h[3])),Nq(f)}return new Dq(c,e,d,g)}
665
- var Tq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),Uq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Vq(){}function Wq(a){try{var b=Xq(a);return Ve({uri:a,pf:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Te(c)}}function Xq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new P(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new P(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=pd(a):e=kd(a);return{data:e,contentType:c}}
666
- N("shaka.net.DataUriPlugin",Vq);Vq.parse=Wq;df("data",Wq);function Yq(){var a=this;this.g=this.i=null;this.Aa=1;this.A=new Map;this.C=new Map;this.na=new Set;this.h=new Map;this.j=null;this.N="";this.$=new Qq;this.ma=0;this.F=new Q(function(){Zq(a)});this.m=$q;this.G=null;this.aa=0;this.I=Infinity;this.Z=this.ba=0;this.H=new af;this.W=[];this.K=new Map;this.Ba=!1;this.B=new Map;this.R=null;this.va=new Map;this.J=new Map;this.l=!1}q=Yq.prototype;q.configure=function(a){this.g=a};
667
- q.start=function(a,b){var c=this,d,e;return M(function(f){if(1==f.g)return c.i=b,c.l=b.isLowLatencyMode(),z(f,ar(c,a),2);if(3!=f.g)return d=f.h,c.N=d.uri,z(f,br(c,d.data),3);e=c.ma;0<e&&c.F.S(e);return f["return"](c.G)})};q.stop=function(){this.F&&(this.F.stop(),this.F=null);var a=[];this.H&&(a.push(this.H.destroy()),this.H=null);this.g=this.i=null;this.na.clear();this.G=null;this.h.clear();this.C.clear();this.B.clear();this.A.clear();return Promise.all(a)};
668
- q.update=function(){var a=this,b,c,d;return M(function(e){if(1==e.g){if(a.m==$q)return e["return"]();b=[];a.R=null;c=Array.from(a.h.values());return c.length?z(e,cr(a,c[0]),2):e.D(2)}for(d=1;d<c.length;d++)b.push(cr(a,c[d]));return z(e,Promise.all(b),0)})};
669
- function cr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v;return M(function(y){if(1==y.g)return c=dr,d=b.If,e=new jb(d),a.l&&b.Nf&&nb(e,new pb("_HLS_skip=YES")),z(y,ar(a,e.toString()),2);if(3!=y.g){f=y.h;g=Rq(a.$,f.data,f.uri);if(1!=g.type)throw new P(2,4,4017);h=Iq(g.g,"EXT-X-DEFINE");k=er(a,h);l=b.stream;return z(y,fr(a,b.yd,g,l.type,l.mimeType,b.$d,k,b.Sf,l.codecs,l.bandwidth),3)}m=y.h;l.segmentIndex.fc(m,a.j.ob());m.length&&(n=Lq(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.$d.get(n),l.segmentIndex.Gb(p));t=m[m.length-
670
- 1];if(v=Kq(g.g,"EXT-X-ENDLIST"))gr(a,c.Hf),a.j.bb(t.endTime);B(y)})}q.onExpirationUpdated=function(){};
671
- function br(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,D,C,A,F,G,H,K,J,L,W,Z,ka,ja,ea,Ia,Ma,Da,Qa,ac,Dd;return M(function(gb){switch(gb.g){case 1:c=Rq(a.$,b,a.N);if(0!=c.type)throw new P(2,4,4022);d=Iq(c.g,"EXT-X-DEFINE");hr(a,d);e=Iq(c.g,"EXT-X-MEDIA");f=Iq(c.g,"EXT-X-STREAM-INF");g=Iq(c.g,"EXT-X-IMAGE-STREAM-INF");ir(a,f);h=Iq(c.g,"EXT-X-SESSION-DATA");k=r(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=Eq(m,"DATA-ID"),p=Eq(m,"URI"),t=Eq(m,"LANGUAGE"),v=Eq(m,"VALUE"),y=(new Map).set("id",n),p&&
672
- y.set("uri",Hb([a.N],[p])[0]),t&&y.set("language",t),v&&y.set("value",v),w=new O("sessiondata",y),a.i)a.i.onEvent(w);return z(gb,jr(a,e),2);case 2:return kr(a,e),z(gb,lr(a,f),3);case 3:return x=gb.h,z(gb,mr(a,e),4);case 4:return D=gb.h,z(gb,nr(a,g),5);case 5:C=gb.h;if(!a.i)throw new P(2,7,7001);if(a.Ba&&0==x.length)throw new P(2,4,4034);F=A=Infinity;G=r(a.h.values());for(H=G.next();!H.done;H=G.next())K=H.value,A=Math.min(A,K.mf),"text"!=K.stream.type&&(F=Math.min(F,K.Ig-K.mf));a.m!=$q?(a.j=new R(0,
673
- a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.Z?a.Z:3*a.aa),a.j.Pc(!1)):(a.j=new R(null,0),a.j.Pc(!0));if(a.m!=$q)a.ma=a.I,J=dr,a.m==J.Ne&&(L=a.j.td,isNaN(a.g.availabilityWindowOverride)||(L=a.g.availabilityWindowOverride),a.j.ye(L));else for(a.j.bb(F),a.j.offset(-A),W=r(a.h.values()),H=W.next();!H.done;H=W.next())Z=H.value,Z.stream.segmentIndex.offset(-A),Z.stream.segmentIndex.yb(0,F);a.W=[];ka=[];ja=r(x);for(ea=ja.next();!ea.done;ea=ja.next())for(Ia=ea.value,Ma=r([Ia.video,Ia.audio]),
674
- Da=Ma.next();!Da.done;Da=Ma.next())(Qa=Da.value)&&ka.push(Qa);return z(gb,Promise.all(ka.map(function(Tc){return M(function(He){return z(He,Tc.createSegmentIndex(),0)})})),6);case 6:ac=r(ka);for(Da=ac.next();!Da.done;Da=ac.next())Dd=Da.value,a.W.push(Dd.segmentIndex.O);or(a);a.j.Yd();a.G={presentationTimeline:a.j,variants:x,textStreams:D,imageStreams:C,offlineSessionIds:[],minBufferTime:0};a.i.makeTextStreamsForClosedCaptions(a.G);B(gb)}})}
675
- function hr(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=Eq(e,"NAME");e=Eq(e,"VALUE");d&&e&&(a.A.has(d)||a.A.set(d,e))}}function er(a,b){for(var c=new Map,d=r(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Eq(f,"NAME");var g=Eq(f,"VALUE");f=Eq(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.A.get(f))&&c.set(f,e)}return c}
676
- function ir(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=Eq(e,"AUDIO");d=Eq(e,"VIDEO");var g=Eq(e,"SUBTITLES");e=pr(a,e);if(g){var h=Kb(Mb,e);a.B.set(g,h);ic(e,h)}f&&(g=Jb("audio",e),a.B.set(f,g));d&&(f=Jb("video",e),a.B.set(d,f))}}
677
- function mr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t;return M(function(v){if(1==v.g)return c=Jq(b,"SUBTITLES"),d=c.map(function(y){var w,x,D;return M(function(C){if(1==C.g){if(w=a.g.disableText)return C["return"](null);E(C,2);return z(C,qr(a,y),4)}if(2!=C.g)return x=C.h,C["return"](x.stream);D=I(C);if(a.g.hls.ignoreTextStreamFailures)return C["return"](null);throw D;})}),z(v,Promise.all(d),2);e=v.h;f=r(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=Fq(h,"GROUP-ID"),l=a.B.get(k))if(m=a.C.get(k))for(n=
678
- r(m),p=n.next();!p.done;p=n.next())t=p.value,t.stream.codecs=l;return v["return"](e.filter(function(y){return y}))})}
679
- function nr(a,b){var c,d;return M(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return M(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l["return"](null);E(l,2);return z(l,rr(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=I(l);if(a.g.hls.ignoreImageStreamFailures)return l["return"](null);throw k;})}),z(e,Promise.all(c),2);d=e.h;return e["return"](d.filter(function(f){return f}))})}
680
- function jr(a,b){var c;return M(function(d){if(1==d.g)return b=b.filter(function(e){var f=Eq(e,"URI")||"";return"SUBTITLES"!=Eq(e,"TYPE")&&""!=f}),b.length?z(d,qr(a,b[0]),2):d.D(2);c=b.slice(1).map(function(e){return qr(a,e)});return z(d,Promise.all(c),0)})}
681
- function lr(a,b){var c,d,e;return M(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,t,v;return M(function(y){if(1==y.g)return h=Eq(g,"FRAME-RATE"),k=Number(Eq(g,"AVERAGE-BANDWIDTH"))||Number(Fq(g,"BANDWIDTH")),l=Eq(g,"RESOLUTION"),m=r(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,t=Eq(g,"VIDEO-RANGE"),z(y,sr(a,g,k),2);if(v=y.h){for(var w=y["return"],x=v.audio,D=v.video,C=r(D),A=C.next();!A.done;A=C.next())if(A=A.value.stream)A.width=Number(n)||void 0,A.height=Number(p)||
682
- void 0,A.frameRate=Number(h)||void 0,A.hdr=t||void 0;C=a.g.disableAudio;if(!x.length||C)x=[null];C=a.g.disableVideo;if(!D.length||C)D=[null];C=[];x=r(x);for(A=x.next();!A.done;A=x.next()){A=A.value;for(var F=r(D),G=F.next();!G.done;G=F.next()){var H=G.value;G=A?A.stream:null;var K=H?H.stream:null,J=A?A.stream.drmInfos:null,L=H?H.stream.drmInfos:null;H=(H?H.yd:"")+" - "+(A?A.yd:"");G&&K&&J.length&&L.length&&!(0<kg(J,L).length)||a.na.has(H)||(G={id:a.Aa++,language:G?G.language:"und",primary:!!G&&G.primary||
683
- !!K&&K.primary,audio:G,video:K,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},C.push(G),a.na.add(H))}}y=w.call(y,C)}else y=y["return"]([]);return y})}),z(f,Promise.all(c),2);d=f.h;e=d.reduce(Db,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
684
- function sr(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,w;return M(function(x){if(1==x.g)return d=Nb,e=pr(a,b),f=Eq(b,"AUDIO"),g=Eq(b,"VIDEO"),k=(h=f||g)&&a.C.has(h)?a.C.get(h):[],l={audio:f?k:[],video:g?k:[]},n=!1,p=Fq(b,"URI"),t=l.audio.find(function(D){return D&&D.yd==p}),v=Kb(d.gb,e),(y=Kb(d.Fb,e))&&!v?m=d.Fb:!k.length&&y&&v?(m=d.gb,e=[[v,y].join()]):l.audio.length&&t?(m=d.Fb,n=!0):m=l.video.length?d.Fb:d.gb,n?x.D(2):z(x,tr(a,b,e,m,c),3);2!=x.g&&(w=x.h);if(w)l[w.stream.type]=[w];else if(null===w)return x["return"](null);
685
- ur(l);return x["return"](l)})}function pr(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);var d=Eq(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=Bd(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function vr(a){a=Eq(a,"LANGUAGE")||"und";return Qb(a)}
686
- function ur(a){a=r(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function kr(a,b){var c=Jq(b,"CLOSED-CAPTIONS");c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=vr(e);var f=Fq(e,"GROUP-ID");e=Fq(e,"INSTREAM-ID");a.K.get(f)||a.K.set(f,new Map);a.K.get(f).set(e,d)}}
687
- function qr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y;return M(function(w){if(1==w.g){c=Fq(b,"GROUP-ID");d="";var x=Fq(b,"TYPE").toLowerCase();"subtitles"==x&&(x=Mb);e=x;e!=Mb&&c&&a.B.has(c)&&(d=a.B.get(c));f=wr(Fq(b,"URI"),a.A);if(a.h.has(f))return w["return"](a.h.get(f));g=vr(b);h=Eq(b,"NAME");k=Eq(b,"DEFAULT");l="YES"==k;"audio"==e?x=(x=Eq(b,"CHANNELS"))?parseInt(x.split("/")[0],10):null:x=null;m=x;"audio"==e?x=(x=Eq(b,"CHANNELS"))?x.includes("/JOC"):!1:x=!1;n=x;p=Eq(b,"CHARACTERISTICS");t=Eq(b,"FORCED");
688
- v="YES"==t;return z(w,xr(a,f,d,e,g,l,h,m,null,p,v,n),2)}y=w.h;a.C.has(c)?a.C.get(c).push(y):a.C.set(c,[y]);if(null==y)return w["return"](null);if(a.h.has(f))return w["return"](a.h.get(f));a.h.set(f,y);return w["return"](y)})}
689
- function rr(a,b){var c,d,e,f,g,h,k,l,m,n;return M(function(p){if(1==p.g){c=wr(Fq(b,"URI"),a.A);d=Eq(b,"CODECS","jpeg")||"";if(a.h.has(c))return p["return"](a.h.get(c));e=vr(b);f=Eq(b,"NAME");g=Eq(b,"CHARACTERISTICS");return z(p,xr(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(null==h)return p["return"](null);if(a.h.has(c))return p["return"](a.h.get(c));if(k=Eq(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=
690
- Number(k.split("x")[1])*Number(m.split("x")[1]);if(n=Eq(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p["return"](h)})}
691
- function tr(a,b,c,d,e){var f,g,h,k;return M(function(l){if(1==l.g){f=wr(Fq(b,"URI"),a.A);if(a.h.has(f))return l["return"](a.h.get(f));var m=Eq(b,"CLOSED-CAPTIONS");g="video"==d&&m&&"NONE"!=m?a.K.get(m):null;h=Jb(d,c);return z(l,xr(a,f,h,d,"und",!1,null,null,g,null,!1,!1,e),2)}k=l.h;if(null==k)return l["return"](null);if(a.h.has(f))return l["return"](a.h.get(f));a.h.set(f,k);return l["return"](k)})}
692
- function xr(a,b,c,d,e,f,g,h,k,l,m,n,p){var t,v,y,w,x,D,C,A,F,G,H,K,J,L,W,Z,ka,ja,ea,Ia,Ma,Da,Qa,ac,Dd,gb,Tc,He,pp,qp,rp,sp,Zi,$i,jg,tp,up,vp,wp;return M(function(lb){switch(lb.g){case 1:return t=Hb([a.N],[b])[0],z(lb,ar(a,t),2);case 2:v=lb.h;t=v.uri;y=Rq(a.$,v.data,t);if(1!=y.type)throw new P(2,4,4017);w=[];if(y.segments)for(x=r(y.segments),D=x.next();!D.done;D=x.next())C=D.value,A=Iq(C.g,"EXT-X-KEY"),w.push.apply(w,ia(A));F=!1;G=[];H=new Set;K=r(w);for(J=K.next();!J.done;J=K.next())if(L=J.value,
693
- W=Fq(L,"METHOD"),"NONE"!=W){F=!0;if("AES-128"==W)return a.Ba=!0,lb["return"](null);Z=Fq(L,"KEYFORMAT");if(ja=(ka=yr[Z])?ka(L):null){if(ja.keyIds)for(ea=r(ja.keyIds),Ia=ea.next();!Ia.done;Ia=ea.next())Ma=Ia.value,H.add(Ma);G.push(ja)}}if(F&&!G.length)throw new P(2,4,4026);Da=Iq(y.g,"EXT-X-DEFINE");Qa=er(a,Da);zr(a,y);return z(lb,Ar(a,d,c,y,Qa),3);case 3:return ac=lb.h,Br.includes(ac)&&(c=""),Dd=new Map,gb=new Map,E(lb,4),z(lb,fr(a,b,y,d,ac,Dd,Qa,gb,c,p),6);case 6:Tc=lb.h;va(lb,5);break;case 4:He=I(lb);
694
- if(4035==He.code)return Sa("Skipping unsupported HLS stream",ac,b),lb["return"](null);throw He;case 5:pp=Tc[0].startTime;qp=Tc[Tc.length-1].endTime;rp=new Pi(Tc);sp=d==Mb?"subtitle":void 0;Zi=[];if(l)for($i=r(l.split(",")),jg=$i.next();!jg.done;jg=$i.next())tp=jg.value,Zi.push(tp);vp=(up=Kq(y.g,"EXT-X-SERVER-CONTROL"))?null!=up.getAttribute("CAN-SKIP-UNTIL"):!1;wp={id:a.Aa++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:rp,mimeType:ac,codecs:c,kind:sp,encrypted:F,
695
- drmInfos:G,keyIds:H,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:Zi,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return lb["return"]({stream:wp,yd:b,If:t,mf:pp,Ig:qp,$d:Dd,Sf:gb,Nf:vp})}})}
696
- function zr(a,b){var c=Kq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Kq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)gr(a,$q);else{c?gr(a,Cr):gr(a,Dr);d=Kq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new P(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Kq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ba=Number(Fq(c,"PART-TARGET")),a.I=Math.min(a.ba,a.I),c=Kq(b.g,"EXT-X-SERVER-CONTROL"),a.Z=c?Number(Fq(c,"PART-HOLD-BACK")):0):a.I=Math.min(d,a.I);a.aa=Math.max(d,a.aa)}}
697
- function Er(a,b,c,d){c=Kq(c,"EXT-X-MAP");if(!c)return null;var e=Fq(c,"URI");d=wr(Hb([b],[e])[0],d);b=[d,Eq(c,"BYTERANGE","")].join("-");a.va.has(b)||(c=Fr(d,c),a.va.set(b,c));return a.va.get(b)}function Fr(a,b){var c=0,d=null,e=Eq(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new qi(function(){return[a]},c,d)}
698
- function Gr(a,b,c,d,e,f,g,h,k){var l=d.g,m=wr(d.h,g),n=Kq(l,"EXTINF"),p=g=0,t=null;if(!n){if(0==d.i.length)throw new P(2,4,4024,"EXTINF");if(!a.l)return null}var v=[];if(a.l)for(var y={},w=0;w<d.i.length;y={Id:y.Id},w++){var x=d.i[w],D=0==w?c:v[v.length-1],C=0==w?e:D.endTime,A=Number(Eq(x,"DURATION"))||a.ba;if(A){A=C+A;var F=0,G=null;"EXT-X-PRELOAD-HINT"==x.name?F=(D=Eq(x,"BYTERANGE-START"))?Number(D):0:(F=Eq(x,"BYTERANGE"),D=r(Hr(D,F)),F=D.next().value,G=D.next().value);if(x=Eq(x,"URI"))y.Id=Hb([h],
699
- [x])[0],v.push(new si(C,A,function(H){return function(){return[H.Id]}}(y),F,G,b,f,0,Infinity))}}n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(a=Kq(l,"EXT-X-BYTERANGE"))?(t=r(Hr(c,a.value)),p=t.next().value,t=t.next().value):v.length&&(p=v[0].Ha,t=v[v.length-1].wa);c="";a=null;"image"==k&&(c="1x1",k=Kq(l,"EXT-X-TILES"))&&(c=Fq(k,"LAYOUT"),(k=Eq(k,"DURATION"))&&(a=Number(k)));return new si(e,g,function(){return m.length?[m]:[]},p,t,b,f,0,Infinity,v,c,a)}
700
- function Hr(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.wa+1,d=c+d-1);return[c,d]}function or(a){if(a.j){for(var b=r(a.W),c=b.next();!c.done;c=b.next())a.j.hc(c.value);a.W=[]}}
701
- function fr(a,b,c,d,e,f,g,h,k,l){var m,n,p,t,v,y,w,x,D,C,A,F,G,H,K,J,L,W,Z,ka,ja;return M(function(ea){switch(ea.g){case 1:m=c.segments;p=Lq(c.g,"EXT-X-MEDIA-SEQUENCE",0);v=(t=Kq(c.g,"EXT-X-SKIP"))?Number(Eq(t,"SKIPPED-SEGMENTS")):0;y=p+v;if(a.m!=$q&&f.has(y)){w=f.get(y);ea.D(2);break}if(null!=a.R){ea.D(3);break}n=Er(a,c.h,m[0].g,g);x=a;return z(ea,Ir(a,b,n,e,y,!1,m[0],g,d,k,l),4);case 4:x.R=ea.h;case 3:w=a.R;case 2:D=m[0].h;D.split("/").pop();C=Lq(c.g,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.l&&(h.has(C)||
702
- h.set(C,y),v))for(A=h;A.has(C+1)&&A.get(C+1)<y;)C++;F=a.J.get(C)||0;G=[];H=0;case 5:if(!(H<m.length)){ea.D(7);break}K=m[H];J=G[G.length-1];L=0==H?w:J.endTime;y=p+v+H;f.set(y,L);n=Er(a,c.h,K.g,g);W=Kq(K.g,"EXT-X-DISCONTINUITY");if(!W){ea.D(8);break}C++;h.set(C,y);return z(ea,Jr(a,C,b,n,e,y,K,g,L,d,k,l),9);case 9:F=ea.h;case 8:!a.l&&(Z=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());ka=Kq(K.g,"EXTINF");a.l||ka?(ja=Gr(a,n,J,K,L,F,g,c.h,d))&&G.push(ja):a.l||Sa("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
703
- H++;ea.D(5);break;case 7:return ea["return"](G)}})}function Jr(a,b,c,d,e,f,g,h,k,l,m,n){var p,t;return M(function(v){if(1==v.g)return p=0,a.J.has(b)?(p=a.J.get(b),v.D(2)):z(v,Ir(a,c,d,e,f,!0,g,h,l,m,n),3);2!=v.g&&(t=v.h,p=k-t,a.J.set(b,p));return v["return"](p)})}
704
- function Kr(a,b,c,d,e,f){var g,h,k,l,m,n;return M(function(p){switch(p.g){case 1:g=nf;h=ij(b.Ka(),b.Ha,b.wa,a.g.retryParameters);a.i.modifySegmentRequest(h,{type:c,init:b instanceof qi,duration:b.endTime-b.startTime,mimeType:d,codecs:e,bandwidth:f});if(a.g.hls.useFullSegmentsForStartTime)return p["return"](Lr(a,h,g));k=ij(b.Ka(),b.Ha,b.Ha+2048-1,a.g.retryParameters);a.i.modifySegmentRequest(k,{type:c,init:b instanceof qi,duration:b.endTime-b.startTime,mimeType:d,codecs:e,bandwidth:f});E(p,2);return z(p,
705
- Lr(a,k,g),4);case 4:return l=p.h,p["return"](l);case 2:m=I(p);if(7001==m.code)throw m;Sa("Unable to fetch the starting part of HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",k.uris[0]);return z(p,Lr(a,h,g),5);case 5:return n=p.h,p["return"](n)}})}
706
- function Ir(a,b,c,d,e,f,g,h,k,l,m){var n,p,t,v,y,w,x,D;return M(function(C){switch(C.g){case 1:n=Gr(a,c,null,g,0,0,h,"",k);if(a.G&&!f&&(p=a.h.get(b),t=p.$d.get(e),void 0!=t))return C["return"](t);d=d.toLowerCase();if(Br.includes(d))throw Sa("Raw formats are not yet supported. Skipping "+d),new P(1,4,4035);if("video/webm"==d)throw Sa("WebM in HLS is not yet supported. Skipping."),new P(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){C.D(2);break}v=[Kr(a,n,k,d,l,m)];c&&v.push(Kr(a,c,k,d,l,m));return z(C,
707
- Promise.all(v),3);case 3:return y=C.h,w=y[0],x=y[1]||y[0],C["return"](Mr(b,w.uri,w.data,x.data));case 2:if("video/mp2t"!=d){C.D(4);break}return z(C,Kr(a,n,k,d,l,m),5);case 5:return D=C.h,C["return"](Nr(b,D.uri,D.data));case 4:throw new P(2,4,4030,b);}})}
708
- function Mr(a,b,c,d){var e=0;(new vg).box("moov",zg).box("trak",zg).box("mdia",zg).X("mdhd",function(h){e=Mh(h.reader,h.version).timescale;h.parser.stop()}).parse(d,!0);if(!e)throw new P(2,4,4030,a,b);var f=0,g=!1;(new vg).box("moof",zg).box("traf",zg).X("tfdt",function(h){f=Lh(h.reader,h.version).Rd/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new P(2,4,4030,a,b);return f}
709
- function Nr(a,b,c){function d(){f.seek(g+188);h=f.ka();71!=h&&(f.seek(g+192),h=f.ka());71!=h&&(f.seek(g+204),h=f.ka());71!=h&&e();f.tf(1)}function e(){throw new P(2,4,4030,a,b);}var f=new sg(c,0),g=0,h=0;for(c=Math.min(f.U.byteLength-188,940);;){g=f.ia();h=f.ka();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.kc();if(8191==(k&8191))d();else if(k&16384)if(k=(f.ka()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.ka(),f.skip(k)),1!=f.P()>>8)d();else{f.skip(3);c=f.ka()>>6;0!=c&&1!=c||e();0==f.ka()&&e();c=f.ka();k=
710
- f.kc();var l=f.kc();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function wr(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=r(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new P(2,4,4039,f);}}return c}
711
- function Ar(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,y;return M(function(w){if(1==w.g){f=Nb;g=nf;h=wr(d.segments[0].h,e);k=new jb(h);l=k.Na.split(".").pop();m=Or[b];if(n=m[l])return w["return"](n);if(b==f.oa)return c&&"vtt"!=c&&"wvtt"!=c?w["return"]("application/mp4"):w["return"]("text/vtt");if(b==f.wc&&(!c||"jpeg"==c))return w["return"]("image/jpeg");p=gf([h],a.g.retryParameters);p.method="HEAD";return z(w,Lr(a,p,g),2)}t=w.h;v=t.headers["content-type"];return v?w["return"](v.split(";")[0]):(y=m.mp4,w["return"](y))})}
712
- function ar(a,b){var c=gf([b],a.g.retryParameters);a.i.modifyManifestRequest(c,{format:"h"});return Lr(a,c,0)}function Zq(a){var b,c;M(function(d){if(1==d.g){if(!a.i)return d["return"]();E(d,2);return z(d,a.update(),4)}if(2!=d.g)return b=a.ma,a.F.S(b),va(d,0);c=I(d);if(!a.i)return d["return"]();c.severity=1;a.i.onError(c);a.F.S(.1);B(d)})}function gr(a,b){a.m=b;a.j&&a.j.Pc(a.m==$q);a.m!=$q||a.F.stop()}
713
- function Lr(a,b,c){if(!a.H)throw new P(2,7,7001);b=a.i.networkingEngine.request(c,b);bf(a.H,b);return b.promise}N("shaka.hls.HlsParser",Yq);
714
- var Br=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],Or={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
715
- vtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},yr={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Fq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Fq(a,"URI");b=Xq(b);b=Ic(b.data);b=Ib("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Eq(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=
716
- Fq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Fq(a,"URI");a=Xq(a);a=Ic(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=io(a,b);return Ib("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},$q="VOD",Dr="EVENT",Cr="LIVE",dr={Hf:$q,Ch:Dr,Ne:Cr};qg.m3u8=function(){return new Yq};og["application/x-mpegurl"]=function(){return new Yq};og["application/vnd.apple.mpegurl"]=function(){return new Yq};function Pr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,pf:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=jd(b)}catch(g){}throw new P(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Qr(){}function Rr(a,b,c,d,e){var f=new Sr;yf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Tr,h={Qe:!1,Df:!1};a=Ur(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 Se(a,function(){h.Qe=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Q(function(){h.Df=!0;g.abort()});k.S(b/1E3);a["finally"](function(){k.stop()})}return a}
717
- function Ur(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,y,w,x,D,C;return M(function(A){switch(A.g){case 1:return h=Vr,k=Wr,p=n=0,t=Date.now(),E(A,2),z(A,h(a,c),4);case 4:return l=A.h,f(Xr(l.headers)),v=l.clone().body.getReader(),w=(y=l.headers.get("Content-Length"))?parseInt(y,10):0,x=function(F){function G(){var H,K;return M(function(J){switch(J.g){case 1:return E(J,2),z(J,v.read(),4);case 4:H=J.h;va(J,3);break;case 2:return I(J),J["return"]();case 3:if(H.done){J.D(5);break}n+=H.value.byteLength;if(!g){J.D(5);
718
- break}return z(J,g(H.value),5);case 5:K=Date.now();if(100<K-t||H.done)e(K-t,n-p,w-n),p=n,t=K;H.done?F.close():(F.enqueue(H.value),G());B(J)}})}G()},new k({start:x}),z(A,l.arrayBuffer(),5);case 5:m=A.h;va(A,3);break;case 2:D=I(A);if(d.Qe)throw new P(1,1,7001,a,b);if(d.Df)throw new P(1,1,1003,a,b);throw new P(1,1,1002,a,D,b);case 3:return C=Xr(l.headers),A["return"](Pr(C,m,l.status,a,l.url,b))}})}function Xr(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
719
- function Yr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}N("shaka.net.HttpFetchPlugin",Qr);Qr.isSupported=Yr;Qr.parse=Rr;var Vr=window.fetch,Tr=window.AbortController,Wr=window.ReadableStream,Sr=window.Headers;Yr()&&(df("http",Rr,2,!0),df("https",Rr,2,!0),df("blob",Rr,2,!0));function Zr(){}
720
- function $r(a,b,c,d,e){var f=new as,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 P(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var t=bs(f);e(t);n=!0}};f.onload=function(){var t=bs(f),v=f.response;try{var y=Pr(t,v,f.status,a,f.responseURL,c);l(y)}catch(w){m(w)}};f.onerror=function(t){m(new P(1,1,1002,a,t,
659
+ function uq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=uo(d,"timescale",Ao)||1;d=r(mo(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=uo(k,"presentationTime",Ao)||0,m=uo(k,"duration",Ao)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.h.onTimelineRegionAdded(k))}}
660
+ function Aq(a,b,c,d){var e,f,g,h,k;return M(function(l){if(1==l.g)return e=nf,f=ij(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),bf(a.A,h),A(l,h.promise,2);k=l.h;return l["return"](k.data)})}function yq(a,b){return Fd(yd(a,b))?Mb:a.split("/")[0]}N("shaka.dash.DashParser",kq);qg.mpd=function(){return new kq};og["application/dash+xml"]=function(){return new kq};og["video/vnd.mpeg.dash.mpd"]=function(){return new kq};function Dq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function Eq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Eq.prototype.toString=function(){function a(d){return d.name+"="+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}var b="#"+this.name,c=this.g?this.g.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b};
661
+ Eq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Fq(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Gq(a,b){var c=a.getAttribute(b);if(!c)throw new P(2,4,4023,b);return c.value}function Hq(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.i=c}function Iq(a,b){this.name=a;this.value=b};function Jq(a,b){return a.filter(function(c){return c.name==b})}function Kq(a,b){return a.filter(function(c){return Gq(c,"TYPE")==b})}function Lq(a,b){var c=Jq(a,b);return c.length?c[0]:null}function Mq(a,b,c){c=void 0===c?0:c;return(a=Lq(a,b))?Number(a.value):c};function Nq(a){this.h=a;this.g=0}function Oq(a){Pq(a,/[ \t]+/gm)}function Pq(a,b){b.lastIndex=a.g;var c=b.exec(a.h);c=null==c?null:{position:c.index,length:c[0].length,results:c};if(a.g==a.h.length||null==c||c.position!=a.g)return null;a.g+=c.length;return c.results}function Qq(a){return a.g==a.h.length?null:(a=Pq(a,/[^ \t\n]*/gm))?a[0]:null};function Rq(){this.g=0}
662
+ function Sq(a,b,c){b=gd(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 P(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=Tq(a,g),--a.g,Uq.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=Tq(a,h);if(Vq.includes(h.name)){if(1!=b)throw new P(2,4,4017);
663
+ 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=Tq(a,m),Uq.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"==Fq(m,"TYPE")?k.push(m):"MAP"==Fq(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Hb([d],[m.trim()])[0],h&&g.push(h),e.push(new Hq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new Hq("",g,k)));return new Dq(c,b,f,
664
+ e)}f.push(h);"EXT-X-STREAM-INF"==h.name&&(h.g.push(new Iq("URI",k)),e=!0)}}return new Dq(c,b,f)}function Tq(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new P(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new Nq(f);var h;(h=Pq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=Pq(f,k);)d.push(new Iq(h[1],h[2]||h[3])),Oq(f)}return new Eq(c,e,d,g)}
665
+ var Uq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),Vq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Wq(){}function Xq(a){try{var b=Yq(a);return Ve({uri:a,pf:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Te(c)}}function Yq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new P(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new P(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=pd(a):e=kd(a);return{data:e,contentType:c}}
666
+ N("shaka.net.DataUriPlugin",Wq);Wq.parse=Xq;df("data",Xq);function Zq(){var a=this;this.g=this.i=null;this.Aa=1;this.A=new Map;this.C=new Map;this.na=new Set;this.h=new Map;this.j=null;this.N="";this.$=new Rq;this.ma=0;this.F=new Q(function(){$q(a)});this.m=ar;this.G=null;this.aa=0;this.I=Infinity;this.Z=this.ba=0;this.H=new af;this.W=[];this.K=new Map;this.Ba=!1;this.B=new Map;this.R=null;this.va=new Map;this.J=new Map;this.l=!1}q=Zq.prototype;q.configure=function(a){this.g=a};
667
+ q.start=function(a,b){var c=this,d,e;return M(function(f){if(1==f.g)return c.i=b,c.l=b.isLowLatencyMode(),A(f,br(c,a),2);if(3!=f.g)return d=f.h,c.N=d.uri,A(f,cr(c,d.data),3);e=c.ma;0<e&&c.F.S(e);return f["return"](c.G)})};q.stop=function(){this.F&&(this.F.stop(),this.F=null);var a=[];this.H&&(a.push(this.H.destroy()),this.H=null);this.g=this.i=null;this.na.clear();this.G=null;this.h.clear();this.C.clear();this.B.clear();this.A.clear();return Promise.all(a)};
668
+ q.update=function(){var a=this,b,c,d;return M(function(e){if(1==e.g){if(a.m==ar)return e["return"]();b=[];a.R=null;c=Array.from(a.h.values());return c.length?A(e,dr(a,c[0]),2):e.D(2)}for(d=1;d<c.length;d++)b.push(dr(a,c[d]));return A(e,Promise.all(b),0)})};
669
+ function dr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v;return M(function(x){if(1==x.g)return c=er,d=b.If,e=new jb(d),a.l&&b.Nf&&mb(e,new pb("_HLS_skip=YES")),A(x,br(a,e.toString()),2);if(3!=x.g){f=x.h;g=Sq(a.$,f.data,f.uri);if(1!=g.type)throw new P(2,4,4017);h=Jq(g.g,"EXT-X-DEFINE");k=fr(a,h);l=b.stream;return A(x,gr(a,b.yd,g,l.type,l.mimeType,b.$d,k,b.Sf,l.codecs,l.bandwidth),3)}m=x.h;l.segmentIndex.fc(m,a.j.ob());m.length&&(n=Mq(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.$d.get(n),l.segmentIndex.Hb(p));t=m[m.length-
670
+ 1];if(v=Lq(g.g,"EXT-X-ENDLIST"))hr(a,c.Hf),a.j.bb(t.endTime);C(x)})}q.onExpirationUpdated=function(){};
671
+ function cr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,x,y,w,D,z,B,F,G,H,J,K,L,W,Z,ka,ja,ea,Ia,Ma,Da,Qa,ac,Dd;return M(function(gb){switch(gb.g){case 1:c=Sq(a.$,b,a.N);if(0!=c.type)throw new P(2,4,4022);d=Jq(c.g,"EXT-X-DEFINE");ir(a,d);e=Jq(c.g,"EXT-X-MEDIA");f=Jq(c.g,"EXT-X-STREAM-INF");g=Jq(c.g,"EXT-X-IMAGE-STREAM-INF");jr(a,f);h=Jq(c.g,"EXT-X-SESSION-DATA");k=r(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=Fq(m,"DATA-ID"),p=Fq(m,"URI"),t=Fq(m,"LANGUAGE"),v=Fq(m,"VALUE"),x=(new Map).set("id",n),p&&
672
+ x.set("uri",Hb([a.N],[p])[0]),t&&x.set("language",t),v&&x.set("value",v),y=new O("sessiondata",x),a.i)a.i.onEvent(y);return A(gb,kr(a,e),2);case 2:return lr(a,e),A(gb,mr(a,f),3);case 3:return w=gb.h,A(gb,nr(a,e),4);case 4:return D=gb.h,A(gb,or(a,g),5);case 5:z=gb.h;if(!a.i)throw new P(2,7,7001);if(a.Ba&&0==w.length)throw new P(2,4,4034);F=B=Infinity;G=r(a.h.values());for(H=G.next();!H.done;H=G.next())J=H.value,B=Math.min(B,J.mf),"text"!=J.stream.type&&(F=Math.min(F,J.Ig-J.mf));a.m!=ar?(a.j=new R(0,
673
+ a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.Z?a.Z:3*a.aa),a.j.Pc(!1)):(a.j=new R(null,0),a.j.Pc(!0));if(a.m!=ar)a.ma=a.I,K=er,a.m==K.Ne&&(L=a.j.td,isNaN(a.g.availabilityWindowOverride)||(L=a.g.availabilityWindowOverride),a.j.ye(L));else for(a.j.bb(F),a.j.offset(-B),W=r(a.h.values()),H=W.next();!H.done;H=W.next())Z=H.value,Z.stream.segmentIndex.offset(-B),Z.stream.segmentIndex.yb(0,F);a.W=[];ka=[];ja=r(w);for(ea=ja.next();!ea.done;ea=ja.next())for(Ia=ea.value,Ma=r([Ia.video,Ia.audio]),
674
+ Da=Ma.next();!Da.done;Da=Ma.next())(Qa=Da.value)&&ka.push(Qa);return A(gb,Promise.all(ka.map(function(Tc){return M(function(He){return A(He,Tc.createSegmentIndex(),0)})})),6);case 6:ac=r(ka);for(Da=ac.next();!Da.done;Da=ac.next())Dd=Da.value,a.W.push(Dd.segmentIndex.O);pr(a);a.j.Yd();a.G={presentationTimeline:a.j,variants:w,textStreams:D,imageStreams:z,offlineSessionIds:[],minBufferTime:0};a.i.makeTextStreamsForClosedCaptions(a.G);C(gb)}})}
675
+ function ir(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=Fq(e,"NAME");e=Fq(e,"VALUE");d&&e&&(a.A.has(d)||a.A.set(d,e))}}function fr(a,b){for(var c=new Map,d=r(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Fq(f,"NAME");var g=Fq(f,"VALUE");f=Fq(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.A.get(f))&&c.set(f,e)}return c}
676
+ function jr(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=Fq(e,"AUDIO");d=Fq(e,"VIDEO");var g=Fq(e,"SUBTITLES");e=qr(a,e);if(g){var h=Kb(Mb,e);a.B.set(g,h);ic(e,h)}f&&(g=Jb("audio",e),a.B.set(f,g));d&&(f=Jb("video",e),a.B.set(d,f))}}
677
+ function nr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t;return M(function(v){if(1==v.g)return c=Kq(b,"SUBTITLES"),d=c.map(function(x){var y,w,D;return M(function(z){if(1==z.g){if(y=a.g.disableText)return z["return"](null);E(z,2);return A(z,rr(a,x),4)}if(2!=z.g)return w=z.h,z["return"](w.stream);D=I(z);if(a.g.hls.ignoreTextStreamFailures)return z["return"](null);throw D;})}),A(v,Promise.all(d),2);e=v.h;f=r(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=Gq(h,"GROUP-ID"),l=a.B.get(k))if(m=a.C.get(k))for(n=
678
+ r(m),p=n.next();!p.done;p=n.next())t=p.value,t.stream.codecs=l;return v["return"](e.filter(function(x){return x}))})}
679
+ function or(a,b){var c,d;return M(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return M(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l["return"](null);E(l,2);return A(l,sr(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=I(l);if(a.g.hls.ignoreImageStreamFailures)return l["return"](null);throw k;})}),A(e,Promise.all(c),2);d=e.h;return e["return"](d.filter(function(f){return f}))})}
680
+ function kr(a,b){var c;return M(function(d){if(1==d.g)return b=b.filter(function(e){var f=Fq(e,"URI")||"";return"SUBTITLES"!=Fq(e,"TYPE")&&""!=f}),b.length?A(d,rr(a,b[0]),2):d.D(2);c=b.slice(1).map(function(e){return rr(a,e)});return A(d,Promise.all(c),0)})}
681
+ function mr(a,b){var c,d,e;return M(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,t,v;return M(function(x){if(1==x.g)return h=Fq(g,"FRAME-RATE"),k=Number(Fq(g,"AVERAGE-BANDWIDTH"))||Number(Gq(g,"BANDWIDTH")),l=Fq(g,"RESOLUTION"),m=r(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,t=Fq(g,"VIDEO-RANGE"),A(x,tr(a,g,k),2);if(v=x.h){for(var y=x["return"],w=v.audio,D=v.video,z=r(D),B=z.next();!B.done;B=z.next())if(B=B.value.stream)B.width=Number(n)||void 0,B.height=Number(p)||
682
+ void 0,B.frameRate=Number(h)||void 0,B.hdr=t||void 0;z=a.g.disableAudio;if(!w.length||z)w=[null];z=a.g.disableVideo;if(!D.length||z)D=[null];z=[];w=r(w);for(B=w.next();!B.done;B=w.next()){B=B.value;for(var F=r(D),G=F.next();!G.done;G=F.next()){var H=G.value;G=B?B.stream:null;var J=H?H.stream:null,K=B?B.stream.drmInfos:null,L=H?H.stream.drmInfos:null;H=(H?H.yd:"")+" - "+(B?B.yd:"");G&&J&&K.length&&L.length&&!(0<jg(K,L).length)||a.na.has(H)||(G={id:a.Aa++,language:G?G.language:"und",primary:!!G&&G.primary||
683
+ !!J&&J.primary,audio:G,video:J,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},z.push(G),a.na.add(H))}}x=y.call(x,z)}else x=x["return"]([]);return x})}),A(f,Promise.all(c),2);d=f.h;e=d.reduce(Db,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
684
+ function tr(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,x,y;return M(function(w){if(1==w.g)return d=Nb,e=qr(a,b),f=Fq(b,"AUDIO"),g=Fq(b,"VIDEO"),k=(h=f||g)&&a.C.has(h)?a.C.get(h):[],l={audio:f?k:[],video:g?k:[]},n=!1,p=Gq(b,"URI"),t=l.audio.find(function(D){return D&&D.yd==p}),v=Kb(d.gb,e),(x=Kb(d.Gb,e))&&!v?m=d.Gb:!k.length&&x&&v?(m=d.gb,e=[[v,x].join()]):l.audio.length&&t?(m=d.Gb,n=!0):m=l.video.length?d.Gb:d.gb,n?w.D(2):A(w,ur(a,b,e,m,c),3);2!=w.g&&(y=w.h);if(y)l[y.stream.type]=[y];else if(null===y)return w["return"](null);
685
+ vr(l);return w["return"](l)})}function qr(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);var d=Fq(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=Bd(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function wr(a){a=Fq(a,"LANGUAGE")||"und";return Qb(a)}
686
+ function vr(a){a=r(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function lr(a,b){var c=Kq(b,"CLOSED-CAPTIONS");c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=wr(e);var f=Gq(e,"GROUP-ID");e=Gq(e,"INSTREAM-ID");a.K.get(f)||a.K.set(f,new Map);a.K.get(f).set(e,d)}}
687
+ function rr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,x;return M(function(y){if(1==y.g){c=Gq(b,"GROUP-ID");d="";var w=Gq(b,"TYPE").toLowerCase();"subtitles"==w&&(w=Mb);e=w;e!=Mb&&c&&a.B.has(c)&&(d=a.B.get(c));f=xr(Gq(b,"URI"),a.A);if(a.h.has(f))return y["return"](a.h.get(f));g=wr(b);h=Fq(b,"NAME");k=Fq(b,"DEFAULT");l="YES"==k;"audio"==e?w=(w=Fq(b,"CHANNELS"))?parseInt(w.split("/")[0],10):null:w=null;m=w;"audio"==e?w=(w=Fq(b,"CHANNELS"))?w.includes("/JOC"):!1:w=!1;n=w;p=Fq(b,"CHARACTERISTICS");t=Fq(b,"FORCED");
688
+ v="YES"==t;return A(y,yr(a,f,d,e,g,l,h,m,null,p,v,n),2)}x=y.h;a.C.has(c)?a.C.get(c).push(x):a.C.set(c,[x]);if(null==x)return y["return"](null);if(a.h.has(f))return y["return"](a.h.get(f));a.h.set(f,x);return y["return"](x)})}
689
+ function sr(a,b){var c,d,e,f,g,h,k,l,m,n;return M(function(p){if(1==p.g){c=xr(Gq(b,"URI"),a.A);d=Fq(b,"CODECS","jpeg")||"";if(a.h.has(c))return p["return"](a.h.get(c));e=wr(b);f=Fq(b,"NAME");g=Fq(b,"CHARACTERISTICS");return A(p,yr(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(null==h)return p["return"](null);if(a.h.has(c))return p["return"](a.h.get(c));if(k=Fq(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=
690
+ Number(k.split("x")[1])*Number(m.split("x")[1]);if(n=Fq(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p["return"](h)})}
691
+ function ur(a,b,c,d,e){var f,g,h,k;return M(function(l){if(1==l.g){f=xr(Gq(b,"URI"),a.A);if(a.h.has(f))return l["return"](a.h.get(f));var m=Fq(b,"CLOSED-CAPTIONS");g="video"==d&&m&&"NONE"!=m?a.K.get(m):null;h=Jb(d,c);return A(l,yr(a,f,h,d,"und",!1,null,null,g,null,!1,!1,e),2)}k=l.h;if(null==k)return l["return"](null);if(a.h.has(f))return l["return"](a.h.get(f));a.h.set(f,k);return l["return"](k)})}
692
+ function yr(a,b,c,d,e,f,g,h,k,l,m,n,p){var t,v,x,y,w,D,z,B,F,G,H,J,K,L,W,Z,ka,ja,ea,Ia,Ma,Da,Qa,ac,Dd,gb,Tc,He,qp,rp,sp,tp,aj,bj,kg,up,vp,wp,xp;return M(function(nb){switch(nb.g){case 1:return t=Hb([a.N],[b])[0],A(nb,br(a,t),2);case 2:v=nb.h;t=v.uri;x=Sq(a.$,v.data,t);if(1!=x.type)throw new P(2,4,4017);y=[];if(x.segments)for(w=r(x.segments),D=w.next();!D.done;D=w.next())z=D.value,B=Jq(z.g,"EXT-X-KEY"),y.push.apply(y,ia(B));F=!1;G=[];H=new Set;J=r(y);for(K=J.next();!K.done;K=J.next())if(L=K.value,
693
+ W=Gq(L,"METHOD"),"NONE"!=W){F=!0;if("AES-128"==W)return a.Ba=!0,nb["return"](null);Z=Gq(L,"KEYFORMAT");if(ja=(ka=zr[Z])?ka(L):null){if(ja.keyIds)for(ea=r(ja.keyIds),Ia=ea.next();!Ia.done;Ia=ea.next())Ma=Ia.value,H.add(Ma);G.push(ja)}}if(F&&!G.length)throw new P(2,4,4026);Da=Jq(x.g,"EXT-X-DEFINE");Qa=fr(a,Da);Ar(a,x);return A(nb,Br(a,d,c,x,Qa),3);case 3:return ac=nb.h,Cr.includes(ac)&&(c=""),Dd=new Map,gb=new Map,E(nb,4),A(nb,gr(a,b,x,d,ac,Dd,Qa,gb,c,p),6);case 6:Tc=nb.h;va(nb,5);break;case 4:He=I(nb);
694
+ if(4035==He.code)return Sa("Skipping unsupported HLS stream",ac,b),nb["return"](null);throw He;case 5:qp=Tc[0].startTime;rp=Tc[Tc.length-1].endTime;sp=new Pi(Tc);tp=d==Mb?"subtitle":void 0;aj=[];if(l)for(bj=r(l.split(",")),kg=bj.next();!kg.done;kg=bj.next())up=kg.value,aj.push(up);wp=(vp=Lq(x.g,"EXT-X-SERVER-CONTROL"))?null!=vp.getAttribute("CAN-SKIP-UNTIL"):!1;xp={id:a.Aa++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:sp,mimeType:ac,codecs:c,kind:tp,encrypted:F,
695
+ drmInfos:G,keyIds:H,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:aj,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return nb["return"]({stream:xp,yd:b,If:t,mf:qp,Ig:rp,$d:Dd,Sf:gb,Nf:wp})}})}
696
+ function Ar(a,b){var c=Lq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Lq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)hr(a,ar);else{c?hr(a,Dr):hr(a,Er);d=Lq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new P(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Lq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ba=Number(Gq(c,"PART-TARGET")),a.I=Math.min(a.ba,a.I),c=Lq(b.g,"EXT-X-SERVER-CONTROL"),a.Z=c?Number(Gq(c,"PART-HOLD-BACK")):0):a.I=Math.min(d,a.I);a.aa=Math.max(d,a.aa)}}
697
+ function Fr(a,b,c,d){c=Lq(c,"EXT-X-MAP");if(!c)return null;var e=Gq(c,"URI");d=xr(Hb([b],[e])[0],d);b=[d,Fq(c,"BYTERANGE","")].join("-");a.va.has(b)||(c=Gr(d,c),a.va.set(b,c));return a.va.get(b)}function Gr(a,b){var c=0,d=null,e=Fq(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new qi(function(){return[a]},c,d)}
698
+ function Hr(a,b,c,d,e,f,g,h,k){var l=d.g,m=xr(d.h,g),n=Lq(l,"EXTINF"),p=g=0,t=null;if(!n){if(0==d.i.length)throw new P(2,4,4024,"EXTINF");if(!a.l)return null}var v=[];if(a.l)for(var x={},y=0;y<d.i.length;x={Id:x.Id},y++){var w=d.i[y],D=0==y?c:v[v.length-1],z=0==y?e:D.endTime,B=Number(Fq(w,"DURATION"))||a.ba;if(B){B=z+B;var F=0,G=null;"EXT-X-PRELOAD-HINT"==w.name?F=(D=Fq(w,"BYTERANGE-START"))?Number(D):0:(F=Fq(w,"BYTERANGE"),D=r(Ir(D,F)),F=D.next().value,G=D.next().value);if(w=Fq(w,"URI"))x.Id=Hb([h],
699
+ [w])[0],v.push(new si(z,B,function(H){return function(){return[H.Id]}}(x),F,G,b,f,0,Infinity))}}n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(a=Lq(l,"EXT-X-BYTERANGE"))?(t=r(Ir(c,a.value)),p=t.next().value,t=t.next().value):v.length&&(p=v[0].Ha,t=v[v.length-1].wa);c="";a=null;"image"==k&&(c="1x1",k=Lq(l,"EXT-X-TILES"))&&(c=Gq(k,"LAYOUT"),(k=Fq(k,"DURATION"))&&(a=Number(k)));return new si(e,g,function(){return m.length?[m]:[]},p,t,b,f,0,Infinity,v,c,a)}
700
+ function Ir(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.wa+1,d=c+d-1);return[c,d]}function pr(a){if(a.j){for(var b=r(a.W),c=b.next();!c.done;c=b.next())a.j.hc(c.value);a.W=[]}}
701
+ function gr(a,b,c,d,e,f,g,h,k,l){var m,n,p,t,v,x,y,w,D,z,B,F,G,H,J,K,L,W,Z,ka,ja;return M(function(ea){switch(ea.g){case 1:m=c.segments;p=Mq(c.g,"EXT-X-MEDIA-SEQUENCE",0);v=(t=Lq(c.g,"EXT-X-SKIP"))?Number(Fq(t,"SKIPPED-SEGMENTS")):0;x=p+v;if(a.m!=ar&&f.has(x)){y=f.get(x);ea.D(2);break}if(null!=a.R){ea.D(3);break}n=Fr(a,c.h,m[0].g,g);w=a;return A(ea,Jr(a,b,n,e,x,!1,m[0],g,d,k,l),4);case 4:w.R=ea.h;case 3:y=a.R;case 2:D=m[0].h;D.split("/").pop();z=Mq(c.g,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.l&&(h.has(z)||
702
+ h.set(z,x),v))for(B=h;B.has(z+1)&&B.get(z+1)<x;)z++;F=a.J.get(z)||0;G=[];H=0;case 5:if(!(H<m.length)){ea.D(7);break}J=m[H];K=G[G.length-1];L=0==H?y:K.endTime;x=p+v+H;f.set(x,L);n=Fr(a,c.h,J.g,g);W=Lq(J.g,"EXT-X-DISCONTINUITY");if(!W){ea.D(8);break}z++;h.set(z,x);return A(ea,Kr(a,z,b,n,e,x,J,g,L,d,k,l),9);case 9:F=ea.h;case 8:!a.l&&(Z=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());ka=Lq(J.g,"EXTINF");a.l||ka?(ja=Hr(a,n,K,J,L,F,g,c.h,d))&&G.push(ja):a.l||Sa("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
703
+ H++;ea.D(5);break;case 7:return ea["return"](G)}})}function Kr(a,b,c,d,e,f,g,h,k,l,m,n){var p,t;return M(function(v){if(1==v.g)return p=0,a.J.has(b)?(p=a.J.get(b),v.D(2)):A(v,Jr(a,c,d,e,f,!0,g,h,l,m,n),3);2!=v.g&&(t=v.h,p=k-t,a.J.set(b,p));return v["return"](p)})}
704
+ function Lr(a,b,c,d,e,f){var g,h,k,l,m,n;return M(function(p){switch(p.g){case 1:g=nf;h=ij(b.Ka(),b.Ha,b.wa,a.g.retryParameters);a.i.modifySegmentRequest(h,{type:c,init:b instanceof qi,duration:b.endTime-b.startTime,mimeType:d,codecs:e,bandwidth:f});if(a.g.hls.useFullSegmentsForStartTime)return p["return"](Mr(a,h,g));k=ij(b.Ka(),b.Ha,b.Ha+2048-1,a.g.retryParameters);a.i.modifySegmentRequest(k,{type:c,init:b instanceof qi,duration:b.endTime-b.startTime,mimeType:d,codecs:e,bandwidth:f});E(p,2);return A(p,
705
+ Mr(a,k,g),4);case 4:return l=p.h,p["return"](l);case 2:m=I(p);if(7001==m.code)throw m;Sa("Unable to fetch the starting part of HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",k.uris[0]);return A(p,Mr(a,h,g),5);case 5:return n=p.h,p["return"](n)}})}
706
+ function Jr(a,b,c,d,e,f,g,h,k,l,m){var n,p,t,v,x,y,w,D;return M(function(z){switch(z.g){case 1:n=Hr(a,c,null,g,0,0,h,"",k);if(a.G&&!f&&(p=a.h.get(b),t=p.$d.get(e),void 0!=t))return z["return"](t);d=d.toLowerCase();if(Cr.includes(d))throw Sa("Raw formats are not yet supported. Skipping "+d),new P(1,4,4035);if("video/webm"==d)throw Sa("WebM in HLS is not yet supported. Skipping."),new P(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){z.D(2);break}v=[Lr(a,n,k,d,l,m)];c&&v.push(Lr(a,c,k,d,l,m));return A(z,
707
+ Promise.all(v),3);case 3:return x=z.h,y=x[0],w=x[1]||x[0],z["return"](Nr(b,y.uri,y.data,w.data));case 2:if("video/mp2t"!=d){z.D(4);break}return A(z,Lr(a,n,k,d,l,m),5);case 5:return D=z.h,z["return"](Or(b,D.uri,D.data));case 4:throw new P(2,4,4030,b);}})}
708
+ function Nr(a,b,c,d){var e=0;(new vg).box("moov",zg).box("trak",zg).box("mdia",zg).X("mdhd",function(h){e=Mh(h.reader,h.version).timescale;h.parser.stop()}).parse(d,!0);if(!e)throw new P(2,4,4030,a,b);var f=0,g=!1;(new vg).box("moof",zg).box("traf",zg).X("tfdt",function(h){f=Lh(h.reader,h.version).Rd/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new P(2,4,4030,a,b);return f}
709
+ function Or(a,b,c){function d(){f.seek(g+188);h=f.ka();71!=h&&(f.seek(g+192),h=f.ka());71!=h&&(f.seek(g+204),h=f.ka());71!=h&&e();f.tf(1)}function e(){throw new P(2,4,4030,a,b);}var f=new sg(c,0),g=0,h=0;for(c=Math.min(f.U.byteLength-188,940);;){g=f.ia();h=f.ka();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.kc();if(8191==(k&8191))d();else if(k&16384)if(k=(f.ka()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.ka(),f.skip(k)),1!=f.P()>>8)d();else{f.skip(3);c=f.ka()>>6;0!=c&&1!=c||e();0==f.ka()&&e();c=f.ka();k=
710
+ f.kc();var l=f.kc();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function xr(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=r(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new P(2,4,4039,f);}}return c}
711
+ function Br(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,x;return M(function(y){if(1==y.g){f=Nb;g=nf;h=xr(d.segments[0].h,e);k=new jb(h);l=k.Na.split(".").pop();m=Pr[b];if(n=m[l])return y["return"](n);if(b==f.oa)return c&&"vtt"!=c&&"wvtt"!=c?y["return"]("application/mp4"):y["return"]("text/vtt");if(b==f.wc&&(!c||"jpeg"==c))return y["return"]("image/jpeg");p=gf([h],a.g.retryParameters);p.method="HEAD";return A(y,Mr(a,p,g),2)}t=y.h;v=t.headers["content-type"];return v?y["return"](v.split(";")[0]):(x=m.mp4,y["return"](x))})}
712
+ function br(a,b){var c=gf([b],a.g.retryParameters);a.i.modifyManifestRequest(c,{format:"h"});return Mr(a,c,0)}function $q(a){var b,c;M(function(d){if(1==d.g){if(!a.i)return d["return"]();E(d,2);return A(d,a.update(),4)}if(2!=d.g)return b=a.ma,a.F.S(b),va(d,0);c=I(d);if(!a.i)return d["return"]();c.severity=1;a.i.onError(c);a.F.S(.1);C(d)})}function hr(a,b){a.m=b;a.j&&a.j.Pc(a.m==ar);a.m!=ar||a.F.stop()}
713
+ function Mr(a,b,c){if(!a.H)throw new P(2,7,7001);b=a.i.networkingEngine.request(c,b);bf(a.H,b);return b.promise}N("shaka.hls.HlsParser",Zq);
714
+ var Cr=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],Pr={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
715
+ vtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},zr={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Gq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Gq(a,"URI");b=Yq(b);b=Ic(b.data);b=Ib("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Fq(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=
716
+ Gq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Gq(a,"URI");a=Yq(a);a=Ic(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=jo(a,b);return Ib("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},ar="VOD",Er="EVENT",Dr="LIVE",er={Hf:ar,Ch:Er,Ne:Dr};qg.m3u8=function(){return new Zq};og["application/x-mpegurl"]=function(){return new Zq};og["application/vnd.apple.mpegurl"]=function(){return new Zq};function Qr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,pf:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=jd(b)}catch(g){}throw new P(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Rr(){}function Sr(a,b,c,d,e){var f=new Tr;yf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Ur,h={Qe:!1,Df:!1};a=Vr(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 Se(a,function(){h.Qe=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Q(function(){h.Df=!0;g.abort()});k.S(b/1E3);a["finally"](function(){k.stop()})}return a}
717
+ function Vr(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,x,y,w,D,z;return M(function(B){switch(B.g){case 1:return h=Wr,k=Xr,p=n=0,t=Date.now(),E(B,2),A(B,h(a,c),4);case 4:return l=B.h,f(Yr(l.headers)),v=l.clone().body.getReader(),y=(x=l.headers.get("Content-Length"))?parseInt(x,10):0,w=function(F){function G(){var H,J;return M(function(K){switch(K.g){case 1:return E(K,2),A(K,v.read(),4);case 4:H=K.h;va(K,3);break;case 2:return I(K),K["return"]();case 3:if(H.done){K.D(5);break}n+=H.value.byteLength;if(!g){K.D(5);
718
+ break}return A(K,g(H.value),5);case 5:J=Date.now();if(100<J-t||H.done)e(J-t,n-p,y-n),p=n,t=J;H.done?F.close():(F.enqueue(H.value),G());C(K)}})}G()},new k({start:w}),A(B,l.arrayBuffer(),5);case 5:m=B.h;va(B,3);break;case 2:D=I(B);if(d.Qe)throw new P(1,1,7001,a,b);if(d.Df)throw new P(1,1,1003,a,b);throw new P(1,1,1002,a,D,b);case 3:return z=Yr(l.headers),B["return"](Qr(z,m,l.status,a,l.url,b))}})}function Yr(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
719
+ function Zr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}N("shaka.net.HttpFetchPlugin",Rr);Rr.isSupported=Zr;Rr.parse=Sr;var Wr=window.fetch,Ur=window.AbortController,Xr=window.ReadableStream,Tr=window.Headers;Zr()&&(df("http",Sr,2,!0),df("https",Sr,2,!0),df("blob",Sr,2,!0));function $r(){}
720
+ function as(a,b,c,d,e){var f=new bs,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 P(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var t=cs(f);e(t);n=!0}};f.onload=function(){var t=cs(f),v=f.response;try{var x=Qr(t,v,f.status,a,f.responseURL,c);l(x)}catch(y){m(y)}};f.onerror=function(t){m(new P(1,1,1002,a,t,
721
721
  c))};f.ontimeout=function(){m(new P(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 p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new Se(k,function(){f.abort();return Promise.resolve()})}
722
- function bs(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}N("shaka.net.HttpXHRPlugin",Zr);Zr.parse=$r;var as=window.XMLHttpRequest;df("http",$r,1,!0);df("https",$r,1,!0);df("blob",$r,1,!0);function cs(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function ds(a){return a.Ka().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ha+":"+a.wa}function es(a,b){return ij(a.g.Ka(),a.g.Ha,a.g.wa,b.streaming.retryParameters)};function fs(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function gs(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}fs.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 hs(a){var b=this;this.A=a;this.j=new Map;this.i=new of(function(){return is(b)["catch"](function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new fs}hs.prototype.destroy=function(){return this.i.destroy()};function js(a,b,c){a.m=b;a.l=c}function is(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
723
- function ks(a,b,c,d,e,f){pf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,t;return M(function(v){if(1==v.g)return z(v,ls(a,c),2);h=v.h;if(a.i.g)throw new P(2,9,7001);if(e)for(m in k=Ic(h),l=new ho(k),l.data)n=Number(m),p=l.data[n],t=l.g[n],a.l(p,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 ms(a){return M(function(b){return 1==b.g?z(b,Promise.all(a.j.values()),2):b["return"](a.g.h)})}
724
- function ls(a,b){var c,d,e,f;return M(function(g){if(1==g.g)return c=nf,d=a.A.request(c,b),e=function(){return d.abort()},a.h.push(e),z(g,d.promise,2);f=g.h;ic(a.h,e);return g["return"](f.data)})};function ns(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Pc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}ns.prototype.abort=function(){var a=this;return M(function(b){if(1==b.g){try{a.i.abort()}catch(c){}E(b,2);return z(b,a.g,4)}if(2!=b.g)return va(b,0);I(b);B(b)})};
725
- function os(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return M(function(g){if(1==g.g){if(null==e.result)return c(),g["return"]();f=e.result;return z(g,b(f.key,f.value,f),2)}f["continue"]();B(g)})}})}ns.prototype.store=function(){return this.h};ns.prototype.promise=function(){return this.g};function ps(a){this.h=a;this.g=[]}ps.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function qs(a,b){return rs(a,b,"readwrite")}function rs(a,b,c){c=a.h.transaction([b],c);var d=new ns(c,b);a.g.push(d);d.promise().then(function(){ic(a.g,d)},function(){ic(a.g,d)});return d};function ss(a,b,c){this.h=new ps(a);this.i=b;this.g=c}q=ss.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return ts(this.i)};q.removeSegments=function(a,b){return us(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return M(function(d){if(1==d.g)return z(d,vs(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.Te(e)}))})};q.addManifests=function(){return ts(this.g)};
726
- q.updateManifest=function(){return Promise.reject(new P(2,9,9016,"Cannot modify values in "+this.g))};function ws(a,b,c){a=qs(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=qs(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 us(this,this.g,a,b)};
727
- q.getManifests=function(a){var b=this,c;return M(function(d){if(1==d.g)return z(d,vs(b,b.g,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.zc(e)})))})};q.getAllManifests=function(){var a=this,b,c;return M(function(d){return 1==d.g?(b=rs(a.h,a.g,"readonly"),c=new Map,z(d,os(b,function(e,f){var g;return M(function(h){if(1==h.g)return z(h,a.zc(f),2);g=h.h;c.set(e,g);B(h)})}),2)):3!=d.g?z(d,b.promise(),3):d["return"](c)})};q.Te=function(a){return a};q.zc=function(a){return Promise.resolve(a)};
728
- function ts(a){return Promise.reject(new P(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 M(function(m){if(1==m.g){d=qs(c.h,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={Uc:g.Uc},k=h.next())l=k.value,g.Uc=e.add(l),g.Uc.onsuccess=function(n){return function(){f.push(n.Uc.result)}}(g);return z(m,d.promise(),2)}return m["return"](f)})};
729
- function us(a,b,c,d){a=qs(a.h,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={Tc:e.Tc},f=c.next())e.Tc=f.value,b["delete"](e.Tc).onsuccess=function(g){return function(){return d(g.Tc)}}(e);return a.promise()}
730
- function vs(a,b,c){var d,e,f,g,h,k,l;return M(function(m){if(1==m.g){d=rs(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={uc:h.uc,qc:h.qc},l=k.next())h.qc=l.value,h.uc=e.get(h.qc),h.uc.onsuccess=function(n){return function(){void 0==n.uc.result&&g.push(n.qc);f[n.qc]=n.uc.result}}(h);return z(m,d.promise(),2)}if(g.length)throw new P(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function xs(a){this.g=new ps(a)}xs.prototype.destroy=function(){return this.g.destroy()};xs.prototype.getAll=function(){var a=this,b,c;return M(function(d){return 1==d.g?(b=rs(a.g,"session-ids","readonly"),c=[],z(d,os(b,function(e,f){c.push(f)}),2)):3!=d.g?z(d,b.promise(),3):d["return"](c)})};xs.prototype.add=function(a){var b=qs(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()};
731
- xs.prototype.remove=function(a){var b=this,c;return M(function(d){return 1==d.g?(c=qs(b.g,"session-ids"),z(d,os(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):z(d,c.promise(),0)})};function ys(){this.g=new Map}ys.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)};ys.prototype.init=function(){var a=this;zs.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});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)};
732
- function As(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Sa:d,Da:f},Da:e})})});if(b)return b;throw new P(2,9,9013,"Could not find a cell that supports add-operations");}function Bs(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Sa:d,Da:f},e)})})}
733
- function Cs(a,b,c){a=a.g.get(b);if(!a)throw new P(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new P(2,9,9013,"Could not find cell with name "+c);return b}function Ds(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Es(a){var b=Array.from(a.g.keys());if(!b.length)throw new P(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
734
- function Fs(a){var b,c,d;return M(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=zs,d.forEach(function(f){(f=f())&&b.push(f)})),z(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.D(0):z(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Gs(a,b){zs.set(a,b)}N("shaka.offline.StorageMuxer",ys);ys.unregister=function(a){zs["delete"](a)};ys.register=Gs;ys.prototype.destroy=ys.prototype.destroy;var zs=new Map;function Hs(){ss.apply(this,arguments)}u(Hs,ss);Hs.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return M(function(g){d=qs(c.h,c.g);e=d.store();f=new Pc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new P(2,9,9012,"Could not find values for "+a))};return z(g,Promise.all([d.promise(),f]),0)})};
735
- Hs.prototype.zc=function(a){var b,c,d,e,f,g;return M(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=Is(a.periods[c],e),b.push(f);return z(h,Pp(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})})};
736
- function Is(a,b){Js(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Ks(e,a.startTime,b)})}
737
- function Ks(a,b,c){var d=a.initSegmentUri?Ls(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=Ls(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
738
- 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}}Hs.prototype.Te=function(a){return{data:a.data}};function Ls(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 P(2,9,9004,"Could not parse uri "+a);}
739
- function Js(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++,
740
- 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 Ms(){ss.apply(this,arguments)}u(Ms,ss);
741
- Ms.prototype.zc=function(a){var b,c,d,e,f,g;return M(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),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(Ns(n,k.startTime,k.startTime+e));f=l;b.push(f)}return z(h,Pp(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
722
+ function cs(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}N("shaka.net.HttpXHRPlugin",$r);$r.parse=as;var bs=window.XMLHttpRequest;df("http",as,1,!0);df("https",as,1,!0);df("blob",as,1,!0);function ds(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function es(a){return a.Ka().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ha+":"+a.wa}function fs(a,b){return ij(a.g.Ka(),a.g.Ha,a.g.wa,b.streaming.retryParameters)};function gs(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function hs(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}gs.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 is(a){var b=this;this.A=a;this.j=new Map;this.i=new of(function(){return js(b)["catch"](function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new gs}is.prototype.destroy=function(){return this.i.destroy()};function ks(a,b,c){a.m=b;a.l=c}function js(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
723
+ function ls(a,b,c,d,e,f){pf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,t;return M(function(v){if(1==v.g)return A(v,ms(a,c),2);h=v.h;if(a.i.g)throw new P(2,9,7001);if(e)for(m in k=Ic(h),l=new io(k),l.data)n=Number(m),p=l.data[n],t=l.g[n],a.l(p,t);a.g.close(d,h.byteLength);var x=a.g;a.m(0==x.i?0:x.j/x.i,a.g.h);return v["return"](f(h))})});a.j.set(b,g)}function ns(a){return M(function(b){return 1==b.g?A(b,Promise.all(a.j.values()),2):b["return"](a.g.h)})}
724
+ function ms(a,b){var c,d,e,f;return M(function(g){if(1==g.g)return c=nf,d=a.A.request(c,b),e=function(){return d.abort()},a.h.push(e),A(g,d.promise,2);f=g.h;ic(a.h,e);return g["return"](f.data)})};function os(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Pc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}os.prototype.abort=function(){var a=this;return M(function(b){if(1==b.g){try{a.i.abort()}catch(c){}E(b,2);return A(b,a.g,4)}if(2!=b.g)return va(b,0);I(b);C(b)})};
725
+ function ps(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return M(function(g){if(1==g.g){if(null==e.result)return c(),g["return"]();f=e.result;return A(g,b(f.key,f.value,f),2)}f["continue"]();C(g)})}})}os.prototype.store=function(){return this.h};os.prototype.promise=function(){return this.g};function qs(a){this.h=a;this.g=[]}qs.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function rs(a,b){return ss(a,b,"readwrite")}function ss(a,b,c){c=a.h.transaction([b],c);var d=new os(c,b);a.g.push(d);d.promise().then(function(){ic(a.g,d)},function(){ic(a.g,d)});return d};function ts(a,b,c){this.h=new qs(a);this.i=b;this.g=c}q=ts.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return us(this.i)};q.removeSegments=function(a,b){return vs(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return M(function(d){if(1==d.g)return A(d,ws(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.Te(e)}))})};q.addManifests=function(){return us(this.g)};
726
+ q.updateManifest=function(){return Promise.reject(new P(2,9,9016,"Cannot modify values in "+this.g))};function xs(a,b,c){a=rs(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=rs(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 vs(this,this.g,a,b)};
727
+ q.getManifests=function(a){var b=this,c;return M(function(d){if(1==d.g)return A(d,ws(b,b.g,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.zc(e)})))})};q.getAllManifests=function(){var a=this,b,c;return M(function(d){return 1==d.g?(b=ss(a.h,a.g,"readonly"),c=new Map,A(d,ps(b,function(e,f){var g;return M(function(h){if(1==h.g)return A(h,a.zc(f),2);g=h.h;c.set(e,g);C(h)})}),2)):3!=d.g?A(d,b.promise(),3):d["return"](c)})};q.Te=function(a){return a};q.zc=function(a){return Promise.resolve(a)};
728
+ function us(a){return Promise.reject(new P(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 M(function(m){if(1==m.g){d=rs(c.h,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={Uc:g.Uc},k=h.next())l=k.value,g.Uc=e.add(l),g.Uc.onsuccess=function(n){return function(){f.push(n.Uc.result)}}(g);return A(m,d.promise(),2)}return m["return"](f)})};
729
+ function vs(a,b,c,d){a=rs(a.h,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={Tc:e.Tc},f=c.next())e.Tc=f.value,b["delete"](e.Tc).onsuccess=function(g){return function(){return d(g.Tc)}}(e);return a.promise()}
730
+ function ws(a,b,c){var d,e,f,g,h,k,l;return M(function(m){if(1==m.g){d=ss(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={uc:h.uc,qc:h.qc},l=k.next())h.qc=l.value,h.uc=e.get(h.qc),h.uc.onsuccess=function(n){return function(){void 0==n.uc.result&&g.push(n.qc);f[n.qc]=n.uc.result}}(h);return A(m,d.promise(),2)}if(g.length)throw new P(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function ys(a){this.g=new qs(a)}ys.prototype.destroy=function(){return this.g.destroy()};ys.prototype.getAll=function(){var a=this,b,c;return M(function(d){return 1==d.g?(b=ss(a.g,"session-ids","readonly"),c=[],A(d,ps(b,function(e,f){c.push(f)}),2)):3!=d.g?A(d,b.promise(),3):d["return"](c)})};ys.prototype.add=function(a){var b=rs(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()};
731
+ ys.prototype.remove=function(a){var b=this,c;return M(function(d){return 1==d.g?(c=rs(b.g,"session-ids"),A(d,ps(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):A(d,c.promise(),0)})};function zs(){this.g=new Map}zs.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)};zs.prototype.init=function(){var a=this;As.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});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)};
732
+ function Bs(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Sa:d,Da:f},Da:e})})});if(b)return b;throw new P(2,9,9013,"Could not find a cell that supports add-operations");}function Cs(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Sa:d,Da:f},e)})})}
733
+ function Ds(a,b,c){a=a.g.get(b);if(!a)throw new P(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new P(2,9,9013,"Could not find cell with name "+c);return b}function Es(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Fs(a){var b=Array.from(a.g.keys());if(!b.length)throw new P(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
734
+ function Gs(a){var b,c,d;return M(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=As,d.forEach(function(f){(f=f())&&b.push(f)})),A(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.D(0):A(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Hs(a,b){As.set(a,b)}N("shaka.offline.StorageMuxer",zs);zs.unregister=function(a){As["delete"](a)};zs.register=Hs;zs.prototype.destroy=zs.prototype.destroy;var As=new Map;function Is(){ts.apply(this,arguments)}u(Is,ts);Is.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return M(function(g){d=rs(c.h,c.g);e=d.store();f=new Pc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new P(2,9,9012,"Could not find values for "+a))};return A(g,Promise.all([d.promise(),f]),0)})};
735
+ Is.prototype.zc=function(a){var b,c,d,e,f,g;return M(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=Js(a.periods[c],e),b.push(f);return A(h,Qp(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})})};
736
+ function Js(a,b){Ks(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Ls(e,a.startTime,b)})}
737
+ function Ls(a,b,c){var d=a.initSegmentUri?Ms(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=Ms(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
738
+ 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}}Is.prototype.Te=function(a){return{data:a.data}};function Ms(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 P(2,9,9004,"Could not parse uri "+a);}
739
+ function Ks(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++,
740
+ 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 Ns(){ts.apply(this,arguments)}u(Ns,ts);
741
+ Ns.prototype.zc=function(a){var b,c,d,e,f,g;return M(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),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(Os(n,k.startTime,k.startTime+e));f=l;b.push(f)}return A(h,Qp(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
742
742
  a.expiration?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g})})};
743
- function Ns(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,
744
- dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Os(){ss.apply(this,arguments)}u(Os,ss);q=Os.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 ws(this,a,b)};q.zc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Ps(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Ps.prototype;
745
- q.init=function(){var a=this,b=new Pc,c=window.indexedDB.open("shaka_offline_db",5);c.onsuccess=function(){var d=c.result;a.l=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new Hs(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new Ms(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new Ms(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
746
- e=e.contains("manifest-v5")&&e.contains("segment-v5")?new Os(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new xs(d):null;a.m=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=r(["segment-v5","manifest-v5","session-ids"]),f=e.next();!f.done;f=e.next())f=f.value,d.objectStoreNames.contains(f)||d.createObjectStore(f,{autoIncrement:!0})};c.onerror=function(d){b.reject(new P(2,9,9001,c.error));d.preventDefault()};return b};
747
- q.destroy=function(){var a=this;return M(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return z(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return z(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return z(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return z(b,a.j.destroy(),8);case 8:if(!a.m){b.D(10);break}return z(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),B(b)}})};
743
+ function Os(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,
744
+ dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Ps(){ts.apply(this,arguments)}u(Ps,ts);q=Ps.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 xs(this,a,b)};q.zc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Qs(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Qs.prototype;
745
+ q.init=function(){var a=this,b=new Pc,c=window.indexedDB.open("shaka_offline_db",5);c.onsuccess=function(){var d=c.result;a.l=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new Is(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new Ns(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new Ns(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
746
+ e=e.contains("manifest-v5")&&e.contains("segment-v5")?new Ps(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new ys(d):null;a.m=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=r(["segment-v5","manifest-v5","session-ids"]),f=e.next();!f.done;f=e.next())f=f.value,d.objectStoreNames.contains(f)||d.createObjectStore(f,{autoIncrement:!0})};c.onerror=function(d){b.reject(new P(2,9,9001,c.error));d.preventDefault()};return b};
747
+ q.destroy=function(){var a=this;return M(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return A(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return A(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return A(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return A(b,a.j.destroy(),8);case 8:if(!a.m){b.D(10);break}return A(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),C(b)}})};
748
748
  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};
749
- q.erase=function(){var a=this;return M(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return z(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return z(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return z(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return z(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),z(b,Qs(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,z(b,a.init(),0)}})};
750
- function Qs(){var a=new Pc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new P(2,9,9001,b.error));c.preventDefault()};return a}Gs("idb",function(){return $c()||Wc()||!window.indexedDB?null:new Ps});function Rs(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Rs.prototype.Sa=function(){return this.i};Rs.prototype.Da=function(){return this.h};Rs.prototype.key=function(){return this.l};Rs.prototype.toString=function(){return this.j};
751
- function Ss(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 Rs(b,c,d,Number(a[4])):null};function Ts(a,b){this.h=a;this.g=b}
752
- function Us(a,b){var c=new R(null,0);c.bb(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Vs(a,d,e,c);e=b.streams.filter(function(l){return l.type==Mb}).map(function(l){return Ws(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Ws(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=
749
+ q.erase=function(){var a=this;return M(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return A(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return A(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return A(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return A(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),A(b,Rs(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,A(b,a.init(),0)}})};
750
+ function Rs(){var a=new Pc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new P(2,9,9001,b.error));c.preventDefault()};return a}Hs("idb",function(){return $c()||Wc()||!window.indexedDB?null:new Qs});function Ss(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Ss.prototype.Sa=function(){return this.i};Ss.prototype.Da=function(){return this.h};Ss.prototype.key=function(){return this.l};Ss.prototype.toString=function(){return this.j};
751
+ function Ts(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 Ss(b,c,d,Number(a[4])):null};function Us(a,b){this.h=a;this.g=b}
752
+ function Vs(a,b){var c=new R(null,0);c.bb(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Ws(a,d,e,c);e=b.streams.filter(function(l){return l.type==Mb}).map(function(l){return Xs(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Xs(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=
753
753
  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}}
754
- function Vs(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:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=r(b);for(e=b.next();!e.done;e=b.next())for(e=
755
- e.value,g=Ws(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=Ws(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}
756
- function Ws(a,b,c){var d=b.segments.map(function(e){return Xs(a,e)});c.hc(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Pi(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,
757
- roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Xs(a,b){var c=new Rs("segment",a.h,a.g,b.dataKey);return new si(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Ys(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
758
- function Ys(a,b){var c=new Rs("segment",a.h,a.g,b);return new qi(function(){return[c.toString()]},0,null)};function Zs(){this.g=null}q=Zs.prototype;q.configure=function(){};
759
- q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){switch(m.g){case 1:d=Ss(a);c.g=d;if(null==d||"manifest"!=d.g)throw new P(2,1,9004,a);e=new ys;ua(m);return z(m,e.init(),4);case 4:return z(m,Cs(e,d.Sa(),d.Da()),5);case 5:return f=m.h,z(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Ts(d.Sa(),d.Da()),l=Us(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return wa(m),z(m,e.destroy(),7);case 7:xa(m,0)}})};q.stop=function(){return Promise.resolve()};
760
- q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){switch(m.g){case 1:return d=c.g,e=new ys,E(m,2,3),z(m,e.init(),5);case 5:return z(m,Cs(e,d.Sa(),d.Da()),6);case 6:return f=m.h,z(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 z(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),z(m,e.destroy(),10);case 10:xa(m,0);break;case 2:I(m),m.D(3)}})};
761
- og["application/x-offline-manifest"]=function(){return new Zs};function $s(){}function at(a){var b=Ss(a);b&&"manifest"==b.g?(a={uri:a,pf:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Ve(a)):a=b&&"segment"==b.g?bt(b.key(),b):Te(new P(2,1,9004,a));return a}
762
- function bt(a,b){var c=new ys;return Ve(void 0).qa(function(){return c.init()}).qa(function(){return Cs(c,b.Sa(),b.Da())}).qa(function(d){return d.getSegments([b.key()])}).qa(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}N("shaka.offline.OfflineScheme",$s);$s.plugin=at;df("offline",at);function ct(a,b,c){var d,e,f,g,h,k;return M(function(l){switch(l.g){case 1:d=[];for(var m=[],n=r(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var t=!1,v=r(m),y=v.next();!y.done;y=v.next())if(y=y.value,dt(y.info,p)){y.sessionIds.push(p.sessionId);t=!0;break}t||m.push({info:p,sessionIds:[p.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.D(4);break}g=f.value;h=et(a,b,g);return z(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)}})}
763
- function et(a,b,c){var d,e;return M(function(f){switch(f.g){case 1:return d=new Bf({Pb:b,onError:function(){},qd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),E(f,2),d.configure(a),z(f,Jf(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 I(f),z(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return E(f,6),z(f,Sf(d),8);case 8:va(f,7);break;case 6:return I(f),z(f,d.destroy(),
764
- 9);case 9:return f["return"]([]);case 7:return e=[],z(f,Promise.all(c.sessionIds.map(function(g){return M(function(h){if(1==h.g)return E(h,2),z(h,Tf(d,g),4);if(2!=h.g)return e.push(g),va(h,0);I(h);B(h)})})),10);case 10:return z(f,d.destroy(),11);case 11:return f["return"](e)}})}
765
- function dt(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&jc(a.audioCapabilities,b.audioCapabilities,c)&&jc(a.videoCapabilities,b.videoCapabilities,c)};function ft(a,b,c){var d=b.presentationTimeline.getDuration();b=gt(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function ht(a,b){var c=Us(new Ts(a.Sa(),a.Da()),b),d=b.appMetadata||{};c=gt(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}}
766
- function gt(a){var b=[],c=ue(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(le(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(me(c.value));return b};function it(){this.g={}}function jt(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 kt(a,b){a.g[b.id]=b.bandwidth||2048}function lt(a,b){var c=a.g[b];null==c&&(c=0);return c};function mt(a){var b=this;if(a&&a.constructor!=T)throw new P(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Dc()):(this.h=Hk(),this.g=new cf);this.i=[];this.j=[];var c=!a;this.l=new of(function(){var d,e,f,g,h;return M(function(k){switch(k.g){case 1:return z(k,Promise.all(b.j.map(function(l){return is(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 z(k,Promise.all(e),3);case 3:if(!c){k.D(4);break}return z(k,b.g.destroy(),4);
767
- case 4:b.h=null,b.g=null,B(k)}})})}function nt(){if(Sc())a:{var a=r(zs.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=mt.prototype;q.destroy=function(){return this.l.destroy()};
754
+ function Ws(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:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=r(b);for(e=b.next();!e.done;e=b.next())for(e=
755
+ e.value,g=Xs(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=Xs(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}
756
+ function Xs(a,b,c){var d=b.segments.map(function(e){return Ys(a,e)});c.hc(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Pi(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,
757
+ roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Ys(a,b){var c=new Ss("segment",a.h,a.g,b.dataKey);return new si(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Zs(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
758
+ function Zs(a,b){var c=new Ss("segment",a.h,a.g,b);return new qi(function(){return[c.toString()]},0,null)};function $s(){this.g=null}q=$s.prototype;q.configure=function(){};
759
+ q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){switch(m.g){case 1:d=Ts(a);c.g=d;if(null==d||"manifest"!=d.g)throw new P(2,1,9004,a);e=new zs;ua(m);return A(m,e.init(),4);case 4:return A(m,Ds(e,d.Sa(),d.Da()),5);case 5:return f=m.h,A(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Us(d.Sa(),d.Da()),l=Vs(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return wa(m),A(m,e.destroy(),7);case 7:xa(m,0)}})};q.stop=function(){return Promise.resolve()};
760
+ q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){switch(m.g){case 1:return d=c.g,e=new zs,E(m,2,3),A(m,e.init(),5);case 5:return A(m,Ds(e,d.Sa(),d.Da()),6);case 6:return f=m.h,A(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 A(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),A(m,e.destroy(),10);case 10:xa(m,0);break;case 2:I(m),m.D(3)}})};
761
+ og["application/x-offline-manifest"]=function(){return new $s};function at(){}function bt(a){var b=Ts(a);b&&"manifest"==b.g?(a={uri:a,pf:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Ve(a)):a=b&&"segment"==b.g?ct(b.key(),b):Te(new P(2,1,9004,a));return a}
762
+ function ct(a,b){var c=new zs;return Ve(void 0).qa(function(){return c.init()}).qa(function(){return Ds(c,b.Sa(),b.Da())}).qa(function(d){return d.getSegments([b.key()])}).qa(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}N("shaka.offline.OfflineScheme",at);at.plugin=bt;df("offline",bt);function dt(a,b,c){var d,e,f,g,h,k;return M(function(l){switch(l.g){case 1:d=[];for(var m=[],n=r(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var t=!1,v=r(m),x=v.next();!x.done;x=v.next())if(x=x.value,et(x.info,p)){x.sessionIds.push(p.sessionId);t=!0;break}t||m.push({info:p,sessionIds:[p.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.D(4);break}g=f.value;h=ft(a,b,g);return A(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)}})}
763
+ function ft(a,b,c){var d,e;return M(function(f){switch(f.g){case 1:return d=new Bf({Qb:b,onError:function(){},qd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),E(f,2),d.configure(a),A(f,Jf(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 I(f),A(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return E(f,6),A(f,Sf(d),8);case 8:va(f,7);break;case 6:return I(f),A(f,d.destroy(),
764
+ 9);case 9:return f["return"]([]);case 7:return e=[],A(f,Promise.all(c.sessionIds.map(function(g){return M(function(h){if(1==h.g)return E(h,2),A(h,Tf(d,g),4);if(2!=h.g)return e.push(g),va(h,0);I(h);C(h)})})),10);case 10:return A(f,d.destroy(),11);case 11:return f["return"](e)}})}
765
+ function et(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&jc(a.audioCapabilities,b.audioCapabilities,c)&&jc(a.videoCapabilities,b.videoCapabilities,c)};function gt(a,b,c){var d=b.presentationTimeline.getDuration();b=ht(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function it(a,b){var c=Vs(new Us(a.Sa(),a.Da()),b),d=b.appMetadata||{};c=ht(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}}
766
+ function ht(a){var b=[],c=ue(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(le(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(me(c.value));return b};function jt(){this.g={}}function kt(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 lt(a,b){a.g[b.id]=b.bandwidth||2048}function mt(a,b){var c=a.g[b];null==c&&(c=0);return c};function nt(a){var b=this;if(a&&a.constructor!=T)throw new P(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Dc()):(this.h=Hk(),this.g=new cf);this.i=[];this.j=[];var c=!a;this.l=new of(function(){var d,e,f,g,h;return M(function(k){switch(k.g){case 1:return A(k,Promise.all(b.j.map(function(l){return js(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 A(k,Promise.all(e),3);case 3:if(!c){k.D(4);break}return A(k,b.g.destroy(),4);
767
+ case 4:b.h=null,b.g=null,C(k)}})})}function ot(){if(Sc())a:{var a=r(As.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=nt.prototype;q.destroy=function(){return this.l.destroy()};
768
768
  q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Ek(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(zb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return Jk(this.h,a)};q.getConfiguration=function(){var a=Hk();Jk(a,this.h,Hk());return a};q.Dc=function(){return this.g};
769
- q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new hs(this.g);this.j.push(f);b=ot(this,a,b||{},function(){var h;return M(function(k){if(1==k.g)return z(k,ng(a,d.g,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"](Gb(h))})},e,f);var g=new Se(b,function(){return is(f)});g["finally"](function(){ic(d.j,f)});g.then=function(h){zb("shaka.offline.Storage.store.then","Storage operations now return a shaka.util.AbortableOperation, rather than a promise. Please update to conform to this new API; you can use the |chain| method instead.");
770
- return g.promise.then(h)};return pt(this,g)};q.sg=function(){zb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
771
- function ot(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,y,w,x,D,C;return M(function(A){switch(A.g){case 1:return qt(),h=g=null,k=new ys,n=m=l=null,E(A,2,3),z(A,d(),5);case 5:return g=A.h,z(A,rt(a,b,g,e),6);case 6:p=A.h;st(a);t=!p.presentationTimeline.T()&&!p.presentationTimeline.Mb();if(!t)throw new P(2,9,9005,b);return z(A,tt(a,p,function(F){n=n||F},e),7);case 7:h=A.h;st(a);if(n)throw n;return z(A,ut(p,e),8);case 8:return z(A,k.init(),9);case 9:return st(a),z(A,As(k),10);case 10:return l=A.h,st(a),v=vt(h,
772
- p,b,c,e,f),y=v.Gg,w=v.Ce,z(A,l.Da.addManifests([y]),11);case 11:x=A.h;st(a);m=x[0];st(a);if(n)throw n;return z(A,wt(a,w,m,y,f,e,l.Da,p,h),12);case 12:return st(a),D=new Rs("manifest",l.path.Sa,l.path.Da,m),A["return"](ht(D,y));case 3:return wa(A),z(A,k.destroy(),13);case 13:if(!g){A.D(14);break}return z(A,g.stop(),14);case 14:if(!h){A.D(16);break}return z(A,h.destroy(),16);case 16:xa(A,0);break;case 2:C=I(A);if(null==m){A.D(18);break}return z(A,xt(m),18);case 18:throw n||C;}})}
773
- function wt(a,b,c,d,e,f,g,h,k){var l,m,n,p,t,v,y,w,x,D;return M(function(C){switch(C.g){case 1:l={};m=0;n=function(A,F){var G,H,K,J,L,W,Z;return M(function(ka){if(1==ka.g){G={};H=r(A);for(K=H.next();!K.done;G={Eb:G.Eb},K=H.next())G.Eb=K.value,J=es(G.Eb,f),L=G.Eb.i,W=G.Eb.h,Z=function(ja){return function(ea){var Ia,Ma,Da;return M(function(Qa){if(1==Qa.g)return z(Qa,g.addSegments([{data:ea}]),2);Ia=Qa.h;st(a);Ma=ja.Eb.g;Da=ds(Ma);l[Da]=Ia[0];m+=ea.byteLength;B(Qa)})}}(G),ks(e,G.Eb.groupId,J,L,W,Z);
774
- return z(ka,ms(e),2)}if(!F)return ka.D(0);st(a);yt(h,d,k,f);return z(ka,g.updateManifest(c,d),0)})};p=!1;E(C,2);if(!zt(h)||!p||At(h)){C.D(4);break}return z(C,n(b.filter(function(A){return A.h}),!0),5);case 5:return st(a),b=b.filter(function(A){return!A.h}),t=l,v=m,l={},m=0,z(C,Bt(g,c,d,t,v,function(){return st(a)}),6);case 6:st(a);case 4:if(p){C.D(7);break}return z(C,n(b,!1),8);case 8:return st(a),y=l,w=m,l={},m=0,z(C,Bt(g,c,d,y,w,function(){return st(a)}),9);case 9:st(a);case 7:va(C,0);break;case 2:return x=
775
- I(C),D=Object.values(l),z(C,g.removeSegments(D,function(){}),10);case 10:throw x;}})}function xt(a){var b,c,d,e;return M(function(f){switch(f.g){case 1:return b=new ys,z(f,b.init(),2);case 2:return z(f,As(b),3);case 3:return c=f.h,d=new Rs("manifest",c.path.Sa,c.path.Da,a),z(f,b.destroy(),4);case 4:return e=new mt,z(f,e.remove(d.toString()),0)}})}
776
- function Bt(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,y,w;return M(function(x){switch(x.g){case 1:g=!1;E(x,2);h=!0;k=r(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=r(m.segments),p=n.next();!p.done;p=n.next())t=p.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&&
777
- (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return z(x,a.updateManifest(b,c),4);case 4:g=!0;f();va(x,0);break;case 2:return y=I(x),z(x,xt(b),5);case 5:if(g){x.D(6);break}w=Object.values(d);return z(x,a.removeSegments(w,function(){}),6);case 6:throw y;}})}
778
- function ut(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,D,C,A,F,G,H,K,J,L,W,Z,ka,ja;return M(function(ea){switch(ea.g){case 1:return c={width:Infinity,height:Infinity},Zd(a,b.restrictions,c),z(ea,be(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Nd(a,g,h,e,f);k=r(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(le(m));n=r(a.textStreams);for(p=n.next();!p.done;p=n.next())t=
779
- p.value,d.push(me(t));v=r(a.imageStreams);for(y=v.next();!y.done;y=v.next())w=y.value,d.push(ne(w));return z(ea,b.offline.trackSelectionCallback(d),3);case 3:x=ea.h;D=a.presentationTimeline.getDuration();C=0;A=r(x);for(F=A.next();!F.done;F=A.next())G=F.value,H=G.bandwidth*D/8,C+=H;E(ea,4);return z(ea,b.offline.downloadSizeCallback(C),6);case 6:K=ea.h;if(!K)throw new P(2,9,9014);va(ea,5);break;case 4:J=I(ea);if(J instanceof P)throw J;throw new P(2,9,9015);case 5:L=new Set;W=new Set;Z=new Set;ka=r(x);
780
- for(F=ka.next();!F.done;F=ka.next())ja=F.value,"variant"==ja.type&&L.add(ja.id),"text"==ja.type&&W.add(ja.id),"image"==ja.type&&Z.add(ja.id);a.variants=a.variants.filter(function(Ia){return L.has(Ia.id)});a.textStreams=a.textStreams.filter(function(Ia){return W.has(Ia.id)});a.imageStreams=a.imageStreams.filter(function(Ia){return Z.has(Ia.id)});Ct(a);B(ea)}})}
781
- function vt(a,b,c,d,e,f){var g=ft(c,b,d),h=e.offline.progressCallback;js(f,function(t,v){g.size=v;h(g,t)},function(t,v){k&&e.offline.usePersistentLicense&&l==v&&Rf(a,"cenc",t)});var k=zt(b)&&!At(b),l=null;k&&(l=Dt.get(a.g.keySystem));for(var m=new it,n=r(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=r(b.imageStreams);for(p=n.next();!p.done;p=n.next())kt(m,p.value);p=r(b.variants);for(n=p.next();!n.done;n=p.next())jt(m,n.value);m=Et(f,m,b);f=m.streams;m=m.Ce;p=a.g;n=e.offline.usePersistentLicense;
782
- p&&n&&(p.initData=[]);return{Gg:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Cc(),streams:f,sessionIds:n?Xf(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0},Ce:m}}function zt(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
783
- function At(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 yt(a,b,c,d){b.expiration=c.Cc();c=Xf(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(zt(a)&&d.offline.usePersistentLicense&&!c.length)throw new P(2,9,9007);}q.remove=function(a){return Ft(this,Gt(this,a))};
784
- function Gt(a,b){var c,d,e,f,g,h;return M(function(k){switch(k.g){case 1:qt();c=Ss(b);if(null==c||"manifest"!=c.g)throw new P(2,9,9004,b);d=c;e=new ys;ua(k);return z(k,e.init(),4);case 4:return z(k,Cs(e,d.Sa(),d.Da()),5);case 5:return f=k.h,z(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],z(k,Promise.all([Ht(a,h,e),It(f,d,h)]),2);case 2:return wa(k),z(k,e.destroy(),8);case 8:xa(k,0)}})}
785
- function Jt(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:yd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:yd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Ht(a,b,c){return M(function(d){return z(d,Kt(a.g,a.h.drm,c,b),0)})}
786
- function It(a,b,c){function d(){}var e=Lt(c);ht(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Ug=function(){return Ft(this,Mt(this))};
787
- function Mt(a){var b,c,d,e,f,g,h,k,l,m;return M(function(n){switch(n.g){case 1:return qt(),b=a.g,c=a.h.drm,d=new ys,e=!1,ua(n),z(n,d.init(),4);case 4:f=[],Ds(d,function(p){return f.push(p)}),g=r(f),h=g.next();case 5:if(h.done){n.D(2);break}k=h.value;return z(n,k.getAll(),8);case 8:return l=n.h,z(n,ct(c,b,l),9);case 9:return m=n.h,z(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.D(5);break;case 2:return wa(n),z(n,d.destroy(),11);case 11:xa(n,3);break;case 3:return n["return"](!e)}})}
788
- q.list=function(){return Ft(this,Nt())};function Nt(){var a,b,c;return M(function(d){switch(d.g){case 1:return qt(),a=[],b=new ys,ua(d),z(d,b.init(),4);case 4:return c=Promise.resolve(),Bs(b,function(e,f){c=c.then(function(){var g;return M(function(h){if(1==h.g)return z(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=ht(new Rs("manifest",e.Sa,e.Da,l),k);a.push(m)});B(h)})})}),z(d,c,2);case 2:return wa(d),z(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d["return"](a)}})}
789
- function rt(a,b,c,d){var e,f,g,h,k;return M(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),st(a),z(l,c.start(b,
790
- g),2);if(3!=l.g)return h=l.h,st(a),k=Ot(h),z(l,Promise.all(db(k,function(m){return m.createSegmentIndex()})),3);st(a);if(e)throw e;return l["return"](h)})}function tt(a,b,c,d){var e;return M(function(f){switch(f.g){case 1:return e=new Bf({Pb:a.g,onError:c,qd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),z(f,Gf(e,b.variants,d.offline.usePersistentLicense),2);case 2:return z(f,Sf(e),3);case 3:return z(f,Qf(e),4);case 4:return f["return"](e)}})}
791
- function Et(a,b,c){var d=new Map,e=Ot(c),f=new Map;e=r(e);for(var g=e.next();!g.done;g=e.next()){g=g.value;var h=Pt(a,b,c,g,d);f.set(g.id,h)}a=r(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&f.get(b.audio.id).variantIds.push(b.id),b.video&&f.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(f.values()),Ce:Array.from(d.values())}}
792
- function Pt(a,b,c,d,e){var f={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
793
- tilesLayout:d.tilesLayout};Qt(d,c.presentationTimeline.ob(),function(g){var h=ds(g),k=void 0;if(!e.has(h)){var l=g.endTime-g.startTime;l=lt(b,d.id)*l;l=gs(a.g,l);e.set(h,new cs(g,l,d.id,!1))}g.g&&(k=ds(g.g),e.has(k)||(l=.5*lt(b,d.id),l=gs(a.g,l),e.set(k,new cs(g.g,l,d.id,!0))));f.segments.push({pendingInitSegmentRefId:k,initSegmentKey:k?0:null,startTime:g.startTime,endTime:g.endTime,appendWindowStart:g.appendWindowStart,appendWindowEnd:g.appendWindowEnd,timestampOffset:g.timestampOffset,tilesLayout:g.tilesLayout,
794
- pendingSegmentRefId:h,dataKey:0})});return f}function Qt(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 st(a){if(a.l.g)throw new P(2,9,7001);}function qt(){if(!nt())throw new P(2,9,9E3);}function Ft(a,b){return M(function(c){if(1==c.g)return a.i.push(b),ua(c),z(c,b,4);if(2!=c.g)return c["return"](c.h);wa(c);ic(a.i,b);return xa(c,0)})}function pt(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){ic(a.i,c)})}
795
- function Lt(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)}
796
- function Kt(a,b,c,d){var e,f,g;return M(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=Es(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Jt(d,!1),videoCapabilities:Jt(d,!0)}});return z(h,ct(b,a,f),2)}return 3!=h.g?(g=h.h,z(h,e.remove(g),3)):z(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
797
- function Ot(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}
798
- function Ct(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());}N("shaka.offline.Storage",mt);mt.deleteAll=function(){var a;return M(function(b){return 1==b.g?(a=new ys,ua(b),z(b,Fs(a),2)):5!=b.g?(wa(b),z(b,a.destroy(),5)):xa(b,0)})};mt.prototype.list=mt.prototype.list;
799
- mt.prototype.removeEmeSessions=mt.prototype.Ug;mt.prototype.remove=mt.prototype.remove;mt.prototype.getStoreInProgress=mt.prototype.sg;mt.prototype.store=mt.prototype.store;mt.prototype.getNetworkingEngine=mt.prototype.Dc;mt.prototype.getConfiguration=mt.prototype.getConfiguration;mt.prototype.configure=mt.prototype.configure;mt.prototype.destroy=mt.prototype.destroy;mt.support=nt;
800
- var Dt=(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");
801
- Nm.offline=nt;function Rt(){}function St(){for(var a=r(Tt),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Mf()}catch(c){Sa("Error installing polyfill!",c)}}}function Ut(a,b){for(var c={priority:b||0,Mf:a},d=0;d<Tt.length;d++)if(Tt[d].priority<c.priority){Tt.splice(d,0,c);return}Tt.push(c)}N("shaka.polyfill",Rt);Rt.register=Ut;Rt.installAll=St;var Tt=[];function Vt(){}function Wt(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=r(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Xt(b.value)}function Xt(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)}})}Rt.Aria=Vt;Vt.install=Wt;Ut(Wt);function Yt(){}function Zt(){$t()}Rt.EncryptionScheme=Yt;Yt.install=Zt;Ut(Zt,-2);function au(){}
802
- 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}}),
803
- 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)}}
804
- 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)}Rt.Fullscreen=au;au.install=bu;Ut(bu);function du(){}function eu(){}Rt.MathRound=du;du.install=eu;Ut(eu);function fu(){}function gu(){if($c()||ad()||bd()||Xc("PlayStation 5")||Zc()||Yc()||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),hu=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=iu}
805
- function iu(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,y,w;return M(function(x){switch(x.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return x["return"](b);if("media-source"==a.type){if(!Sc()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return x["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=Uc(g),!h)||a.audio&&(k=a.audio.contentType,
806
- l=Uc(k),!l))return x["return"](b)}else return x["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,x["return"](Promise.resolve(b));m=a.keySystemConfiguration;n=[];p=[];m.audio&&(t={robustness:m.audio.robustness||"",contentType:a.audio.contentType},n.push(t));m.video&&(v={robustness:m.video.robustness||"",contentType:a.video.contentType},p.push(v));y={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
807
- n.length&&(y.audioCapabilities=n);p.length&&(y.videoCapabilities=p);E(x,3);return z(x,navigator.requestMediaKeySystemAccess(m.keySystem,[y]),5);case 5:w=x.h;va(x,4);break;case 3:I(x);case 4:w&&(b.supported=!0,b.keySystemAccess=w);case 2:return x["return"](b)}})}Rt.MediaCapabilities=fu;fu.install=gu;var hu=null;fu.originalMcap=hu;Ut(gu,-1);function ju(){}function ku(){var a=cd();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?lu():a?(mu(),12>=a?(nu(),ou()):nu()):(Xc("Tizen 2")||Xc("Tizen 3")||Xc("Tizen 4"))&&pu());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&qu()}
808
- function nu(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Fa.apply(0,arguments));b.abort=function(){};return b}}function ou(){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].toLowerCase()?!1:a(b)}}
809
- function pu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Bd(b)[0]&&a(b)}}function lu(){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)}}
810
- function qu(){var a=MediaSource.isTypeSupported;Zc()||(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)})}Rt.MediaSource=ju;ju.install=ku;Ut(ku);function ru(){}function su(){screen.orientation||void 0!=window.orientation&&tu()}function tu(){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 uu;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new O("change");b.dispatchEvent(c)})}Rt.Orientation=ru;
811
- ru.install=su;function uu(){cb.call(this);this.type="";this.angle=0}u(uu,cb);
812
- uu.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)};
813
- uu.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Ut(su);function vu(){}function wu(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=xu,window.MediaKeys=yu,window.MediaKeySystemAccess=zu,navigator.requestMediaKeySystemAccess=Au)}function Au(a,b){try{var c=new zu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
814
- function xu(a){var b=this.mediaKeys;b&&b!=a&&Bu(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Bu(a,this):Promise.resolve()}function Cu(a){a=Ic(a.initData);if(Lc(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=hd(a.subarray(4),!0);a=kd(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Jc(a);this.dispatchEvent(b)}Rt.PatchedMediaKeysApple=vu;vu.install=wu;
815
- function zu(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;if("required"==e.persistentState)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=r(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
769
+ q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new is(this.g);this.j.push(f);b=pt(this,a,b||{},function(){var h;return M(function(k){if(1==k.g)return A(k,ng(a,d.g,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"](Gb(h))})},e,f);var g=new Se(b,function(){return js(f)});g["finally"](function(){ic(d.j,f)});g.then=function(h){zb("shaka.offline.Storage.store.then","Storage operations now return a shaka.util.AbortableOperation, rather than a promise. Please update to conform to this new API; you can use the |chain| method instead.");
770
+ return g.promise.then(h)};return qt(this,g)};q.sg=function(){zb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
771
+ function pt(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,x,y,w,D,z;return M(function(B){switch(B.g){case 1:return rt(),h=g=null,k=new zs,n=m=l=null,E(B,2,3),A(B,d(),5);case 5:return g=B.h,A(B,st(a,b,g,e),6);case 6:p=B.h;tt(a);t=!p.presentationTimeline.T()&&!p.presentationTimeline.Nb();if(!t)throw new P(2,9,9005,b);return A(B,ut(a,p,function(F){n=n||F},e),7);case 7:h=B.h;tt(a);if(n)throw n;return A(B,vt(p,e),8);case 8:return A(B,k.init(),9);case 9:return tt(a),A(B,Bs(k),10);case 10:return l=B.h,tt(a),v=wt(h,
772
+ p,b,c,e,f),x=v.Gg,y=v.Ce,A(B,l.Da.addManifests([x]),11);case 11:w=B.h;tt(a);m=w[0];tt(a);if(n)throw n;return A(B,xt(a,y,m,x,f,e,l.Da,p,h),12);case 12:return tt(a),D=new Ss("manifest",l.path.Sa,l.path.Da,m),B["return"](it(D,x));case 3:return wa(B),A(B,k.destroy(),13);case 13:if(!g){B.D(14);break}return A(B,g.stop(),14);case 14:if(!h){B.D(16);break}return A(B,h.destroy(),16);case 16:xa(B,0);break;case 2:z=I(B);if(null==m){B.D(18);break}return A(B,yt(m),18);case 18:throw n||z;}})}
773
+ function xt(a,b,c,d,e,f,g,h,k){var l,m,n,p,t,v,x,y,w,D;return M(function(z){switch(z.g){case 1:l={};m=0;n=function(B,F){var G,H,J,K,L,W,Z;return M(function(ka){if(1==ka.g){G={};H=r(B);for(J=H.next();!J.done;G={Fb:G.Fb},J=H.next())G.Fb=J.value,K=fs(G.Fb,f),L=G.Fb.i,W=G.Fb.h,Z=function(ja){return function(ea){var Ia,Ma,Da;return M(function(Qa){if(1==Qa.g)return A(Qa,g.addSegments([{data:ea}]),2);Ia=Qa.h;tt(a);Ma=ja.Fb.g;Da=es(Ma);l[Da]=Ia[0];m+=ea.byteLength;C(Qa)})}}(G),ls(e,G.Fb.groupId,K,L,W,Z);
774
+ return A(ka,ns(e),2)}if(!F)return ka.D(0);tt(a);zt(h,d,k,f);return A(ka,g.updateManifest(c,d),0)})};p=!1;E(z,2);if(!At(h)||!p||Bt(h)){z.D(4);break}return A(z,n(b.filter(function(B){return B.h}),!0),5);case 5:return tt(a),b=b.filter(function(B){return!B.h}),t=l,v=m,l={},m=0,A(z,Ct(g,c,d,t,v,function(){return tt(a)}),6);case 6:tt(a);case 4:if(p){z.D(7);break}return A(z,n(b,!1),8);case 8:return tt(a),x=l,y=m,l={},m=0,A(z,Ct(g,c,d,x,y,function(){return tt(a)}),9);case 9:tt(a);case 7:va(z,0);break;case 2:return w=
775
+ I(z),D=Object.values(l),A(z,g.removeSegments(D,function(){}),10);case 10:throw w;}})}function yt(a){var b,c,d,e;return M(function(f){switch(f.g){case 1:return b=new zs,A(f,b.init(),2);case 2:return A(f,Bs(b),3);case 3:return c=f.h,d=new Ss("manifest",c.path.Sa,c.path.Da,a),A(f,b.destroy(),4);case 4:return e=new nt,A(f,e.remove(d.toString()),0)}})}
776
+ function Ct(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,x,y;return M(function(w){switch(w.g){case 1:g=!1;E(w,2);h=!0;k=r(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=r(m.segments),p=n.next();!p.done;p=n.next())t=p.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&&
777
+ (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return A(w,a.updateManifest(b,c),4);case 4:g=!0;f();va(w,0);break;case 2:return x=I(w),A(w,yt(b),5);case 5:if(g){w.D(6);break}y=Object.values(d);return A(w,a.removeSegments(y,function(){}),6);case 6:throw x;}})}
778
+ function vt(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,x,y,w,D,z,B,F,G,H,J,K,L,W,Z,ka,ja;return M(function(ea){switch(ea.g){case 1:return c={width:Infinity,height:Infinity},Zd(a,b.restrictions,c),A(ea,be(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Nd(a,g,h,e,f);k=r(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(le(m));n=r(a.textStreams);for(p=n.next();!p.done;p=n.next())t=
779
+ p.value,d.push(me(t));v=r(a.imageStreams);for(x=v.next();!x.done;x=v.next())y=x.value,d.push(ne(y));return A(ea,b.offline.trackSelectionCallback(d),3);case 3:w=ea.h;D=a.presentationTimeline.getDuration();z=0;B=r(w);for(F=B.next();!F.done;F=B.next())G=F.value,H=G.bandwidth*D/8,z+=H;E(ea,4);return A(ea,b.offline.downloadSizeCallback(z),6);case 6:J=ea.h;if(!J)throw new P(2,9,9014);va(ea,5);break;case 4:K=I(ea);if(K instanceof P)throw K;throw new P(2,9,9015);case 5:L=new Set;W=new Set;Z=new Set;ka=r(w);
780
+ for(F=ka.next();!F.done;F=ka.next())ja=F.value,"variant"==ja.type&&L.add(ja.id),"text"==ja.type&&W.add(ja.id),"image"==ja.type&&Z.add(ja.id);a.variants=a.variants.filter(function(Ia){return L.has(Ia.id)});a.textStreams=a.textStreams.filter(function(Ia){return W.has(Ia.id)});a.imageStreams=a.imageStreams.filter(function(Ia){return Z.has(Ia.id)});Dt(a);C(ea)}})}
781
+ function wt(a,b,c,d,e,f){var g=gt(c,b,d),h=e.offline.progressCallback;ks(f,function(t,v){g.size=v;h(g,t)},function(t,v){k&&e.offline.usePersistentLicense&&l==v&&Rf(a,"cenc",t)});var k=At(b)&&!Bt(b),l=null;k&&(l=Et.get(a.g.keySystem));for(var m=new jt,n=r(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=r(b.imageStreams);for(p=n.next();!p.done;p=n.next())lt(m,p.value);p=r(b.variants);for(n=p.next();!n.done;n=p.next())kt(m,n.value);m=Ft(f,m,b);f=m.streams;m=m.Ce;p=a.g;n=e.offline.usePersistentLicense;
782
+ p&&n&&(p.initData=[]);return{Gg:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Cc(),streams:f,sessionIds:n?Xf(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0},Ce:m}}function At(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
783
+ function Bt(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 zt(a,b,c,d){b.expiration=c.Cc();c=Xf(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(At(a)&&d.offline.usePersistentLicense&&!c.length)throw new P(2,9,9007);}q.remove=function(a){return Gt(this,Ht(this,a))};
784
+ function Ht(a,b){var c,d,e,f,g,h;return M(function(k){switch(k.g){case 1:rt();c=Ts(b);if(null==c||"manifest"!=c.g)throw new P(2,9,9004,b);d=c;e=new zs;ua(k);return A(k,e.init(),4);case 4:return A(k,Ds(e,d.Sa(),d.Da()),5);case 5:return f=k.h,A(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],A(k,Promise.all([It(a,h,e),Jt(f,d,h)]),2);case 2:return wa(k),A(k,e.destroy(),8);case 8:xa(k,0)}})}
785
+ function Kt(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:yd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:yd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function It(a,b,c){return M(function(d){return A(d,Lt(a.g,a.h.drm,c,b),0)})}
786
+ function Jt(a,b,c){function d(){}var e=Mt(c);it(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Ug=function(){return Gt(this,Nt(this))};
787
+ function Nt(a){var b,c,d,e,f,g,h,k,l,m;return M(function(n){switch(n.g){case 1:return rt(),b=a.g,c=a.h.drm,d=new zs,e=!1,ua(n),A(n,d.init(),4);case 4:f=[],Es(d,function(p){return f.push(p)}),g=r(f),h=g.next();case 5:if(h.done){n.D(2);break}k=h.value;return A(n,k.getAll(),8);case 8:return l=n.h,A(n,dt(c,b,l),9);case 9:return m=n.h,A(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.D(5);break;case 2:return wa(n),A(n,d.destroy(),11);case 11:xa(n,3);break;case 3:return n["return"](!e)}})}
788
+ q.list=function(){return Gt(this,Ot())};function Ot(){var a,b,c;return M(function(d){switch(d.g){case 1:return rt(),a=[],b=new zs,ua(d),A(d,b.init(),4);case 4:return c=Promise.resolve(),Cs(b,function(e,f){c=c.then(function(){var g;return M(function(h){if(1==h.g)return A(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=it(new Ss("manifest",e.Sa,e.Da,l),k);a.push(m)});C(h)})})}),A(d,c,2);case 2:return wa(d),A(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d["return"](a)}})}
789
+ function st(a,b,c,d){var e,f,g,h,k;return M(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),tt(a),A(l,c.start(b,
790
+ g),2);if(3!=l.g)return h=l.h,tt(a),k=Pt(h),A(l,Promise.all(db(k,function(m){return m.createSegmentIndex()})),3);tt(a);if(e)throw e;return l["return"](h)})}function ut(a,b,c,d){var e;return M(function(f){switch(f.g){case 1:return e=new Bf({Qb:a.g,onError:c,qd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),A(f,Gf(e,b.variants,d.offline.usePersistentLicense),2);case 2:return A(f,Sf(e),3);case 3:return A(f,Qf(e),4);case 4:return f["return"](e)}})}
791
+ function Ft(a,b,c){var d=new Map,e=Pt(c),f=new Map;e=r(e);for(var g=e.next();!g.done;g=e.next()){g=g.value;var h=Qt(a,b,c,g,d);f.set(g.id,h)}a=r(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&f.get(b.audio.id).variantIds.push(b.id),b.video&&f.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(f.values()),Ce:Array.from(d.values())}}
792
+ function Qt(a,b,c,d,e){var f={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
793
+ tilesLayout:d.tilesLayout};Rt(d,c.presentationTimeline.ob(),function(g){var h=es(g),k=void 0;if(!e.has(h)){var l=g.endTime-g.startTime;l=mt(b,d.id)*l;l=hs(a.g,l);e.set(h,new ds(g,l,d.id,!1))}g.g&&(k=es(g.g),e.has(k)||(l=.5*mt(b,d.id),l=hs(a.g,l),e.set(k,new ds(g.g,l,d.id,!0))));f.segments.push({pendingInitSegmentRefId:k,initSegmentKey:k?0:null,startTime:g.startTime,endTime:g.endTime,appendWindowStart:g.appendWindowStart,appendWindowEnd:g.appendWindowEnd,timestampOffset:g.timestampOffset,tilesLayout:g.tilesLayout,
794
+ pendingSegmentRefId:h,dataKey:0})});return f}function Rt(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 tt(a){if(a.l.g)throw new P(2,9,7001);}function rt(){if(!ot())throw new P(2,9,9E3);}function Gt(a,b){return M(function(c){if(1==c.g)return a.i.push(b),ua(c),A(c,b,4);if(2!=c.g)return c["return"](c.h);wa(c);ic(a.i,b);return xa(c,0)})}function qt(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){ic(a.i,c)})}
795
+ function Mt(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)}
796
+ function Lt(a,b,c,d){var e,f,g;return M(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=Fs(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Kt(d,!1),videoCapabilities:Kt(d,!0)}});return A(h,dt(b,a,f),2)}return 3!=h.g?(g=h.h,A(h,e.remove(g),3)):A(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
797
+ function Pt(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}
798
+ function Dt(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());}N("shaka.offline.Storage",nt);nt.deleteAll=function(){var a;return M(function(b){return 1==b.g?(a=new zs,ua(b),A(b,Gs(a),2)):5!=b.g?(wa(b),A(b,a.destroy(),5)):xa(b,0)})};nt.prototype.list=nt.prototype.list;
799
+ nt.prototype.removeEmeSessions=nt.prototype.Ug;nt.prototype.remove=nt.prototype.remove;nt.prototype.getStoreInProgress=nt.prototype.sg;nt.prototype.store=nt.prototype.store;nt.prototype.getNetworkingEngine=nt.prototype.Dc;nt.prototype.getConfiguration=nt.prototype.getConfiguration;nt.prototype.configure=nt.prototype.configure;nt.prototype.destroy=nt.prototype.destroy;nt.support=ot;
800
+ var Et=(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");
801
+ Nm.offline=ot;function St(){}function Tt(){for(var a=r(Ut),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Mf()}catch(c){Sa("Error installing polyfill!",c)}}}function Vt(a,b){for(var c={priority:b||0,Mf:a},d=0;d<Ut.length;d++)if(Ut[d].priority<c.priority){Ut.splice(d,0,c);return}Ut.push(c)}N("shaka.polyfill",St);St.register=Vt;St.installAll=Tt;var Ut=[];function Wt(){}function Xt(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=r(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Yt(b.value)}function Yt(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)}})}St.Aria=Wt;Wt.install=Xt;Vt(Xt);function Zt(){}function $t(){au()}St.EncryptionScheme=Zt;Zt.install=$t;Vt($t,-2);function bu(){}
802
+ function cu(){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}}),
803
+ Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",du);document.addEventListener("webkitfullscreenerror",du);document.addEventListener("mozfullscreenchange",du);document.addEventListener("mozfullscreenerror",du);document.addEventListener("MSFullscreenChange",du);document.addEventListener("MSFullscreenError",du)}}
804
+ function du(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)}St.Fullscreen=bu;bu.install=cu;Vt(cu);function eu(){}function fu(){}St.MathRound=eu;eu.install=fu;Vt(fu);function gu(){}function hu(){if($c()||ad()||bd()||Xc("PlayStation 5")||Zc()||Yc()||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),iu=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=ju}
805
+ function ju(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,x,y;return M(function(w){switch(w.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return w["return"](b);if("media-source"==a.type){if(!Sc()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return w["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=Uc(g),!h)||a.audio&&(k=a.audio.contentType,
806
+ l=Uc(k),!l))return w["return"](b)}else return w["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,w["return"](Promise.resolve(b));m=a.keySystemConfiguration;n=[];p=[];m.audio&&(t={robustness:m.audio.robustness||"",contentType:a.audio.contentType},n.push(t));m.video&&(v={robustness:m.video.robustness||"",contentType:a.video.contentType},p.push(v));x={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
807
+ n.length&&(x.audioCapabilities=n);p.length&&(x.videoCapabilities=p);E(w,3);return A(w,navigator.requestMediaKeySystemAccess(m.keySystem,[x]),5);case 5:y=w.h;va(w,4);break;case 3:I(w);case 4:y&&(b.supported=!0,b.keySystemAccess=y);case 2:return w["return"](b)}})}St.MediaCapabilities=gu;gu.install=hu;var iu=null;gu.originalMcap=iu;Vt(hu,-1);function ku(){}function lu(){var a=cd();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?mu():a?(nu(),12>=a?(ou(),pu()):ou()):(Xc("Tizen 2")||Xc("Tizen 3")||Xc("Tizen 4"))&&qu());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&ru()}
808
+ function ou(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Fa.apply(0,arguments));b.abort=function(){};return b}}function pu(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function nu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
809
+ function qu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Bd(b)[0]&&a(b)}}function mu(){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)}}
810
+ function ru(){var a=MediaSource.isTypeSupported;Zc()||(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)})}St.MediaSource=ku;ku.install=lu;Vt(lu);function su(){}function tu(){screen.orientation||void 0!=window.orientation&&uu()}function uu(){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 vu;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new O("change");b.dispatchEvent(c)})}St.Orientation=su;
811
+ su.install=tu;function vu(){cb.call(this);this.type="";this.angle=0}u(vu,cb);
812
+ vu.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)};
813
+ vu.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Vt(tu);function wu(){}function xu(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=yu,window.MediaKeys=zu,window.MediaKeySystemAccess=Au,navigator.requestMediaKeySystemAccess=Bu)}function Bu(a,b){try{var c=new Au(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
814
+ function yu(a){var b=this.mediaKeys;b&&b!=a&&Cu(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Cu(a,this):Promise.resolve()}function Du(a){a=Ic(a.initData);if(Lc(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=hd(a.subarray(4),!0);a=kd(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Jc(a);this.dispatchEvent(b)}St.PatchedMediaKeysApple=wu;wu.install=xu;
815
+ function Au(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;if("required"==e.persistentState)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=r(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
816
816
  k.contentType.split(";")[0])&&(d.audioCapabilities.push(k),g=!0));if(e.videoCapabilities)for(e=r(e.videoCapabilities),k=e.next();!k.done;k=e.next())h=k.value,h.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,h.contentType.split(";")[0])&&(d.videoCapabilities.push(h),g=!0));f||(g=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));d=g?d:null}if(d){this.g=d;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
817
- zu.prototype.createMediaKeys=function(){var a=new yu(this.keySystem);return Promise.resolve(a)};zu.prototype.getConfiguration=function(){return this.g};function yu(a){this.h=new WebKitMediaKeys(a);this.g=new qf}yu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Du(this.h,a)};yu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
818
- function Bu(a,b){a.g.rb();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",Cu);try{return zi(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function Du(a){cb.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new qf;this.sessionId="";this.expiration=NaN;this.closed=new Pc;this.keyStatuses=new Eu}u(Du,cb);q=Du.prototype;
819
- q.generateRequest=function(a,b){var c=this;this.g=new Pc;try{var d=this.l.createSession("video/mp4",Ic(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"webkitkeymessage",function(e){c.g&&(c.g.resolve(),c.g=null);e=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Jc(e.message));e=new O("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.h&&(Fu(c,"usable"),c.h.resolve(),c.h=null)});this.j.o(d,"webkitkeyerror",function(){var e=
820
- Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.g)c.g.reject(e),c.g=null;else if(null!=c.h)c.h.reject(e),c.h=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Fu(c,"output-not-allowed");break;default:Fu(c,"internal-error")}});Fu(this,"status-pending")}catch(e){this.g.reject(e)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
821
- q.update=function(a){this.h=new Pc;try{this.i.update(Ic(a))}catch(b){this.h.reject(b)}return this.h};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.rb()}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 Fu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new O("keystatuseschange");a.dispatchEvent(c)}
822
- function Eu(){this.size=0;this.g=void 0}q=Eu.prototype;q.forEach=function(a){this.g&&a(this.g,lg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=lg.value();return this.g&&Gc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Ut(wu);function Gu(){}function Hu(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=Iu,window.MediaKeySystemAccess=Ju,navigator.requestMediaKeySystemAccess=Ku,HTMLMediaElement.prototype.setMediaKeys=Lu)}function Ku(a,b){try{var c=new Ju(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
823
- function Mu(a){if(a.initData){var b=new CustomEvent("encrypted");b.initDataType="cenc";b.initData=Jc(jo(a.initData));this.dispatchEvent(b)}}Rt.PatchedMediaKeysMs=Gu;Gu.install=Hu;
824
- function Ju(a,b){this.keySystem=a;for(var c=!1,d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},g=!1;if(e.audioCapabilities)for(var h=r(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.audioCapabilities.push(k),c=
817
+ Au.prototype.createMediaKeys=function(){var a=new zu(this.keySystem);return Promise.resolve(a)};Au.prototype.getConfiguration=function(){return this.g};function zu(a){this.h=new WebKitMediaKeys(a);this.g=new qf}zu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Eu(this.h,a)};zu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
818
+ function Cu(a,b){a.g.rb();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",Du);try{return zi(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function Eu(a){cb.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new qf;this.sessionId="";this.expiration=NaN;this.closed=new Pc;this.keyStatuses=new Fu}u(Eu,cb);q=Eu.prototype;
819
+ q.generateRequest=function(a,b){var c=this;this.g=new Pc;try{var d=this.l.createSession("video/mp4",Ic(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"webkitkeymessage",function(e){c.g&&(c.g.resolve(),c.g=null);e=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Jc(e.message));e=new O("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.h&&(Gu(c,"usable"),c.h.resolve(),c.h=null)});this.j.o(d,"webkitkeyerror",function(){var e=
820
+ Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.g)c.g.reject(e),c.g=null;else if(null!=c.h)c.h.reject(e),c.h=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Gu(c,"output-not-allowed");break;default:Gu(c,"internal-error")}});Gu(this,"status-pending")}catch(e){this.g.reject(e)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
821
+ q.update=function(a){this.h=new Pc;try{this.i.update(Ic(a))}catch(b){this.h.reject(b)}return this.h};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.rb()}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 Gu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new O("keystatuseschange");a.dispatchEvent(c)}
822
+ function Fu(){this.size=0;this.g=void 0}q=Fu.prototype;q.forEach=function(a){this.g&&a(this.g,lg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=lg.value();return this.g&&Gc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Vt(xu);function Hu(){}function Iu(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=Ju,window.MediaKeySystemAccess=Ku,navigator.requestMediaKeySystemAccess=Lu,HTMLMediaElement.prototype.setMediaKeys=Mu)}function Lu(a,b){try{var c=new Ku(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
823
+ function Nu(a){if(a.initData){var b=new CustomEvent("encrypted");b.initDataType="cenc";b.initData=Jc(ko(a.initData));this.dispatchEvent(b)}}St.PatchedMediaKeysMs=Hu;Hu.install=Iu;
824
+ function Ku(a,b){this.keySystem=a;for(var c=!1,d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},g=!1;if(e.audioCapabilities)for(var h=r(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.audioCapabilities.push(k),c=
825
825
  !0));if(e.videoCapabilities)for(h=r(e.videoCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.videoCapabilities.push(k),c=!0));g||(c=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==e.persistentState&&(c=!1);if(c){this.g=f;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
826
- Ju.prototype.createMediaKeys=function(){var a=new Iu(this.keySystem);return Promise.resolve(a)};Ju.prototype.getConfiguration=function(){return this.g};function Lu(a){var b=this.mediaKeys;b&&b!=a&&Nu(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Nu(a,this):Promise.resolve()}function Iu(a){this.h=new MSMediaKeys(a);this.g=new qf}
827
- Iu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Ou(this.h,a)};Iu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function Nu(a,b){a.g.rb();if(!b)return Promise.resolve();a.g.o(b,"msneedkey",Mu);try{return zi(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.msSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
828
- function Ou(a){cb.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new qf;this.sessionId="";this.expiration=NaN;this.closed=new Pc;this.keyStatuses=new Pu}u(Ou,cb);q=Ou.prototype;
829
- q.generateRequest=function(a,b){var c=this;this.g=new Pc;try{this.i=this.l.createSession("video/mp4",Ic(b),null),this.j.o(this.i,"mskeymessage",function(d){c.g&&(c.g.resolve(),c.g=null);d=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Jc(d.message));d=new O("message",d);c.dispatchEvent(d)}),this.j.o(this.i,"mskeyadded",function(){c.g?(Qu(c,"usable"),c.g.resolve(),c.g=null):c.h&&(Qu(c,"usable"),c.h.resolve(),c.h=null)}),this.j.o(this.i,"mskeyerror",
830
- function(){var d=Error("EME PatchedMediaKeysMs key error");d.errorCode=c.i.error;if(null!=c.g)c.g.reject(d),c.g=null;else if(null!=c.h)c.h.reject(d),c.h=null;else switch(c.i.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Qu(c,"output-not-allowed");break;default:Qu(c,"internal-error")}}),Qu(this,"status-pending")}catch(d){this.g.reject(d)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
831
- q.update=function(a){this.h=new Pc;try{this.i.update(Ic(a))}catch(b){this.h.reject(b)}return this.h};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.rb()}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 Qu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new O("keystatuseschange");a.dispatchEvent(c)}
832
- function Pu(){this.size=0;this.g=void 0}q=Pu.prototype;q.forEach=function(a){this.g&&a(this.g,lg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=lg.value();return this.g&&Gc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Ut(Hu);function Ru(){}function Su(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Tu,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Uu,window.MediaKeys=Vu,window.MediaKeySystemAccess=Wu)}function Tu(){return Promise.reject(Error("The key system specified is not supported."))}
833
- function Uu(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Rt.PatchedMediaKeysNop=Ru;Ru.install=Su;function Vu(){throw new TypeError("Illegal constructor.");}Vu.prototype.createSession=function(){};Vu.prototype.setServerCertificate=function(){};function Wu(){this.keySystem="";throw new TypeError("Illegal constructor.");}Wu.prototype.getConfiguration=function(){};Wu.prototype.createMediaKeys=function(){};Ut(Su,-10);function Xu(){}function Yu(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Zu="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=$u;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=av;window.MediaKeys=bv;window.MediaKeySystemAccess=cv}}
834
- function dv(a){var b=Zu;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function $u(a,b){try{var c=new cv(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function av(a){var b=this.mediaKeys;b&&b!=a&&ev(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&ev(a,this);return Promise.resolve()}Rt.PatchedMediaKeysWebkit=Xu;Xu.install=Yu;
835
- function cv(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");for(var f=r(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=r(g.audioCapabilities),
826
+ Ku.prototype.createMediaKeys=function(){var a=new Ju(this.keySystem);return Promise.resolve(a)};Ku.prototype.getConfiguration=function(){return this.g};function Mu(a){var b=this.mediaKeys;b&&b!=a&&Ou(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Ou(a,this):Promise.resolve()}function Ju(a){this.h=new MSMediaKeys(a);this.g=new qf}
827
+ Ju.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Pu(this.h,a)};Ju.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function Ou(a,b){a.g.rb();if(!b)return Promise.resolve();a.g.o(b,"msneedkey",Nu);try{return zi(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.msSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
828
+ function Pu(a){cb.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new qf;this.sessionId="";this.expiration=NaN;this.closed=new Pc;this.keyStatuses=new Qu}u(Pu,cb);q=Pu.prototype;
829
+ q.generateRequest=function(a,b){var c=this;this.g=new Pc;try{this.i=this.l.createSession("video/mp4",Ic(b),null),this.j.o(this.i,"mskeymessage",function(d){c.g&&(c.g.resolve(),c.g=null);d=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Jc(d.message));d=new O("message",d);c.dispatchEvent(d)}),this.j.o(this.i,"mskeyadded",function(){c.g?(Ru(c,"usable"),c.g.resolve(),c.g=null):c.h&&(Ru(c,"usable"),c.h.resolve(),c.h=null)}),this.j.o(this.i,"mskeyerror",
830
+ function(){var d=Error("EME PatchedMediaKeysMs key error");d.errorCode=c.i.error;if(null!=c.g)c.g.reject(d),c.g=null;else if(null!=c.h)c.h.reject(d),c.h=null;else switch(c.i.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Ru(c,"output-not-allowed");break;default:Ru(c,"internal-error")}}),Ru(this,"status-pending")}catch(d){this.g.reject(d)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
831
+ q.update=function(a){this.h=new Pc;try{this.i.update(Ic(a))}catch(b){this.h.reject(b)}return this.h};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.rb()}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 Ru(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new O("keystatuseschange");a.dispatchEvent(c)}
832
+ function Qu(){this.size=0;this.g=void 0}q=Qu.prototype;q.forEach=function(a){this.g&&a(this.g,lg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=lg.value();return this.g&&Gc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Vt(Iu);function Su(){}function Tu(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Uu,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Vu,window.MediaKeys=Wu,window.MediaKeySystemAccess=Xu)}function Uu(){return Promise.reject(Error("The key system specified is not supported."))}
833
+ function Vu(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}St.PatchedMediaKeysNop=Su;Su.install=Tu;function Wu(){throw new TypeError("Illegal constructor.");}Wu.prototype.createSession=function(){};Wu.prototype.setServerCertificate=function(){};function Xu(){this.keySystem="";throw new TypeError("Illegal constructor.");}Xu.prototype.getConfiguration=function(){};Xu.prototype.createMediaKeys=function(){};Vt(Tu,-10);function Yu(){}function Zu(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)$u="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=av;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=bv;window.MediaKeys=cv;window.MediaKeySystemAccess=dv}}
834
+ function ev(a){var b=$u;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function av(a,b){try{var c=new dv(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function bv(a){var b=this.mediaKeys;b&&b!=a&&fv(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&fv(a,this);return Promise.resolve()}St.PatchedMediaKeysWebkit=Yu;Yu.install=Zu;
835
+ function dv(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");for(var f=r(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=r(g.audioCapabilities),
836
836
  m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType.split(";")[0],this.g)&&(h.audioCapabilities.push(m),d=!0));if(g.videoCapabilities)for(l=r(g.videoCapabilities),m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType,this.g)&&(h.videoCapabilities.push(m),d=!0));k||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==g.persistentState&&(c?(h.persistentState="required",h.sessionTypes=["persistent-license"]):
837
- d=!1);if(d){this.h=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}cv.prototype.createMediaKeys=function(){var a=new bv(this.g);return Promise.resolve(a)};cv.prototype.getConfiguration=function(){return this.h};function bv(a){this.l=a;this.h=null;this.g=new qf;this.i=[];this.j=new Map}
838
- function ev(a,b){a.h=b;a.g.rb();var c=Zu;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Jc(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=fv(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.g?"licenserequest":"licenserenewal").set("message",d.message),d=new O("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){if(d=fv(a,d.sessionId))gv(d,"usable"),
839
- d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=fv(a,d.sessionId);e&&e.handleError(d)}))}bv.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new hv(b,this.l,a);this.i.push(a);return a};bv.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
840
- function fv(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function hv(a,b,c){cb.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Pc;this.keyStatuses=new iv}u(hv,cb);q=hv.prototype;
841
- q.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?gv(this,"output-restricted"):1==b?gv(this,"expired"):gv(this,"internal-error"))};
842
- function jv(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Ic(kd("LOAD_SESSION|"+c));else{var e=kd("PERSISTENT|");d=sd(e,b)}else d=Ic(b)}catch(g){return Promise.reject(g)}a.h=new Pc;var f=dv("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Q(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).S(.01)}return a.h}
843
- function kv(a,b,c){if(a.g)a.g.then(function(){return kv(a,b,c)})["catch"](function(){return kv(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=gd(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=pd(e.keys[0].k);e=pd(e.keys[0].kid)}else d=Ic(c),e=null;var f=dv("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
844
- function gv(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new O("keystatuseschange");a.dispatchEvent(c)}q.generateRequest=function(a,b){return jv(this,b,null)};q.load=function(a){return"persistent-license"==this.l?jv(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Pc;kv(this,b,a);return b};
845
- 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=dv("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 iv(){this.size=0;this.g=void 0}q=iv.prototype;q.forEach=function(a){this.g&&a(this.g,lg.value())};q.get=function(a){if(this.has(a))return this.g};
846
- q.has=function(a){var b=lg.value();return this.g&&Gc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var Zu="";Ut(Yu);function lv(){}function mv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=nv,Object.defineProperty(a,"disablePictureInPicture",{get:ov,set:pv,enumerable:!0,configurable:!0}),document.exitPictureInPicture=qv,document.addEventListener("webkitpresentationmodechanged",rv,!0))}}
847
- function rv(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)}
848
- function nv(){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 qv(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
849
- function ov(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function pv(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Rt.PiPWebkit=lv;lv.install=mv;Ut(mv);function sv(){}function tv(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=uv))}function uv(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Rt.RandomUUID=sv;sv.install=tv;Ut(tv);function vv(){}function wv(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=xv)}function xv(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Rt.StorageEstimate=vv;vv.install=wv;Ut(wv);function yv(){}function zv(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Av})}function Av(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Rt.Symbol=yv;yv.install=zv;Ut(zv);function Bv(){}function Cv(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}Rt.VideoPlayPromise=Bv;Bv.install=Cv;Ut(Cv);function Dv(){}function Ev(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Xc("Web0S")&&Xc("Chrome/38.0.2125.122 Safari/537.36"))&&(a.getVideoPlaybackQuality=Fv)}}function Fv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Rt.VideoPlaybackQuality=Dv;Dv.install=Ev;Ut(Ev);function Gv(){}function Hv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Iv;else if(6==b)a=Jv;else{try{var c=!!Iv(1,2,"")}catch(d){c=!1}c&&(a=Iv)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Iv(a,b,c){return new window.TextTrackCue(a,b,c)}function Jv(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Rt.VTTCue=Gv;Gv.install=Hv;Ut(Hv);function Kv(){}Kv.prototype.parseInit=function(){};Kv.prototype.parseMedia=function(a,b){var c=null,d=[],e=gd(a).split(/\r?\n/);e=r(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=Lv.exec(f))){var g=Mv.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new lc(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};N("shaka.text.LrcTextParser",Kv);Kv.prototype.parseMedia=Kv.prototype.parseMedia;
850
- Kv.prototype.parseInit=Kv.prototype.parseInit;var Lv=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Mv=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Gd["application/x-subtitle-lrc"]=function(){return new Kv};function Nv(){}Nv.prototype.parseInit=function(){};
851
- Nv.prototype.parseMedia=function(a,b){var c=gd(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(C){throw new P(2,2,2005,"Failed to parse TTML.");}if(f){if(c=f.getElementsByTagName("parsererror")[0])throw new P(2,2,2005,c.textContent);var g=f.getElementsByTagName("tt")[0];if(!g)throw new P(2,2,2005,"TTML does not contain <tt> tag.");f=g.getElementsByTagName("body")[0];if(!f)return[];var h=qo(g,Ov,"frameRate"),k=qo(g,Ov,"subFrameRate"),l=qo(g,Ov,"frameRateMultiplier"),
852
- m=qo(g,Ov,"tickRate"),n=qo(g,Ov,"cellResolution");c=g.getAttribute("xml:space")||"default";e=qo(g,Pv,"extent");if("default"!=c&&"preserve"!=c)throw new P(2,2,2005,"Invalid xml:space value: "+c);c="default"==c;h=new Qv(h,k,l,m);n=n?(n=/^(\d+) (\d+)$/.exec(n))?{columns:parseInt(n[1],10),rows:parseInt(n[2],10)}:null:null;k=(k=g.getElementsByTagName("metadata")[0])?oo(k):[];l=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));m=[];for(var p=r(g),t=p.next();!t.done;t=
853
- p.next()){var v=t.value;t=new nc;var y=v.getAttribute("xml:id");if(y){t.id=y;var w=null;e&&(w=Rv.exec(e)||Sv.exec(e));y=w?Number(w[1]):null;w=w?Number(w[2]):null;var x,D;if(x=Tv(v,l,"extent"))x=(D=Rv.exec(x))||Sv.exec(x),null!=x&&(t.width=Number(x[1]),t.height=Number(x[2]),D||(null!=y&&(t.width=100*t.width/y),null!=w&&(t.height=100*t.height/w)),t.widthUnits=D||null!=y?Dc:0,t.heightUnits=D||null!=w?Dc:0);if(v=Tv(v,l,"origin"))x=(D=Rv.exec(v))||Sv.exec(v),null!=x&&(t.viewportAnchorX=Number(x[1]),t.viewportAnchorY=
854
- Number(x[2]),D||(null!=w&&(t.viewportAnchorY=100*t.viewportAnchorY/w),null!=y&&(t.viewportAnchorX=100*t.viewportAnchorX/y)),t.viewportAnchorUnits=D||null!=y?Dc:0)}else t=null;t&&m.push(t)}if(lo(f,"p").length)throw new P(2,2,2001,"<p> can only be inside <div> in TTML");e=r(lo(f,"div"));for(p=e.next();!p.done;p=e.next())if(lo(p.value,"span").length)throw new P(2,2,2001,"<span> can only be inside <p> in TTML");(f=Uv(f,b.periodStart,h,k,l,g,m,c,n,null,!1))&&d.push(f)}return d};
855
- function Uv(a,b,c,d,e,f,g,h,k,l,m){var n=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var p=document.createElement("span");p.textContent=a.textContent}else p=a;for(var t=null,v=r(Vv),y=v.next();!y.done&&!(t=Wv(p,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=m;if("p"==a.nodeName||t)m=!0;h="default"==(p.getAttribute("xml:space")||(h?"default":"preserve"));y=Array.from(p.childNodes).every(function(A){return A.nodeType==Node.TEXT_NODE});
856
- a=[];if(!y)for(var w=r(p.childNodes),x=w.next();!x.done;x=w.next())(x=Uv(x.value,b,c,d,e,f,g,h,k,p,m))&&a.push(x);d=null!=l;w=/\S/.test(p.textContent);var D=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(D||w||"br"==p.tagName||0!=a.length||d&&!h))return null;x=Xv(p,c);w=x.start;for(x=x.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)x=Yv(n,c,w,x),w=x.start,x=x.end,n=n.parentNode;null==w&&(w=0);w+=b;x=null==x?Infinity:x+b;if(!D&&0<a.length)for(w=Infinity,x=0,b=r(a),
857
- c=b.next();!c.done;c=b.next())c=c.value,w=Math.min(w,c.startTime),x=Math.max(x,c.endTime);if("br"==p.tagName)return e=new lc(w,x,""),e.lineBreak=!0,e;b="";y&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new lc(w,x,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Wv(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var C=k.getAttribute("xml:id");b.region=g.filter(function(A){return A.id==C})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&
858
- (g=Wv(l,"region",f,"")[0]);Zv(b,p,g,t,e,v,0==a.length);return b}
859
- function Zv(a,b,c,d,e,f,g){f=f||g;"rtl"==$v(b,c,e,"direction",f)&&(a.direction="rtl");g=$v(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=mc);(g=$v(b,c,e,"textAlign",!0))?(a.positionAlign=aw[g],a.lineAlign=bw[g],a.textAlign=xc[g.toUpperCase()]):a.textAlign=pc;if(g=$v(b,c,e,"displayAlign",!0))a.displayAlign=yc[g.toUpperCase()];if(g=$v(b,c,e,"color",f))a.color=g;if(g=$v(b,c,e,"backgroundColor",
860
- f))a.backgroundColor=g;if(g=$v(b,c,e,"border",f))a.border=g;if(g=$v(b,c,e,"fontFamily",f))a.fontFamily=g;(g=$v(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=$v(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=$v(b,c,e,"lineHeight",f))&&g.match(cw)&&(a.lineHeight=g);(g=$v(b,c,e,"fontSize",f))&&(g.match(cw)||g.match(dw))&&(a.fontSize=g);if(g=$v(b,c,e,"fontStyle",f))a.fontStyle=Cc[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
861
- d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=$v(b,c,e,"textOutline",f))d=d.split(" "),d[0].match(cw)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(cw)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=$v(b,c,e,"letterSpacing",f))&&d.match(cw)&&(a.letterSpacing=d);(d=$v(b,c,e,"linePadding",f))&&d.match(cw)&&(a.linePadding=d);if(f=$v(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=Tv(c,e,"textDecoration"))&&ew(a,c);(b=
862
- fw(b,e,"textDecoration"))&&ew(a,b)}
863
- function ew(a,b){for(var c=r(b.split(" ")),d=c.next();!d.done;d=c.next())switch(d.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&ic(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&ic(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
864
- a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&ic(a.textDecoration,"overline")}}function $v(a,b,c,d,e){e=void 0===e?!0:e;return(a=fw(a,c,d))?a:e?Tv(b,c,d):null}function Tv(a,b,c){if(!a)return null;var d=qo(a,Pv,c);return d?d:gw(a,b,c)}function fw(a,b,c){var d=qo(a,Pv,c);return d?d:gw(a,b,c)}
865
- function gw(a,b,c){a=Wv(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=po(a[e],"urn:ebu:tt:style",c);f||(f=qo(a[e],Pv,c));f||(f=fw(a[e],b,c));f&&(d=f)}return d}
866
- function Wv(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?po(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=r(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=r(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function Yv(a,b,c,d){a=Xv(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
867
- function Xv(a,b){var c=hw(a.getAttribute("begin"),b),d=hw(a.getAttribute("end"),b),e=hw(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
868
- function hw(a,b){var c=null;if(iw.test(a)){c=iw.exec(a);var d=Number(c[1]),e=Number(c[2]),f=Number(c[3]),g=Number(c[4]);g+=(Number(c[5])||0)/b.h;f+=g/b.frameRate;c=f+60*e+3600*d}else if(jw.test(a))c=kw(jw,a);else if(lw.test(a))c=kw(lw,a);else if(mw.test(a))c=mw.exec(a),c=Number(c[1])/b.frameRate;else if(nw.test(a))c=nw.exec(a),c=Number(c[1])/b.g;else if(ow.test(a))c=kw(ow,a);else if(a)throw new P(2,2,2001,"Could not parse cue time range in TTML");return c}
869
- function kw(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)}N("shaka.text.TtmlTextParser",Nv);Nv.prototype.parseMedia=Nv.prototype.parseMedia;Nv.prototype.parseInit=Nv.prototype.parseInit;function Qv(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
870
- var Rv=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,dw=/^(\d{1,2}(?:\.\d+)?|100)%$/,cw=/^(\d+px|\d+em|\d*\.?\d+c)$/,Sv=/^(\d+)px (\d+)px$/,iw=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,jw=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,lw=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,mw=/^(\d*(?:\.\d*)?)f$/,nw=/^(\d*(?:\.\d*)?)t$/,ow=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),bw={left:sc,center:"center",right:"end",start:sc,
871
- end:"end"},aw={left:"line-left",center:"center",right:"line-right"},Ov=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Pv=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Vv=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Gd["application/ttml+xml"]=function(){return new Nv};function pw(){this.g=new Nv}pw.prototype.parseInit=function(a){var b=!1;(new vg).box("moov",zg).box("trak",zg).box("mdia",zg).box("minf",zg).box("stbl",zg).X("stsd",Bg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new P(2,2,2007);};pw.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new vg).box("mdat",Cg(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new P(2,2,2007);return e};N("shaka.text.Mp4TtmlParser",pw);pw.prototype.parseMedia=pw.prototype.parseMedia;
872
- pw.prototype.parseInit=pw.prototype.parseInit;Gd['application/mp4; codecs="stpp"']=function(){return new pw};Gd['application/mp4; codecs="stpp.ttml"']=function(){return new pw};Gd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new pw};Gd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new pw};function qw(){}qw.prototype.parseInit=function(){};
873
- qw.prototype.parseMedia=function(a,b){var c=gd(a);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var d=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new P(2,2,2E3);c=b.periodStart;if(d[0].includes("X-TIMESTAMP-MAP")){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=rw(new Mq(e[1]));if(null==c)throw new P(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+f/9E4-c}}f=
874
- [];e=r(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new Mq(g);var h=new nc;Pq(g);Nq(g);for(var k=Pq(g);k;){var l=h,m=k;(k=/^id=(.*)$/.exec(m))?l.id=k[1]:(k=/^width=(\d{1,2}|100)%$/.exec(m))?l.width=Number(k[1]):(k=/^lines=(\d+)$/.exec(m))?(l.height=Number(k[1]),l.heightUnits=2):(k=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?(l.regionAnchorX=Number(k[1]),l.regionAnchorY=Number(k[2])):(k=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?
875
- (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");Nq(g);k=Pq(g)}f.push(h)}e=new Map;sw(e);g=[];d=r(d.slice(1));for(h=d.next();!h.done;h=d.next()){h=h.value.split("\n");if((1!=h.length||h[0])&&!/^NOTE($|[ \t])/.test(h[0])&&"STYLE"==h[0]&&h[1].includes("::cue")){l="global";(k=h[1].match(/\((.*)\)/))&&(l=k.pop());k=h.slice(2,-1);h[1].includes("}")&&(m=/\{(.*?)\}/.exec(h[1]))&&(k=m[1].split(";"));m=new lc(0,0,"");for(var n=!1,p=0;p<k.length;p++){var t=
837
+ d=!1);if(d){this.h=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}dv.prototype.createMediaKeys=function(){var a=new cv(this.g);return Promise.resolve(a)};dv.prototype.getConfiguration=function(){return this.h};function cv(a){this.l=a;this.h=null;this.g=new qf;this.i=[];this.j=new Map}
838
+ function fv(a,b){a.h=b;a.g.rb();var c=$u;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Jc(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=gv(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.g?"licenserequest":"licenserenewal").set("message",d.message),d=new O("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){if(d=gv(a,d.sessionId))hv(d,"usable"),
839
+ d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=gv(a,d.sessionId);e&&e.handleError(d)}))}cv.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new iv(b,this.l,a);this.i.push(a);return a};cv.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
840
+ function gv(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function iv(a,b,c){cb.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Pc;this.keyStatuses=new jv}u(iv,cb);q=iv.prototype;
841
+ q.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?hv(this,"output-restricted"):1==b?hv(this,"expired"):hv(this,"internal-error"))};
842
+ function kv(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Ic(kd("LOAD_SESSION|"+c));else{var e=kd("PERSISTENT|");d=sd(e,b)}else d=Ic(b)}catch(g){return Promise.reject(g)}a.h=new Pc;var f=ev("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Q(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).S(.01)}return a.h}
843
+ function lv(a,b,c){if(a.g)a.g.then(function(){return lv(a,b,c)})["catch"](function(){return lv(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=gd(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=pd(e.keys[0].k);e=pd(e.keys[0].kid)}else d=Ic(c),e=null;var f=ev("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
844
+ function hv(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new O("keystatuseschange");a.dispatchEvent(c)}q.generateRequest=function(a,b){return kv(this,b,null)};q.load=function(a){return"persistent-license"==this.l?kv(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Pc;lv(this,b,a);return b};
845
+ 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=ev("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 jv(){this.size=0;this.g=void 0}q=jv.prototype;q.forEach=function(a){this.g&&a(this.g,lg.value())};q.get=function(a){if(this.has(a))return this.g};
846
+ q.has=function(a){var b=lg.value();return this.g&&Gc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var $u="";Vt(Zu);function mv(){}function nv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=ov,Object.defineProperty(a,"disablePictureInPicture",{get:pv,set:qv,enumerable:!0,configurable:!0}),document.exitPictureInPicture=rv,document.addEventListener("webkitpresentationmodechanged",sv,!0))}}
847
+ function sv(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)}
848
+ function ov(){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 rv(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
849
+ function pv(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function qv(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}St.PiPWebkit=mv;mv.install=nv;Vt(nv);function tv(){}function uv(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=vv))}function vv(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}St.RandomUUID=tv;tv.install=uv;Vt(uv);function wv(){}function xv(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=yv)}function yv(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}St.StorageEstimate=wv;wv.install=xv;Vt(xv);function zv(){}function Av(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Bv})}function Bv(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}St.Symbol=zv;zv.install=Av;Vt(Av);function Cv(){}function Dv(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}St.VideoPlayPromise=Cv;Cv.install=Dv;Vt(Dv);function Ev(){}function Fv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Xc("Web0S")&&Xc("Chrome/38.0.2125.122 Safari/537.36"))&&(a.getVideoPlaybackQuality=Gv)}}function Gv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}St.VideoPlaybackQuality=Ev;Ev.install=Fv;Vt(Fv);function Hv(){}function Iv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Jv;else if(6==b)a=Kv;else{try{var c=!!Jv(1,2,"")}catch(d){c=!1}c&&(a=Jv)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Jv(a,b,c){return new window.TextTrackCue(a,b,c)}function Kv(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}St.VTTCue=Hv;Hv.install=Iv;Vt(Iv);function Lv(){}Lv.prototype.parseInit=function(){};Lv.prototype.parseMedia=function(a,b){var c=null,d=[],e=gd(a).split(/\r?\n/);e=r(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=Mv.exec(f))){var g=Nv.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new lc(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};N("shaka.text.LrcTextParser",Lv);Lv.prototype.parseMedia=Lv.prototype.parseMedia;
850
+ Lv.prototype.parseInit=Lv.prototype.parseInit;var Mv=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Nv=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Gd["application/x-subtitle-lrc"]=function(){return new Lv};function Ov(){}Ov.prototype.parseInit=function(){};
851
+ Ov.prototype.parseMedia=function(a,b){var c=gd(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(z){throw new P(2,2,2005,"Failed to parse TTML.");}if(f){if(c=f.getElementsByTagName("parsererror")[0])throw new P(2,2,2005,c.textContent);var g=f.getElementsByTagName("tt")[0];if(!g)throw new P(2,2,2005,"TTML does not contain <tt> tag.");f=g.getElementsByTagName("body")[0];if(!f)return[];var h=ro(g,Pv,"frameRate"),k=ro(g,Pv,"subFrameRate"),l=ro(g,Pv,"frameRateMultiplier"),
852
+ m=ro(g,Pv,"tickRate"),n=ro(g,Pv,"cellResolution");c=g.getAttribute("xml:space")||"default";e=ro(g,Qv,"extent");if("default"!=c&&"preserve"!=c)throw new P(2,2,2005,"Invalid xml:space value: "+c);c="default"==c;h=new Rv(h,k,l,m);n=n?(n=/^(\d+) (\d+)$/.exec(n))?{columns:parseInt(n[1],10),rows:parseInt(n[2],10)}:null:null;k=(k=g.getElementsByTagName("metadata")[0])?po(k):[];l=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));m=[];for(var p=r(g),t=p.next();!t.done;t=
853
+ p.next()){var v=t.value;t=new nc;var x=v.getAttribute("xml:id");if(x){t.id=x;var y=null;e&&(y=Sv.exec(e)||Tv.exec(e));x=y?Number(y[1]):null;y=y?Number(y[2]):null;var w,D;if(w=Uv(v,l,"extent"))w=(D=Sv.exec(w))||Tv.exec(w),null!=w&&(t.width=Number(w[1]),t.height=Number(w[2]),D||(null!=x&&(t.width=100*t.width/x),null!=y&&(t.height=100*t.height/y)),t.widthUnits=D||null!=x?Dc:0,t.heightUnits=D||null!=y?Dc:0);if(v=Uv(v,l,"origin"))w=(D=Sv.exec(v))||Tv.exec(v),null!=w&&(t.viewportAnchorX=Number(w[1]),t.viewportAnchorY=
854
+ Number(w[2]),D||(null!=y&&(t.viewportAnchorY=100*t.viewportAnchorY/y),null!=x&&(t.viewportAnchorX=100*t.viewportAnchorX/x)),t.viewportAnchorUnits=D||null!=x?Dc:0)}else t=null;t&&m.push(t)}if(mo(f,"p").length)throw new P(2,2,2001,"<p> can only be inside <div> in TTML");e=r(mo(f,"div"));for(p=e.next();!p.done;p=e.next())if(mo(p.value,"span").length)throw new P(2,2,2001,"<span> can only be inside <p> in TTML");if(f=Vv(f,b.periodStart,h,k,l,g,m,c,n,null,!1))f.backgroundColor||(f.backgroundColor="transparent"),
855
+ d.push(f)}return d};
856
+ function Vv(a,b,c,d,e,f,g,h,k,l,m){var n=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var p=document.createElement("span");p.textContent=a.textContent}else p=a;for(var t=null,v=r(Wv),x=v.next();!x.done&&!(t=Xv(p,"backgroundImage",d,"#",x.value)[0]);x=v.next());v=m;if("p"==a.nodeName||t)m=!0;h="default"==(p.getAttribute("xml:space")||(h?"default":"preserve"));x=Array.from(p.childNodes).every(function(B){return B.nodeType==Node.TEXT_NODE});
857
+ a=[];if(!x)for(var y=r(p.childNodes),w=y.next();!w.done;w=y.next())(w=Vv(w.value,b,c,d,e,f,g,h,k,p,m))&&a.push(w);d=null!=l;y=/\S/.test(p.textContent);var D=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(D||y||"br"==p.tagName||0!=a.length||d&&!h))return null;w=Yv(p,c);y=w.start;for(w=w.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)w=Zv(n,c,y,w),y=w.start,w=w.end,n=n.parentNode;null==y&&(y=0);y+=b;w=null==w?Infinity:w+b;if(!D&&0<a.length)for(y=Infinity,w=0,b=r(a),
858
+ c=b.next();!c.done;c=b.next())c=c.value,y=Math.min(y,c.startTime),w=Math.max(w,c.endTime);if("br"==p.tagName)return e=new lc(y,w,""),e.lineBreak=!0,e;b="";x&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new lc(y,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Xv(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var z=k.getAttribute("xml:id");b.region=g.filter(function(B){return B.id==z})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&
859
+ (g=Xv(l,"region",f,"")[0]);$v(b,p,g,t,e,v,0==a.length);return b}
860
+ function $v(a,b,c,d,e,f,g){f=f||g;"rtl"==aw(b,c,e,"direction",f)&&(a.direction="rtl");g=aw(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=mc);(g=aw(b,c,e,"textAlign",!0))?(a.positionAlign=bw[g],a.lineAlign=cw[g],a.textAlign=xc[g.toUpperCase()]):a.textAlign=pc;if(g=aw(b,c,e,"displayAlign",!0))a.displayAlign=yc[g.toUpperCase()];if(g=aw(b,c,e,"color",f))a.color=g;if(g=aw(b,c,e,"backgroundColor",
861
+ f))a.backgroundColor=g;if(g=aw(b,c,e,"border",f))a.border=g;if(g=aw(b,c,e,"fontFamily",f))a.fontFamily=g;(g=aw(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=aw(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=aw(b,c,e,"lineHeight",f))&&g.match(dw)&&(a.lineHeight=g);(g=aw(b,c,e,"fontSize",f))&&(g.match(dw)||g.match(ew))&&(a.fontSize=g);if(g=aw(b,c,e,"fontStyle",f))a.fontStyle=Cc[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
862
+ d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=aw(b,c,e,"textOutline",f))d=d.split(" "),d[0].match(dw)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(dw)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=aw(b,c,e,"letterSpacing",f))&&d.match(dw)&&(a.letterSpacing=d);(d=aw(b,c,e,"linePadding",f))&&d.match(dw)&&(a.linePadding=d);if(f=aw(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=Uv(c,e,"textDecoration"))&&fw(a,c);(b=
863
+ gw(b,e,"textDecoration"))&&fw(a,b)}
864
+ function fw(a,b){for(var c=r(b.split(" ")),d=c.next();!d.done;d=c.next())switch(d.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&ic(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&ic(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
865
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&ic(a.textDecoration,"overline")}}function aw(a,b,c,d,e){e=void 0===e?!0:e;return(a=gw(a,c,d))?a:e?Uv(b,c,d):null}function Uv(a,b,c){if(!a)return null;var d=ro(a,Qv,c);return d?d:hw(a,b,c)}function gw(a,b,c){var d=ro(a,Qv,c);return d?d:hw(a,b,c)}
866
+ function hw(a,b,c){a=Xv(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=qo(a[e],"urn:ebu:tt:style",c);f||(f=ro(a[e],Qv,c));f||(f=gw(a[e],b,c));f&&(d=f)}return d}
867
+ function Xv(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?qo(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=r(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=r(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function Zv(a,b,c,d){a=Yv(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
868
+ function Yv(a,b){var c=iw(a.getAttribute("begin"),b),d=iw(a.getAttribute("end"),b),e=iw(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
869
+ function iw(a,b){var c=null;if(jw.test(a)){c=jw.exec(a);var d=Number(c[1]),e=Number(c[2]),f=Number(c[3]),g=Number(c[4]);g+=(Number(c[5])||0)/b.h;f+=g/b.frameRate;c=f+60*e+3600*d}else if(kw.test(a))c=lw(kw,a);else if(mw.test(a))c=lw(mw,a);else if(nw.test(a))c=nw.exec(a),c=Number(c[1])/b.frameRate;else if(ow.test(a))c=ow.exec(a),c=Number(c[1])/b.g;else if(pw.test(a))c=lw(pw,a);else if(a)throw new P(2,2,2001,"Could not parse cue time range in TTML");return c}
870
+ function lw(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)}N("shaka.text.TtmlTextParser",Ov);Ov.prototype.parseMedia=Ov.prototype.parseMedia;Ov.prototype.parseInit=Ov.prototype.parseInit;function Rv(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
871
+ var Sv=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,ew=/^(\d{1,2}(?:\.\d+)?|100)%$/,dw=/^(\d+px|\d+em|\d*\.?\d+c)$/,Tv=/^(\d+)px (\d+)px$/,jw=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,kw=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,mw=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,nw=/^(\d*(?:\.\d*)?)f$/,ow=/^(\d*(?:\.\d*)?)t$/,pw=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),cw={left:sc,center:"center",right:"end",start:sc,
872
+ end:"end"},bw={left:"line-left",center:"center",right:"line-right"},Pv=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Qv=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Wv=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Gd["application/ttml+xml"]=function(){return new Ov};function qw(){this.g=new Ov}qw.prototype.parseInit=function(a){var b=!1;(new vg).box("moov",zg).box("trak",zg).box("mdia",zg).box("minf",zg).box("stbl",zg).X("stsd",Bg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new P(2,2,2007);};qw.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new vg).box("mdat",Cg(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new P(2,2,2007);return e};N("shaka.text.Mp4TtmlParser",qw);qw.prototype.parseMedia=qw.prototype.parseMedia;
873
+ qw.prototype.parseInit=qw.prototype.parseInit;Gd['application/mp4; codecs="stpp"']=function(){return new qw};Gd['application/mp4; codecs="stpp.ttml"']=function(){return new qw};Gd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new qw};Gd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new qw};function rw(){}rw.prototype.parseInit=function(){};
874
+ rw.prototype.parseMedia=function(a,b){var c=gd(a);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var d=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new P(2,2,2E3);c=b.periodStart;if(d[0].includes("X-TIMESTAMP-MAP")){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=sw(new Nq(e[1]));if(null==c)throw new P(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+f/9E4-c}}f=
875
+ [];e=r(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new Nq(g);var h=new nc;Qq(g);Oq(g);for(var k=Qq(g);k;){var l=h,m=k;(k=/^id=(.*)$/.exec(m))?l.id=k[1]:(k=/^width=(\d{1,2}|100)%$/.exec(m))?l.width=Number(k[1]):(k=/^lines=(\d+)$/.exec(m))?(l.height=Number(k[1]),l.heightUnits=2):(k=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?(l.regionAnchorX=Number(k[1]),l.regionAnchorY=Number(k[2])):(k=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?
876
+ (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");Oq(g);k=Qq(g)}f.push(h)}e=new Map;tw(e);g=[];d=r(d.slice(1));for(h=d.next();!h.done;h=d.next()){h=h.value.split("\n");if((1!=h.length||h[0])&&!/^NOTE($|[ \t])/.test(h[0])&&"STYLE"==h[0]&&h[1].includes("::cue")){l="global";(k=h[1].match(/\((.*)\)/))&&(l=k.pop());k=h.slice(2,-1);h[1].includes("}")&&(m=/\{(.*?)\}/.exec(h[1]))&&(k=m[1].split(";"));m=new lc(0,0,"");for(var n=!1,p=0;p<k.length;p++){var t=
876
877
  /^\s*([^:]+):\s*(.*)/.exec(k[p]);if(t){var v=t[2].trim().replace(";","");switch(t[1].trim()){case "background-color":n=!0;m.backgroundColor=v;break;case "color":n=!0;m.color=v;break;case "font-family":n=!0;m.fontFamily=v;break;case "font-size":n=!0;m.fontSize=v;break;case "font-weight":700<=parseInt(v,10)&&(n=!0,m.fontWeight=700);break;case "font-style":switch(v){case "normal":n=!0;m.fontStyle=vc;break;case "italic":n=!0;m.fontStyle="italic";break;case "oblique":n=!0,m.fontStyle="oblique"}break;case "opacity":n=
877
- !0;m.opacity=parseFloat(v);break;case "white-space":n=!0,m.wrapLine="noWrap"!=v}}}n&&e.set(l,m)}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new Mq(h[0]);m=rw(k);t=Oq(k,/[ \t]+--\x3e[ \t]+/g);n=rw(k);if(null==m||null==t||null==n)throw new P(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),h.startTime=m,h.endTime=n,h.payload=
878
- ""):h=new lc(m,n,"");tw(p,h,e);Nq(k);for(m=Pq(k);m;)uw(h,m,f),Nq(k),m=Pq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function sw(a){for(var b=r(Object.entries(Ac)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new lc(0,0,"");e.color=d;a.set(c,e)}b=r(Object.entries(Bc));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new lc(0,0,""),e.backgroundColor=d,a.set(c,e)}
879
- function tw(a,b,c){0===c.size&&sw(c);a=vw(a);var d=Co("<span>"+a+"</span>","span");if(d){var e=[];d=d.childNodes;if(1==d.length){var f=d[0];if(f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE){b.payload=a;return}}a=r(d);for(d=a.next();!d.done;d=a.next())ww(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
880
- function vw(a){for(var b=[],c=-1,d="",e=0;e<a.length;e++)if("/"===a[e]){var f=a.indexOf(">",e);if(f<=e)return a;f=a.substring(e+1,f);var g=b.pop();if(f&&g){if(g===f)d+="/"+f+">";else{if(!g.startsWith("c.")||"c"!==f)return a;d+="/"+g+">"}e+=f.length+1}else return a}else"<"===a[e]?c=e+1:">"===a[e]&&0<c&&(b.push(a.substr(c,e-c)),c=-1),d+=a[e];return d}function xw(a,b){return a&&0<a.length?a:b}
881
- function ww(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=r(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next()){g=g.value;if(d.has(g)){var h=d.get(g);h&&(e.backgroundColor=xw(h.backgroundColor,e.backgroundColor),e.color=xw(h.color,e.color),e.fontFamily=xw(h.fontFamily,e.fontFamily),e.fontSize=xw(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine)}switch(g){case "b":e.fontWeight=700;break;case "i":e.fontStyle=
882
- "italic";break;case "u":e.textDecoration.push("underline")}}if(so(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=a,c.push(f)),f=!1;else for(b=r(a.childNodes),a=b.next();!a.done;a=b.next())ww(a.value,e,c,d)}
883
- function uw(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=pc:a.textAlign=xc[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|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||"end"==
884
- b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=yw(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=zc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=rc,a.line=Number(c[1]),c[2]&&(a.lineAlign=zc[c[2].toUpperCase()])}function yw(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
885
- function rw(a){a=Oq(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)}N("shaka.text.VttTextParser",qw);qw.prototype.parseMedia=qw.prototype.parseMedia;qw.prototype.parseInit=qw.prototype.parseInit;Gd["text/vtt"]=function(){return new qw};Gd['text/vtt; codecs="vtt"']=function(){return new qw};Gd['text/vtt; codecs="wvtt"']=function(){return new qw};function zw(){this.g=null}zw.prototype.parseInit=function(a){var b=this,c=!1;(new vg).box("moov",zg).box("trak",zg).box("mdia",zg).X("mdhd",function(d){d=Mh(d.reader,d.version);b.g=d.timescale}).box("minf",zg).box("stbl",zg).X("stsd",Bg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new P(2,2,2008);if(!c)throw new P(2,2,2008);};
886
- zw.prototype.parseMedia=function(a,b){if(!this.g)throw new P(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new vg).box("moof",zg).box("traf",zg).X("tfdt",function(A){g=!0;c=Lh(A.reader,A.version).Rd}).X("tfhd",function(A){l=Kh(A.reader,A.flags).We}).X("trun",function(A){h=!0;d=Nh(A.reader,A.version,A.flags).uf}).box("mdat",Cg(function(A){k=!0;e=A})).parse(a,!1);if(!k&&!g&&!h)throw new P(2,2,2008);for(var m=c,n=new sg(e,0),p=r(d),t=p.next();!t.done;t=p.next()){t=t.value;var v=t.me||l,y=t.vd?
887
- c+t.vd:m;m=y+(v||0);var w=0;do{var x=n.P();w+=x;var D=n.P(),C=null;"vttc"==Dg(D)?8<x&&(C=n.Cb(x-8)):n.skip(x-8);v&&C&&(x=Aw(C,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(x))}while(t.sampleSize&&w<t.sampleSize)}return f.filter(Fb)};function Aw(a,b,c){var d,e,f;(new vg).box("payl",Cg(function(g){d=gd(g)})).box("iden",Cg(function(g){e=gd(g)})).box("sttg",Cg(function(g){f=gd(g)})).parse(a);return d?Bw(d,e,f,b,c):null}
888
- function Bw(a,b,c,d,e){d=new lc(d,e,"");tw(a,d,new Map);b&&(d.id=b);if(c)for(a=new Mq(c),b=Pq(a);b;)uw(d,b,[]),Nq(a),b=Pq(a);return d}N("shaka.text.Mp4VttParser",zw);zw.prototype.parseMedia=zw.prototype.parseMedia;zw.prototype.parseInit=zw.prototype.parseInit;Gd['application/mp4; codecs="wvtt"']=function(){return new zw};function Cw(){}Cw.prototype.parseInit=function(){};Cw.prototype.parseMedia=function(a){var b=gd(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 Mq(c[0]),e=Dw(d),f=Oq(d,/,/g);d=Dw(d);if(null==e||null==f||null==d)throw new P(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new lc(e,d,c.slice(1).join("\n").trim()))}return a};
889
- function Dw(a){a=Oq(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)}N("shaka.text.SbvTextParser",Cw);Cw.prototype.parseMedia=Cw.prototype.parseMedia;Cw.prototype.parseInit=Cw.prototype.parseInit;Gd["text/x-subviewer"]=function(){return new Cw};function Ew(){this.g=new qw}Ew.prototype.parseInit=function(){};Ew.prototype.parseMedia=function(a,b){var c=gd(a);c=Fw(c);c=Ic(kd(c));return this.g.parseMedia(c,b)};function Fw(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}N("shaka.text.SrtTextParser",Ew);Ew.srt2webvtt=Fw;Ew.prototype.parseMedia=Ew.prototype.parseMedia;
890
- Ew.prototype.parseInit=Ew.prototype.parseInit;Gd["text/srt"]=function(){return new Ew};function Gw(){}Gw.prototype.parseInit=function(){};
891
- Gw.prototype.parseMedia=function(a){var b="",c="";a=gd(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=Hw.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=Iw.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Jw);else if("Style"==e){e=f.split(Jw);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
892
- [];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={Od:e.Od},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Iw.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Jw);else if("Dialogue"==f){g=g.split(Jw);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Kw(f.Start);var k=Kw(f.End);g=new lc(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Od=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Od}}(e)))&&Lw(g,f);d.push(g)}return d};
893
- function Lw(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Mw(c))a.color=c;if(c=b.BackColour)if(c=Mw(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=tc;a.textAlign="start";break;case 2:a.displayAlign=tc;a.textAlign=pc;break;case 3:a.displayAlign=tc;a.textAlign="end";
878
+ !0;m.opacity=parseFloat(v);break;case "white-space":n=!0,m.wrapLine="noWrap"!=v}}}n&&e.set(l,m)}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new Nq(h[0]);m=sw(k);t=Pq(k,/[ \t]+--\x3e[ \t]+/g);n=sw(k);if(null==m||null==t||null==n)throw new P(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),h.startTime=m,h.endTime=n,h.payload=
879
+ ""):h=new lc(m,n,"");uw(p,h,e);Oq(k);for(m=Qq(k);m;)vw(h,m,f),Oq(k),m=Qq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function tw(a){for(var b=r(Object.entries(Ac)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new lc(0,0,"");e.color=d;a.set(c,e)}b=r(Object.entries(Bc));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new lc(0,0,""),e.backgroundColor=d,a.set(c,e)}
880
+ function uw(a,b,c){0===c.size&&tw(c);a=ww(a);var d=Do("<span>"+a+"</span>","span");if(d){var e=[];d=d.childNodes;if(1==d.length){var f=d[0];if(f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE){b.payload=a;return}}a=r(d);for(d=a.next();!d.done;d=a.next())xw(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
881
+ function ww(a){for(var b=[],c=-1,d="",e=0;e<a.length;e++)if("/"===a[e]){var f=a.indexOf(">",e);if(f<=e)return a;f=a.substring(e+1,f);var g=b.pop();if(f&&g){if(g===f)d+="/"+f+">";else{if(!g.startsWith("c.")||"c"!==f)return a;d+="/"+g+">"}e+=f.length+1}else return a}else"<"===a[e]?c=e+1:">"===a[e]&&0<c&&(b.push(a.substr(c,e-c)),c=-1),d+=a[e];return d}function yw(a,b){return a&&0<a.length?a:b}
882
+ function xw(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=r(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next()){g=g.value;if(d.has(g)){var h=d.get(g);h&&(e.backgroundColor=yw(h.backgroundColor,e.backgroundColor),e.color=yw(h.color,e.color),e.fontFamily=yw(h.fontFamily,e.fontFamily),e.fontSize=yw(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine)}switch(g){case "b":e.fontWeight=700;break;case "i":e.fontStyle=
883
+ "italic";break;case "u":e.textDecoration.push("underline")}}if(to(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=a,c.push(f)),f=!1;else for(b=r(a.childNodes),a=b.next();!a.done;a=b.next())xw(a.value,e,c,d)}
884
+ function vw(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=pc:a.textAlign=xc[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|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||"end"==
885
+ b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=zw(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=zc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=rc,a.line=Number(c[1]),c[2]&&(a.lineAlign=zc[c[2].toUpperCase()])}function zw(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
886
+ function sw(a){a=Pq(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)}N("shaka.text.VttTextParser",rw);rw.prototype.parseMedia=rw.prototype.parseMedia;rw.prototype.parseInit=rw.prototype.parseInit;Gd["text/vtt"]=function(){return new rw};Gd['text/vtt; codecs="vtt"']=function(){return new rw};Gd['text/vtt; codecs="wvtt"']=function(){return new rw};function Aw(){this.g=null}Aw.prototype.parseInit=function(a){var b=this,c=!1;(new vg).box("moov",zg).box("trak",zg).box("mdia",zg).X("mdhd",function(d){d=Mh(d.reader,d.version);b.g=d.timescale}).box("minf",zg).box("stbl",zg).X("stsd",Bg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new P(2,2,2008);if(!c)throw new P(2,2,2008);};
887
+ Aw.prototype.parseMedia=function(a,b){if(!this.g)throw new P(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new vg).box("moof",zg).box("traf",zg).X("tfdt",function(B){g=!0;c=Lh(B.reader,B.version).Rd}).X("tfhd",function(B){l=Kh(B.reader,B.flags).We}).X("trun",function(B){h=!0;d=Nh(B.reader,B.version,B.flags).uf}).box("mdat",Cg(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new P(2,2,2008);for(var m=c,n=new sg(e,0),p=r(d),t=p.next();!t.done;t=p.next()){t=t.value;var v=t.me||l,x=t.vd?
888
+ c+t.vd:m;m=x+(v||0);var y=0;do{var w=n.P();y+=w;var D=n.P(),z=null;"vttc"==Dg(D)?8<w&&(z=n.Cb(w-8)):n.skip(w-8);v&&z&&(w=Bw(z,b.periodStart+x/this.g,b.periodStart+m/this.g),f.push(w))}while(t.sampleSize&&y<t.sampleSize)}return f.filter(Fb)};function Bw(a,b,c){var d,e,f;(new vg).box("payl",Cg(function(g){d=gd(g)})).box("iden",Cg(function(g){e=gd(g)})).box("sttg",Cg(function(g){f=gd(g)})).parse(a);return d?Cw(d,e,f,b,c):null}
889
+ function Cw(a,b,c,d,e){d=new lc(d,e,"");uw(a,d,new Map);b&&(d.id=b);if(c)for(a=new Nq(c),b=Qq(a);b;)vw(d,b,[]),Oq(a),b=Qq(a);return d}N("shaka.text.Mp4VttParser",Aw);Aw.prototype.parseMedia=Aw.prototype.parseMedia;Aw.prototype.parseInit=Aw.prototype.parseInit;Gd['application/mp4; codecs="wvtt"']=function(){return new Aw};function Dw(){}Dw.prototype.parseInit=function(){};Dw.prototype.parseMedia=function(a){var b=gd(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 Nq(c[0]),e=Ew(d),f=Pq(d,/,/g);d=Ew(d);if(null==e||null==f||null==d)throw new P(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new lc(e,d,c.slice(1).join("\n").trim()))}return a};
890
+ function Ew(a){a=Pq(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)}N("shaka.text.SbvTextParser",Dw);Dw.prototype.parseMedia=Dw.prototype.parseMedia;Dw.prototype.parseInit=Dw.prototype.parseInit;Gd["text/x-subviewer"]=function(){return new Dw};function Fw(){this.g=new rw}Fw.prototype.parseInit=function(){};Fw.prototype.parseMedia=function(a,b){var c=gd(a);c=Gw(c);c=Ic(kd(c));return this.g.parseMedia(c,b)};function Gw(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}N("shaka.text.SrtTextParser",Fw);Fw.srt2webvtt=Gw;Fw.prototype.parseMedia=Fw.prototype.parseMedia;
891
+ Fw.prototype.parseInit=Fw.prototype.parseInit;Gd["text/srt"]=function(){return new Fw};function Hw(){}Hw.prototype.parseInit=function(){};
892
+ Hw.prototype.parseMedia=function(a){var b="",c="";a=gd(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=Iw.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=Jw.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Kw);else if("Style"==e){e=f.split(Kw);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
893
+ [];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={Od:e.Od},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Jw.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Kw);else if("Dialogue"==f){g=g.split(Kw);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Lw(f.Start);var k=Lw(f.End);g=new lc(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Od=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Od}}(e)))&&Mw(g,f);d.push(g)}return d};
894
+ function Mw(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Nw(c))a.color=c;if(c=b.BackColour)if(c=Nw(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=tc;a.textAlign="start";break;case 2:a.displayAlign=tc;a.textAlign=pc;break;case 3:a.displayAlign=tc;a.textAlign="end";
894
895
  break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=pc;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=pc;break;case 11:a.displayAlign="center",a.textAlign="end"}if(c=b.AlphaLevel)a.opacity=parseFloat(c)}
895
- function Mw(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function Kw(a){a=Nw.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}N("shaka.text.SsaTextParser",Gw);Gw.prototype.parseMedia=Gw.prototype.parseMedia;Gw.prototype.parseInit=Gw.prototype.parseInit;var Hw=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Iw=/^\s*([^:]+):\s*(.*)/,Jw=/\s*,\s*/,Nw=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
896
- Gd["text/x-ssa"]=function(){return new Gw};/*
896
+ function Nw(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function Lw(a){a=Ow.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}N("shaka.text.SsaTextParser",Hw);Hw.prototype.parseMedia=Hw.prototype.parseMedia;Hw.prototype.parseInit=Hw.prototype.parseInit;var Iw=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Jw=/^\s*([^:]+):\s*(.*)/,Kw=/\s*,\s*/,Ow=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
897
+ Gd["text/x-ssa"]=function(){return new Hw};/*
897
898
  @license
898
899
  EME Encryption Scheme Polyfill
899
900
  Copyright 2019 Google LLC
900
901
  SPDX-License-Identifier: Apache-2.0
901
902
  */
902
- function Ow(){}var Pw;function Qw(){Pw?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Pw=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Rw):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
903
- function Rw(a,b){var c=this,d;return M(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),z(e,Pw.call(c,a,b),2);d=e.h;if(Sw(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Pw,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Tw;return e["return"](Tw.call(c,
903
+ function Pw(){}var Qw;function Rw(){Qw?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Qw=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Sw):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
904
+ function Sw(a,b){var c=this,d;return M(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),A(e,Qw.call(c,a,b),2);d=e.h;if(Tw(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Qw,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Uw;return e["return"](Uw.call(c,
904
905
  a,b))})}
905
- function Tw(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return M(function(t){if(1==t.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Uw(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Vw(h.videoCapabilities,d),l=Vw(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),
906
- n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return z(t,Pw.call(c,a,e),2)}p=t.h;return t["return"](new Ww(p,d))})}function Vw(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}N("EmeEncryptionSchemePolyfill",Ow);Ow.install=Qw;function Xw(){}var Yw;
907
- function Zw(){Yw?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Yw=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=$w):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
908
- function $w(a){var b=this,c,d,e;return M(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),z(f,Yw.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f["return"](c);if((d=c.keySystemAccess)&&Sw(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Yw,f["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
909
- navigator.mediaCapabilities.decodingInfo=ax;if(d){f.D(3);break}e=c;return z(f,bx(a),4);case 4:return e.keySystemAccess=f.h,f["return"](c);case 3:return f["return"](ax.call(b,a))}})}
910
- function ax(a){var b=this,c,d,e,f,g,h,k,l;return M(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=Uw(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m["return"](h):z(m,Yw.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
911
- new Ww(k.keySystemAccess,c);m.D(3);break}if(!a.keySystemConfiguration){m.D(3);break}l=k;return z(m,bx(a),5);case 5:l.keySystemAccess=m.h;case 3:return m["return"](k)}})}
912
- function bx(a){var b,c;return M(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return z(d,
913
- navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d["return"](c)})}N("McEncryptionSchemePolyfill",Xw);Xw.install=Zw;function Ww(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
914
- Ww.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};Ww.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
915
- function Uw(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 Sw(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}
916
- function cx(){}function $t(){Qw();Zw()}N("EncryptionSchemePolyfills",cx);cx.install=$t;"undefined"!==typeof module&&module.exports&&(module.exports=cx);/*
906
+ function Uw(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return M(function(t){if(1==t.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Vw(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Ww(h.videoCapabilities,d),l=Ww(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),
907
+ n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return A(t,Qw.call(c,a,e),2)}p=t.h;return t["return"](new Xw(p,d))})}function Ww(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}N("EmeEncryptionSchemePolyfill",Pw);Pw.install=Rw;function Yw(){}var Zw;
908
+ function $w(){Zw?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Zw=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=ax):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
909
+ function ax(a){var b=this,c,d,e;return M(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),A(f,Zw.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f["return"](c);if((d=c.keySystemAccess)&&Tw(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Zw,f["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
910
+ navigator.mediaCapabilities.decodingInfo=bx;if(d){f.D(3);break}e=c;return A(f,cx(a),4);case 4:return e.keySystemAccess=f.h,f["return"](c);case 3:return f["return"](bx.call(b,a))}})}
911
+ function bx(a){var b=this,c,d,e,f,g,h,k,l;return M(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=Vw(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m["return"](h):A(m,Zw.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
912
+ new Xw(k.keySystemAccess,c);m.D(3);break}if(!a.keySystemConfiguration){m.D(3);break}l=k;return A(m,cx(a),5);case 5:l.keySystemAccess=m.h;case 3:return m["return"](k)}})}
913
+ function cx(a){var b,c;return M(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return A(d,
914
+ navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d["return"](c)})}N("McEncryptionSchemePolyfill",Yw);Yw.install=$w;function Xw(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
915
+ Xw.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};Xw.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
916
+ function Vw(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 Tw(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}
917
+ function dx(){}function au(){Rw();$w()}N("EncryptionSchemePolyfills",dx);dx.install=au;"undefined"!==typeof module&&module.exports&&(module.exports=dx);/*
917
918
  @license
918
919
  Copyright 2013 Ali Al Dallal
919
920
 
@@ -937,7 +938,7 @@ function cx(){}function $t(){Qw();Zw()}N("EncryptionSchemePolyfills",cx);cx.inst
937
938
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
938
939
  SOFTWARE.
939
940
  */
940
- for(var dx={ach:{s:"Lwo",u:"Acholi"},ady:{s:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",u:"Adyghe"},af:{s:"Afrikaans",u:"Afrikaans"},"af-NA":{s:"Afrikaans (Namibia)",u:"Afrikaans (Namibia)"},"af-ZA":{s:"Afrikaans (South Africa)",u:"Afrikaans (South Africa)"},ak:{s:"T\u0255\u0265i",u:"Akan"},ar:{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-AR":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-MA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic (Morocco)"},
941
+ for(var ex={ach:{s:"Lwo",u:"Acholi"},ady:{s:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",u:"Adyghe"},af:{s:"Afrikaans",u:"Afrikaans"},"af-NA":{s:"Afrikaans (Namibia)",u:"Afrikaans (Namibia)"},"af-ZA":{s:"Afrikaans (South Africa)",u:"Afrikaans (South Africa)"},ak:{s:"T\u0255\u0265i",u:"Akan"},ar:{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-AR":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-MA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic (Morocco)"},
941
942
  "ar-SA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)",u:"Arabic (Saudi Arabia)"},"ay-BO":{s:"Aymar aru",u:"Aymara"},az:{s:"Az\u0259rbaycan dili",u:"Azerbaijani"},"az-AZ":{s:"Az\u0259rbaycan dili",u:"Azerbaijani"},"be-BY":{s:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",u:"Belarusian"},bg:{s:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",u:"Bulgarian"},"bg-BG":{s:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",
942
943
  u:"Bulgarian"},bn:{s:"\u09ac\u09be\u0982\u09b2\u09be",u:"Bengali"},"bn-IN":{s:"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)",u:"Bengali (India)"},"bn-BD":{s:"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)",u:"Bengali (Bangladesh)"},"bs-BA":{s:"Bosanski",u:"Bosnian"},ca:{s:"Catal\u00e0",u:"Catalan"},"ca-ES":{s:"Catal\u00e0",u:"Catalan"},cak:{s:"Maya Kaqchikel",u:"Kaqchikel"},"ck-US":{s:"\u13e3\u13b3\u13a9 (tsalagi)",u:"Cherokee"},cs:{s:"\u010ce\u0161tina",
943
944
  u:"Czech"},"cs-CZ":{s:"\u010ce\u0161tina",u:"Czech"},cy:{s:"Cymraeg",u:"Welsh"},"cy-GB":{s:"Cymraeg",u:"Welsh"},da:{s:"Dansk",u:"Danish"},"da-DK":{s:"Dansk",u:"Danish"},de:{s:"Deutsch",u:"German"},"de-AT":{s:"Deutsch (\u00d6sterreich)",u:"German (Austria)"},"de-DE":{s:"Deutsch (Deutschland)",u:"German (Germany)"},"de-CH":{s:"Deutsch (Schweiz)",u:"German (Switzerland)"},dsb:{s:"Dolnoserb\u0161\u0107ina",u:"Lower Sorbian"},el:{s:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",u:"Greek"},"el-GR":{s:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",
@@ -958,54 +959,54 @@ u:"Slovak"},"sk-SK":{s:"Sloven\u010dina (Slovakia)",u:"Slovak (Slovakia)"},sl:{s
958
959
  sw:{s:"Kiswahili",u:"Swahili"},"sw-KE":{s:"Kiswahili",u:"Swahili (Kenya)"},ta:{s:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",u:"Tamil"},"ta-IN":{s:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",u:"Tamil"},te:{s:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",u:"Telugu"},"te-IN":{s:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",u:"Telugu"},tg:{s:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301",u:"Tajik"},"tg-TJ":{s:"\u0442\u043e\u04b7\u0438\u043a\u04e3",u:"Tajik"},th:{s:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",
959
960
  u:"Thai"},"th-TH":{s:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",u:"Thai (Thailand)"},tl:{s:"Filipino",u:"Filipino"},"tl-PH":{s:"Filipino",u:"Filipino"},tlh:{s:"tlhIngan-Hol",u:"Klingon"},tr:{s:"T\u00fcrk\u00e7e",u:"Turkish"},"tr-TR":{s:"T\u00fcrk\u00e7e",u:"Turkish"},"tt-RU":{s:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",u:"Tatar"},uk:{s:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",u:"Ukrainian"},"uk-UA":{s:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
960
961
  u:"Ukrainian"},ur:{s:"\u0627\u0631\u062f\u0648",u:"Urdu"},"ur-PK":{s:"\u0627\u0631\u062f\u0648",u:"Urdu"},uz:{s:"O'zbek",u:"Uzbek"},"uz-UZ":{s:"O'zbek",u:"Uzbek"},vi:{s:"Ti\u1ebfng Vi\u1ec7t",u:"Vietnamese"},"vi-VN":{s:"Ti\u1ebfng Vi\u1ec7t",u:"Vietnamese"},"xh-ZA":{s:"isiXhosa",u:"Xhosa"},yi:{s:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",u:"Yiddish"},"yi-DE":{s:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",u:"Yiddish (German)"},zh:{s:"\u4e2d\u6587",u:"Chinese"},"zh-HANS":{s:"\u4e2d\u6587\u7b80\u4f53",
961
- u:"Chinese Simplified"},"zh-HANT":{s:"\u4e2d\u6587\u7e41\u9ad4",u:"Chinese Traditional"},"zh-CN":{s:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",u:"Chinese Simplified (China)"},"zh-HK":{s:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",u:"Chinese Traditional (Hong Kong)"},"zh-SG":{s:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",u:"Chinese Simplified (Singapore)"},"zh-TW":{s:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",u:"Chinese Traditional (Taiwan)"},"zu-ZA":{s:"isiZulu",u:"Zulu"}},ex=r(Object.keys(dx)),fx=ex.next();!fx.done;fx=
962
- ex.next()){var gx=fx.value;dx[gx.toLowerCase()]=dx[gx]};function V(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new qf;this.localization=this.controls.Ba;this.player=this.controls.ac();this.video=this.controls.Bb();this.adManager=this.player.bd();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})}
963
- V.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};N("shaka.ui.Element",V);V.prototype.release=V.prototype.release;function hx(a){return ix(a,"shaka-back-to-overflow-button")}function ix(a,b){var c=a.getElementsByClassName(b);return c.length?c[0]:null}function jx(a){a&&(a=ix(a,"shaka-chosen-item"))&&a.parentElement.focus()}function kx(){var a=S("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function X(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
964
- function lx(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60),e=Math.floor(a%60);10>e&&(e="0"+e);e=d+":"+e;b&&(10>d&&(e="0"+e),e=c+":"+e);return e};function mx(a,b){V.call(this,a,b);var c=this;this.i=S("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=S("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new Q(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=lx(e-d,!1)+" / "+lx(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=
965
- ""))});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.za();c.g.ha(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.za(),this.g.ha(.5))}u(mx,V);mx.prototype.release=function(){this.g.stop();this.g=null;V.prototype.release.call(this)};N("shaka.ui.AdCounter",mx);function nx(a,b){V.call(this,a,b);var c=this;this.g=S("div");this.g.classList.add("shaka-ad-position");X(this.g,!1);this.parent.appendChild(this.g);this.h=S("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.o(this.localization,"locale-updated",function(){c.ad&&ox(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&ox(c)});this.eventManager.o(this.adManager,"ad-started",function(){ox(c)});this.eventManager.o(this.adManager,
966
- "ad-stopped",function(){c.h.textContent="";X(c.g,!1)});this.ad&&ox(this)}u(nx,V);function ox(a){var b=a.ad.getSequenceLength();if(1<b){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));X(a.g,!0)}}N("shaka.ui.AdPosition",nx);function px(a,b){V.call(this,a,b);var c=this;this.button=Xj();this.parent.appendChild(this.button);this.eventManager.o(this.localization,"locale-updated",function(){c.g()});this.eventManager.o(this.localization,"locale-changed",function(){c.g()});this.eventManager.o(this.video,"play",function(){c.g();c.h()});this.eventManager.o(this.video,"pause",function(){c.g();c.h()});this.eventManager.o(this.video,"seeking",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-paused",function(){c.g();
967
- c.h()});this.eventManager.o(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.o(this.button,"click",function(){c.ad&&c.ad.isLinear()?qx(c.controls):rx(c.controls)});this.ad&&(this.g(),this.h())}u(px,V);px.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.A.paused&&!a.$;return a};px.prototype.g=function(){};px.prototype.h=function(){};
968
- N("shaka.ui.PlayButton",px);function sx(a,b){px.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}u(sx,px);sx.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};sx.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};N("shaka.ui.BigPlayButton",sx);function tx(a,b){V.call(this,a,b);var c=this;this.j=this.controls.i;this.h=this.controls.g;this.i=[];this.g=S("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-context-menu");this.g.classList.add("shaka-hidden");this.h.appendChild(this.g);this.eventManager.o(this.h,"contextmenu",function(d){if(c.g.classList.contains("shaka-hidden")){d.preventDefault();var e=c.h.getBoundingClientRect();c.g.style.left=d.clientX-e.left+"px";c.g.style.top=d.clientY-e.top+"px";X(c.g,!0)}else X(c.g,
969
- !1)});this.eventManager.o(window,"click",function(){X(c.g,!1)});ux(this)}u(tx,V);tx.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=[];V.prototype.release.call(this)};function vx(a,b){wx.set(a,b)}function ux(a){for(var b=r(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=wx.get(c);d?a.i.push(d.create(a.g,a.controls)):Sa("Unrecognized context menu element:",c)}}N("shaka.ui.ContextMenu",tx);
970
- tx.registerElement=vx;var wx=new Map;function xx(a,b,c,d){V.call(this,a,b);var e=this;this.container=S("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,ia(c));this.g=!1;this.bar=document.createElement("input");this.l=new Q(function(){e.onChangeEnd();e.g=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,ia(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);
971
- this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(){e.controls.Nb()&&(e.g=!0,e.onChangeStart())});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.Nb()&&(e.g=!0,yx(e,f),e.onChangeStart())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.g&&(yx(e,f),e.onChange())});this.eventManager.o(this.bar,"touchend",function(f){e.g&&(e.g=!1,yx(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,
972
- "mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}u(xx,V);q=xx.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);V.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.S(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
973
- q.setValue=function(a){this.g||(this.bar.value=a)};function yx(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect(),e=parseFloat(a.bar.min),f=parseFloat(a.bar.max);c=e+(f-e)/d.width*(c.clientX-d.left);c<e?c=e:c>f&&(c=f);a.bar.value=c}N("shaka.ui.RangeElement",xx);xx.prototype.setValue=xx.prototype.setValue;xx.prototype.getValue=xx.prototype.getValue;xx.prototype.changeTo=xx.prototype.changeTo;xx.prototype.onChangeEnd=xx.prototype.onChangeEnd;xx.prototype.onChange=xx.prototype.onChange;
974
- xx.prototype.onChangeStart=xx.prototype.onChangeStart;xx.prototype.setRange=xx.prototype.setRange;function zx(a,b){xx.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=S("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 Q(function(){c.video.currentTime=c.getValue()});this.A=new Q(function(){Ax(c)});this.B=!1;this.i=[];this.eventManager.o(this.localization,"locale-updated",function(){return Bx(c)});this.eventManager.o(this.localization,
975
- "locale-changed",function(){return Bx(c)});this.eventManager.o(this.adManager,"ad-started",function(){Cx(c)||X(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){Cx(c)&&X(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;Dx(c)});this.eventManager.o(this.player,"unloading",function(){c.i=[];Dx(c)});this.setValue(this.video.currentTime);this.update();Bx(this);this.ad&&X(this.container,!1)}u(zx,xx);q=zx.prototype;
976
- q.release=function(){this.h&&(this.h.stop(),this.h=null,this.A.stop(),this.A=null);xx.prototype.release.call(this)};q.onChangeStart=function(){this.B=!this.video.paused;this.controls.xe(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.S(.125))};q.onChangeEnd=function(){this.h.za();this.controls.xe(!1);this.B&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
977
- 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.La(),g=f.end-f.start;this.setRange(f.start,f.end);Cx(this)?(X(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?
962
+ u:"Chinese Simplified"},"zh-HANT":{s:"\u4e2d\u6587\u7e41\u9ad4",u:"Chinese Traditional"},"zh-CN":{s:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",u:"Chinese Simplified (China)"},"zh-HK":{s:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",u:"Chinese Traditional (Hong Kong)"},"zh-SG":{s:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",u:"Chinese Simplified (Singapore)"},"zh-TW":{s:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",u:"Chinese Traditional (Taiwan)"},"zu-ZA":{s:"isiZulu",u:"Zulu"}},fx=r(Object.keys(ex)),gx=fx.next();!gx.done;gx=
963
+ fx.next()){var hx=gx.value;ex[hx.toLowerCase()]=ex[hx]};function V(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new qf;this.localization=this.controls.Ba;this.player=this.controls.ac();this.video=this.controls.Bb();this.adManager=this.player.bd();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})}
964
+ V.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};N("shaka.ui.Element",V);V.prototype.release=V.prototype.release;function ix(a){return jx(a,"shaka-back-to-overflow-button")}function jx(a,b){var c=a.getElementsByClassName(b);return c.length?c[0]:null}function kx(a){a&&(a=jx(a,"shaka-chosen-item"))&&a.parentElement.focus()}function lx(){var a=S("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function X(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
965
+ function mx(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60),e=Math.floor(a%60);10>e&&(e="0"+e);e=d+":"+e;b&&(10>d&&(e="0"+e),e=c+":"+e);return e};function nx(a,b){V.call(this,a,b);var c=this;this.i=S("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=S("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new Q(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=mx(e-d,!1)+" / "+mx(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=
966
+ ""))});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.za();c.g.ha(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.za(),this.g.ha(.5))}u(nx,V);nx.prototype.release=function(){this.g.stop();this.g=null;V.prototype.release.call(this)};N("shaka.ui.AdCounter",nx);function ox(a,b){V.call(this,a,b);var c=this;this.g=S("div");this.g.classList.add("shaka-ad-position");X(this.g,!1);this.parent.appendChild(this.g);this.h=S("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.o(this.localization,"locale-updated",function(){c.ad&&px(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&px(c)});this.eventManager.o(this.adManager,"ad-started",function(){px(c)});this.eventManager.o(this.adManager,
967
+ "ad-stopped",function(){c.h.textContent="";X(c.g,!1)});this.ad&&px(this)}u(ox,V);function px(a){var b=a.ad.getSequenceLength();if(1<b){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));X(a.g,!0)}}N("shaka.ui.AdPosition",ox);function qx(a,b){V.call(this,a,b);var c=this;this.button=Xj();this.parent.appendChild(this.button);this.eventManager.o(this.localization,"locale-updated",function(){c.g()});this.eventManager.o(this.localization,"locale-changed",function(){c.g()});this.eventManager.o(this.video,"play",function(){c.g();c.h()});this.eventManager.o(this.video,"pause",function(){c.g();c.h()});this.eventManager.o(this.video,"seeking",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-paused",function(){c.g();
968
+ c.h()});this.eventManager.o(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.o(this.button,"click",function(){c.ad&&c.ad.isLinear()?rx(c.controls):sx(c.controls)});this.ad&&(this.g(),this.h())}u(qx,V);qx.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.A.paused&&!a.$;return a};qx.prototype.g=function(){};qx.prototype.h=function(){};
969
+ N("shaka.ui.PlayButton",qx);function tx(a,b){qx.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}u(tx,qx);tx.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};tx.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};N("shaka.ui.BigPlayButton",tx);function ux(a,b){V.call(this,a,b);var c=this;this.j=this.controls.i;this.h=this.controls.g;this.i=[];this.g=S("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-context-menu");this.g.classList.add("shaka-hidden");this.h.appendChild(this.g);this.eventManager.o(this.h,"contextmenu",function(d){if(c.g.classList.contains("shaka-hidden")){d.preventDefault();var e=c.h.getBoundingClientRect();c.g.style.left=d.clientX-e.left+"px";c.g.style.top=d.clientY-e.top+"px";X(c.g,!0)}else X(c.g,
970
+ !1)});this.eventManager.o(window,"click",function(){X(c.g,!1)});vx(this)}u(ux,V);ux.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=[];V.prototype.release.call(this)};function wx(a,b){xx.set(a,b)}function vx(a){for(var b=r(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=xx.get(c);d?a.i.push(d.create(a.g,a.controls)):Sa("Unrecognized context menu element:",c)}}N("shaka.ui.ContextMenu",ux);
971
+ ux.registerElement=wx;var xx=new Map;function yx(a,b,c,d){V.call(this,a,b);var e=this;this.container=S("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,ia(c));this.g=!1;this.bar=document.createElement("input");this.l=new Q(function(){e.onChangeEnd();e.g=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,ia(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);
972
+ this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(){e.controls.Ob()&&(e.g=!0,e.onChangeStart())});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.Ob()&&(e.g=!0,zx(e,f),e.onChangeStart())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.g&&(zx(e,f),e.onChange())});this.eventManager.o(this.bar,"touchend",function(f){e.g&&(e.g=!1,zx(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,
973
+ "mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}u(yx,V);q=yx.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);V.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.S(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
974
+ q.setValue=function(a){this.g||(this.bar.value=a)};function zx(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect(),e=parseFloat(a.bar.min),f=parseFloat(a.bar.max);c=e+(f-e)/d.width*(c.clientX-d.left);c<e?c=e:c>f&&(c=f);a.bar.value=c}N("shaka.ui.RangeElement",yx);yx.prototype.setValue=yx.prototype.setValue;yx.prototype.getValue=yx.prototype.getValue;yx.prototype.changeTo=yx.prototype.changeTo;yx.prototype.onChangeEnd=yx.prototype.onChangeEnd;yx.prototype.onChange=yx.prototype.onChange;
975
+ yx.prototype.onChangeStart=yx.prototype.onChangeStart;yx.prototype.setRange=yx.prototype.setRange;function Ax(a,b){yx.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=S("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 Q(function(){c.video.currentTime=c.getValue()});this.A=new Q(function(){Bx(c)});this.B=!1;this.i=[];this.eventManager.o(this.localization,"locale-updated",function(){return Cx(c)});this.eventManager.o(this.localization,
976
+ "locale-changed",function(){return Cx(c)});this.eventManager.o(this.adManager,"ad-started",function(){Dx(c)||X(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){Dx(c)&&X(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;Ex(c)});this.eventManager.o(this.player,"unloading",function(){c.i=[];Ex(c)});this.setValue(this.video.currentTime);this.update();Cx(this);this.ad&&X(this.container,!1)}u(Ax,yx);q=Ax.prototype;
977
+ q.release=function(){this.h&&(this.h.stop(),this.h=null,this.A.stop(),this.A=null);yx.prototype.release.call(this)};q.onChangeStart=function(){this.B=!this.video.paused;this.controls.xe(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.S(.125))};q.onChangeEnd=function(){this.h.za();this.controls.xe(!1);this.B&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
978
+ 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.La(),g=f.end-f.start;this.setRange(f.start,f.end);Dx(this)?(X(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?
978
979
  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()+")")):X(this.container,!1)};
979
- function Ax(a){if(a.i.length){for(var b=a.player.La(),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 "+
980
- 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 Dx(a){Ax(a);var b=a.player.La();b=b.end-b.start;a.player.T()&&5<b&&a.A.ha(1)}function Cx(a){var b=a.player.La();b=b.end-b.start;return a.player.T()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function Bx(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}N("shaka.ui.SeekBar",zx);function Ex(){}
981
- Ex.prototype.create=function(a,b){return new zx(a,b)};zx.Factory=Ex;function Y(a,b,c,d){cb.call(this);var e=this;this.W=!0;this.i=d;this.B=new Cn(c,a,this.i.castReceiverAppId);this.hb=!0;this.A=this.B.Bb();this.C=c;this.F=this.B.ac();this.Aa=a;this.j=b;this.Wa=this.F.bd();this.m=this.l=null;this.$=!1;this.G=[];this.wb=[];this.jb=!1;this.aa=new Q(function(){e.j.style.cursor="none";e.jb=!1;Fx(e)});this.ma=new Q(function(){e.g.removeAttribute("shown");e.I.S(2)});this.I=new Q(function(){for(var f=r(e.G),g=f.next();!g.done;g=f.next())X(g.value,!1)});this.Oa=new Q(function(){e.Nb()&&
982
- Gx(e)});this.J=null;this.H=[];this.Ba=Hx();this.h=new qf;this.configure(this.i);Ix(this);this.na=new Set;Jx(this);this.Oa.ha(.125);this.h.o(this.Ba,"locale-changed",function(f){e.Wa.setLocale(f.locales[0])})}u(Y,cb);q=Y.prototype;
983
- q.destroy=function(){var a=this;return M(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.C){b.D(2);break}return z(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.aa&&(a.aa.stop(),a.aa=null);a.ma&&(a.ma.stop(),a.ma=null);a.I&&(a.I.stop(),a.I=null);a.Oa&&(a.Oa.stop(),a.Oa=null);Kx(a);a.g&&(a.j.removeChild(a.g),a.g=null);if(!a.B){b.D(4);break}return z(b,a.B.destroy(),5);case 5:a.B=null;case 4:if(!a.Aa){b.D(6);break}return z(b,a.Aa.destroy(),7);case 7:a.Aa=
984
- null;case 6:a.F=null,a.C=null,a.A=null,a.Ba=null,a.na.clear(),cb.prototype.release.call(a),B(b)}})};function Kx(a){for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function Lx(a,b){Mx.set(a,b)}q.Lf=function(a){this.hb=a;Jx(this)};q.Fg=function(){Fx(this)};
985
- q.configure=function(a){this.i=a;this.B.Se(a.castReceiverAppId);this.m&&(this.m=null);this.fb&&(this.fb=null);this.Xa&&(this.Xa=null);this.g?(Yj(this.g),Kx(this)):(Nx(this),Ox(this));this.j.classList.add("shaka-video-container");this.C.classList.add("shaka-video");Px(this);this.i.addBigPlayButton&&Qx(this);this.i.customContextMenu&&(this.Xa=new tx(this.Z,this),this.H.push(this.Xa));this.ba||Rx(this);this.ib=S("div");this.ib.classList.add("shaka-server-side-ad-container");this.g.appendChild(this.ib);
986
- Sx(this);this.G=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.G.push.apply(this.G,ia(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));Tx(this);this.wb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));Fx(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",c)}};
987
- q.se=function(a){(this.W=a)?(this.j.setAttribute("shaka-controls","true"),this.C.tabIndex=-1,this.C.controls=!1):this.j.removeAttribute("shaka-controls");Fx(this)};q.yf=function(a){this.C.controls=a;this.C.tabIndex=a?0:-1;a&&this.se(!1)};q.getAd=function(){return this.l};q.Xf=function(){return this.B};q.jg=function(){return this.Ba};q.zg=function(){return this.j};q.Bb=function(){return this.A};q.ig=function(){return this.C};q.ac=function(){return this.F};q.hg=function(){return this.Aa};q.cg=function(){return this.g};
980
+ function Bx(a){if(a.i.length){for(var b=a.player.La(),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 "+
981
+ 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 Ex(a){Bx(a);var b=a.player.La();b=b.end-b.start;a.player.T()&&5<b&&a.A.ha(1)}function Dx(a){var b=a.player.La();b=b.end-b.start;return a.player.T()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function Cx(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}N("shaka.ui.SeekBar",Ax);function Fx(){}
982
+ Fx.prototype.create=function(a,b){return new Ax(a,b)};Ax.Factory=Fx;function Y(a,b,c,d){cb.call(this);var e=this;this.W=!0;this.i=d;this.B=new Dn(c,a,this.i.castReceiverAppId);this.hb=!0;this.A=this.B.Bb();this.C=c;this.F=this.B.ac();this.Aa=a;this.j=b;this.Xa=this.F.bd();this.m=this.l=null;this.$=!1;this.G=[];this.wb=[];this.jb=!1;this.aa=new Q(function(){e.j.style.cursor="none";e.jb=!1;Gx(e)});this.ma=new Q(function(){e.g.removeAttribute("shown");e.I.S(2)});this.I=new Q(function(){for(var f=r(e.G),g=f.next();!g.done;g=f.next())X(g.value,!1)});this.Oa=new Q(function(){e.Ob()&&
983
+ Hx(e)});this.J=null;this.H=[];this.Ba=Ix();this.h=new qf;this.configure(this.i);Jx(this);this.na=new Set;Kx(this);this.Oa.ha(.125);this.h.o(this.Ba,"locale-changed",function(f){e.Xa.setLocale(f.locales[0])})}u(Y,cb);q=Y.prototype;
984
+ q.destroy=function(){var a=this;return M(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.C){b.D(2);break}return A(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.aa&&(a.aa.stop(),a.aa=null);a.ma&&(a.ma.stop(),a.ma=null);a.I&&(a.I.stop(),a.I=null);a.Oa&&(a.Oa.stop(),a.Oa=null);Lx(a);a.g&&(a.j.removeChild(a.g),a.g=null);if(!a.B){b.D(4);break}return A(b,a.B.destroy(),5);case 5:a.B=null;case 4:if(!a.Aa){b.D(6);break}return A(b,a.Aa.destroy(),7);case 7:a.Aa=
985
+ null;case 6:a.F=null,a.C=null,a.A=null,a.Ba=null,a.na.clear(),cb.prototype.release.call(a),C(b)}})};function Lx(a){for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function Mx(a,b){Nx.set(a,b)}q.Lf=function(a){this.hb=a;Kx(this)};q.Fg=function(){Gx(this)};
986
+ q.configure=function(a){this.i=a;this.B.Se(a.castReceiverAppId);this.m&&(this.m=null);this.fb&&(this.fb=null);this.Ya&&(this.Ya=null);this.g?(Yj(this.g),Lx(this)):(Ox(this),Px(this));this.j.classList.add("shaka-video-container");this.C.classList.add("shaka-video");Qx(this);this.i.addBigPlayButton&&Rx(this);this.i.customContextMenu&&(this.Ya=new ux(this.Z,this),this.H.push(this.Ya));this.ba||Sx(this);this.ib=S("div");this.ib.classList.add("shaka-server-side-ad-container");this.g.appendChild(this.ib);
987
+ Tx(this);this.G=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.G.push.apply(this.G,ia(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));Ux(this);this.wb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));Gx(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",c)}};
988
+ q.se=function(a){(this.W=a)?(this.j.setAttribute("shaka-controls","true"),this.C.tabIndex=-1,this.C.controls=!1):this.j.removeAttribute("shaka-controls");Gx(this)};q.yf=function(a){this.C.controls=a;this.C.tabIndex=a?0:-1;a&&this.se(!1)};q.getAd=function(){return this.l};q.Xf=function(){return this.B};q.jg=function(){return this.Ba};q.zg=function(){return this.j};q.Bb=function(){return this.A};q.ig=function(){return this.C};q.ac=function(){return this.F};q.hg=function(){return this.Aa};q.cg=function(){return this.g};
988
989
  q.rg=function(){return this.ib};q.Zf=function(){return this.R};q.$f=function(){return this.i};q.Eg=function(){return this.$};q.xe=function(a){this.$=a};q.Cg=function(){return this.hb};q.bf=function(){return this.m?this.m.getValue():this.A.currentTime};q.zf=function(a){this.J=a};q.Wc=function(){return this.G.some(function(a){return!a.classList.contains("shaka-hidden")})};q.cc=function(){this.I.za()};
989
- q.De=function(){var a=this,b;return M(function(c){switch(c.g){case 1:if(document.fullscreenElement)return screen.orientation&&screen.orientation.unlock(),z(c,document.exitFullscreen(),0);E(c,4);if(!document.pictureInPictureElement){c.D(6);break}return z(c,document.exitPictureInPicture(),6);case 6:return z(c,a.j.requestFullscreen({navigationUI:"hide"}),8);case 8:if(!a.i.forceLandscapeOnFullscreen||!screen.orientation){c.D(9);break}E(c,10);return z(c,screen.orientation.lock("landscape"),12);case 12:va(c,
990
- 9,4);break;case 10:I(c,4);case 9:va(c,0);break;case 4:b=I(c),a.dispatchEvent(new O("error",(new Map).set("detail",b))),c.D(0)}})};q.Bf=function(){X(this.K,!0);X(this.R,!0);this.g.setAttribute("ad-active","true")};q.ef=function(){X(this.K,!1);X(this.R,!1);this.g.removeAttribute("ad-active")};function rx(a){a.W&&a.A.duration&&(a.F.Pe(),a.A.paused&&!a.$?a.A.play():a.A.pause())}function qx(a){a.l&&a.l.isPaused()?a.l.play():a.l&&a.l.pause()}
991
- function Nx(a){a.g=S("div");a.g.classList.add("shaka-controls-container");a.j.appendChild(a.g);a.j.setAttribute("shaka-controls","true");a.h.o(a.g,"touchstart",function(b){a.A.duration&&(a.Nb()?a.J=Date.now():(Ux(a,b),b.preventDefault()))},{passive:!1});a.h.o(a.g,"click",function(){Vx(a)});a.h.o(a.g,"dblclick",function(){a.i.doubleClickForFullscreen&&document.fullscreenEnabled&&a.De()})}
992
- function Qx(a){var b=S("div");b.classList.add("shaka-play-button-container");a.g.appendChild(b);a.fb=new sx(b,a);a.H.push(a.fb)}function Px(a){var b=S("div");b.classList.add("shaka-scrim-container");a.g.appendChild(b)}function Wx(a){a.K=S("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.l&&a.l.isLinear();X(a.K,b);a.N.appendChild(a.K);b=new nx(a.K,a);a.H.push(b);b=new mx(a.K,a);a.H.push(b)}
993
- function Rx(a){a.ba=S("div");a.ba.classList.add("shaka-spinner-container");a.j.appendChild(a.ba);var b=S("div");b.classList.add("shaka-spinner");a.ba.appendChild(b);a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("shaka-spinner-svg");a.setAttribute("viewBox","0 0 30 30");b.appendChild(a);b=document.createElementNS("http://www.w3.org/2000/svg","circle");b.classList.add("shaka-spinner-path");b.setAttribute("cx","15");b.setAttribute("cy","15");b.setAttribute("r","14.5");
990
+ q.De=function(){var a=this,b;return M(function(c){switch(c.g){case 1:if(document.fullscreenElement)return screen.orientation&&screen.orientation.unlock(),A(c,document.exitFullscreen(),0);E(c,4);if(!document.pictureInPictureElement){c.D(6);break}return A(c,document.exitPictureInPicture(),6);case 6:return A(c,a.j.requestFullscreen({navigationUI:"hide"}),8);case 8:if(!a.i.forceLandscapeOnFullscreen||!screen.orientation){c.D(9);break}E(c,10);return A(c,screen.orientation.lock("landscape"),12);case 12:va(c,
991
+ 9,4);break;case 10:I(c,4);case 9:va(c,0);break;case 4:b=I(c),a.dispatchEvent(new O("error",(new Map).set("detail",b))),c.D(0)}})};q.Bf=function(){X(this.K,!0);X(this.R,!0);this.g.setAttribute("ad-active","true")};q.ef=function(){X(this.K,!1);X(this.R,!1);this.g.removeAttribute("ad-active")};function sx(a){a.W&&a.A.duration&&(a.F.Pe(),a.A.paused&&!a.$?a.A.play():a.A.pause())}function rx(a){a.l&&a.l.isPaused()?a.l.play():a.l&&a.l.pause()}
992
+ function Ox(a){a.g=S("div");a.g.classList.add("shaka-controls-container");a.j.appendChild(a.g);a.j.setAttribute("shaka-controls","true");a.h.o(a.g,"touchstart",function(b){a.A.duration&&(a.Ob()?a.J=Date.now():(Vx(a,b),b.preventDefault()))},{passive:!1});a.h.o(a.g,"click",function(){Wx(a)});a.h.o(a.g,"dblclick",function(){a.i.doubleClickForFullscreen&&document.fullscreenEnabled&&a.De()})}
993
+ function Rx(a){var b=S("div");b.classList.add("shaka-play-button-container");a.g.appendChild(b);a.fb=new tx(b,a);a.H.push(a.fb)}function Qx(a){var b=S("div");b.classList.add("shaka-scrim-container");a.g.appendChild(b)}function Xx(a){a.K=S("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.l&&a.l.isLinear();X(a.K,b);a.N.appendChild(a.K);b=new ox(a.K,a);a.H.push(b);b=new nx(a.K,a);a.H.push(b)}
994
+ function Sx(a){a.ba=S("div");a.ba.classList.add("shaka-spinner-container");a.j.appendChild(a.ba);var b=S("div");b.classList.add("shaka-spinner");a.ba.appendChild(b);a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("shaka-spinner-svg");a.setAttribute("viewBox","0 0 30 30");b.appendChild(a);b=document.createElementNS("http://www.w3.org/2000/svg","circle");b.classList.add("shaka-spinner-path");b.setAttribute("cx","15");b.setAttribute("cy","15");b.setAttribute("r","14.5");
994
995
  b.setAttribute("fill","none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}
995
- function Sx(a){a.N=S("div");a.N.classList.add("shaka-bottom-controls");a.N.classList.add("shaka-no-propagation");a.g.appendChild(a.N);a.h.o(a.N,"click",function(e){e.target.closest(".shaka-overflow-button")||a.cc()});Wx(a);a.Z=S("div");a.Z.classList.add("shaka-controls-button-panel");a.Z.classList.add("shaka-show-controls-on-mouse-over");a.i.enableTooltips&&a.Z.classList.add("shaka-tooltips-on");a.N.appendChild(a.Z);for(var b={},c=r(a.i.controlPanelElements),d=c.next();!d.done;b={rc:b.rc},d=c.next())d=
996
- d.value,Mx.get(d)?(d=Mx.get(d).create(a.Z,a),"function"!=typeof d.release&&(zb("shaka.extern.IUIElement","Please update UI elements to have a release() method."),b.rc=d,b.rc.release=function(e){return function(){e.rc.destroy&&e.rc.destroy()}}(b)),a.H.push(d)):Sa("Unrecognized control panel element requested:",d)}function Tx(a){if(a.i.addSeekBar)a.m=Xx.create(a.N,a),a.H.push(a.m);else{a=r(a.G);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}
997
- function Ox(a){a.R=S("div");a.R.classList.add("shaka-client-side-ad-container");X(a.R,!1);a.h.o(a.R,"click",function(){Vx(a)});a.j.appendChild(a.R)}
998
- function Ix(a){a.h.o(a.F,"buffering",function(){a.W&&X(a.ba,a.F.Ic())});a.W&&X(a.ba,a.F.Ic());a.h.o(window,"keydown",function(b){Yx(a,b)});a.h.o(window,"click",function(){return a.cc()});a.h.o(a,"submenuopen",function(){a.cc()});a.h.o(a.A,"play",function(){Fx(a)});a.h.o(a.A,"pause",function(){Fx(a)});a.h.o(a.j,"mousemove",function(b){Ux(a,b)});a.h.o(a.j,"touchmove",function(b){Ux(a,b)},{passive:!0});a.h.o(a.j,"touchend",function(b){Ux(a,b)},{passive:!0});a.h.o(a.j,"mouseleave",function(){a.J||a.aa.za()});
999
- a.h.o(a.B,"caststatuschanged",function(){Jx(a)});a.h.o(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.g.contains(c)&&Ux(a,b);if(a.i.enableKeyboardPlaybackControls)switch(b.key){case "ArrowLeft":a.m&&!d&&(b.preventDefault(),Zx(a,a.m.getValue()-5));break;case "ArrowRight":a.m&&!d&&(b.preventDefault(),Zx(a,a.m.getValue()+5));break;case "Home":a.m&&Zx(a,a.F.La().start);break;
1000
- case "End":a.m&&Zx(a,a.F.La().end);break;case " ":e&&$x(a)}});a.h.o(a.j,"keyup",function(b){a.na["delete"](b.key)});a.h.o(a.Wa,"ad-started",function(b){a.l=b.ad;a.Bf()});a.h.o(a.Wa,"ad-stopped",function(){a.l=null;a.ef()});screen.orientation&&a.h.o(screen.orientation,"change",function(){return M(function(b){return z(b,ay(a),0)})});a.h.o(document,"fullscreenchange",function(){a.l&&a.l.resize(a.C.offsetWidth,a.C.offsetHeight)})}
1001
- function ay(a){return M(function(b){return a.A&&0!=a.A.readyState&&!a.B.ra()&&a.i.enableFullscreenOnRotation?screen.orientation.type.includes("landscape")&&!document.fullscreenElement?z(b,a.j.requestFullscreen({navigationUI:"hide"}),0):screen.orientation.type.includes("portrait")&&document.fullscreenElement?z(b,document.exitFullscreen(),0):b.D(0):b["return"]()})}
1002
- function Ux(a,b){"mousemove"==b.type&&(a.g.classList.remove("shaka-keyboard-navigation"),Fx(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.J=Date.now():a.J+1E3<Date.now()&&(a.J=null);a.J&&"mousemove"==b.type||(a.j.style.cursor="",a.jb=!0,a.I.stop(),a.Nb()||(Gx(a),Fx(a)),a.aa.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.aa.S(3))}function by(a){return window.matchMedia("hover: hover").matches?a.wb.some(function(b){return b.matches(":hover")}):!1}
1003
- function Fx(a){var b=a.l?a.l.isPaused():!1,c=a.A.paused&&!a.$,d=a.g.classList.contains("shaka-keyboard-navigation");b||(!a.l||!a.l.isLinear())&&c||a.jb||d||by(a)?(Gx(a),a.g.setAttribute("shown","true"),a.ma.stop()):a.ma.S(a.i.fadeDelay)}function Vx(a){a.W&&(a.Wc()?a.I.za():a.i.singleClickForPlayAndPause&&$x(a))}function $x(a){a.l&&a.l.isLinear()?qx(a):rx(a)}
1004
- function Jx(a){var b=a.B.ra();a.dispatchEvent(new O("caststatuschanged",(new Map).set("newStatus",b)));b?a.g.setAttribute("casting","true"):a.g.removeAttribute("casting")}q.Nb=function(){return this.W?null!=this.g.getAttribute("shown")||null!=this.g.getAttribute("casting"):!1};function Zx(a,b){a.m.changeTo(b);a.Nb()&&Gx(a)}
1005
- function Gx(a){if(a.m)if(a.m.setValue(a.A.currentTime),a.m.update(),a.m.isShowing())for(var b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new O("timeandseekrangeupdated"))}
1006
- function Yx(a,b){a.na.add(b.key);var c=a.Wc();"Tab"==b.key&&(a.g.classList.add("shaka-keyboard-navigation"),Fx(a),a.h.o(window,"mousedown",function(){a.h.nc(window,"mousedown")}));"Escape"==b.key&&a.I.za();c&&a.na.has("Tab")&&cy(a,b)}
1007
- function cy(a,b){var c=a.G.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.na.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
1008
- function Hx(){var a=new Zb("en");a.ea("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],
996
+ function Tx(a){a.N=S("div");a.N.classList.add("shaka-bottom-controls");a.N.classList.add("shaka-no-propagation");a.g.appendChild(a.N);a.h.o(a.N,"click",function(e){e.target.closest(".shaka-overflow-button")||a.cc()});Xx(a);a.Z=S("div");a.Z.classList.add("shaka-controls-button-panel");a.Z.classList.add("shaka-show-controls-on-mouse-over");a.i.enableTooltips&&a.Z.classList.add("shaka-tooltips-on");a.N.appendChild(a.Z);for(var b={},c=r(a.i.controlPanelElements),d=c.next();!d.done;b={rc:b.rc},d=c.next())d=
997
+ d.value,Nx.get(d)?(d=Nx.get(d).create(a.Z,a),"function"!=typeof d.release&&(zb("shaka.extern.IUIElement","Please update UI elements to have a release() method."),b.rc=d,b.rc.release=function(e){return function(){e.rc.destroy&&e.rc.destroy()}}(b)),a.H.push(d)):Sa("Unrecognized control panel element requested:",d)}function Ux(a){if(a.i.addSeekBar)a.m=Yx.create(a.N,a),a.H.push(a.m);else{a=r(a.G);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}
998
+ function Px(a){a.R=S("div");a.R.classList.add("shaka-client-side-ad-container");X(a.R,!1);a.h.o(a.R,"click",function(){Wx(a)});a.j.appendChild(a.R)}
999
+ function Jx(a){a.h.o(a.F,"buffering",function(){a.W&&X(a.ba,a.F.Ic())});a.W&&X(a.ba,a.F.Ic());a.h.o(window,"keydown",function(b){Zx(a,b)});a.h.o(window,"click",function(){return a.cc()});a.h.o(a,"submenuopen",function(){a.cc()});a.h.o(a.A,"play",function(){Gx(a)});a.h.o(a.A,"pause",function(){Gx(a)});a.h.o(a.j,"mousemove",function(b){Vx(a,b)});a.h.o(a.j,"touchmove",function(b){Vx(a,b)},{passive:!0});a.h.o(a.j,"touchend",function(b){Vx(a,b)},{passive:!0});a.h.o(a.j,"mouseleave",function(){a.J||a.aa.za()});
1000
+ a.h.o(a.B,"caststatuschanged",function(){Kx(a)});a.h.o(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.g.contains(c)&&Vx(a,b);if(a.i.enableKeyboardPlaybackControls)switch(b.key){case "ArrowLeft":a.m&&!d&&(b.preventDefault(),$x(a,a.m.getValue()-5));break;case "ArrowRight":a.m&&!d&&(b.preventDefault(),$x(a,a.m.getValue()+5));break;case "Home":a.m&&$x(a,a.F.La().start);break;
1001
+ case "End":a.m&&$x(a,a.F.La().end);break;case " ":e&&ay(a)}});a.h.o(a.j,"keyup",function(b){a.na["delete"](b.key)});a.h.o(a.Xa,"ad-started",function(b){a.l=b.ad;a.Bf()});a.h.o(a.Xa,"ad-stopped",function(){a.l=null;a.ef()});screen.orientation&&a.h.o(screen.orientation,"change",function(){return M(function(b){return A(b,by(a),0)})});a.h.o(document,"fullscreenchange",function(){a.l&&a.l.resize(a.C.offsetWidth,a.C.offsetHeight)})}
1002
+ function by(a){return M(function(b){return a.A&&0!=a.A.readyState&&!a.B.ra()&&a.i.enableFullscreenOnRotation?screen.orientation.type.includes("landscape")&&!document.fullscreenElement?A(b,a.j.requestFullscreen({navigationUI:"hide"}),0):screen.orientation.type.includes("portrait")&&document.fullscreenElement?A(b,document.exitFullscreen(),0):b.D(0):b["return"]()})}
1003
+ function Vx(a,b){"mousemove"==b.type&&(a.g.classList.remove("shaka-keyboard-navigation"),Gx(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.J=Date.now():a.J+1E3<Date.now()&&(a.J=null);a.J&&"mousemove"==b.type||(a.j.style.cursor="",a.jb=!0,a.I.stop(),a.Ob()||(Hx(a),Gx(a)),a.aa.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.aa.S(3))}function cy(a){return window.matchMedia("hover: hover").matches?a.wb.some(function(b){return b.matches(":hover")}):!1}
1004
+ function Gx(a){var b=a.l?a.l.isPaused():!1,c=a.A.paused&&!a.$,d=a.g.classList.contains("shaka-keyboard-navigation");b||(!a.l||!a.l.isLinear())&&c||a.jb||d||cy(a)?(Hx(a),a.g.setAttribute("shown","true"),a.ma.stop()):a.ma.S(a.i.fadeDelay)}function Wx(a){a.W&&(a.Wc()?a.I.za():a.i.singleClickForPlayAndPause&&ay(a))}function ay(a){a.l&&a.l.isLinear()?rx(a):sx(a)}
1005
+ function Kx(a){var b=a.B.ra();a.dispatchEvent(new O("caststatuschanged",(new Map).set("newStatus",b)));b?a.g.setAttribute("casting","true"):a.g.removeAttribute("casting")}q.Ob=function(){return this.W?null!=this.g.getAttribute("shown")||null!=this.g.getAttribute("casting"):!1};function $x(a,b){a.m.changeTo(b);a.Ob()&&Hx(a)}
1006
+ function Hx(a){if(a.m)if(a.m.setValue(a.A.currentTime),a.m.update(),a.m.isShowing())for(var b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new O("timeandseekrangeupdated"))}
1007
+ function Zx(a,b){a.na.add(b.key);var c=a.Wc();"Tab"==b.key&&(a.g.classList.add("shaka-keyboard-navigation"),Gx(a),a.h.o(window,"mousedown",function(){a.h.nc(window,"mousedown")}));"Escape"==b.key&&a.I.za();c&&a.na.has("Tab")&&dy(a,b)}
1008
+ function dy(a,b){var c=a.G.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.na.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
1009
+ function Ix(){var a=new Zb("en");a.ea("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],
1009
1010
  ["ENTER_LOOP_MODE","\u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],["ENTER_PICTURE_IN_PICTURE",'\u0627\u0644\u062f\u062e\u0648\u0644 \u0641\u064a \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["EXIT_FULL_SCREEN","\u0625\u0646\u0647\u0627\u0621 \u0648\u0636\u0639 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["EXIT_LOOP_MODE","\u0625\u064a\u0642\u0627\u0641 \u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],
1010
1011
  ["EXIT_PICTURE_IN_PICTURE",'\u0627\u0644\u062e\u0631\u0648\u062c \u0645\u0646 \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["FAST_FORWARD","\u062a\u0642\u062f\u064a\u0645 \u0633\u0631\u064a\u0639"],["FULL_SCREEN","\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["LANGUAGE","\u0627\u0644\u0644\u063a\u0629"],["LIVE","\u0645\u0628\u0627\u0634\u0631"],["LOOP","\u062a\u0643\u0631\u0627\u0631"],["MORE_SETTINGS","\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0625\u0639\u062f\u0627\u062f\u0627\u062a"],
1011
1012
  ["MULTIPLE_LANGUAGES","\u0644\u063a\u0627\u062a \u0645\u062a\u0639\u062f\u062f\u0629"],["MUTE","\u0643\u062a\u0645 \u0627\u0644\u0635\u0648\u062a"],["NOT_APPLICABLE","\u063a\u064a\u0631 \u0633\u0627\u0631\u064d"],["OFF","\u0625\u064a\u0642\u0627\u0641"],["ON","\u062a\u0634\u063a\u064a\u0644"],["PAUSE","\u0625\u064a\u0642\u0627\u0641 \u0645\u0624\u0642\u062a"],["PICTURE_IN_PICTURE","\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0627\u0644\u0646\u0627\u0641\u0630\u0629"],["PLAY","\u0627\u0644\u062a\u0634\u063a\u064a\u0644"],
@@ -1063,75 +1064,75 @@ a.ea("en",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [
1063
1064
  ["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],["RESOLUTION","\u5206\u8fa8\u7387"],["REWIND","\u5feb\u9000"],["SEEK","\u8fdb\u5ea6"],["SKIP_AD","\u8df3\u8fc7\u5e7f\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u672a\u786e\u5b9a"],["UNMUTE","\u53d6\u6d88\u9759\u97f3"],["UNRECOGNIZED_LANGUAGE","\u65e0\u6cd5\u8bc6\u522b"],["VOLUME","\u97f3\u91cf"]]));a.ea("zh-TW",new Map([["AD_DURATION","\u5ee3\u544a\u9577\u5ea6"],["AD_PROGRESS","\u5ee3\u544a [AD_ON]/[NUM_ADS]"],
1064
1065
  ["AD_TIME","\u5ee3\u544a\uff1a[AD_TIME]"],["AUTO_QUALITY","\u81ea\u52d5"],["BACK","\u8fd4\u56de"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u6295\u653e..."],["ENTER_LOOP_MODE","\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["ENTER_PICTURE_IN_PICTURE","\u9032\u5165\u5b50\u6bcd\u756b\u9762"],["EXIT_FULL_SCREEN","\u9000\u51fa\u5168\u87a2\u5e55\u6a21\u5f0f"],["EXIT_LOOP_MODE","\u505c\u6b62\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["EXIT_PICTURE_IN_PICTURE","\u96e2\u958b\u5b50\u6bcd\u756b\u9762"],
1065
1066
  ["FAST_FORWARD","\u5feb\u8f49"],["FULL_SCREEN","\u5168\u87a2\u5e55"],["LANGUAGE","\u8a9e\u8a00"],["LIVE","\u76f4\u64ad"],["LOOP","\u5faa\u74b0\u64ad\u653e"],["MORE_SETTINGS","\u986f\u793a\u66f4\u591a\u8a2d\u5b9a"],["MULTIPLE_LANGUAGES","\u591a\u7a2e\u8a9e\u8a00"],["MUTE","\u975c\u97f3"],["NOT_APPLICABLE","\u4e0d\u9069\u7528"],["OFF","\u95dc\u9589"],["ON","\u958b\u555f"],["PAUSE","\u66ab\u505c"],["PICTURE_IN_PICTURE","\u5b50\u6bcd\u756b\u9762"],["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],
1066
- ["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.Re(navigator.languages||[]);return a}N("shaka.ui.Controls",Y);Y.prototype.isOpaque=Y.prototype.Nb;Y.prototype.hideAdUI=Y.prototype.ef;Y.prototype.showAdUI=Y.prototype.Bf;
1067
+ ["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.Re(navigator.languages||[]);return a}N("shaka.ui.Controls",Y);Y.prototype.isOpaque=Y.prototype.Ob;Y.prototype.hideAdUI=Y.prototype.ef;Y.prototype.showAdUI=Y.prototype.Bf;
1067
1068
  Y.prototype.toggleFullScreen=Y.prototype.De;Y.prototype.hideSettingsMenus=Y.prototype.cc;Y.prototype.anySettingsMenusAreOpen=Y.prototype.Wc;Y.prototype.setLastTouchEventTime=Y.prototype.zf;Y.prototype.getDisplayTime=Y.prototype.bf;Y.prototype.isCastAllowed=Y.prototype.Cg;Y.prototype.setSeeking=Y.prototype.xe;Y.prototype.isSeeking=Y.prototype.Eg;Y.prototype.getConfig=Y.prototype.$f;Y.prototype.getClientSideAdContainer=Y.prototype.Zf;Y.prototype.getServerSideAdContainer=Y.prototype.rg;
1068
1069
  Y.prototype.getControlsContainer=Y.prototype.cg;Y.prototype.getLocalPlayer=Y.prototype.hg;Y.prototype.getPlayer=Y.prototype.ac;Y.prototype.getLocalVideo=Y.prototype.ig;Y.prototype.getVideo=Y.prototype.Bb;Y.prototype.getVideoContainer=Y.prototype.zg;Y.prototype.getLocalization=Y.prototype.jg;Y.prototype.getCastProxy=Y.prototype.Xf;Y.prototype.getAd=Y.prototype.getAd;Y.prototype.setEnabledNativeControls=Y.prototype.yf;Y.prototype.setEnabledShakaControls=Y.prototype.se;Y.prototype.configure=Y.prototype.configure;
1069
- Y.prototype.loadComplete=Y.prototype.Fg;Y.prototype.allowCast=Y.prototype.Lf;Y.registerSeekBar=function(a){Xx=a};Y.registerElement=Lx;Y.prototype.destroy=Y.prototype.destroy;var Mx=new Map,Xx=new Ex;function dy(a,b){V.call(this,a,b);var c=this;this.l=this.controls.i;this.j=this.controls.g;this.i=[];this.g=Xj();this.g.classList.add("shaka-overflow-menu-button");this.g.classList.add("shaka-no-propagation");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.g.textContent="more_vert";this.parent.appendChild(this.g);this.h=S("div");this.h.classList.add("shaka-overflow-menu");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");
1070
- this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);ey(this);this.eventManager.o(this.localization,"locale-updated",function(){fy(c)});this.eventManager.o(this.localization,"locale-changed",function(){fy(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&X(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){X(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){X(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.zf(Date.now());
1071
- d.stopPropagation()});this.eventManager.o(this.g,"click",function(){gy(c)});fy(this);this.ad&&this.ad.isLinear()&&X(this.g,!1)}u(dy,V);dy.prototype.release=function(){this.j=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];V.prototype.release.call(this)};function hy(a,b){iy.set(a,b)}
1072
- function ey(a){for(var b=r(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,iy.get(c)?(c=iy.get(c),a.i.push(c.create(a.h,a.controls))):Sa("Unrecognized overflow menu element requested:",c)}function gy(a){if(a.controls.Wc())a.controls.cc();else{X(a.h,!0);Fx(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};fb(a.h.childNodes,b)&&hb(a.h.childNodes,b)[0].focus()}}function fy(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
1073
- N("shaka.ui.OverflowMenu",dy);dy.registerElement=hy;function jy(){}jy.prototype.create=function(a,b){return new dy(a,b)};Lx("overflow_menu",new jy);var iy=new Map;function ky(a,b){V.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=S("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");var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=S("span");d.appendChild(this.j);
1074
- this.i=S("span");this.i.classList.add("shaka-current-selection-span");d.appendChild(this.i);this.g.appendChild(d);this.parent.appendChild(this.g);ly(this);my(this);this.eventManager.o(this.localization,"locale-updated",function(){ly(c)});this.eventManager.o(this.localization,"locale-changed",function(){ly(c)});this.eventManager.o(this.g,"click",function(){c.controls.Bb().webkitShowPlaybackTargetPicker()});d=this.controls.Bb();this.eventManager.o(d,"webkitplaybacktargetavailabilitychanged",function(e){var f=
1075
- c.player.cf()==am;X(c.g,"available"==e.availability&&f)});this.eventManager.o(d,"webkitcurrentplaybacktargetiswirelesschanged",function(){my(c)})}u(ky,V);function my(a){var b=a.controls.Bb();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function ly(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}N("shaka.ui.AirPlayButton",ky);function ny(){}ny.prototype.create=function(a,b){return new ky(a,b)};hy("airplay",new ny);
1076
- Lx("airplay",new ny);function oy(a,b,c){this.i=a;this.h=py(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Ud()&&b.classList.add("shaka-mobile");this.g=new Y(a,b,c,this.h);this.configure({});c.controls||a.Ae(b);b.ui=this;c.ui=this}q=oy.prototype;q.destroy=function(){var a=this;return M(function(b){if(1==b.g)return a.g?z(b,a.g.destroy(),2):b.D(2);if(4!=b.g)return a.g=null,a.i?z(b,a.i.destroy(),4):b.D(4);a.i=null;B(b)})};q.Ud=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:ad()&&1<navigator.maxTouchPoints};
1077
- q.getConfiguration=function(){var a=py(this);Dk(a,this.h,py(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Ek(a,b));Dk(this.h,a,py(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new O("uiupdated"))};q.ag=function(){return this.g};q.eh=function(a){this.g.se(a)};
1078
- function py(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",
1079
- "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:"",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)"},trackLabelFormat:qy,fadeDelay:0,
1070
+ Y.prototype.loadComplete=Y.prototype.Fg;Y.prototype.allowCast=Y.prototype.Lf;Y.registerSeekBar=function(a){Yx=a};Y.registerElement=Mx;Y.prototype.destroy=Y.prototype.destroy;var Nx=new Map,Yx=new Fx;function ey(a,b){V.call(this,a,b);var c=this;this.l=this.controls.i;this.j=this.controls.g;this.i=[];this.g=Xj();this.g.classList.add("shaka-overflow-menu-button");this.g.classList.add("shaka-no-propagation");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.g.textContent="more_vert";this.parent.appendChild(this.g);this.h=S("div");this.h.classList.add("shaka-overflow-menu");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");
1071
+ this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);fy(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.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&X(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){X(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){X(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.zf(Date.now());
1072
+ d.stopPropagation()});this.eventManager.o(this.g,"click",function(){hy(c)});gy(this);this.ad&&this.ad.isLinear()&&X(this.g,!1)}u(ey,V);ey.prototype.release=function(){this.j=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];V.prototype.release.call(this)};function iy(a,b){jy.set(a,b)}
1073
+ function fy(a){for(var b=r(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,jy.get(c)?(c=jy.get(c),a.i.push(c.create(a.h,a.controls))):Sa("Unrecognized overflow menu element requested:",c)}function hy(a){if(a.controls.Wc())a.controls.cc();else{X(a.h,!0);Gx(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};fb(a.h.childNodes,b)&&hb(a.h.childNodes,b)[0].focus()}}function gy(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
1074
+ N("shaka.ui.OverflowMenu",ey);ey.registerElement=iy;function ky(){}ky.prototype.create=function(a,b){return new ey(a,b)};Mx("overflow_menu",new ky);var jy=new Map;function ly(a,b){V.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=S("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");var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=S("span");d.appendChild(this.j);
1075
+ this.i=S("span");this.i.classList.add("shaka-current-selection-span");d.appendChild(this.i);this.g.appendChild(d);this.parent.appendChild(this.g);my(this);ny(this);this.eventManager.o(this.localization,"locale-updated",function(){my(c)});this.eventManager.o(this.localization,"locale-changed",function(){my(c)});this.eventManager.o(this.g,"click",function(){c.controls.Bb().webkitShowPlaybackTargetPicker()});d=this.controls.Bb();this.eventManager.o(d,"webkitplaybacktargetavailabilitychanged",function(e){var f=
1076
+ c.player.cf()==am;X(c.g,"available"==e.availability&&f)});this.eventManager.o(d,"webkitcurrentplaybacktargetiswirelesschanged",function(){ny(c)})}u(ly,V);function ny(a){var b=a.controls.Bb();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function my(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}N("shaka.ui.AirPlayButton",ly);function oy(){}oy.prototype.create=function(a,b){return new ly(a,b)};iy("airplay",new oy);
1077
+ Mx("airplay",new oy);function py(a,b,c){this.i=a;this.h=qy(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Ud()&&b.classList.add("shaka-mobile");this.g=new Y(a,b,c,this.h);this.configure({});c.controls||a.Ae(b);b.ui=this;c.ui=this}q=py.prototype;q.destroy=function(){var a=this;return M(function(b){if(1==b.g)return a.g?A(b,a.g.destroy(),2):b.D(2);if(4!=b.g)return a.g=null,a.i?A(b,a.i.destroy(),4):b.D(4);a.i=null;C(b)})};q.Ud=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:ad()&&1<navigator.maxTouchPoints};
1078
+ q.getConfiguration=function(){var a=qy(this);Dk(a,this.h,qy(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Ek(a,b));Dk(this.h,a,qy(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new O("uiupdated"))};q.ag=function(){return this.g};q.eh=function(a){this.g.se(a)};
1079
+ function qy(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",
1080
+ "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:"",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)"},trackLabelFormat:ry,fadeDelay:0,
1080
1081
  doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.Ud()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
1081
- function ry(){var a,b,c,d,e,f,g,h,k,l,m,n,p;return M(function(t){switch(t.g){case 1:St();if(!il())return sy("shaka-ui-load-failed",ty),t["return"]();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");if(!b.length&&!a.length){t.D(2);break}if(b.length&&!a.length){c=r(b);for(d=c.next();!d.done;d=c.next())e=d.value,e.ui||(f=document.createElement("div"),g=e.parentElement,g.replaceChild(f,e),f.appendChild(e),uy(f,e));t.D(2);break}h=r(a);k=h.next();
1082
- case 4:if(k.done){t.D(2);break}l=k.value;if(l.ui){t.D(5);break}m=null;n=r(b);for(d=n.next();!d.done;d=n.next())if(p=d.value,p.parentElement==l){m=p;break}m||(m=document.createElement("video"),m.setAttribute("playsinline",""),l.appendChild(m));E(t,7);return z(t,uy(l,m),9);case 9:va(t,5);break;case 7:return I(t),sy("shaka-ui-load-failed",vy),t["return"]();case 5:k=h.next();t.D(4);break;case 2:sy("shaka-ui-loaded"),B(t)}})}
1083
- function sy(a,b){var c=null;void 0!=b&&(c={reasonCode:b});c=new CustomEvent(a,{detail:c});document.dispatchEvent(c)}
1084
- function uy(a,b){var c,d,e,f,g,h,k,l;return M(function(m){switch(m.g){case 1:c=new T(b);d=new oy(c,a,b);e="";a.dataset&&a.dataset.shakaPlayerCastReceiverId?e=a.dataset.shakaPlayerCastReceiverId:b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(e=b.dataset.shakaPlayerCastReceiverId);e.length&&d.configure({castReceiverAppId:e});b.controls&&d.g.yf(!0);if(f=b.getAttribute("src"))g=document.createElement("source"),g.setAttribute("src",f),b.appendChild(g),b.removeAttribute("src");h=r(b.querySelectorAll("source"));
1085
- k=h.next();case 2:if(k.done){m.D(0);break}l=k.value;E(m,5);return z(m,d.g.ac().load(l.getAttribute("src")),7);case 7:m.D(0);break;case 5:I(m);case 3:k=h.next(),m.D(2)}})}N("shaka.ui.Overlay",oy);oy.prototype.setEnabled=oy.prototype.eh;oy.prototype.getControls=oy.prototype.ag;oy.prototype.configure=oy.prototype.configure;oy.prototype.getConfiguration=oy.prototype.getConfiguration;oy.prototype.isMobile=oy.prototype.Ud;oy.prototype.destroy=oy.prototype.destroy;var qy=0;
1086
- oy.TrackLabelFormat={LANGUAGE:qy,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var ty=0,vy=1;oy.FailReasonCode={NO_BROWSER_SUPPORT:ty,PLAYER_FAILED_TO_LOAD:vy};"complete"==document.readyState?M(function(a){if(1==a.g)return z(a,Promise.resolve(),2);ry();B(a)}):window.addEventListener("load",ry);function wy(a,b,c,d,e,f,g){function h(C,A){return C+": "+A}function k(C){return"variant"==C.type?C.audioRoles?C.audioRoles.join(", "):void 0:C.roles.join(", ")}var l=a.find(function(C){return 1==C.active}),m=hx(b);Yj(b);b.appendChild(m);m=new Map;for(var n=r(a),p=n.next();!p.done;p=n.next())p=p.value,m.has(p.language)||m.set(p.language,new Set),m.get(p.language).add(k(p));m=new Set;l=l?h(l.language,k(l)):"";n={};a=r(a);for(p=a.next();!p.done;n={Ua:n.Ua},p=a.next()){n.Ua=p.value;p=n.Ua.language;var t=
1087
- n.Ua.forced,v=f.resolve(dc.Gf),y=k(n.Ua),w=h(p,y);if(!m.has(w)){m.add(w);var x=Xj();x.addEventListener("click",function(C){return function(){c(C.Ua)}}(n));var D=S("span");x.appendChild(D);D.textContent=xy(p,f);switch(g){case qy:t&&(D.textContent+=" ("+v+")");break;case 1:y?D.textContent=y:(Sa("Track #"+n.Ua.id+" does not have a role, but the UI is configured to only show role."),D.textContent="?");t&&(D.textContent+=" ("+v+")");break;case 2:y&&(D.textContent+=": "+y);t&&(D.textContent+=" ("+v+")");
1088
- break;case 3:n.Ua.label?D.textContent=n.Ua.label:(Sa("Track #"+n.Ua.id+" does not have a label, but the UI is configured to only show labels."),D.textContent="?")}d&&w==l&&(x.appendChild(kx()),D.classList.add("shaka-chosen-item"),x.ariaSelected="true",e.textContent=D.textContent);b.appendChild(x)}}}
1089
- function xy(a,b){if(!a&&!b)return"";switch(a){case "mul":return b.resolve("MULTIPLE_LANGUAGES");case "und":return b.resolve("UNDETERMINED_LANGUAGE");case "zxx":return b.resolve("NOT_APPLICABLE")}var c=Vb(a);return a in dx?dx[a].s:c in dx?dx[c].s+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function yy(a,b,c){V.call(this,a,b);var d=this;zy(this,c);Ay(this);By(this);this.eventManager.o(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new O("submenuopen")),X(d.menu,!0),jx(d.menu)):X(d.menu,!1)})}u(yy,V);
1090
- function zy(a,b){a.button=Xj();a.button.classList.add("shaka-overflow-button");a.icon=S("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);var c=S("label");c.classList.add("shaka-overflow-button-label");c.classList.add("shaka-overflow-menu-only");a.nameSpan=S("span");c.appendChild(a.nameSpan);a.currentSelection=S("span");a.currentSelection.classList.add("shaka-current-selection-span");c.appendChild(a.currentSelection);a.button.appendChild(c);a.parent.appendChild(a.button)}
1091
- function Ay(a){a.menu=S("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=Xj();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.cc()});var b=S("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
1092
- S("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}function By(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.o(a.backButton,"click",function(){X(a.parent,!0);a.parent.childNodes[0].focus();Fx(a.controls)}))}N("shaka.ui.SettingsMenu",yy);function Cy(a,b){yy.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.o(this.localization,"locale-updated",function(){Dy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Dy(c)});this.eventManager.o(this.player,"trackschanged",function(){var d=0<c.player.Za().length;X(c.button,d);Ey(c)});this.eventManager.o(this.player,"variantchanged",
1093
- function(){Ey(c)});Dy(this);Ey(this)}u(Cy,yy);function Ey(a){var b=a.player.Za();wy(b,a.menu,function(c){a.player.wd(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.i.trackLabelFormat);jx(a.menu);a.controls.dispatchEvent(new O("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText)}
1094
- function Dy(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("LANGUAGE");a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}N("shaka.ui.AudioLanguageSelection",Cy);function Fy(){}Fy.prototype.create=function(a,b){return new Cy(a,b)};hy("language",new Fy);Lx("language",new Fy);function Gy(a,b){V.call(this,a,b);var c=this;this.h=this.controls.B;this.g=Xj();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.l=S("span");d.appendChild(this.l);this.j=S("span");this.j.classList.add("shaka-current-selection-span");
1095
- d.appendChild(this.j);this.g.appendChild(d);this.parent.appendChild(this.g);Hy(this);Iy(this);this.eventManager.o(this.localization,"locale-updated",function(){Hy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Hy(c)});this.eventManager.o(this.g,"click",function(){Jy(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){Iy(c)})}u(Gy,V);
1096
- function Jy(a){var b;M(function(c){if(1==c.g){if(a.h.ra())return a.h.Cf(),c.D(0);E(c,3);a.g.disabled=!0;return z(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,va(c,0);b=I(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new O("error",(new Map).set("detail",b)));B(c)})}function Iy(a){var b=a.h.Oe()&&a.controls.hb,c=a.h.ra();X(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");Ky(a)}
1097
- function Ky(a){a.j.textContent=a.h.ra()?a.h.ud():a.localization.resolve("OFF")}function Hy(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");Ky(a)}N("shaka.ui.CastButton",Gy);function Ly(){}Ly.prototype.create=function(a,b){return new Gy(a,b)};hy("cast",new Ly);Lx("cast",new Ly);function My(a,b){V.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");this.g.textContent="fast_forward";this.parent.appendChild(this.g);Ny(this);this.h=this.controls.i.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){Ny(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ny(c)});
1098
- this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ab())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Fe(d);c.g.setAttribute("shaka-status",d+"x")}})}u(My,V);function Ny(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}N("shaka.ui.FastForwardButton",My);function Oy(){}Oy.prototype.create=function(a,b){return new My(a,b)};Lx("fast_forward",new Oy);function Py(a,b){V.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");document.fullscreenEnabled||this.g.classList.add("shaka-hidden");this.g.textContent="fullscreen";this.parent.appendChild(this.g);Qy(this);this.eventManager.o(this.localization,"locale-updated",function(){Qy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Qy(c)});this.eventManager.o(this.g,
1099
- "click",function(){return M(function(d){return z(d,c.controls.De(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=document.fullscreenElement?"fullscreen_exit":"fullscreen";Qy(c)})}u(Py,V);function Qy(a){a.g.ariaLabel=a.localization.resolve(document.fullscreenElement?"EXIT_FULL_SCREEN":"FULL_SCREEN")}N("shaka.ui.FullscreenButton",Py);function Ry(){}Ry.prototype.create=function(a,b){return new Py(a,b)};Lx("fullscreen",new Ry);function Sy(a,b){V.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=S("span");this.j.textContent=this.localization.resolve("LOOP");d.appendChild(this.j);this.l=S("span");this.l.classList.add("shaka-current-selection-span");
1100
- d.appendChild(this.l);this.g.appendChild(d);Ty(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){Ty(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ty(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.za();c.h.ha(1)});this.m=this.video.loop;this.h=new Q(function(){c.m!=c.video.loop&&(Ty(c),c.m=c.video.loop)});this.h.ha(1)}u(Sy,V);Sy.prototype.release=function(){this.h.stop();this.h=null;V.prototype.release.call(this)};
1101
- function Ty(a){a.j.textContent=a.localization.resolve("LOOP");a.l.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}N("shaka.ui.LoopButton",Sy);function Uy(){}Uy.prototype.create=function(a,b){return new Sy(a,b)};hy("loop",new Uy);Lx("loop",new Uy);vx("loop",new Uy);function Vy(a,b){V.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.parent.appendChild(this.g);Wy(this);Xy(this);this.eventManager.o(this.localization,"locale-updated",function(){Wy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Wy(c)});this.eventManager.o(this.g,"click",function(){c.ad&&c.ad.isLinear()?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});
1102
- this.eventManager.o(this.video,"volumechange",function(){Wy(c);Xy(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){Wy(c);Xy(c)});this.eventManager.o(this.adManager,"ad-muted",function(){Wy(c);Xy(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;Wy(c);Xy(c)})}u(Vy,V);function Wy(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
1103
- function Xy(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}N("shaka.ui.MuteButton",Vy);function Yy(){}Yy.prototype.create=function(a,b){return new Vy(a,b)};Lx("mute",new Yy);function Zy(a,b){V.call(this,a,b);var c=this;this.l=this.controls.C;this.g=Xj();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=S("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");d.appendChild(this.j);
1104
- this.h=S("span");this.h.classList.add("shaka-current-selection-span");d.appendChild(this.h);this.g.appendChild(d);$y(this);this.parent.appendChild(this.g);document.pictureInPictureEnabled&&!this.video.disablePictureInPicture||X(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){$y(c)});this.eventManager.o(this.localization,"locale-changed",function(){$y(c)});this.eventManager.o(this.g,"click",function(){az(c)});this.eventManager.o(this.l,"enterpictureinpicture",function(){c.i.textContent=
1082
+ function sy(){var a,b,c,d,e,f,g,h,k,l,m,n,p;return M(function(t){switch(t.g){case 1:Tt();if(!il())return ty("shaka-ui-load-failed",uy),t["return"]();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");if(!b.length&&!a.length){t.D(2);break}if(b.length&&!a.length){c=r(b);for(d=c.next();!d.done;d=c.next())e=d.value,e.ui||(f=document.createElement("div"),g=e.parentElement,g.replaceChild(f,e),f.appendChild(e),vy(f,e));t.D(2);break}h=r(a);k=h.next();
1083
+ case 4:if(k.done){t.D(2);break}l=k.value;if(l.ui){t.D(5);break}m=null;n=r(b);for(d=n.next();!d.done;d=n.next())if(p=d.value,p.parentElement==l){m=p;break}m||(m=document.createElement("video"),m.setAttribute("playsinline",""),l.appendChild(m));E(t,7);return A(t,vy(l,m),9);case 9:va(t,5);break;case 7:return I(t),ty("shaka-ui-load-failed",wy),t["return"]();case 5:k=h.next();t.D(4);break;case 2:ty("shaka-ui-loaded"),C(t)}})}
1084
+ function ty(a,b){var c=null;void 0!=b&&(c={reasonCode:b});c=new CustomEvent(a,{detail:c});document.dispatchEvent(c)}
1085
+ function vy(a,b){var c,d,e,f,g,h,k,l;return M(function(m){switch(m.g){case 1:c=new T(b);d=new py(c,a,b);e="";a.dataset&&a.dataset.shakaPlayerCastReceiverId?e=a.dataset.shakaPlayerCastReceiverId:b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(e=b.dataset.shakaPlayerCastReceiverId);e.length&&d.configure({castReceiverAppId:e});b.controls&&d.g.yf(!0);if(f=b.getAttribute("src"))g=document.createElement("source"),g.setAttribute("src",f),b.appendChild(g),b.removeAttribute("src");h=r(b.querySelectorAll("source"));
1086
+ k=h.next();case 2:if(k.done){m.D(0);break}l=k.value;E(m,5);return A(m,d.g.ac().load(l.getAttribute("src")),7);case 7:m.D(0);break;case 5:I(m);case 3:k=h.next(),m.D(2)}})}N("shaka.ui.Overlay",py);py.prototype.setEnabled=py.prototype.eh;py.prototype.getControls=py.prototype.ag;py.prototype.configure=py.prototype.configure;py.prototype.getConfiguration=py.prototype.getConfiguration;py.prototype.isMobile=py.prototype.Ud;py.prototype.destroy=py.prototype.destroy;var ry=0;
1087
+ py.TrackLabelFormat={LANGUAGE:ry,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var uy=0,wy=1;py.FailReasonCode={NO_BROWSER_SUPPORT:uy,PLAYER_FAILED_TO_LOAD:wy};"complete"==document.readyState?M(function(a){if(1==a.g)return A(a,Promise.resolve(),2);sy();C(a)}):window.addEventListener("load",sy);function xy(a,b,c,d,e,f,g){function h(z,B){return z+": "+B}function k(z){return"variant"==z.type?z.audioRoles?z.audioRoles.join(", "):void 0:z.roles.join(", ")}var l=a.find(function(z){return 1==z.active}),m=ix(b);Yj(b);b.appendChild(m);m=new Map;for(var n=r(a),p=n.next();!p.done;p=n.next())p=p.value,m.has(p.language)||m.set(p.language,new Set),m.get(p.language).add(k(p));m=new Set;l=l?h(l.language,k(l)):"";n={};a=r(a);for(p=a.next();!p.done;n={Va:n.Va},p=a.next()){n.Va=p.value;p=n.Va.language;var t=
1088
+ n.Va.forced,v=f.resolve(dc.Gf),x=k(n.Va),y=h(p,x);if(!m.has(y)){m.add(y);var w=Xj();w.addEventListener("click",function(z){return function(){c(z.Va)}}(n));var D=S("span");w.appendChild(D);D.textContent=yy(p,f);switch(g){case ry:t&&(D.textContent+=" ("+v+")");break;case 1:x?D.textContent=x:(Sa("Track #"+n.Va.id+" does not have a role, but the UI is configured to only show role."),D.textContent="?");t&&(D.textContent+=" ("+v+")");break;case 2:x&&(D.textContent+=": "+x);t&&(D.textContent+=" ("+v+")");
1089
+ break;case 3:n.Va.label?D.textContent=n.Va.label:(Sa("Track #"+n.Va.id+" does not have a label, but the UI is configured to only show labels."),D.textContent="?")}d&&y==l&&(w.appendChild(lx()),D.classList.add("shaka-chosen-item"),w.ariaSelected="true",e.textContent=D.textContent);b.appendChild(w)}}}
1090
+ function yy(a,b){if(!a&&!b)return"";switch(a){case "mul":return b.resolve("MULTIPLE_LANGUAGES");case "und":return b.resolve("UNDETERMINED_LANGUAGE");case "zxx":return b.resolve("NOT_APPLICABLE")}var c=Vb(a);return a in ex?ex[a].s:c in ex?ex[c].s+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function zy(a,b,c){V.call(this,a,b);var d=this;Ay(this,c);By(this);Cy(this);this.eventManager.o(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new O("submenuopen")),X(d.menu,!0),kx(d.menu)):X(d.menu,!1)})}u(zy,V);
1091
+ function Ay(a,b){a.button=Xj();a.button.classList.add("shaka-overflow-button");a.icon=S("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);var c=S("label");c.classList.add("shaka-overflow-button-label");c.classList.add("shaka-overflow-menu-only");a.nameSpan=S("span");c.appendChild(a.nameSpan);a.currentSelection=S("span");a.currentSelection.classList.add("shaka-current-selection-span");c.appendChild(a.currentSelection);a.button.appendChild(c);a.parent.appendChild(a.button)}
1092
+ function By(a){a.menu=S("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=Xj();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.cc()});var b=S("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
1093
+ S("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}function Cy(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.o(a.backButton,"click",function(){X(a.parent,!0);a.parent.childNodes[0].focus();Gx(a.controls)}))}N("shaka.ui.SettingsMenu",zy);function Dy(a,b){zy.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.o(this.localization,"locale-updated",function(){Ey(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ey(c)});this.eventManager.o(this.player,"trackschanged",function(){var d=0<c.player.$a().length;X(c.button,d);Fy(c)});this.eventManager.o(this.player,"variantchanged",
1094
+ function(){Fy(c)});Ey(this);Fy(this)}u(Dy,zy);function Fy(a){var b=a.player.$a();xy(b,a.menu,function(c){a.player.wd(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.i.trackLabelFormat);kx(a.menu);a.controls.dispatchEvent(new O("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText)}
1095
+ function Ey(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("LANGUAGE");a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}N("shaka.ui.AudioLanguageSelection",Dy);function Gy(){}Gy.prototype.create=function(a,b){return new Dy(a,b)};iy("language",new Gy);Mx("language",new Gy);function Hy(a,b){V.call(this,a,b);var c=this;this.h=this.controls.B;this.g=Xj();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.l=S("span");d.appendChild(this.l);this.j=S("span");this.j.classList.add("shaka-current-selection-span");
1096
+ d.appendChild(this.j);this.g.appendChild(d);this.parent.appendChild(this.g);Iy(this);Jy(this);this.eventManager.o(this.localization,"locale-updated",function(){Iy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Iy(c)});this.eventManager.o(this.g,"click",function(){Ky(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){Jy(c)})}u(Hy,V);
1097
+ function Ky(a){var b;M(function(c){if(1==c.g){if(a.h.ra())return a.h.Cf(),c.D(0);E(c,3);a.g.disabled=!0;return A(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,va(c,0);b=I(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new O("error",(new Map).set("detail",b)));C(c)})}function Jy(a){var b=a.h.Oe()&&a.controls.hb,c=a.h.ra();X(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");Ly(a)}
1098
+ function Ly(a){a.j.textContent=a.h.ra()?a.h.ud():a.localization.resolve("OFF")}function Iy(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");Ly(a)}N("shaka.ui.CastButton",Hy);function My(){}My.prototype.create=function(a,b){return new Hy(a,b)};iy("cast",new My);Mx("cast",new My);function Ny(a,b){V.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");this.g.textContent="fast_forward";this.parent.appendChild(this.g);Oy(this);this.h=this.controls.i.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){Oy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Oy(c)});
1099
+ this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ab())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Fe(d);c.g.setAttribute("shaka-status",d+"x")}})}u(Ny,V);function Oy(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}N("shaka.ui.FastForwardButton",Ny);function Py(){}Py.prototype.create=function(a,b){return new Ny(a,b)};Mx("fast_forward",new Py);function Qy(a,b){V.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");document.fullscreenEnabled||this.g.classList.add("shaka-hidden");this.g.textContent="fullscreen";this.parent.appendChild(this.g);Ry(this);this.eventManager.o(this.localization,"locale-updated",function(){Ry(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ry(c)});this.eventManager.o(this.g,
1100
+ "click",function(){return M(function(d){return A(d,c.controls.De(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=document.fullscreenElement?"fullscreen_exit":"fullscreen";Ry(c)})}u(Qy,V);function Ry(a){a.g.ariaLabel=a.localization.resolve(document.fullscreenElement?"EXIT_FULL_SCREEN":"FULL_SCREEN")}N("shaka.ui.FullscreenButton",Qy);function Sy(){}Sy.prototype.create=function(a,b){return new Qy(a,b)};Mx("fullscreen",new Sy);function Ty(a,b){V.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=S("span");this.j.textContent=this.localization.resolve("LOOP");d.appendChild(this.j);this.l=S("span");this.l.classList.add("shaka-current-selection-span");
1101
+ d.appendChild(this.l);this.g.appendChild(d);Uy(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){Uy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Uy(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.za();c.h.ha(1)});this.m=this.video.loop;this.h=new Q(function(){c.m!=c.video.loop&&(Uy(c),c.m=c.video.loop)});this.h.ha(1)}u(Ty,V);Ty.prototype.release=function(){this.h.stop();this.h=null;V.prototype.release.call(this)};
1102
+ function Uy(a){a.j.textContent=a.localization.resolve("LOOP");a.l.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}N("shaka.ui.LoopButton",Ty);function Vy(){}Vy.prototype.create=function(a,b){return new Ty(a,b)};iy("loop",new Vy);Mx("loop",new Vy);wx("loop",new Vy);function Wy(a,b){V.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.parent.appendChild(this.g);Xy(this);Yy(this);this.eventManager.o(this.localization,"locale-updated",function(){Xy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Xy(c)});this.eventManager.o(this.g,"click",function(){c.ad&&c.ad.isLinear()?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});
1103
+ this.eventManager.o(this.video,"volumechange",function(){Xy(c);Yy(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){Xy(c);Yy(c)});this.eventManager.o(this.adManager,"ad-muted",function(){Xy(c);Yy(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;Xy(c);Yy(c)})}u(Wy,V);function Xy(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
1104
+ function Yy(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}N("shaka.ui.MuteButton",Wy);function Zy(){}Zy.prototype.create=function(a,b){return new Wy(a,b)};Mx("mute",new Zy);function $y(a,b){V.call(this,a,b);var c=this;this.l=this.controls.C;this.g=Xj();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=S("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");d.appendChild(this.j);
1105
+ this.h=S("span");this.h.classList.add("shaka-current-selection-span");d.appendChild(this.h);this.g.appendChild(d);az(this);this.parent.appendChild(this.g);document.pictureInPictureEnabled&&!this.video.disablePictureInPicture||X(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){az(c)});this.eventManager.o(this.localization,"locale-changed",function(){az(c)});this.eventManager.o(this.g,"click",function(){bz(c)});this.eventManager.o(this.l,"enterpictureinpicture",function(){c.i.textContent=
1105
1106
  "branding_watermark";c.g.ariaLabel=c.localization.resolve("EXIT_PICTURE_IN_PICTURE");c.h.textContent=c.localization.resolve("ON")});this.eventManager.o(this.l,"leavepictureinpicture",function(){c.i.textContent="picture_in_picture_alt";c.g.ariaLabel=c.localization.resolve("ENTER_PICTURE_IN_PICTURE");c.h.textContent=c.localization.resolve("OFF")});this.eventManager.o(this.controls,"caststatuschanged",function(e){e.newStatus?document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&X(c.g,!1):
1106
- document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&X(c.g,!0)});this.eventManager.o(this.player,"trackschanged",function(){bz(c)})}u(Zy,V);function az(a){var b;M(function(c){if(1==c.g)return E(c,2),document.pictureInPictureElement?z(c,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),z(c,a.video.requestPictureInPicture(),5));if(2!=c.g)return va(c,0);b=I(c);a.controls.dispatchEvent(new O("error",(new Map).set("detail",b)));B(c)})}
1107
- function $y(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");a.g.ariaLabel=a.localization.resolve(document.pictureInPictureElement?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve(document.pictureInPictureElement?"ON":"OFF")}
1108
- function bz(a){M(function(b){if(!document.pictureInPictureEnabled||a.video.disablePictureInPicture)return X(a.g,!1),b.D(0);if(!a.player||!a.player.jf())return X(a.g,!0),b.D(0);X(a.g,!1);return document.pictureInPictureElement?z(b,document.exitPictureInPicture(),0):b.D(0)})}N("shaka.ui.PipButton",Zy);function cz(){}cz.prototype.create=function(a,b){return new Zy(a,b)};hy("picture_in_picture",new cz);Lx("picture_in_picture",new cz);vx("picture_in_picture",new cz);function dz(a,b){yy.call(this,a,b,"slow_motion_video");var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.button.classList.add("shaka-tooltip-status");this.eventManager.o(this.localization,"locale-updated",function(){ez(c)});this.eventManager.o(this.localization,"locale-changed",function(){ez(c)});this.eventManager.o(this.player,"ratechange",function(){fz(c,c.player.Ab())});this.g=new Map(this.controls.i.playbackRates.map(function(d){return[d+
1109
- "x",d]}));ez(this);gz(this);fz(this,this.player.Ab())}u(dz,yy);function ez(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("PLAYBACK_RATE");a.nameSpan.textContent=a.localization.resolve("PLAYBACK_RATE");a.backSpan.textContent=a.localization.resolve("PLAYBACK_RATE")}
1110
- function fz(a,b){var c=ix(a.menu,"material-icons-round shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");d.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(e){return a.g.get(e.textContent)==b}))d=c.parentElement,d.appendChild(kx()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
1111
- "x")}function gz(a){for(var b={},c=r(a.g.keys()),d=c.next();!d.done;b={sc:b.sc},d=c.next()){b.sc=d.value;d=Xj();var e=S("span");e.textContent=b.sc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.sc);a.video.defaultPlaybackRate=a.g.get(f.sc)}}(b));a.menu.appendChild(d)}jx(a.menu)}N("shaka.ui.PlaybackRateSelection",dz);function hz(){}hz.prototype.create=function(a,b){return new dz(a,b)};hy("playback_rate",new hz);Lx("playback_rate",new hz);function iz(a,b){V.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-current-time");jz(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.T()&&(c.video.currentTime=c.player.La().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.$,e=c.controls.bf(),f=c.video.duration,g=c.player.La(),h=g.end-g.start;c.player.T()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(jz(c,"- "+lx(e,f)),c.g.disabled=
1112
- !1):(jz(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=lx(e,d),f&&(e+=" / "+lx(f,d)),jz(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.T()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}u(iz,V);function jz(a,b){b!=a.g.textContent&&(a.g.textContent=b)}N("shaka.ui.PresentationTimeTracker",iz);function kz(){}kz.prototype.create=function(a,b){return new iz(a,b)};Lx("time_and_duration",new kz);function lz(a,b){yy.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(){mz(c)});this.eventManager.o(this.localization,"locale-changed",function(){mz(c)});this.eventManager.o(this.player,"variantchanged",function(){nz(c)});this.eventManager.o(this.player,"trackschanged",function(){nz(c)});this.eventManager.o(this.player,
1113
- "abrstatuschanged",function(){nz(c)});nz(this);mz(this)}u(lz,yy);
1114
- function nz(a){var b=a.player.Za();if(b.length&&!b[0].height)X(a.menu,!1),X(a.button,!1);else{X(a.button,!0);b.sort(function(k,l){return l.height-k.height});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 b.findIndex(function(m){return m.height==k.height})==l});var d=hx(a.menu);Yj(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=r(b),g=f.next();!g.done;e=
1115
- {vc:e.vc},g=f.next()){e.vc=g.value;g=Xj();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.vc;a.player.configure({abr:{enabled:!1}});a.player.qe(l,a.controls.i.clearBufferOnQualityChange)}}(e));var h=S("span");h.textContent=e.vc.height+"p";g.appendChild(h);d||e.vc!=c||(g.ariaSelected="true",g.appendChild(kx()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=Xj();e.classList.add("shaka-enable-abr-button");
1116
- a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});nz(a)});a.g=S("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(kx()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",a.currentSelection.textContent);a.menu.appendChild(e);jx(a.menu);a.controls.dispatchEvent(new O("resolutionselectionupdated"))}}
1117
- function mz(a){a.button.ariaLabel=a.localization.resolve("RESOLUTION");a.backButton.ariaLabel=a.localization.resolve("RESOLUTION");a.backSpan.textContent=a.localization.resolve("RESOLUTION");a.nameSpan.textContent=a.localization.resolve("RESOLUTION");a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}N("shaka.ui.ResolutionSelection",lz);function oz(){}
1118
- oz.prototype.create=function(a,b){return new lz(a,b)};hy("quality",new oz);Lx("quality",new oz);function pz(a,b){V.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status",this.localization.resolve("OFF"));this.g.textContent="fast_rewind";this.parent.appendChild(this.g);qz(this);this.h=this.controls.i.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){qz(c)});this.eventManager.o(this.localization,"locale-changed",function(){qz(c)});
1119
- this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ab())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Fe(d);c.g.setAttribute("shaka-status",d+"x")}})}u(pz,V);function qz(a){a.g.ariaLabel=a.localization.resolve("REWIND")}N("shaka.ui.RewindButton",pz);function rz(){}rz.prototype.create=function(a,b){return new pz(a,b)};Lx("rewind",new rz);function sz(a,b){V.call(this,a,b);var c=this;this.j=S("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=S("div");this.h.classList.add("shaka-skip-ad-counter");X(this.h,!1);this.j.appendChild(this.h);this.g=Xj();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;X(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);tz(this);this.i=new Q(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
1120
- d:(c.i.stop(),X(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){tz(c)});this.eventManager.o(this.localization,"locale-changed",function(){tz(c)});this.eventManager.o(this.adManager,"ad-started",function(){uz(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),X(c.h,!1))});this.eventManager.o(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;X(c.g,!1);X(c.h,!1)});this.eventManager.o(this.g,
1121
- "click",function(){c.ad.skip()});this.ad&&uz(this)}u(sz,V);sz.prototype.release=function(){this.i.stop();this.i=null;V.prototype.release.call(this)};function tz(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function uz(a){a.ad.isSkippable()&&(X(a.g,!0),X(a.h,!0),a.h.textContent="",a.i.za(),a.i.ha(.5))}N("shaka.ui.SkipAdButton",sz);function vz(a,b){px.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.button.classList.add("shaka-tooltip");this.h();this.g()}u(vz,px);vz.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};vz.prototype.g=function(){if(this.video.ended)this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};
1122
- N("shaka.ui.SmallPlayButton",vz);function wz(){}wz.prototype.create=function(a,b){return new vz(a,b)};Lx("play_pause",new wz);function xz(a,b){V.call(this,a,b);var c=S("div");c.classList.add("shaka-spacer");c.ariaHidden="true";this.parent.appendChild(c)}u(xz,V);N("shaka.ui.Spacer",xz);function yz(){}yz.prototype.create=function(a,b){return new xz(a,b)};Lx("spacer",new yz);function zz(a,b){function c(l){return lx(h.h[l],!1)+" (m)"}function d(l){return Math.round(h.h[l]/1E3)+" (kbits/s)"}function e(l){return h.h[l].toFixed(2)+" (s)"}function f(l){return h.h[l]+" (frames)"}function g(l){return h.h[l]+" (px)"}V.call(this,a,b);var h=this;this.i=Xj();this.i.classList.add("shaka-statistics-button");this.j=S("i");this.j.classList.add("material-icons-round");this.j.textContent="insert_chart_outlined";this.i.appendChild(this.j);var k=S("label");k.classList.add("shaka-overflow-button-label");
1107
+ document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&X(c.g,!0)});this.eventManager.o(this.player,"trackschanged",function(){cz(c)})}u($y,V);function bz(a){var b;M(function(c){if(1==c.g)return E(c,2),document.pictureInPictureElement?A(c,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),A(c,a.video.requestPictureInPicture(),5));if(2!=c.g)return va(c,0);b=I(c);a.controls.dispatchEvent(new O("error",(new Map).set("detail",b)));C(c)})}
1108
+ function az(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");a.g.ariaLabel=a.localization.resolve(document.pictureInPictureElement?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve(document.pictureInPictureElement?"ON":"OFF")}
1109
+ function cz(a){M(function(b){if(!document.pictureInPictureEnabled||a.video.disablePictureInPicture)return X(a.g,!1),b.D(0);if(!a.player||!a.player.jf())return X(a.g,!0),b.D(0);X(a.g,!1);return document.pictureInPictureElement?A(b,document.exitPictureInPicture(),0):b.D(0)})}N("shaka.ui.PipButton",$y);function dz(){}dz.prototype.create=function(a,b){return new $y(a,b)};iy("picture_in_picture",new dz);Mx("picture_in_picture",new dz);wx("picture_in_picture",new dz);function ez(a,b){zy.call(this,a,b,"slow_motion_video");var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.button.classList.add("shaka-tooltip-status");this.eventManager.o(this.localization,"locale-updated",function(){fz(c)});this.eventManager.o(this.localization,"locale-changed",function(){fz(c)});this.eventManager.o(this.player,"ratechange",function(){gz(c,c.player.Ab())});this.g=new Map(this.controls.i.playbackRates.map(function(d){return[d+
1110
+ "x",d]}));fz(this);hz(this);gz(this,this.player.Ab())}u(ez,zy);function fz(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("PLAYBACK_RATE");a.nameSpan.textContent=a.localization.resolve("PLAYBACK_RATE");a.backSpan.textContent=a.localization.resolve("PLAYBACK_RATE")}
1111
+ function gz(a,b){var c=jx(a.menu,"material-icons-round shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");d.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(e){return a.g.get(e.textContent)==b}))d=c.parentElement,d.appendChild(lx()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
1112
+ "x")}function hz(a){for(var b={},c=r(a.g.keys()),d=c.next();!d.done;b={sc:b.sc},d=c.next()){b.sc=d.value;d=Xj();var e=S("span");e.textContent=b.sc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.sc);a.video.defaultPlaybackRate=a.g.get(f.sc)}}(b));a.menu.appendChild(d)}kx(a.menu)}N("shaka.ui.PlaybackRateSelection",ez);function iz(){}iz.prototype.create=function(a,b){return new ez(a,b)};iy("playback_rate",new iz);Mx("playback_rate",new iz);function jz(a,b){V.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-current-time");kz(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.T()&&(c.video.currentTime=c.player.La().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.$,e=c.controls.bf(),f=c.video.duration,g=c.player.La(),h=g.end-g.start;c.player.T()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(kz(c,"- "+mx(e,f)),c.g.disabled=
1113
+ !1):(kz(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=mx(e,d),f&&(e+=" / "+mx(f,d)),kz(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.T()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}u(jz,V);function kz(a,b){b!=a.g.textContent&&(a.g.textContent=b)}N("shaka.ui.PresentationTimeTracker",jz);function lz(){}lz.prototype.create=function(a,b){return new jz(a,b)};Mx("time_and_duration",new lz);function mz(a,b){zy.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(){nz(c)});this.eventManager.o(this.localization,"locale-changed",function(){nz(c)});this.eventManager.o(this.player,"variantchanged",function(){oz(c)});this.eventManager.o(this.player,"trackschanged",function(){oz(c)});this.eventManager.o(this.player,
1114
+ "abrstatuschanged",function(){oz(c)});oz(this);nz(this)}u(mz,zy);
1115
+ function oz(a){var b=a.player.$a();if(b.length&&!b[0].height)X(a.menu,!1),X(a.button,!1);else{X(a.button,!0);b.sort(function(k,l){return l.height-k.height});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 b.findIndex(function(m){return m.height==k.height})==l});var d=ix(a.menu);Yj(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=r(b),g=f.next();!g.done;e=
1116
+ {vc:e.vc},g=f.next()){e.vc=g.value;g=Xj();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.vc;a.player.configure({abr:{enabled:!1}});a.player.qe(l,a.controls.i.clearBufferOnQualityChange)}}(e));var h=S("span");h.textContent=e.vc.height+"p";g.appendChild(h);d||e.vc!=c||(g.ariaSelected="true",g.appendChild(lx()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=Xj();e.classList.add("shaka-enable-abr-button");
1117
+ a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});oz(a)});a.g=S("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(lx()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",a.currentSelection.textContent);a.menu.appendChild(e);kx(a.menu);a.controls.dispatchEvent(new O("resolutionselectionupdated"))}}
1118
+ function nz(a){a.button.ariaLabel=a.localization.resolve("RESOLUTION");a.backButton.ariaLabel=a.localization.resolve("RESOLUTION");a.backSpan.textContent=a.localization.resolve("RESOLUTION");a.nameSpan.textContent=a.localization.resolve("RESOLUTION");a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}N("shaka.ui.ResolutionSelection",mz);function pz(){}
1119
+ pz.prototype.create=function(a,b){return new mz(a,b)};iy("quality",new pz);Mx("quality",new pz);function qz(a,b){V.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status",this.localization.resolve("OFF"));this.g.textContent="fast_rewind";this.parent.appendChild(this.g);rz(this);this.h=this.controls.i.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){rz(c)});this.eventManager.o(this.localization,"locale-changed",function(){rz(c)});
1120
+ this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ab())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Fe(d);c.g.setAttribute("shaka-status",d+"x")}})}u(qz,V);function rz(a){a.g.ariaLabel=a.localization.resolve("REWIND")}N("shaka.ui.RewindButton",qz);function sz(){}sz.prototype.create=function(a,b){return new qz(a,b)};Mx("rewind",new sz);function tz(a,b){V.call(this,a,b);var c=this;this.j=S("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=S("div");this.h.classList.add("shaka-skip-ad-counter");X(this.h,!1);this.j.appendChild(this.h);this.g=Xj();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;X(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);uz(this);this.i=new Q(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
1121
+ d:(c.i.stop(),X(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){uz(c)});this.eventManager.o(this.localization,"locale-changed",function(){uz(c)});this.eventManager.o(this.adManager,"ad-started",function(){vz(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),X(c.h,!1))});this.eventManager.o(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;X(c.g,!1);X(c.h,!1)});this.eventManager.o(this.g,
1122
+ "click",function(){c.ad.skip()});this.ad&&vz(this)}u(tz,V);tz.prototype.release=function(){this.i.stop();this.i=null;V.prototype.release.call(this)};function uz(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function vz(a){a.ad.isSkippable()&&(X(a.g,!0),X(a.h,!0),a.h.textContent="",a.i.za(),a.i.ha(.5))}N("shaka.ui.SkipAdButton",tz);function wz(a,b){qx.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.button.classList.add("shaka-tooltip");this.h();this.g()}u(wz,qx);wz.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};wz.prototype.g=function(){if(this.video.ended)this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};
1123
+ N("shaka.ui.SmallPlayButton",wz);function xz(){}xz.prototype.create=function(a,b){return new wz(a,b)};Mx("play_pause",new xz);function yz(a,b){V.call(this,a,b);var c=S("div");c.classList.add("shaka-spacer");c.ariaHidden="true";this.parent.appendChild(c)}u(yz,V);N("shaka.ui.Spacer",yz);function zz(){}zz.prototype.create=function(a,b){return new yz(a,b)};Mx("spacer",new zz);function Az(a,b){function c(l){return mx(h.h[l],!1)+" (m)"}function d(l){return Math.round(h.h[l]/1E3)+" (kbits/s)"}function e(l){return h.h[l].toFixed(2)+" (s)"}function f(l){return h.h[l]+" (frames)"}function g(l){return h.h[l]+" (px)"}V.call(this,a,b);var h=this;this.i=Xj();this.i.classList.add("shaka-statistics-button");this.j=S("i");this.j.classList.add("material-icons-round");this.j.textContent="insert_chart_outlined";this.i.appendChild(this.j);var k=S("label");k.classList.add("shaka-overflow-button-label");
1123
1124
  this.A=S("span");k.appendChild(this.A);this.m=S("span");this.m.classList.add("shaka-current-selection-span");k.appendChild(this.m);this.i.appendChild(k);this.parent.appendChild(this.i);this.g=S("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-show-controls-on-mouse-over");this.g.classList.add("shaka-statistics-container");this.g.classList.add("shaka-hidden");this.controls.g.appendChild(this.g);this.F=[];this.G=["stateHistory","switchHistory"];this.h=this.player.getStats();
1124
- this.B={};this.C={width:g,height:g,completionPercent:function(l){return h.h[l]+" (%)"},bufferingTime:e,drmTimeSeconds:e,licenseTime:e,liveLatency:e,loadLatency:e,manifestTimeSeconds:e,estimatedBandwidth:d,streamBandwidth:d,maxSegmentDuration:c,pauseTime:c,playTime:c,corruptedFrames:f,decodedFrames:f,droppedFrames:f};this.l=new Q(function(){h.h=h.player.getStats();for(var l=r(h.F),m=l.next();!m.done;m=l.next())m=m.value,h.B[m].textContent=h.C[m](m)});Az(this);Bz(this);this.eventManager.o(this.localization,
1125
- "locale-updated",function(){Az(h)});this.eventManager.o(this.localization,"locale-changed",function(){Az(h)});this.eventManager.o(this.i,"click",function(){X(h.parent,!1);h.g.classList.contains("shaka-hidden")?(h.j.textContent="insert_chart",h.l.ha(.1),X(h.g,!0)):(h.j.textContent="insert_chart_outlined",h.l.stop(),X(h.g,!1));Az(h)})}u(zz,V);
1126
- function Az(a){a.A.textContent=a.localization.resolve("STATISTICS");a.i.ariaLabel=a.localization.resolve("STATISTICS");a.m.textContent=a.localization.resolve(a.g.classList.contains("shaka-hidden")?"OFF":"ON")}
1127
- function Bz(a){for(var b=r(a.controls.i.statisticsList),c=b.next();!c.done;c=b.next())if(c=c.value,c in a.h&&!a.G.includes(c)){var d=a.g,e=d.appendChild,f=a,g=S("div"),h=S("label");h.textContent=c+":";g.appendChild(h);h=S("span");h.textContent=f.C[c](c);g.appendChild(h);f.B[c]=h;e.call(d,g);a.F.push(c)}else Sa("Unrecognized statistic element:",c)}zz.prototype.release=function(){this.l.stop();this.l=null;V.prototype.release.call(this)};N("shaka.ui.StatisticsButton",zz);function Cz(){}
1128
- Cz.prototype.create=function(a,b){return new zz(a,b)};hy("statistics",new Cz);vx("statistics",new Cz);function Dz(a,b){yy.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Ob()?this.button.ariaPressed="true":this.button.ariaPressed="false";Ez(this);this.eventManager.o(this.localization,"locale-updated",function(){Fz(c);Gz(c)});this.eventManager.o(this.localization,"locale-changed",function(){Fz(c);Gz(c)});this.eventManager.o(this.player,
1129
- "texttrackvisibility",function(){Hz(c);Gz(c)});this.eventManager.o(this.player,"textchanged",function(){Gz(c)});this.eventManager.o(this.player,"trackschanged",function(){Iz(c)});Hz(this);Fz(this);Gz(this);Iz(this)}u(Dz,yy);function Ez(a){var b=Xj();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(kx());a.g=S("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
1130
- function Hz(a){a.player.Ob()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new O("captionselectionupdated"))}
1131
- function Gz(a){var b=a.player.pb();wy(b,a.menu,function(c){return Jz(a,c)},a.player.Ob(),a.currentSelection,a.localization,a.controls.i.trackLabelFormat);b=Xj();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.ze(!1);Gz(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Ob()||(b.ariaSelected="true",b.appendChild(kx()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));a.button.setAttribute("shaka-status",
1132
- a.currentSelection.textContent);jx(a.menu);a.controls.dispatchEvent(new O("captionselectionupdated"))}function Jz(a,b){return M(function(c){a.player.pe(b);return z(c,a.player.ze(!0),0)})}function Fz(a){a.button.ariaLabel=a.localization.resolve("CAPTIONS");a.backButton.ariaLabel=a.localization.resolve("BACK");a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}
1133
- function Iz(a){var b=0<a.player.pb().length;X(a.button,b);Gz(a)}N("shaka.ui.TextSelection",Dz);function Kz(){}Kz.prototype.create=function(a,b){return new Dz(a,b)};hy("captions",new Kz);Lx("captions",new Kz);function Lz(a,b){xx.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.h=this.controls.i;this.eventManager.o(this.video,"volumechange",function(){return Mz(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return Nz(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return Nz(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return Mz(c)});this.eventManager.o(this.localization,"locale-updated",function(){return Oz(c)});
1134
- this.eventManager.o(this.localization,"locale-changed",function(){return Oz(c)});Mz(this);Oz(this);if(this.ad)this.onChange()}u(Lz,xx);Lz.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()):(this.video.volume=this.getValue(),this.video.muted=0==this.video.volume?!0:!1)};function Mz(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);Pz(a)}function Nz(a){var b=a.ad.getVolume();a.setValue(b);Pz(a)}
1135
- function Pz(a){var b=a.h.volumeBarColors,c=["to right"];c.push(b.level+100*a.getValue()+"%");c.push(b.base+100*a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function Oz(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}N("shaka.ui.VolumeBar",Lz);function Qz(){}Qz.prototype.create=function(a,b){return new Lz(a,b)};Lx("volume",new Qz);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
1125
+ this.B={};this.C={width:g,height:g,completionPercent:function(l){return h.h[l]+" (%)"},bufferingTime:e,drmTimeSeconds:e,licenseTime:e,liveLatency:e,loadLatency:e,manifestTimeSeconds:e,estimatedBandwidth:d,streamBandwidth:d,maxSegmentDuration:c,pauseTime:c,playTime:c,corruptedFrames:f,decodedFrames:f,droppedFrames:f};this.l=new Q(function(){h.h=h.player.getStats();for(var l=r(h.F),m=l.next();!m.done;m=l.next())m=m.value,h.B[m].textContent=h.C[m](m)});Bz(this);Cz(this);this.eventManager.o(this.localization,
1126
+ "locale-updated",function(){Bz(h)});this.eventManager.o(this.localization,"locale-changed",function(){Bz(h)});this.eventManager.o(this.i,"click",function(){X(h.parent,!1);h.g.classList.contains("shaka-hidden")?(h.j.textContent="insert_chart",h.l.ha(.1),X(h.g,!0)):(h.j.textContent="insert_chart_outlined",h.l.stop(),X(h.g,!1));Bz(h)})}u(Az,V);
1127
+ function Bz(a){a.A.textContent=a.localization.resolve("STATISTICS");a.i.ariaLabel=a.localization.resolve("STATISTICS");a.m.textContent=a.localization.resolve(a.g.classList.contains("shaka-hidden")?"OFF":"ON")}
1128
+ function Cz(a){for(var b=r(a.controls.i.statisticsList),c=b.next();!c.done;c=b.next())if(c=c.value,c in a.h&&!a.G.includes(c)){var d=a.g,e=d.appendChild,f=a,g=S("div"),h=S("label");h.textContent=c+":";g.appendChild(h);h=S("span");h.textContent=f.C[c](c);g.appendChild(h);f.B[c]=h;e.call(d,g);a.F.push(c)}else Sa("Unrecognized statistic element:",c)}Az.prototype.release=function(){this.l.stop();this.l=null;V.prototype.release.call(this)};N("shaka.ui.StatisticsButton",Az);function Dz(){}
1129
+ Dz.prototype.create=function(a,b){return new Az(a,b)};iy("statistics",new Dz);wx("statistics",new Dz);function Ez(a,b){zy.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Pb()?this.button.ariaPressed="true":this.button.ariaPressed="false";Fz(this);this.eventManager.o(this.localization,"locale-updated",function(){Gz(c);Hz(c)});this.eventManager.o(this.localization,"locale-changed",function(){Gz(c);Hz(c)});this.eventManager.o(this.player,
1130
+ "texttrackvisibility",function(){Iz(c);Hz(c)});this.eventManager.o(this.player,"textchanged",function(){Hz(c)});this.eventManager.o(this.player,"trackschanged",function(){Jz(c)});Iz(this);Gz(this);Hz(this);Jz(this)}u(Ez,zy);function Fz(a){var b=Xj();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(lx());a.g=S("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
1131
+ function Iz(a){a.player.Pb()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new O("captionselectionupdated"))}
1132
+ function Hz(a){var b=a.player.pb();xy(b,a.menu,function(c){return Kz(a,c)},a.player.Pb(),a.currentSelection,a.localization,a.controls.i.trackLabelFormat);b=Xj();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.ze(!1);Hz(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Pb()||(b.ariaSelected="true",b.appendChild(lx()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));a.button.setAttribute("shaka-status",
1133
+ a.currentSelection.textContent);kx(a.menu);a.controls.dispatchEvent(new O("captionselectionupdated"))}function Kz(a,b){return M(function(c){a.player.pe(b);return A(c,a.player.ze(!0),0)})}function Gz(a){a.button.ariaLabel=a.localization.resolve("CAPTIONS");a.backButton.ariaLabel=a.localization.resolve("BACK");a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}
1134
+ function Jz(a){var b=0<a.player.pb().length;X(a.button,b);Hz(a)}N("shaka.ui.TextSelection",Ez);function Lz(){}Lz.prototype.create=function(a,b){return new Ez(a,b)};iy("captions",new Lz);Mx("captions",new Lz);function Mz(a,b){yx.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.h=this.controls.i;this.eventManager.o(this.video,"volumechange",function(){return Nz(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return Oz(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return Oz(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return Nz(c)});this.eventManager.o(this.localization,"locale-updated",function(){return Pz(c)});
1135
+ this.eventManager.o(this.localization,"locale-changed",function(){return Pz(c)});Nz(this);Pz(this);if(this.ad)this.onChange()}u(Mz,yx);Mz.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()):(this.video.volume=this.getValue(),this.video.muted=0==this.video.volume?!0:!1)};function Nz(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);Qz(a)}function Oz(a){var b=a.ad.getVolume();a.setValue(b);Qz(a)}
1136
+ function Qz(a){var b=a.h.volumeBarColors,c=["to right"];c.push(b.level+100*a.getValue()+"%");c.push(b.base+100*a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function Pz(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}N("shaka.ui.VolumeBar",Mz);function Rz(){}Rz.prototype.create=function(a,b){return new Mz(a,b)};Mx("volume",new Rz);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
1136
1137
 
1137
1138
  //# sourceMappingURL=shaka-player.ui.map