tiny-livestream/static/shaka-player.ui.js

713 lines
321 KiB
JavaScript

(function(){var innerGlobal=typeof window!="undefined"?window:global;var exportTo={};(function(window,global){var n,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(b,c,d){b!=Array.prototype&&b!=Object.prototype&&(b[c]=d.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function ea(){ea=function(){};ba.Symbol||(ba.Symbol=fa)}var fa=function(){var b=0;return function(c){return"jscomp_symbol_"+(c||"")+b++}}();
function ha(){ea();var b=ba.Symbol.iterator;b||(b=ba.Symbol.iterator=ba.Symbol("iterator"));"function"!=typeof Array.prototype[b]&&aa(Array.prototype,b,{configurable:!0,writable:!0,value:function(){return ia(this)}});ha=function(){}}function ia(b){var c=0;return ja(function(){return c<b.length?{done:!1,value:b[c++]}:{done:!0}})}function ja(b){ha();b={next:b};b[ba.Symbol.iterator]=function(){return this};return b}function q(b){ha();var c=b[Symbol.iterator];return c?c.call(b):ia(b)}
function ka(b,c){if(c){for(var d=ba,e=b.split("."),f=0;f<e.length-1;f++){var g=e[f];g in d||(d[g]={});d=d[g]}e=e[e.length-1];f=d[e];g=c(f);g!=f&&null!=g&&aa(d,e,{configurable:!0,writable:!0,value:g})}}
ka("Promise",function(b){function c(b){this.b=0;this.g=void 0;this.a=[];var c=this.c();try{b(c.resolve,c.reject)}catch(l){c.reject(l)}}function d(){this.a=null}function e(b){return b instanceof c?b:new c(function(c){c(b)})}if(b)return b;d.prototype.b=function(b){null==this.a&&(this.a=[],this.f());this.a.push(b)};d.prototype.f=function(){var b=this;this.c(function(){b.j()})};var f=ba.setTimeout;d.prototype.c=function(b){f(b,0)};d.prototype.j=function(){for(;this.a&&this.a.length;){var b=this.a;this.a=
[];for(var c=0;c<b.length;++c){var d=b[c];b[c]=null;try{d()}catch(m){this.g(m)}}}this.a=null};d.prototype.g=function(b){this.c(function(){throw b;})};c.prototype.c=function(){function b(b){return function(e){d||(d=!0,b.call(c,e))}}var c=this,d=!1;return{resolve:b(this.u),reject:b(this.f)}};c.prototype.u=function(b){if(b===this)this.f(new TypeError("A Promise cannot resolve to itself"));else if(b instanceof c)this.v(b);else{a:switch(typeof b){case "object":var d=null!=b;break a;case "function":d=!0;
break a;default:d=!1}d?this.o(b):this.j(b)}};c.prototype.o=function(b){var c=void 0;try{c=b.then}catch(l){this.f(l);return}"function"==typeof c?this.w(c,b):this.j(b)};c.prototype.f=function(b){this.l(2,b)};c.prototype.j=function(b){this.l(1,b)};c.prototype.l=function(b,c){if(0!=this.b)throw Error("Cannot settle("+b+", "+c+"): Promise already settled in state"+this.b);this.b=b;this.g=c;this.m()};c.prototype.m=function(){if(null!=this.a){for(var b=0;b<this.a.length;++b)g.b(this.a[b]);this.a=null}};
var g=new d;c.prototype.v=function(b){var c=this.c();b.cc(c.resolve,c.reject)};c.prototype.w=function(b,c){var d=this.c();try{b.call(c,d.resolve,d.reject)}catch(m){d.reject(m)}};c.prototype.then=function(b,d){function e(b,c){return"function"==typeof b?function(c){try{f(b(c))}catch(R){g(R)}}:c}var f,g,h=new c(function(b,c){f=b;g=c});this.cc(e(b,f),e(d,g));return h};c.prototype["catch"]=function(b){return this.then(void 0,b)};c.prototype.cc=function(b,c){function d(){switch(e.b){case 1:b(e.g);break;
case 2:c(e.g);break;default:throw Error("Unexpected state: "+e.b);}}var e=this;null==this.a?g.b(d):this.a.push(d)};c.resolve=e;c.reject=function(b){return new c(function(c,d){d(b)})};c.race=function(b){return new c(function(c,d){for(var f=q(b),g=f.next();!g.done;g=f.next())e(g.value).cc(c,d)})};c.all=function(b){var d=q(b),f=d.next();return f.done?e([]):new c(function(b,c){function g(c){return function(d){h[c]=d;k--;0==k&&b(h)}}var h=[],k=0;do h.push(void 0),k++,e(f.value).cc(g(h.length-1),c),f=d.next();
while(!f.done)})};return c});ka("Promise.prototype.finally",function(b){return b?b:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});function la(b){function c(c){return b.next(c)}function d(c){return b["throw"](c)}return new Promise(function(e,f){function g(b){b.done?e(b.value):Promise.resolve(b.value).then(c,d).then(g,f)}g(b.next())})}function r(b){return la(b())}
var na="function"==typeof Object.create?Object.create:function(b){function c(){}c.prototype=b;return new c},oa;if("function"==typeof Object.setPrototypeOf)oa=Object.setPrototypeOf;else{var pa;a:{var qa={Ue:!0},ta={};try{ta.__proto__=qa;pa=ta.Ue;break a}catch(b){}pa=!1}oa=pa?function(b,c){b.__proto__=c;if(b.__proto__!==c)throw new TypeError(b+" is not extensible");return b}:null}var ua=oa;
function va(b,c){b.prototype=na(c.prototype);b.prototype.constructor=b;if(ua)ua(b,c);else for(var d in c)if("prototype"!=d)if(Object.defineProperties){var e=Object.getOwnPropertyDescriptor(c,d);e&&Object.defineProperty(b,d,e)}else b[d]=c[d];b.dh=c.prototype}function wa(){this.g=!1;this.c=null;this.C=void 0;this.s=1;this.b=this.f=0;this.l=this.a=null}function xa(b){if(b.g)throw new TypeError("Generator is already running");b.g=!0}wa.prototype.j=function(b){this.C=b};
function ya(b,c){b.a={Bd:c,Ud:!0};b.s=b.f||b.b}wa.prototype["return"]=function(b){this.a={"return":b};this.s=this.b};function u(b,c,d){b.s=d;return{value:c}}wa.prototype.I=function(b){this.s=b};function za(b,c,d){b.f=c;void 0!=d&&(b.b=d)}function Aa(b,c){b.f=0;b.b=c||0}function Ba(b,c){b.s=c;b.f=0}function Ca(b){b.f=0;var c=b.a.Bd;b.a=null;return c}function Da(b){b.l=[b.a];b.f=0;b.b=0}
function Ea(b,c){var d=b.l.splice(0)[0];(d=b.a=b.a||d)?d.Ud?b.s=b.f||b.b:void 0!=d.I&&b.b<d.I?(b.s=d.I,b.a=null):b.s=b.b:b.s=c}function Fa(b){this.a=new wa;this.b=b}function Ga(b,c){xa(b.a);var d=b.a.c;if(d)return Ha(b,"return"in d?d["return"]:function(b){return{value:b,done:!0}},c,b.a["return"]);b.a["return"](c);return Ia(b)}
function Ha(b,c,d,e){try{var f=c.call(b.a.c,d);if(!(f instanceof Object))throw new TypeError("Iterator result "+f+" is not an object");if(!f.done)return b.a.g=!1,f;var g=f.value}catch(h){return b.a.c=null,ya(b.a,h),Ia(b)}b.a.c=null;e.call(b.a,g);return Ia(b)}
function Ia(b){for(;b.a.s;)try{var c=b.b(b.a);if(c)return b.a.g=!1,{value:c.value,done:!1}}catch(d){b.a.C=void 0,ya(b.a,d)}b.a.g=!1;if(b.a.a){c=b.a.a;b.a.a=null;if(c.Ud)throw c.Bd;return{value:c["return"],done:!0}}return{value:void 0,done:!0}}
function Ja(b){this.next=function(c){xa(b.a);b.a.c?c=Ha(b,b.a.c.next,c,b.a.j):(b.a.j(c),c=Ia(b));return c};this["throw"]=function(c){xa(b.a);b.a.c?c=Ha(b,b.a.c["throw"],c,b.a.j):(ya(b.a,c),c=Ia(b));return c};this["return"]=function(c){return Ga(b,c)};ha();this[Symbol.iterator]=function(){return this}}function v(b,c){Ja.prototype=b.prototype;return new Ja(new Fa(c))}function Ka(b,c){return Object.prototype.hasOwnProperty.call(b,c)}
ka("WeakMap",function(b){function c(b){this.a=(g+=Math.random()+1).toString();if(b){ea();ha();b=q(b);for(var c;!(c=b.next()).done;)c=c.value,this.set(c[0],c[1])}}function d(b){Ka(b,f)||aa(b,f,{value:{}})}function e(b){var c=Object[b];c&&(Object[b]=function(b){d(b);return c(b)})}if(function(){if(!b||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new b([[c,2],[d,3]]);if(2!=e.get(c)||3!=e.get(d))return!1;e["delete"](c);e.set(d,4);return!e.has(c)&&4==e.get(d)}catch(m){return!1}}())return b;
var f="$jscomp_hidden_"+Math.random();e("freeze");e("preventExtensions");e("seal");var g=0;c.prototype.set=function(b,c){d(b);if(!Ka(b,f))throw Error("WeakMap key fail: "+b);b[f][this.a]=c;return this};c.prototype.get=function(b){return Ka(b,f)?b[f][this.a]:void 0};c.prototype.has=function(b){return Ka(b,f)&&Ka(b[f],this.a)};c.prototype["delete"]=function(b){return Ka(b,f)&&Ka(b[f],this.a)?delete b[f][this.a]:!1};return c});
ka("Map",function(b){function c(){var b={};return b.Pa=b.next=b.head=b}function d(b,c){var d=b.a;return ja(function(){if(d){for(;d.head!=b.a;)d=d.Pa;for(;d.next!=d.head;)return d=d.next,{done:!1,value:c(d)};d=null}return{done:!0,value:void 0}})}function e(b,c){var d=c&&typeof c;"object"==d||"function"==d?g.has(c)?d=g.get(c):(d=""+ ++h,g.set(c,d)):d="p_"+c;var e=b.b[d];if(e&&Ka(b.b,d))for(var f=0;f<e.length;f++){var k=e[f];if(c!==c&&k.key!==k.key||c===k.key)return{id:d,list:e,index:f,ia:k}}return{id:d,
list:e,index:-1,ia:void 0}}function f(b){this.b={};this.a=c();this.size=0;if(b){b=q(b);for(var d;!(d=b.next()).done;)d=d.value,this.set(d[0],d[1])}}if(function(){if(!b||"function"!=typeof b||!b.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new b(q([[c,"s"]]));if("s"!=d.get(c)||1!=d.size||d.get({x:4})||d.set({x:4},"t")!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||"s"!=f.value[1])return!1;f=e.next();return f.done||4!=f.value[0].x||
"t"!=f.value[1]||!e.next().done?!1:!0}catch(t){return!1}}())return b;ea();ha();var g=new WeakMap;f.prototype.set=function(b,c){var d=e(this,b);d.list||(d.list=this.b[d.id]=[]);d.ia?d.ia.value=c:(d.ia={next:this.a,Pa:this.a.Pa,head:this.a,key:b,value:c},d.list.push(d.ia),this.a.Pa.next=d.ia,this.a.Pa=d.ia,this.size++);return this};f.prototype["delete"]=function(b){b=e(this,b);return b.ia&&b.list?(b.list.splice(b.index,1),b.list.length||delete this.b[b.id],b.ia.Pa.next=b.ia.next,b.ia.next.Pa=b.ia.Pa,
b.ia.head=null,this.size--,!0):!1};f.prototype.clear=function(){this.b={};this.a=this.a.Pa=c();this.size=0};f.prototype.has=function(b){return!!e(this,b).ia};f.prototype.get=function(b){return(b=e(this,b).ia)&&b.value};f.prototype.entries=function(){return d(this,function(b){return[b.key,b.value]})};f.prototype.keys=function(){return d(this,function(b){return b.key})};f.prototype.values=function(){return d(this,function(b){return b.value})};f.prototype.forEach=function(b,c){for(var d=this.entries(),
e;!(e=d.next()).done;)e=e.value,b.call(c,e[1],e[0],this)};f.prototype[Symbol.iterator]=f.prototype.entries;var h=0;return f});
ka("Set",function(b){function c(b){this.a=new Map;if(b){b=q(b);for(var c;!(c=b.next()).done;)this.add(c.value)}this.size=this.a.size}if(function(){if(!b||"function"!=typeof b||!b.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),e=new b(q([c]));if(!e.has(c)||1!=e.size||e.add(c)!=e||1!=e.size||e.add({x:4})!=e||2!=e.size)return!1;var f=e.entries(),g=f.next();if(g.done||g.value[0]!=c||g.value[1]!=c)return!1;g=f.next();return g.done||g.value[0]==c||4!=g.value[0].x||
g.value[1]!=g.value[0]?!1:f.next().done}catch(h){return!1}}())return b;ea();ha();c.prototype.add=function(b){this.a.set(b,b);this.size=this.a.size;return this};c.prototype["delete"]=function(b){b=this.a["delete"](b);this.size=this.a.size;return b};c.prototype.clear=function(){this.a.clear();this.size=0};c.prototype.has=function(b){return this.a.has(b)};c.prototype.entries=function(){return this.a.entries()};c.prototype.values=function(){return this.a.values()};c.prototype.keys=c.prototype.values;
c.prototype[Symbol.iterator]=c.prototype.values;c.prototype.forEach=function(b,c){var d=this;this.a.forEach(function(e){return b.call(c,e,e,d)})};return c});function La(b,c,d){b instanceof String&&(b=String(b));for(var e=b.length,f=0;f<e;f++){var g=b[f];if(c.call(d,g,f,b))return{Pd:f,Le:g}}return{Pd:-1,Le:void 0}}ka("Array.prototype.findIndex",function(b){return b?b:function(b,d){return La(this,b,d).Pd}});
function Ma(b,c){ha();b instanceof String&&(b+="");var d=0,e={next:function(){if(d<b.length){var f=d++;return{value:c(f,b[f]),done:!1}}e.next=function(){return{done:!0,value:void 0}};return e.next()}};e[Symbol.iterator]=function(){return e};return e}ka("Array.prototype.keys",function(b){return b?b:function(){return Ma(this,function(b){return b})}});ka("Object.is",function(b){return b?b:function(b,d){return b===d?0!==b||1/b===1/d:b!==b&&d!==d}});
ka("Array.prototype.includes",function(b){return b?b:function(b,d){var c=this;c instanceof String&&(c=String(c));var f=c.length,g=d||0;for(0>g&&(g=Math.max(g+f,0));g<f;g++){var h=c[g];if(h===b||Object.is(h,b))return!0}return!1}});function Na(b,c,d){if(null==b)throw new TypeError("The 'this' value for String.prototype."+d+" must not be null or undefined");if(c instanceof RegExp)throw new TypeError("First argument to String.prototype."+d+" must not be a regular expression");return b+""}
ka("String.prototype.includes",function(b){return b?b:function(b,d){return-1!==Na(this,b,"includes").indexOf(b,d||0)}});ka("Array.from",function(b){return b?b:function(b,d,e){ha();d=null!=d?d:function(b){return b};var c=[],g=b[Symbol.iterator];if("function"==typeof g)for(b=g.call(b);!(g=b.next()).done;)c.push(d.call(e,g.value));else{g=b.length;for(var h=0;h<g;h++)c.push(d.call(e,b[h]))}return c}});ka("Array.prototype.find",function(b){return b?b:function(b,d){return La(this,b,d).Le}});
ka("String.prototype.startsWith",function(b){return b?b:function(b,d){for(var c=Na(this,b,"startsWith"),f=c.length,g=b.length,h=Math.max(0,Math.min(d|0,c.length)),k=0;k<g&&h<f;)if(c[h++]!=b[k++])return!1;return k>=g}});var Oa=this;Oa.a=!0;function y(b,c){var d=b.split("."),e=Oa;d[0]in e||!e.execScript||e.execScript("var "+d[0]);for(var f;d.length&&(f=d.shift());)d.length||void 0===c?e[f]?e=e[f]:e=e[f]={}:e[f]=c}
function Pa(b,c){function d(){}d.prototype=c.prototype;b.dh=c.prototype;b.prototype=new d;b.prototype.constructor=b;b.ph=function(b,d,g){return c.prototype[d].apply(b,Array.prototype.slice.call(arguments,2))}};/*
Copyright 2016 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
function Qa(b){this.c=Math.exp(Math.log(.5)/b);this.b=this.a=0}function Sa(b,c,d){var e=Math.pow(b.c,c);d=d*(1-e)+e*b.a;isNaN(d)||(b.a=d,b.b+=c)}function Ta(b){return b.a/(1-Math.pow(b.c,b.b))};function Ua(){this.b=new Qa(2);this.c=new Qa(5);this.a=0}Ua.prototype.getBandwidthEstimate=function(b){return 128E3>this.a?b:Math.min(Ta(this.b),Ta(this.c))};function Va(){}function Wa(){}function Xa(){}window.console&&window.console.log.bind&&(Wa=console.warn.bind(console),Va=console.error.bind(console));var Ya=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function Za(b){var c;b instanceof Za?($a(this,b.Ha),this.ob=b.ob,this.La=b.La,ab(this,b.Fb),this.xa=b.xa,bb(this,b.a.clone()),this.ab=b.ab):b&&(c=String(b).match(Ya))?($a(this,c[1]||"",!0),this.ob=cb(c[2]||""),this.La=cb(c[3]||"",!0),ab(this,c[4]),this.xa=cb(c[5]||"",!0),bb(this,c[6]||"",!0),this.ab=cb(c[7]||"")):this.a=new db(null)}n=Za.prototype;n.Ha="";n.ob="";n.La="";n.Fb=null;n.xa="";n.ab="";
n.toString=function(){var b=[],c=this.Ha;c&&b.push(eb(c,ib,!0),":");if(c=this.La){b.push("//");var d=this.ob;d&&b.push(eb(d,ib,!0),"@");b.push(encodeURIComponent(c).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));c=this.Fb;null!=c&&b.push(":",String(c))}if(c=this.xa)this.La&&"/"!=c.charAt(0)&&b.push("/"),b.push(eb(c,"/"==c.charAt(0)?jb:kb,!0));(c=this.a.toString())&&b.push("?",c);(c=this.ab)&&b.push("#",eb(c,lb));return b.join("")};
n.resolve=function(b){var c=this.clone();"data"===c.Ha&&(c=new Za);var d=!!b.Ha;d?$a(c,b.Ha):d=!!b.ob;d?c.ob=b.ob:d=!!b.La;d?c.La=b.La:d=null!=b.Fb;var e=b.xa;if(d)ab(c,b.Fb);else if(d=!!b.xa){if("/"!=e.charAt(0))if(this.La&&!this.xa)e="/"+e;else{var f=c.xa.lastIndexOf("/");-1!=f&&(e=c.xa.substr(0,f+1)+e)}if(".."==e||"."==e)e="";else if(-1!=e.indexOf("./")||-1!=e.indexOf("/.")){f=0==e.lastIndexOf("/",0);e=e.split("/");for(var g=[],h=0;h<e.length;){var k=e[h++];"."==k?f&&h==e.length&&g.push(""):".."==
k?((1<g.length||1==g.length&&""!=g[0])&&g.pop(),f&&h==e.length&&g.push("")):(g.push(k),f=!0)}e=g.join("/")}}d?c.xa=e:d=""!==b.a.toString();d?bb(c,b.a.clone()):d=!!b.ab;d&&(c.ab=b.ab);return c};n.clone=function(){return new Za(this)};function $a(b,c,d){b.Ha=d?cb(c,!0):c;b.Ha&&(b.Ha=b.Ha.replace(/:$/,""))}function ab(b,c){if(c){c=Number(c);if(isNaN(c)||0>c)throw Error("Bad port number "+c);b.Fb=c}else b.Fb=null}function bb(b,c,d){c instanceof db?b.a=c:(d||(c=eb(c,mb)),b.a=new db(c))}
function cb(b,c){return b?c?decodeURI(b):decodeURIComponent(b):""}function eb(b,c,d){return"string"==typeof b?(b=encodeURI(b).replace(c,nb),d&&(b=b.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),b):null}function nb(b){b=b.charCodeAt(0);return"%"+(b>>4&15).toString(16)+(b&15).toString(16)}var ib=/[#\/\?@]/g,kb=/[#\?:]/g,jb=/[#\?]/g,mb=/[#\?@]/g,lb=/#/g;function db(b){this.a=b||null}n=db.prototype;n.wa=null;n.ec=null;
n.add=function(b,c){if(!this.wa&&(this.wa={},this.ec=0,this.a))for(var d=this.a.split("&"),e=0;e<d.length;e++){var f=d[e].indexOf("="),g=null;if(0<=f){var h=d[e].substring(0,f);g=d[e].substring(f+1)}else h=d[e];h=decodeURIComponent(h.replace(/\+/g," "));g=g||"";this.add(h,decodeURIComponent(g.replace(/\+/g," ")))}this.a=null;(d=this.wa.hasOwnProperty(b)&&this.wa[b])||(this.wa[b]=d=[]);d.push(c);this.ec++;return this};
n.toString=function(){if(this.a)return this.a;if(!this.wa)return"";var b=[],c;for(c in this.wa)for(var d=encodeURIComponent(c),e=this.wa[c],f=0;f<e.length;f++){var g=d;""!==e[f]&&(g+="="+encodeURIComponent(e[f]));b.push(g)}return this.a=b.join("&")};n.clone=function(){var b=new db;b.a=this.a;if(this.wa){var c={},d;for(d in this.wa)c[d]=this.wa[d].concat();b.wa=c;b.ec=this.ec}return b};function z(){var b,c,d=new Promise(function(d,f){b=d;c=f});d.resolve=b;d.reject=c;return d}z.prototype.resolve=function(){};z.prototype.reject=function(){};function ob(b,c){var d=pb();this.l=null==b.maxAttempts?d.maxAttempts:b.maxAttempts;this.f=null==b.baseDelay?d.baseDelay:b.baseDelay;this.j=null==b.fuzzFactor?d.fuzzFactor:b.fuzzFactor;this.g=null==b.backoffFactor?d.backoffFactor:b.backoffFactor;this.a=0;this.b=this.f;if(this.c=void 0===c?!1:c)this.a=1}function qb(b){if(b.a>=b.l)if(b.c)b.a=1,b.b=b.f;else return Promise.reject();var c=new z;b.a?(window.setTimeout(c.resolve,b.b*(1+(2*Math.random()-1)*b.j)),b.b*=b.g):c.resolve();b.a++;return c}
function pb(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}};function A(b,c,d,e){for(var f=[],g=3;g<arguments.length;++g)f[g-3]=arguments[g];this.severity=b;this.category=c;this.code=d;this.data=f;this.handled=!1}y("shaka.util.Error",A);A.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};A.Severity={RECOVERABLE:1,CRITICAL:2};A.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9};
A.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,
EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,
UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,
HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,INVALID_STREAMS_CHOSEN:5005,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,
FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,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,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,
CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,STORE_ALREADY_IN_PROGRESS:9006,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};function B(b,c){this.promise=b;this.b=c;this.a=!1}y("shaka.util.AbortableOperation",B);function sb(b){return new B(Promise.reject(b),function(){return Promise.resolve()})}B.failed=sb;function tb(){var b=Promise.reject(new A(2,7,7001));b["catch"](function(){});return new B(b,function(){return Promise.resolve()})}B.aborted=tb;function ub(b){return new B(Promise.resolve(b),function(){return Promise.resolve()})}B.completed=ub;
function vb(b){return new B(b,function(){return b["catch"](function(){})})}B.notAbortable=vb;B.prototype.abort=function(){this.a=!0;return this.b()};B.prototype.abort=B.prototype.abort;function wb(b){return new B(Promise.all(b.map(function(b){return b.promise})),function(){return Promise.all(b.map(function(b){return b.abort()}))})}B.all=wb;B.prototype["finally"]=function(b){this.promise.then(function(){return b(!0)},function(){return b(!1)});return this};B.prototype["finally"]=B.prototype["finally"];
B.prototype.sa=function(b,c){function d(){f.reject(new A(2,7,7001));return e.abort()}var e=this,f=new z;this.promise.then(function(c){e.a?f.reject(new A(2,7,7001)):b?d=xb(b,c,f):f.resolve(c)},function(b){c?d=xb(c,b,f):f.reject(b)});return new B(f,function(){return d()})};B.prototype.chain=B.prototype.sa;
function xb(b,c,d){try{var e=b(c);if(e&&e.promise&&e.abort)return d.resolve(e.promise),function(){return e.abort()};d.resolve(e);return function(){return Promise.resolve(e).then(function(){})["catch"](function(){})}}catch(f){return d.reject(f),function(){return Promise.resolve()}}};function C(b,c){c=void 0===c?{}:c;for(var d in c)this[d]=c[d];this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=b;this.isTrusted=!1;this.target=this.currentTarget=null;this.a=!1}C.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};C.prototype.stopImmediatePropagation=function(){this.a=!0};C.prototype.stopPropagation=function(){};function yb(){this.a={}}n=yb.prototype;n.push=function(b,c){this.a.hasOwnProperty(b)?this.a[b].push(c):this.a[b]=[c]};n.get=function(b){return(b=this.a[b])?b.slice():null};n.getAll=function(){var b=[],c;for(c in this.a)b.push.apply(b,this.a[c]);return b};n.remove=function(b,c){var d=this.a[b];if(d)for(var e=0;e<d.length;++e)d[e]==c&&(d.splice(e,1),--e)};n.forEach=function(b){for(var c in this.a)b(c,this.a[c])};function D(){this.Ra=new yb;this.Ca=this}D.prototype.addEventListener=function(b,c){this.Ra.push(b,c)};D.prototype.removeEventListener=function(b,c){this.Ra.remove(b,c)};D.prototype.dispatchEvent=function(b){for(var c=this.Ra.get(b.type)||[],d=0;d<c.length;++d){b.target=this.Ca;b.currentTarget=this.Ca;var e=c[d];try{e.handleEvent?e.handleEvent(b):e.call(this,b)}catch(f){}if(b.a)break}return b.defaultPrevented};function zb(b){function c(b){switch(typeof b){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return b;default:if(!b||b.buffer&&b.buffer.constructor==ArrayBuffer)return b;if(d.has(b))return null;var e=b.constructor==Array;if(b.constructor!=Object&&!e)return null;d.add(b);var g=e?[]:{},h;for(h in b)g[h]=c(b[h]);e&&(g.length=b.length);return g}}var d=new Set;return c(b)};function Ab(b,c){return"number"===typeof b&&"number"===typeof c&&isNaN(b)&&isNaN(c)?!0:b===c}function Bb(b,c){var d=b.indexOf(c);-1<d&&b.splice(d,1)}function Cb(b,c){var d=0;b.forEach(function(b){d+=c(b)?1:0});return d}
function Db(b,c,d){d||(d=Ab);if(b.length!=c.length)return!1;c=c.slice();var e={};b=q(b);for(var f=b.next();!f.done;e={item:e.item},f=b.next()){e.item=f.value;f=c.findIndex(function(b){return function(c){return d(b.item,c)}}(e));if(-1==f)return!1;c[f]=c[c.length-1];c.pop()}return 0==c.length};function Eb(){this.a=[]}function Gb(b,c){b.a.push(c["finally"](function(){Bb(b.a,c)}))}Eb.prototype.destroy=function(){var b=[];this.a.forEach(function(c){c.promise["catch"](function(){});b.push(c.abort())});this.a=[];return Promise.all(b)};function E(b){D.call(this);this.f=!1;this.g=new Eb;this.a=new Set;this.b=new Set;this.c=b||null}Pa(E,D);y("shaka.net.NetworkingEngine",E);E.RequestType={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3,TIMING:4};E.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:3};var Hb={};function Ib(b,c,d){d=d||3;var e=Hb[b];if(!e||d>=e.priority)Hb[b]={priority:d,Eg:c}}E.registerScheme=Ib;E.unregisterScheme=function(b){delete Hb[b]};E.prototype.Gg=function(b){this.a.add(b)};E.prototype.registerRequestFilter=E.prototype.Gg;
E.prototype.eh=function(b){this.a["delete"](b)};E.prototype.unregisterRequestFilter=E.prototype.eh;E.prototype.bf=function(){this.a.clear()};E.prototype.clearAllRequestFilters=E.prototype.bf;E.prototype.Hg=function(b){this.b.add(b)};E.prototype.registerResponseFilter=E.prototype.Hg;E.prototype.fh=function(b){this.b["delete"](b)};E.prototype.unregisterResponseFilter=E.prototype.fh;E.prototype.cf=function(){this.b.clear()};E.prototype.clearAllResponseFilters=E.prototype.cf;
function Jb(b,c){return{uris:b,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:c,licenseRequestType:null}}E.prototype.destroy=function(){this.f=!0;this.a.clear();this.b.clear();return this.g.destroy()};E.prototype.destroy=E.prototype.destroy;
E.prototype.request=function(b,c){var d=this;if(this.f)return tb();c.method=c.method||"GET";c.headers=c.headers||{};c.retryParameters=c.retryParameters?zb(c.retryParameters):pb();c.uris=zb(c.uris);var e=Kb(this,b,c),f=e.sa(function(){return Lb(d,b,c,new ob(c.retryParameters,!1),0,null)}),g=f.sa(function(c){return Mb(d,b,c)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});var l=0;f.promise.then(function(){l=Date.now()},function(){});e=g.sa(function(c){var e=Date.now()-l,f=
c.response;f.timeMs+=k;f.timeMs+=e;c.If||!d.c||f.fromCache||1!=b||d.c(f.timeMs,f.data.byteLength);return f},function(b){b&&(b.severity=2);throw b;});Gb(this.g,e);return e};E.prototype.request=E.prototype.request;function Kb(b,c,d){var e=ub(void 0),f={};b=q(b.a);for(var g=b.next();!g.done;f={cd:f.cd},g=b.next())f.cd=g.value,e=e.sa(function(b){return function(){return b.cd(c,d)}}(f));return e.sa(void 0,function(b){if(b&&7001==b.code)throw b;throw new A(2,1,1006,b);})}
function Lb(b,c,d,e,f,g){var h=new Za(d.uris[f]),k=h.Ha,l=!1;k||(k=location.protocol,k=k.slice(0,-1),$a(h,k),d.uris[f]=h.toString());var m=(k=Hb[k])?k.Eg:null;if(!m)return sb(new A(2,1,1E3,h));var p;return vb(qb(e)).sa(function(){if(b.f)return tb();p=Date.now();return m(d.uris[f],d,c,function(d,e){b.c&&1==c&&(b.c(d,e),l=!0)})}).sa(function(b){void 0==b.timeMs&&(b.timeMs=Date.now()-p);return{response:b,If:l}},function(h){if(h&&7001==h.code)throw h;if(b.f)return tb();if(h&&1==h.severity)return b.dispatchEvent(new C("retry",
{error:h instanceof A?h:null})),f=(f+1)%d.uris.length,Lb(b,c,d,e,f,h);throw h||g;})}function Mb(b,c,d){var e=ub(void 0);b=q(b.b);for(var f=b.next();!f.done;f=b.next())e=e.sa(f.value.bind(null,c,d.response));return e.sa(function(){return d},function(b){if(b&&7001==b.code)throw b;var c=2;b instanceof A&&(c=b.severity);throw new A(c,1,1007,b);})};function Nb(){this.a=new yb}Nb.prototype.R=function(){Ob(this);this.a=null};function G(b,c,d,e){b.a&&(c=new Pb(c,d,e),b.a.push(d,c))}function Qb(b,c,d,e){G(b,c,d,function(b){this.Ja(c,d);e(b)}.bind(b))}Nb.prototype.Ja=function(b,c){if(this.a)for(var d=this.a.get(c)||[],e=0;e<d.length;++e){var f=d[e];f.target==b&&(f.Ja(),this.a.remove(c,f))}};function Ob(b){if(b.a){for(var c=b.a.getAll(),d=0;d<c.length;++d)c[d].Ja();b.a.a={}}}
function Pb(b,c,d){this.target=b;this.type=c;this.a=d;this.target.addEventListener(c,d,!1)}Pb.prototype.Ja=function(){this.target.removeEventListener(this.type,this.a,!1);this.a=this.target=null};function Rb(b,c){for(var d=[],e=q(b),f=e.next();!f.done;f=e.next())d.push(c(f.value));return d}function Sb(b,c){for(var d=q(b),e=d.next();!e.done;e=d.next())if(!c(e.value))return!1;return!0}function Tb(b,c){for(var d=q(b),e=d.next();!e.done;e=d.next())if(c(e.value))return!0;return!1}function Ub(b,c){for(var d=[],e=q(b),f=e.next();!f.done;f=e.next())f=f.value,c(f)&&d.push(f);return d};function Vb(b){var c=new Map;Object.keys(b).forEach(function(d){c.set(d,b[d])});return c}function Wb(b){var c={};b.forEach(function(b,e){c[e]=b});return c};function Xb(b,c){var d=b;c&&(d+='; codecs="'+c+'"');return d}function Yb(b){var c=[b.mimeType];Zb.forEach(function(d,e){var f=b[e];f&&c.push(d+'="'+f+'"')});return c.join(";")}function $b(b){b=b.split(".");var c=b[0];b.pop();return[c,b.join(".")]}var Zb=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function ac(b){return(navigator.userAgent||"").includes(b)};function bc(b){if(!b)return"";b=new Uint8Array(b);239==b[0]&&187==b[1]&&191==b[2]&&(b=b.subarray(3));b=escape(cc(b));try{return decodeURIComponent(b)}catch(c){throw new A(2,2,2004);}}y("shaka.util.StringUtils.fromUTF8",bc);
function dc(b,c,d){if(!b)return"";if(!d&&0!=b.byteLength%2)throw new A(2,2,2004);if(b instanceof ArrayBuffer)var e=b;else d=new Uint8Array(b.byteLength),d.set(new Uint8Array(b)),e=d.buffer;b=Math.floor(b.byteLength/2);d=new Uint16Array(b);e=new DataView(e);for(var f=0;f<b;f++)d[f]=e.getUint16(2*f,c);return cc(d)}y("shaka.util.StringUtils.fromUTF16",dc);
function ec(b){var c=new Uint8Array(b);if(239==c[0]&&187==c[1]&&191==c[2])return bc(c);if(254==c[0]&&255==c[1])return dc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return dc(c.subarray(2),!0);var d=function(b,c){return b.byteLength<=c||32<=b[c]&&126>=b[c]}.bind(null,c);if(0==c[0]&&0==c[2])return dc(b,!1);if(0==c[1]&&0==c[3])return dc(b,!0);if(d(0)&&d(1)&&d(2)&&d(3))return bc(b);throw new A(2,2,2003);}y("shaka.util.StringUtils.fromBytesAutoDetect",ec);
function fc(b){b=encodeURIComponent(b);b=unescape(b);for(var c=new Uint8Array(b.length),d=0;d<b.length;++d)c[d]=b.charCodeAt(d);return c.buffer}y("shaka.util.StringUtils.toUTF8",fc);function cc(b){for(var c="",d=0;d<b.length;d+=16E3)c+=String.fromCharCode.apply(null,b.subarray(d,d+16E3));return c};function H(b){this.b=b;this.a=null}y("shaka.util.Timer",H);H.prototype.mb=function(){null!=this.a&&(clearTimeout(this.a),this.a=null);this.b()};H.prototype.tick=H.prototype.mb;H.prototype.start=function(b,c){function d(){e.b();e.a=c?setTimeout(d,f):null}var e=this,f=1E3*b;null!=this.a&&clearTimeout(this.a);this.a=setTimeout(d,f)};H.prototype.start=H.prototype.start;H.prototype.stop=function(){null!=this.a&&clearTimeout(this.a);this.a=null};H.prototype.stop=H.prototype.stop;function gc(b,c){var d=cc(b);c=void 0==c?!0:c;d=window.btoa(d).replace(/\+/g,"-").replace(/\//g,"_");return c?d:d.replace(/=*$/,"")}y("shaka.util.Uint8ArrayUtils.toBase64",gc);function ic(b){b=window.atob(b.replace(/-/g,"+").replace(/_/g,"/"));for(var c=new Uint8Array(b.length),d=0;d<b.length;++d)c[d]=b.charCodeAt(d);return c}y("shaka.util.Uint8ArrayUtils.fromBase64",ic);function jc(b){for(var c=new Uint8Array(b.length/2),d=0;d<b.length;d+=2)c[d/2]=window.parseInt(b.substr(d,2),16);return c}
y("shaka.util.Uint8ArrayUtils.fromHex",jc);function kc(b){for(var c="",d=0;d<b.length;++d){var e=b[d].toString(16);1==e.length&&(e="0"+e);c+=e}return c}y("shaka.util.Uint8ArrayUtils.toHex",kc);function lc(b,c){if(!b&&!c)return!0;if(!b||!c||b.length!=c.length)return!1;for(var d=0;d<b.length;++d)if(b[d]!=c[d])return!1;return!0}y("shaka.util.Uint8ArrayUtils.equal",lc);
function mc(b){for(var c=[],d=0;d<arguments.length;++d)c[d]=arguments[d];for(var e=d=0;e<c.length;++e)d+=c[e].length;d=new Uint8Array(d);for(var f=e=0;f<c.length;++f)d.set(c[f],e),e+=c[f].length;return d}y("shaka.util.Uint8ArrayUtils.concat",mc);function nc(b){var c=this;this.w=b;this.v=new Set;this.o=this.j=null;this.H=!1;this.a=null;this.l=new Nb;this.b=new Map;this.u=[];this.m=new z;this.f=null;this.g=function(d){c.m.reject(d);b.onError(d)};this.V=new Map;this.K=new Map;this.G=new H(function(){return oc(c)});this.c=!1;this.P=new z;this.A=!1;this.B=[];this.S=!1;this.F=new H(function(){return pc(c)});this.F.start(1,!0);this.m["catch"](function(){})}n=nc.prototype;
n.destroy=function(){var b=this;return r(function d(){return v(d,function(d){switch(d.s){case 1:if(b.c)return u(d,b.P,0);b.c=!0;return u(d,qc(b),4);case 4:b.P.resolve(),d.I(0)}})})};
function qc(b){return r(function d(){var e;return v(d,function(d){switch(d.s){case 1:return b.l.R(),b.l=null,b.m.reject(),b.F.stop(),b.F=null,b.G.stop(),b.G=null,e=Array.from(b.b.keys()),b.b.clear(),u(d,Promise.all(e.map(function(b){return Promise.resolve().then(function(){return r(function k(){return v(k,function(d){switch(d.s){case 1:return za(d,2),u(d,rc(b),4);case 4:Ba(d,0);break;case 2:Ca(d),d.s=0}})})})})),2);case 2:if(!b.o){d.I(3);break}za(d,4);return u(d,b.o.setMediaKeys(null),6);case 6:Ba(d,
5);break;case 4:Ca(d);case 5:b.o=null;case 3:b.a=null,b.v.clear(),b.j=null,b.u=[],b.f=null,b.g=null,b.w=null,d.s=0}})})}n.configure=function(b){this.f=b};function sc(b,c,d){b.u=[];b.A=d;return tc(b,c)}function uc(b,c,d){b.u=d;b.A=0<d.length;return tc(b,c)}
function vc(b,c,d,e,f,g){var h=new Map;h.set(c,{audioCapabilities:f,videoCapabilities:g,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:c,drmInfos:[{keySystem:c,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:e,initData:null,keyIds:null}]});return wc(b,h)}
function tc(b,c){var d=c.some(function(b){return 0<b.drmInfos.length});if(!d){var e=Vb(b.f.servers);xc(c,e)}var f=yc(b);if(f){var g=q(c);for(e=g.next();!e.done;e=g.next())e.value.drmInfos=[f]}f=q(c);for(e=f.next();!e.done;e=f.next())for(e=q(e.value.drmInfos),g=e.next();!g.done;g=e.next())zc(g.value,Vb(b.f.servers),Vb(b.f.advanced||{}));e=Ac(b,c);if(!e.size)return b.H=!0,Promise.resolve();e=wc(b,e);return d?e:e["catch"](function(){})}
n.bc=function(b){var c=this;if(!this.j)return Qb(this.l,b,"encrypted",function(){c.g(new A(2,6,6010))}),Promise.resolve();this.o=b;Qb(this.l,this.o,"play",function(){for(var b=0;b<c.B.length;b++)Bc(c,c.B[b]);c.S=!0;c.B=[]});b=this.o.setMediaKeys(this.j);b=b["catch"](function(b){return Promise.reject(new A(2,6,6003,b.message))});var d=Cc(this);return Promise.all([b,d]).then(function(){if(c.c)return Promise.reject();Dc(c);c.a.initData.length||c.u.length||G(c.l,c.o,"encrypted",function(b){return Ec(c,
b.initDataType,new Uint8Array(b.initData))})})["catch"](function(b){if(!c.c)return Promise.reject(b)})};function Cc(b){return r(function d(){var e;return v(d,function(d){switch(d.s){case 1:if(!(b.j&&b.a&&b.a.serverCertificate&&b.a.serverCertificate.length)){d.I(0);break}za(d,3);return u(d,b.j.setServerCertificate(b.a.serverCertificate),5);case 5:Ba(d,0);break;case 3:return e=Ca(d),d["return"](Promise.reject(new A(2,6,6004,e.message)))}})})}
function Fc(b,c){return r(function e(){var f,g,h;return v(e,function(e){switch(e.s){case 1:return u(e,Gc(b,c),2);case 2:f=e.C;if(!f)return e["return"]();g=[];if(h=b.b.get(f))h.Ka=new z,g.push(h.Ka);g.push(f.remove());return u(e,Promise.all(g),0)}})})}function Dc(b){var c=b.a?b.a.initData:[];c.forEach(function(c){return Hc(b,c.initDataType,c.initData)});b.u.forEach(function(c){return Gc(b,c)});c.length||b.u.length||b.m.resolve();return b.m}
function Ec(b,c,d){var e=b.b.values();e=q(e);for(var f=e.next();!f.done;f=e.next())if(lc(d,f.value.initData))return;Hc(b,c,d)}n.keySystem=function(){return this.a?this.a.keySystem:""};function Ic(b,c){return ac("Edge/")?!0:b.v.has(c)}function Jc(b){b=b.b.keys();b=Rb(b,function(b){return b.sessionId});return Array.from(b)}n.kc=function(){var b=Infinity,c=this.b.keys();c=q(c);for(var d=c.next();!d.done;d=c.next())d=d.value,isNaN(d.expiration)||(b=Math.min(b,d.expiration));return b};
function Ac(b,c){for(var d=new Set,e=q(c),f=e.next();!f.done;f=e.next()){var g=q(f.value.drmInfos);for(f=g.next();!f.done;f=g.next())d.add(f.value)}e=q(d);for(f=e.next();!f.done;f=e.next())zc(f.value,Vb(b.f.servers),Vb(b.f.advanced||{}));g=b.A?"required":"optional";var h=b.A?["persistent-license"]:["temporary"];e=new Map;d=q(d);for(f=d.next();!f.done;f=d.next())f=f.value,e.set(f.keySystem,{audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",persistentState:g,sessionTypes:h,
label:f.keySystem,drmInfos:[]});d=q(c);for(f=d.next();!f.done;f=d.next()){f=f.value;g=f.audio;h=f.video;var k=g?Xb(g.mimeType,g.codecs):"",l=h?Xb(h.mimeType,h.codecs):"",m=q(f.drmInfos);for(f=m.next();!f.done;f=m.next()){f=f.value;var p=e.get(f.keySystem);p.drmInfos.push(f);f.distinctiveIdentifierRequired&&(p.distinctiveIdentifier="required");f.persistentStateRequired&&(p.persistentState="required");g&&p.audioCapabilities.push({robustness:f.audioRobustness||"",contentType:k});h&&p.videoCapabilities.push({robustness:f.videoRobustness||
"",contentType:l})}}return e}
function wc(b,c){if(1==c.size&&c.has(""))return Promise.reject(new A(2,6,6E3));for(var d=q(c.values()),e=d.next();!e.done;e=d.next())e=e.value,0==e.audioCapabilities.length&&delete e.audioCapabilities,0==e.videoCapabilities.length&&delete e.videoCapabilities;var f=d=new z;[!0,!1].forEach(function(b){var d=this;c.forEach(function(c,e){c.drmInfos.some(function(b){return!!b.licenseServerUri})==b&&(f=f["catch"](function(){if(!this.c)return navigator.requestMediaKeySystemAccess(e,[c])}.bind(d)))})}.bind(b));
f=f["catch"](function(){return Promise.reject(new A(2,6,6001))});f=f.then(function(b){if(this.c)return Promise.reject();this.v.clear();var d=b.getConfiguration(),e=d.videoCapabilities||[],f=q(d.audioCapabilities||[]);for(d=f.next();!d.done;d=f.next())this.v.add(d.value.contentType);e=q(e);for(d=e.next();!d.done;d=e.next())this.v.add(d.value.contentType);e=b.keySystem;d=c.get(b.keySystem);f=[];var g=[],p=[],t=[];Kc(d.drmInfos,f,g,p,t);this.a={keySystem:e,licenseServerUri:f[0],distinctiveIdentifierRequired:"required"==
d.distinctiveIdentifier,persistentStateRequired:"required"==d.persistentState,audioRobustness:d.audioCapabilities?d.audioCapabilities[0].robustness:"",videoRobustness:d.videoCapabilities?d.videoCapabilities[0].robustness:"",serverCertificate:g[0],initData:p,keyIds:t};return this.a.licenseServerUri?b.createMediaKeys():Promise.reject(new A(2,6,6012))}.bind(b)).then(function(b){if(this.c)return Promise.reject();this.j=b;this.H=!0}.bind(b))["catch"](function(b){if(!this.c)return this.a=null,this.v.clear(),
b instanceof A?Promise.reject(b):Promise.reject(new A(2,6,6002,b.message))}.bind(b));d.reject();return f}
function yc(b){b=Vb(b.f.clearKeys);if(0==b.size)return null;var c=[],d=[];b.forEach(function(b,e){var f=jc(e),g=jc(b);f={kty:"oct",kid:gc(f,!1),k:gc(g,!1)};c.push(f);d.push(f.kid)});b=JSON.stringify({keys:c});var e=JSON.stringify({kids:d});e=[{initData:new Uint8Array(fc(e)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(b),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
initData:e,keyIds:[]}}
function Gc(b,c){try{var d=b.j.createSession("persistent-license")}catch(g){var e=new A(2,6,6005,g.message);b.g(e);return Promise.reject(e)}G(b.l,d,"message",b.ke.bind(b));G(b.l,d,"keystatuseschange",b.ce.bind(b));var f={initData:null,loaded:!1,Wc:Infinity,Ka:null};b.b.set(d,f);return d.load(c).then(function(b){if(this.c)return Promise.reject();if(b)return f.loaded=!0,Lc(this)&&this.m.resolve(),d;this.b["delete"](d);this.g(new A(2,6,6013))}.bind(b),function(b){this.c||(this.b["delete"](d),this.g(new A(2,
6,6005,b.message)))}.bind(b))}
function Hc(b,c,d){try{var e=b.A?b.j.createSession("persistent-license"):b.j.createSession()}catch(f){b.g(new A(2,6,6005,f.message));return}G(b.l,e,"message",b.ke.bind(b));G(b.l,e,"keystatuseschange",b.ce.bind(b));b.b.set(e,{initData:d,loaded:!1,Wc:Infinity,Ka:null});e.generateRequest(c,d.buffer)["catch"](function(c){if(!b.c){b.b["delete"](e);if(c.errorCode&&c.errorCode.systemCode){var d=c.errorCode.systemCode;0>d&&(d+=Math.pow(2,32));d="0x"+d.toString(16)}b.g(new A(2,6,6006,c.message,c,d))}})}
n.ke=function(b){this.f.delayLicenseRequestUntilPlayed&&this.o.paused&&!this.S?this.B.push(b):Bc(this,b)};
function Bc(b,c){var d=c.target,e=b.b.get(d),f=b.a.licenseServerUri,g=b.f.advanced[b.a.keySystem];"individualization-request"==c.messageType&&g&&g.individualizationServer&&(f=g.individualizationServer);f=Jb([f],b.f.retryParameters);f.body=c.message;f.method="POST";f.licenseRequestType=c.messageType;"com.microsoft.playready"!=b.a.keySystem&&"com.chromecast.playready"!=b.a.keySystem||Mc(f);b.w.Pb.request(2,f).promise.then(function(b){return this.c?Promise.reject():d.update(b.data).then(function(){var b=
this;this.w.onEvent(new C("drmsessionupdate"));e&&(e.Ka&&e.Ka.resolve(),Nc(Oc).then(function(){e.loaded=!0;Lc(b)&&b.m.resolve()}))}.bind(this))}.bind(b),function(b){this.c||(b=new A(2,6,6007,b),this.g(b),e&&e.Ka&&e.Ka.reject(b))}.bind(b))["catch"](function(b){this.c||(b=new A(2,6,6008,b.message),this.g(b),e&&e.Ka&&e.Ka.reject(b))}.bind(b))}
function Mc(b){var c=dc(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){c=(new DOMParser).parseFromString(c,"application/xml");for(var d=c.getElementsByTagName("HttpHeader"),e=0;e<d.length;++e)b.headers[d[e].querySelector("name").textContent]=d[e].querySelector("value").textContent;b.body=ic(c.querySelector("Challenge").textContent).buffer}else b.headers["Content-Type"]="text/xml; charset=utf-8"}
n.ce=function(b){b=b.target;var c=this.b.get(b),d=!1;b.keyStatuses.forEach(function(b,e){if("string"==typeof e){var f=e;e=b;b=f}if("com.microsoft.playready"==this.a.keySystem&&16==e.byteLength&&!ac("Tizen")){f=new DataView(e);var g=f.getUint32(0,!0),l=f.getUint16(4,!0),m=f.getUint16(6,!0);f.setUint32(0,g,!1);f.setUint16(4,l,!1);f.setUint16(6,m,!1)}"com.microsoft.playready"==this.a.keySystem&&"status-pending"==b&&(b="usable");"status-pending"!=b&&(c.loaded=!0);"expired"==b&&(d=!0);f=kc(new Uint8Array(e));
this.V.set(f,b)}.bind(this));var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Ka&&(this.b["delete"](b),b.close()["catch"](function(){}));Lc(this)&&(this.m.resolve(),this.G.start(Pc,!1))};function oc(b){var c=b.V,d=b.K;d.clear();c.forEach(function(b,c){return d.set(c,b)});c=Array.from(d.values());c.length&&c.every(function(b){return"expired"==b})&&b.g(new A(2,6,6014));b.w.Xc(Wb(d))}
function Qc(){function b(b){return r(function h(){var c,f,m;return v(h,function(h){switch(h.s){case 1:return za(h,2),u(h,navigator.requestMediaKeySystemAccess(b,d),4);case 4:return c=h.C,m=(f=c.getConfiguration().sessionTypes)?f.includes("persistent-license"):!1,ac("Tizen 3")&&(m=!1),e.set(b,{persistentState:m}),u(h,c.createMediaKeys(),5);case 5:Ba(h,0);break;case 2:Ca(h),e.set(b,null),h.s=0}})})}var c=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],d=[{videoCapabilities:c,
persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:c}],e=new Map;c="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" ").map(function(c){return b(c)});return Promise.all(c).then(function(){return Wb(e)})}
function Rc(b,c){var d=c.audio,e=c.video;if(d&&d.encrypted&&!Ic(b,Xb(d.mimeType,d.codecs))||e&&e.encrypted&&!Ic(b,Xb(e.mimeType,e.codecs)))return!1;var f=b.keySystem();return 0==c.drmInfos.length||c.drmInfos.some(function(b){return b.keySystem==f})}
function Sc(b,c){if(!b.length)return c;if(!c.length)return b;for(var d=[],e=0;e<b.length;e++)for(var f=0;f<c.length;f++)if(b[e].keySystem==c[f].keySystem){var g=b[e];f=c[f];var h=[];h=h.concat(g.initData||[]);h=h.concat(f.initData||[]);var k=[];k=k.concat(g.keyIds);k=k.concat(f.keyIds);d.push({keySystem:g.keySystem,licenseServerUri:g.licenseServerUri||f.licenseServerUri,distinctiveIdentifierRequired:g.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:g.persistentStateRequired||
f.persistentStateRequired,videoRobustness:g.videoRobustness||f.videoRobustness,audioRobustness:g.audioRobustness||f.audioRobustness,serverCertificate:g.serverCertificate||f.serverCertificate,initData:h,keyIds:k});break}return d}function pc(b){b.b.forEach(function(c,d){var e=c.Wc,f=d.expiration;isNaN(f)&&(f=Infinity);f!=e&&(b.w.onExpirationUpdated(d.sessionId,f),c.Wc=f)})}function Lc(b){b=b.b.values();return Sb(b,function(b){return b.loaded})}
function Nc(b){return new Promise(function(c){return setTimeout(c,1E3*b)})}function xc(b,c){var d=[];c.forEach(function(b,c){d.push({keySystem:c,licenseServerUri:b,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})});for(var e=q(b),f=e.next();!f.done;f=e.next())f.value.drmInfos=d}
function Kc(b,c,d,e,f){b.forEach(function(b){c.includes(b.licenseServerUri)||c.push(b.licenseServerUri);b.serverCertificate&&(d.some(function(c){return lc(c,b.serverCertificate)})||d.push(b.serverCertificate));b.initData&&b.initData.forEach(function(b){e.some(function(c){return c.keyId&&c.keyId==b.keyId?!0:c.initDataType==b.initDataType&&lc(c.initData,b.initData)})||e.push(b)});if(b.keyIds)for(var g=0;g<b.keyIds.length;++g)f.includes(b.keyIds[g])||f.push(b.keyIds[g])})}
function zc(b,c,d){var e=b.keySystem;if(e){if(c=c.get(e))b.licenseServerUri=c;b.keyIds||(b.keyIds=[]);if(d=d.get(e))b.distinctiveIdentifierRequired||(b.distinctiveIdentifierRequired=d.distinctiveIdentifierRequired),b.persistentStateRequired||(b.persistentStateRequired=d.persistentStateRequired),b.videoRobustness||(b.videoRobustness=d.videoRobustness),b.audioRobustness||(b.audioRobustness=d.audioRobustness),b.serverCertificate||(b.serverCertificate=d.serverCertificate);window.cast&&window.cast.__platform__&&
"com.microsoft.playready"==b.keySystem&&(b.keySystem="com.chromecast.playready")}}function rc(b){return r(function d(){var e,f;return v(d,function(d){switch(d.s){case 1:return e=b.close().then(function(){return!0}),f=Nc(Tc).then(function(){return!1}),u(d,Promise.race([e,f]),2);case 2:d.s=0}})})}var Tc=1,Oc=5,Pc=.5;function Uc(){this.a=new muxjs.mp4.CaptionParser;this.g=[];this.f={}}Uc.prototype.init=function(b){var c=muxjs.mp4.probe;b=new Uint8Array(b);this.g=c.videoTrackIds(b);this.f=c.timescale(b);this.a.init()};Uc.prototype.b=function(b,c){var d=new Uint8Array(b);(d=this.a.parse(d,this.g,this.f))&&d.captions&&c(d.captions);this.a.clearParsedCaptions()};Uc.prototype.c=function(){this.a.resetCaptionStream()};function Vc(){}Vc.prototype.init=function(){};Vc.prototype.b=function(){};Vc.prototype.c=function(){};function Wc(b){return!b||1==b.length&&1E-6>b.end(0)-b.start(0)?null:b.length?b.end(b.length-1):null}function Xc(b,c,d){d=void 0===d?0:d;return!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0)||c>b.end(b.length-1)?!1:c+d>=b.start(0)}function Yc(b,c){if(!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0))return 0;for(var d=0,e=b.length-1;0<=e&&b.end(e)>c;--e)d+=b.end(e)-Math.max(b.start(e),c);return d}
function Zc(b){if(!b)return[];for(var c=[],d=0;d<b.length;d++)c.push({start:b.start(d),end:b.end(d)});return c};var $c={df:function(b,c){return b.reduce(function(b,c,f){return c["catch"](b.bind(null,f))}.bind(null,c),Promise.reject())},Dc:function(b,c){return b.concat(c)},Qb:function(){},Sa:function(b){return null!=b}};function ad(b,c){if(0==c.length)return b;var d=c.map(function(b){return new Za(b)});return b.map(function(b){return new Za(b)}).map(function(b){return d.map(b.resolve.bind(b))}).reduce($c.Dc,[]).map(function(b){return b.toString()})}function bd(b,c){return{keySystem:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:c||[],keyIds:[]}}var cd={Te:"video",Ne:"audio",rb:"text",mh:"application"},hd=1/15;function id(){this.a=new muxjs.mp4.Transmuxer({keepOriginalTimestamps:!0});this.b=null;this.g=[];this.c=[];this.f=!1;this.a.on("data",this.l.bind(this));this.a.on("done",this.j.bind(this))}id.prototype.destroy=function(){this.a.dispose();this.a=null;return Promise.resolve()};function jd(b,c){return window.muxjs&&"mp2t"==b.split(";")[0].split("/")[1]?c?MediaSource.isTypeSupported(kd(c,b)):MediaSource.isTypeSupported(kd("audio",b))||MediaSource.isTypeSupported(kd("video",b)):!1}
function kd(b,c){var d=c.replace("mp2t","mp4");"audio"==b&&(d=d.replace("video","audio"));var e=/avc1\.(66|77|100)\.(\d+)/.exec(d);if(e){var f="avc1.",g=e[1],h=Number(e[2]);f=("66"==g?f+"4200":"77"==g?f+"4d00":f+"6400")+(h>>4).toString(16);f+=(h&15).toString(16);d=d.replace(e[0],f)}return d}function ld(b,c){b.f=!0;b.b=new z;b.g=[];b.c=[];var d=new Uint8Array(c);b.a.push(d);b.a.flush();b.f&&b.b.reject(new A(2,3,3018));return b.b}
id.prototype.l=function(b){this.c=b.captions;var c=new Uint8Array(b.data.byteLength+b.initSegment.byteLength);c.set(b.initSegment,0);c.set(b.data,b.initSegment.byteLength);this.g.push(c)};id.prototype.j=function(){var b={data:mc.apply(null,this.g),captions:this.c};this.b.resolve(b);this.f=!1};function md(b){this.g=null;this.c=b;this.f=this.o=0;this.j=Infinity;this.b=this.a=null;this.m="";this.l=new Map}var nd={};y("shaka.text.TextEngine.registerParser",function(b,c){nd[b]=c});y("shaka.text.TextEngine.unregisterParser",function(b){delete nd[b]});function od(b){return nd[b]||window.muxjs&&"application/cea-608"==b?!0:!1}md.prototype.destroy=function(){this.c=this.g=null;this.l.clear();return Promise.resolve()};function pd(b,c){"application/cea-608"!=c&&(b.g=new nd[c])}
md.prototype.Lc=function(b){var c={periodStart:0,segmentStart:null,segmentEnd:0};try{return this.g.parseMedia(new Uint8Array(b),c)[0].startTime}catch(d){throw new A(2,2,2009,d);}};
function qd(b,c,d,e){return Promise.resolve().then(function(){if(this.g&&this.c)if(null==d||null==e)this.g.parseInit(new Uint8Array(c));else{var b={periodStart:this.o,segmentStart:d,segmentEnd:e};b=this.g.parseMedia(new Uint8Array(c),b).filter(function(b){return b.startTime>=this.f&&b.startTime<this.j}.bind(this));this.c.append(b);null==this.a&&(this.a=Math.max(d,this.f));this.b=Math.min(e,this.j)}}.bind(b))}
md.prototype.remove=function(b,c){return Promise.resolve().then(function(){!this.c||!this.c.remove(b,c)||null==this.a||c<=this.a||b>=this.b||(b<=this.a&&c>=this.b?this.a=this.b=null:b<=this.a&&c<this.b?this.a=c:b>this.a&&c>=this.b&&(this.b=b))}.bind(this))};md.prototype.Ye=function(b){this.c.append(b)};md.prototype.appendCues=md.prototype.Ye;
md.prototype.vc=function(b,c){this.m=b;var d=this.l.get(b);if(d)for(var e=q(d.keys()),f=e.next();!f.done;f=e.next())if(f=d.get(f.value))f=f.filter(function(b){return b.endTime<=c}),this.c.append(f)};md.prototype.setSelectedClosedCaptionId=md.prototype.vc;
function rd(b,c,d,e,f){var g=d+" "+e,h=new Map;c=q(c);for(var k=c.next();!k.done;k=c.next()){var l=k.value;k=l.stream;h.has(k)||h.set(k,new Map);h.get(k).has(g)||h.get(k).set(g,[]);l.startTime+=f;l.endTime+=f;l.startTime>=b.f&&l.startTime<b.j&&(l=new sd(l.startTime,l.endTime,l.text),h.get(k).get(g).push(l),k==b.m&&b.c.append([l]))}f=q(h.keys());for(g=f.next();!g.done;g=f.next())for(g=g.value,b.l.has(g)||b.l.set(g,new Map),c=q(h.get(g).keys()),k=c.next();!k.done;k=c.next())k=k.value,l=h.get(g).get(k),
b.l.get(g).set(k,l);b.a=null==b.a?Math.max(d,b.f):Math.min(b.a,Math.max(d,b.f));b.b=Math.max(b.b,Math.min(e,b.j))};function td(b,c,d){this.f=b;this.m=d;this.b={};this.a=null;this.c={};this.j=new Nb;this.v=!1;this.l={};this.o=c;b=this.u=new z;c=new MediaSource;Qb(this.j,c,"sourceopen",b.resolve);this.f.src=window.URL.createObjectURL(c);this.g=c}function ud(b){var c=Xb(b.mimeType,b.codecs),d=Yb(b);return od(c)||MediaSource.isTypeSupported(d)||jd(c,b.type)}
function vd(){var b={};'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",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(",").forEach(function(c){b[c]=od(c)||
MediaSource.isTypeSupported(c)||jd(c);var d=c.split(";")[0];b[d]=b[d]||b[c]});return b}n=td.prototype;
n.destroy=function(){var b=this;this.v=!0;var c=[],d;for(d in this.c){var e=this.c[d],f=e[0];this.c[d]=e.slice(0,1);f&&c.push(f.p["catch"]($c.Qb));for(f=1;f<e.length;++f)e[f].p["catch"]($c.Qb),e[f].p.reject()}this.a&&c.push(this.a.destroy());this.m&&c.push(this.m.destroy());for(var g in this.l)c.push(this.l[g].destroy());return Promise.all(c).then(function(){b.j&&(b.j.R(),b.j=null);b.f&&(b.f.removeAttribute("src"),b.f.load(),b.f=null);b.g=null;b.a=null;b.m=null;b.b={};b.l={};b.o=null;b.c={}})};
n.init=function(b,c){var d=this;return r(function f(){var g;return v(f,function(f){switch(f.s){case 1:return g=cd,u(f,d.u,2);case 2:b.forEach(function(b,f){var h=Xb(b.mimeType,b.codecs);f==g.rb?wd(d,h):(!c&&MediaSource.isTypeSupported(h)||!jd(h,f)||(d.l[f]=new id,h=kd(f,h)),h=d.g.addSourceBuffer(h),G(d.j,h,"error",d.ah.bind(d,f)),G(d.j,h,"updateend",d.Db.bind(d,f)),d.b[f]=h,d.c[f]=[])}),f.s=0}})})};function wd(b,c){b.a||(b.a=new md(b.m));pd(b.a,c)}
function xd(b,c){if("text"==c)var d=b.a.a;else d=yd(b,c),d=!d||1==d.length&&1E-6>d.end(0)-d.start(0)?null:1==d.length&&0>d.start(0)?0:d.length?d.start(0):null;return d}function zd(b,c){return"text"==c?b.a.b:Wc(yd(b,c))}function Ad(b,c,d){if("text"==c)return b=b.a,null==b.b||b.b<d?0:b.b-Math.max(d,b.a);b=yd(b,c);return Yc(b,d)}n.Ic=function(){var b=this.a&&null!=this.a.a?[{start:this.a.a,end:this.a.b}]:[];return{total:Zc(this.f.buffered),audio:Zc(yd(this,"audio")),video:Zc(yd(this,"video")),text:b}};
function yd(b,c){try{return b.b[c].buffered}catch(d){return null}}
function Bd(b,c,d,e,f,g){if("text"==c)return qd(b.a,d,e,f);if(b.l[c])return ld(b.l[c],d).then(function(b){this.a||wd(this,"text/vtt");b.captions&&rd(this.a,b.captions,e,f,this.b.video.timestampOffset);return Cd(this,c,this.Ge.bind(this,c,b.data.buffer))}.bind(b));g&&window.muxjs&&(b.a||wd(b,"text/vtt"),null==e&&null==f?b.o.init(d):b.o.b(d,function(c){c.length&&rd(b.a,c,e,f,b.b.video.timestampOffset)}));return Cd(b,c,b.Ge.bind(b,c,d))}n.vc=function(b){var c=zd(this,"video")||0;this.a.vc(b,c)};
n.remove=function(b,c,d){return"text"==b?this.a.remove(c,d):Cd(this,b,this.He.bind(this,b,c,d))};function Dd(b,c){if("text"==c){if(!b.a)return Promise.resolve();b.o.c();return b.a.remove(0,Infinity)}return Cd(b,c,b.He.bind(b,c,0,b.g.duration))}n.flush=function(b){return"text"==b?Promise.resolve():Cd(this,b,this.mf.bind(this,b))};
function Ed(b,c,d,e,f){return"text"==c?(b.a.o=d,b=b.a,b.f=e,b.j=f,Promise.resolve()):Promise.all([Cd(b,c,b.Ve.bind(b,c)),Cd(b,c,b.Ug.bind(b,c,d)),Cd(b,c,b.Rg.bind(b,c,e,f))])}n.endOfStream=function(b){return Fd(this,function(){b?this.g.endOfStream(b):this.g.endOfStream()}.bind(this))};n.Ia=function(b){return Fd(this,function(){this.g.duration=b}.bind(this))};n.ka=function(){return this.g.duration};n.Ge=function(b,c){this.b[b].appendBuffer(c)};
n.He=function(b,c,d){d<=c?this.Db(b):this.b[b].remove(c,d)};n.Ve=function(b){var c=this.b[b].appendWindowStart,d=this.b[b].appendWindowEnd;this.b[b].abort();this.b[b].appendWindowStart=c;this.b[b].appendWindowEnd=d;this.Db(b)};n.mf=function(b){this.f.currentTime-=.001;this.Db(b)};n.Ug=function(b,c){0>c&&(c+=.001);this.b[b].timestampOffset=c;this.Db(b)};n.Rg=function(b,c,d){this.b[b].appendWindowStart=0;this.b[b].appendWindowEnd=d;this.b[b].appendWindowStart=c;this.Db(b)};
n.ah=function(b){this.c[b][0].p.reject(new A(2,3,3014,this.f.error?this.f.error.code:0))};n.Db=function(b){var c=this.c[b][0];c&&(c.p.resolve(),Gd(this,b))};function Cd(b,c,d){if(b.v)return Promise.reject();d={start:d,p:new z};b.c[c].push(d);if(1==b.c[c].length)try{d.start()}catch(e){"QuotaExceededError"==e.name?d.p.reject(new A(2,3,3017,c)):d.p.reject(new A(2,3,3015,e)),Gd(b,c)}return d.p}
function Fd(b,c){if(b.v)return Promise.reject();var d=[],e;for(e in b.b){var f=new z,g={start:function(b){b.resolve()}.bind(null,f),p:f};b.c[e].push(g);d.push(f);1==b.c[e].length&&g.start()}return Promise.all(d).then(function(){try{c()}catch(l){var b=Promise.reject(new A(2,3,3015,l))}for(var d in this.b)Gd(this,d);return b}.bind(b),function(){return Promise.reject()}.bind(b))}function Gd(b,c){b.c[c].shift();var d=b.c[c][0];if(d)try{d.start()}catch(e){d.p.reject(new A(2,3,3015,e)),Gd(b,c)}};function Hd(b,c){b=I(b);c=I(c);return b.split("-")[0]==c.split("-")[0]}function Id(b,c){b=I(b);c=I(c);var d=b.split("-"),e=c.split("-");return d[0]==e[0]&&1==d.length&&2==e.length}function I(b){var c=b.split("-");b=c[0]||"";c=c[1]||"";b=b.toLowerCase();b=Jd.get(b)||b;return(c=c.toUpperCase())?b+"-"+c:b}function Kd(b){var c=b.indexOf("-");b=0<=c?b.substring(0,c):b;b=b.toLowerCase();return b=Jd.get(b)||b}
function Ld(b){return b.language?I(b.language):b.audio&&b.audio.language?I(b.audio.language):b.video&&b.video.language?I(b.video.language):"und"}
function Md(b,c){for(var d=I(b),e=new Set,f=q(c),g=f.next();!g.done;g=f.next())e.add(I(g.value));f=q(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,g==d)return g;f=q(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,Id(g,d))return g;f=q(e);for(g=f.next();!g.done;g=f.next()){var h=g=g.value,k=d;h=I(h);k=I(k);h=h.split("-");k=k.split("-");if(2==h.length&&2==k.length&&h[0]==k[0])return g}e=q(e);for(g=e.next();!g.done;g=e.next())if(f=g.value,Id(d,f))return f;return null}
var Jd=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze",
"cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice",
"is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao",
"mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
"sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var J={Qc:function(b,c,d){function e(b,c,d){return b>=c&&b<=d}var f=b.video;return f&&f.width&&f.height&&!(e(f.width,c.minWidth,Math.min(c.maxWidth,d.width))&&e(f.height,c.minHeight,Math.min(c.maxHeight,d.height))&&e(f.width*f.height,c.minPixels,c.maxPixels))||!e(b.bandwidth,c.minBandwidth,c.maxBandwidth)?!1:!0},rd:function(b,c,d){var e=!1;b.forEach(function(b){var f=b.allowedByApplication;b.allowedByApplication=J.Qc(b,c,d);f!=b.allowedByApplication&&(e=!0)});return e},filterNewPeriod:function(b,
c,d,e){e.variants=e.variants.filter(function(e){if(b&&b.H&&!Rc(b,e))return!1;var f=e.audio;e=e.video;return f&&!ud(f)||e&&!ud(e)||f&&c&&!J.sd(f,c)||e&&d&&!J.sd(e,d)?!1:!0});e.textStreams=e.textStreams.filter(function(b){return od(Xb(b.mimeType,b.codecs))})},sd:function(b,c){return b.mimeType!=c.mimeType||b.codecs.split(".")[0]!=c.codecs.split(".")[0]?!1:!0},pd:function(b){var c=b.audio,d=b.video,e=c?c.codecs:null,f=d?d.codecs:null,g=[];f&&g.push(f);e&&g.push(e);var h=[];d&&h.push(d.mimeType);c&&h.push(c.mimeType);
h=h[0]||null;var k=[];c&&k.push(c.kind);d&&k.push(d.kind);k=k[0]||null;var l=new Set;c&&c.roles.forEach(function(b){return l.add(b)});d&&d.roles.forEach(function(b){return l.add(b)});b={id:b.id,active:!1,type:"variant",bandwidth:b.bandwidth,language:b.language,label:null,kind:k,width:null,height:null,frameRate:null,mimeType:h,codecs:g.join(", "),audioCodec:e,videoCodec:f,primary:b.primary,roles:Array.from(l),videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,
originalAudioId:null,originalTextId:null};d&&(b.videoId=d.id,b.originalVideoId=d.originalId,b.width=d.width||null,b.height=d.height||null,b.frameRate=d.frameRate||null,b.videoBandwidth=d.bandwidth||null);c&&(b.audioId=c.id,b.originalAudioId=c.originalId,b.channelsCount=c.channelsCount,b.audioBandwidth=c.bandwidth||null,b.label=c.label);return b},kd:function(b){return{id:b.id,active:!1,type:"text",bandwidth:0,language:b.language,label:b.label,kind:b.kind||null,width:null,height:null,frameRate:null,
mimeType:b.mimeType,codecs:b.codecs||null,audioCodec:null,videoCodec:null,primary:b.primary,roles:b.roles,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:b.originalId}},lf:function(b,c){for(var d=0;d<b.variants.length;d++)if(b.variants[d].id==c.id)return b.variants[d];return null},kf:function(b,c){for(var d=0;d<b.textStreams.length;d++)if(b.textStreams[d].id==c.id)return b.textStreams[d];return null},yb:function(b){return b.allowedByApplication&&
b.allowedByKeySystem},Bf:function(b){return b.filter(function(b){return J.yb(b)})},Ed:function(b,c){var d=b.filter(function(b){return b.audio&&b.audio.channelsCount}).reduce(function(b,c){var d=c.audio.channelsCount;b[d]?b[d].push(c):b[d]=[c];return b},{}),e=Object.keys(d);if(0==e.length)return b;var f=e.filter(function(b){return b<=c});return f.length?d[Math.max.apply(null,f)]:d[Math.min.apply(null,e)]},fc:function(b,c,d){var e=b,f=b.filter(function(b){return b.primary});f.length&&(e=f);var g=e.length?
e[0].language:"";e=e.filter(function(b){return b.language==g});if(c){var h=Md(I(c),b.map(function(b){return b.language}));h&&(e=b.filter(function(b){return I(b.language)==h}))}if(d){if(b=J.Dd(e,d),b.length)return b}else if(b=e.filter(function(b){return 0==b.roles.length}),b.length)return b;b=e.map(function(b){return b.roles}).reduce($c.Dc,[]);return b.length?J.Dd(e,b[0]):e},Dd:function(b,c){return b.filter(function(b){return b.roles.includes(c)})},Nd:function(b,c,d){for(var e=0;e<d.length;e++)if(d[e].audio==
b&&d[e].video==c)return d[e];return null},hc:function(b,c){for(var d=b.periods.length-1;0<d;--d)if(c+hd>=b.periods[d].startTime)return d;return 0},jf:function(b,c){for(var d=0;d<b.periods.length;++d)for(var e=b.periods[d],f=0;f<e.variants.length;++f)if(e.variants[f]==c)return d;return-1},Kf:function(b){return"audio"==b.type},Pf:function(b){return"video"==b.type},Id:function(b){var c=[];b.periods.forEach(function(b){b.variants.forEach(function(b){c.push(b)})});return c},Gf:function(b){var c=[];b.audio&&
c.push(b.audio);b.video&&c.push(b.video);return c},rh:function(b){return J.Kf(b)?"type=audio codecs="+b.codecs+" bandwidth="+b.bandwidth+" channelsCount="+b.channelsCount:J.Pf(b)?"type=video codecs="+b.codecs+" bandwidth="+b.bandwidth+" frameRate="+b.frameRate+" width="+b.width+" height="+b.height:"unexpected stream type"}};function K(){this.j=null;this.g=!1;this.b=new Ua;this.c=[];this.l=!1;this.a=this.f=null}y("shaka.abr.SimpleAbrManager",K);K.prototype.stop=function(){this.j=null;this.g=!1;this.c=[];this.f=null};K.prototype.stop=K.prototype.stop;K.prototype.init=function(b){this.j=b};K.prototype.init=K.prototype.init;
K.prototype.chooseVariant=function(){var b=Nd(this.a.restrictions,this.c),c=this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.c.length&&!b.length&&(b=Nd(null,this.c),b=[b[0]]);for(var d=b[0]||null,e=0;e<b.length;++e){var f=b[e],g=(b[e+1]||{bandwidth:Infinity}).bandwidth/this.a.bandwidthUpgradeTarget;c>=f.bandwidth/this.a.bandwidthDowngradeTarget&&c<=g&&(d=f)}this.f=Date.now();return d};K.prototype.chooseVariant=K.prototype.chooseVariant;K.prototype.enable=function(){this.g=!0};
K.prototype.enable=K.prototype.enable;K.prototype.disable=function(){this.g=!1};K.prototype.disable=K.prototype.disable;K.prototype.segmentDownloaded=function(b,c){var d=this.b;if(!(16E3>c)){var e=8E3*c/b,f=b/1E3;d.a+=c;Sa(d.b,f,e);Sa(d.c,f,e)}if(null!=this.f&&this.g)a:{if(!this.l){if(!(128E3<=this.b.a))break a;this.l=!0}else if(Date.now()-this.f<1E3*this.a.switchInterval)break a;d=this.chooseVariant();this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.j(d)}};
K.prototype.segmentDownloaded=K.prototype.segmentDownloaded;K.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)};K.prototype.getBandwidthEstimate=K.prototype.getBandwidthEstimate;K.prototype.setVariants=function(b){this.c=b};K.prototype.setVariants=K.prototype.setVariants;K.prototype.configure=function(b){this.a=b};K.prototype.configure=K.prototype.configure;
function Nd(b,c){b&&(c=c.filter(function(c){return J.Qc(c,b,{width:Infinity,height:Infinity})}));return c.sort(function(b,c){return b.bandwidth-c.bandwidth})};function Od(b,c){this.a=b;this.b=c}Od.prototype.toString=function(){return"v"+this.a+"."+this.b};function Pd(b,c){var d=new Od(2,6),e=Qd,f=e.a,g=d.b-f.b;(0<(d.a-f.a||g)?e.c:e.b)(e.a,d,b,c)}function Rd(b,c,d,e){Wa([d,"has been deprecated and will be removed in",c,". We are currently at version",b,". Additional information:",e].join(" "))}function Sd(b,c,d,e){Va([d,"has been deprecated and has been removed in",c,". We are now at version",b,". Additional information:",e].join(""))}var Qd=null;var Td="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Ud="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Vd=["loop","playbackRate"],Wd=["pause","play"],Xd="adaptation buffering emsg error loading streaming texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading variantchanged textchanged".split(" "),Yd={getAssetUri:2,getAudioLanguages:2,
getAudioLanguagesAndRoles:2,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,usingEmbeddedTextTrack:2},Zd={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},$d=[["getConfiguration","configure"]],ae=[["isTextTrackVisible","setTextTrackVisibility"]],be="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack setTextTrackVisibility trickPlay".split(" "),
ce=["attach","detach","load","unload"];
function de(b){return JSON.stringify(b,function(b,d){if("function"!=typeof d){if(d instanceof Event||d instanceof C){var c={},f;for(f in d){var g=d[f];g&&"object"==typeof g?"detail"==f&&(c[f]=g):f in Event||(c[f]=g)}return c}if(d instanceof TimeRanges)for(c={__type__:"TimeRanges",length:d.length,start:[],end:[]},f=0;f<d.length;++f)c.start.push(d.start(f)),c.end.push(d.end(f));else c=d instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(d)}:"number"==typeof d?isNaN(d)?"NaN":isFinite(d)?
d:0>d?"-Infinity":"Infinity":d;return c}})}function ee(b){return JSON.parse(b,function(b,d){return"NaN"==d?NaN:"-Infinity"==d?-Infinity:"Infinity"==d?Infinity:d&&"object"==typeof d&&"TimeRanges"==d.__type__?fe(d):d&&"object"==typeof d&&"Uint8Array"==d.__type__?new Uint8Array(d.entries):d})}function fe(b){return{length:b.length,start:function(c){return b.start[c]},end:function(c){return b.end[c]}}};function ge(b,c,d,e,f,g){this.G=b;this.g=c;this.H=d;this.m=!1;this.B=e;this.F=f;this.w=g;this.b=this.j=!1;this.A="";this.l=null;this.o=this.$d.bind(this);this.u=this.eg.bind(this);this.a={video:{},player:{}};this.v=0;this.c={};this.f=null}var he=!1,ie=null;n=ge.prototype;n.destroy=function(){je(this);ie&&ke(this);this.F=this.B=this.g=null;this.b=this.j=!1;this.u=this.o=this.f=this.c=this.a=this.l=null;return Promise.resolve()};n.ba=function(){return this.b};n.uc=function(){return this.A};
n.init=function(){if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){delete window.__onGCastApiAvailable;this.j=!0;this.g();var b=new chrome.cast.SessionRequest(this.G);b=new chrome.cast.ApiConfig(b,this.ae.bind(this),this.mg.bind(this),"origin_scoped");chrome.cast.initialize(b,function(){},function(){});he&&setTimeout(this.g.bind(this),20);(b=ie)&&b.status!=chrome.cast.SessionStatus.STOPPED?this.ae(b):ie=null}else window.__onGCastApiAvailable=function(b){b&&this.init()}.bind(this)};
n.ed=function(b){this.l=b;this.b&&le({type:"appData",appData:this.l})};n.cast=function(b){if(!this.j)return Promise.reject(new A(1,8,8E3));if(!he)return Promise.reject(new A(1,8,8001));if(this.b)return Promise.reject(new A(1,8,8002));this.f=new z;chrome.cast.requestSession(this.Yc.bind(this,b),this.Zd.bind(this));return this.f};n.ic=function(){this.b&&(je(this),ie&&(ke(this),ie.stop(function(){},function(){}),ie=null))};
n.get=function(b,c){if("video"==b){if(Wd.includes(c))return this.se.bind(this,b,c)}else if("player"==b){if(Zd[c]&&!this.get("player","isLive")())return function(){};if(be.includes(c))return this.se.bind(this,b,c);if(ce.includes(c))return this.Jg.bind(this,b,c);if(Yd[c])return this.pe.bind(this,b,c)}return this.pe(b,c)};n.set=function(b,c,d){this.a[b][c]=d;le({type:"set",targetName:b,property:c,value:d})};
n.Yc=function(b,c){ie=c;c.addUpdateListener(this.o);c.addMessageListener("urn:x-cast:com.google.shaka.v2",this.u);this.$d();le({type:"init",initState:b,appData:this.l});this.f.resolve()};n.Zd=function(b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}this.f.reject(new A(2,8,c,b))};n.pe=function(b,c){return this.a[b][c]};
n.se=function(b,c,d){for(var e=[],f=2;f<arguments.length;++f)e[f-2]=arguments[f];le({type:"call",targetName:b,methodName:c,args:e})};n.Jg=function(b,c,d){for(var e=[],f=2;f<arguments.length;++f)e[f-2]=arguments[f];f=new z;var g=this.v.toString();this.v++;this.c[g]=f;le({type:"asyncCall",targetName:b,methodName:c,args:e,id:g});return f};n.ae=function(b){var c=this.w();this.f=new z;this.m=!0;this.Yc(c,b)};n.mg=function(b){he="available"==b;this.g()};
function ke(b){var c=ie;c.removeUpdateListener(b.o);c.removeMessageListener("urn:x-cast:com.google.shaka.v2",b.u)}n.$d=function(){var b=ie?"connected"==ie.status:!1;if(this.b&&!b){this.F();for(var c in this.a)this.a[c]={};je(this)}this.A=(this.b=b)?ie.receiver.friendlyName:"";this.g()};function je(b){for(var c in b.c){var d=b.c[c];delete b.c[c];d.reject(new A(1,7,7E3))}}
n.eg=function(b,c){var d=ee(c);switch(d.type){case "event":var e=d.event;this.B(d.targetName,new C(e.type,e));break;case "update":e=d.update;for(var f in e){d=this.a[f]||{};for(var g in e[f])d[g]=e[f][g]}this.m&&(this.H(),this.m=!1);break;case "asyncComplete":if(f=d.id,d=d.error,g=this.c[f],delete this.c[f],g)if(d){f=new A(d.severity,d.category,d.code);for(e in d)f[e]=d[e];g.reject(f)}else g.resolve()}};function le(b){b=de(b);ie.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Xa)};function L(b,c,d){D.call(this);this.c=b;this.b=c;this.l=this.g=this.f=this.m=this.j=null;this.a=new ge(d,this.Wg.bind(this),this.Xg.bind(this),this.Yg.bind(this),this.Zg.bind(this),this.Ld.bind(this));me(this)}Pa(L,D);y("shaka.cast.CastProxy",L);L.prototype.destroy=function(b){b&&this.a&&this.a.ic();this.l&&(this.l.R(),this.l=null);b=[];this.b&&(b.push(this.b.destroy()),this.b=null);this.a&&(b.push(this.a.destroy()),this.a=null);this.m=this.j=this.c=null;return Promise.all(b)};
L.prototype.destroy=L.prototype.destroy;L.prototype.Mb=function(){return this.j};L.prototype.getVideo=L.prototype.Mb;L.prototype.cb=function(){return this.m};L.prototype.getPlayer=L.prototype.cb;L.prototype.td=function(){return this.a?this.a.j&&he:!1};L.prototype.canCast=L.prototype.td;L.prototype.ba=function(){return this.a?this.a.ba():!1};L.prototype.isCasting=L.prototype.ba;L.prototype.uc=function(){return this.a?this.a.uc():""};L.prototype.receiverName=L.prototype.uc;
L.prototype.cast=function(){var b=this.Ld();return this.a.cast(b).then(function(){if(this.b)return this.b.$b()}.bind(this))};L.prototype.cast=L.prototype.cast;L.prototype.ed=function(b){this.a.ed(b)};L.prototype.setAppData=L.prototype.ed;L.prototype.Ie=function(){var b=this.a;if(b.b){var c=b.w();chrome.cast.requestSession(b.Yc.bind(b,c),b.Zd.bind(b))}};L.prototype.suggestDisconnect=L.prototype.Ie;L.prototype.ic=function(){this.a.ic()};L.prototype.forceDisconnect=L.prototype.ic;
function me(b){b.a.init();b.l=new Nb;Td.forEach(function(b){G(this.l,this.c,b,this.kh.bind(this))}.bind(b));Xd.forEach(function(b){G(this.l,this.b,b,this.Dg.bind(this))}.bind(b));b.j={};for(var c in b.c)Object.defineProperty(b.j,c,{configurable:!1,enumerable:!0,get:b.jh.bind(b,c),set:b.lh.bind(b,c)});b.m={};for(var d in b.b)Object.defineProperty(b.m,d,{configurable:!1,enumerable:!0,get:b.oe.bind(b,d)});b.f=new D;b.f.Ca=b.j;b.g=new D;b.g.Ca=b.m}n=L.prototype;
n.Ld=function(){var b={video:{},player:{},playerAfterLoad:{},manifest:this.b.Hc(),startTime:null};this.c.pause();Vd.forEach(function(c){b.video[c]=this.c[c]}.bind(this));this.c.ended||(b.startTime=this.c.currentTime);$d.forEach(function(c){var d=c[1];c=this.b[c[0]]();b.player[d]=c}.bind(this));ae.forEach(function(c){var d=c[1];c=this.b[c[0]]();b.playerAfterLoad[d]=c}.bind(this));return b};n.Wg=function(){this.dispatchEvent(new C("caststatuschanged"))};
n.Xg=function(){this.f.dispatchEvent(new C(this.j.paused?"pause":"play"))};
n.Zg=function(){var b=this;$d.forEach(function(b){var c=b[1];b=this.a.get("player",b[0])();this.b[c](b)}.bind(this));var c=this.a.get("player","getAssetUri")(),d=this.a.get("video","ended"),e=Promise.resolve(),f=this.c.autoplay,g=null;d||(g=this.a.get("video","currentTime"));c&&(this.c.autoplay=!1,e=this.b.load(c,g));var h={};Vd.forEach(function(b){h[b]=this.a.get("video",b)}.bind(this));e.then(function(){b.c&&(Vd.forEach(function(b){this.c[b]=h[b]}.bind(b)),ae.forEach(function(b){var c=b[1];b=this.a.get("player",
b[0])();this.b[c](b)}.bind(b)),b.c.autoplay=f,c&&b.c.play())},function(c){b.b.dispatchEvent(new C("error",{detail:c}))})};n.jh=function(b){if("addEventListener"==b)return this.f.addEventListener.bind(this.f);if("removeEventListener"==b)return this.f.removeEventListener.bind(this.f);if(this.a.ba()&&0==Object.keys(this.a.a.video).length){var c=this.c[b];if("function"!=typeof c)return c}return this.a.ba()?this.a.get("video",b):(b=this.c[b],"function"==typeof b&&(b=b.bind(this.c)),b)};
n.lh=function(b,c){this.a.ba()?this.a.set("video",b,c):this.c[b]=c};n.kh=function(b){this.a.ba()||this.f.dispatchEvent(new C(b.type,b))};
n.oe=function(b){if("addEventListener"==b)return this.g.addEventListener.bind(this.g);if("removeEventListener"==b)return this.g.removeEventListener.bind(this.g);if("getMediaElement"==b)return function(){return this.j}.bind(this);if("getSharedConfiguration"==b)return this.a.get("player","getConfiguration");if("getNetworkingEngine"==b)return this.b.Jb.bind(this.b);if(this.a.ba()){if("getManifest"==b||"drmInfo"==b)return function(){Wa(b+"() does not work while casting!");return null};if("getManifestUri"==
b)return Pd("getManifestUri",'Please use "getAssetUri" instead.'),this.oe("getAssetUri");if("attach"==b||"detach"==b)return function(){Wa(b+"() does not work while casting!");return Promise.resolve()}}return this.a.ba()&&0==Object.keys(this.a.a.video).length&&Yd[b]||!this.a.ba()?this.b[b].bind(this.b):this.a.get("player",b)};n.Dg=function(b){this.a.ba()||this.g.dispatchEvent(b)};n.Yg=function(b,c){this.a.ba()&&("video"==b?this.f.dispatchEvent(c):"player"==b&&this.g.dispatchEvent(c))};function ne(b,c,d,e){D.call(this);this.a=b;this.b=c;this.c=new Nb;this.w={video:b,player:c};this.A=d||function(){};this.B=e||function(b){return b};this.v=!1;this.j=!0;this.g=0;this.u=!1;this.m=!0;this.o=this.l=this.f=null;oe(this)}Pa(ne,D);y("shaka.cast.CastReceiver",ne);ne.prototype.isConnected=function(){return this.v};ne.prototype.isConnected=ne.prototype.isConnected;ne.prototype.Nf=function(){return this.j};ne.prototype.isIdle=ne.prototype.Nf;
ne.prototype.destroy=function(){var b=this;return r(function d(){var e,f;return v(d,function(d){switch(d.s){case 1:return b.c&&(b.c.R(),b.c=null),e=[],b.b&&(e.push(b.b.destroy()),b.b=null),null!=b.o&&window.clearTimeout(b.o),b.a=null,b.w=null,b.A=null,b.v=!1,b.j=!0,b.f=null,b.l=null,b.o=null,u(d,Promise.all(e),2);case 2:f=cast.receiver.CastReceiverManager.getInstance(),f.stop(),d.s=0}})})};ne.prototype.destroy=ne.prototype.destroy;
function oe(b){var c=cast.receiver.CastReceiverManager.getInstance();c.onSenderConnected=b.je.bind(b);c.onSenderDisconnected=b.je.bind(b);c.onSystemVolumeChanged=b.hf.bind(b);b.l=c.getCastMessageBus("urn:x-cast:com.google.cast.media");b.l.onMessage=b.Zf.bind(b);b.f=c.getCastMessageBus("urn:x-cast:com.google.shaka.v2");b.f.onMessage=b.qg.bind(b);c.start();Td.forEach(function(b){G(this.c,this.a,b,this.qe.bind(this,"video"))}.bind(b));Xd.forEach(function(b){G(this.c,this.b,b,this.qe.bind(this,"player"))}.bind(b));
cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?b.b.gd(3840,2160):b.b.gd(1920,1080);G(b.c,b.a,"loadeddata",function(){this.u=!0}.bind(b));G(b.c,b.b,"loading",function(){this.j=!1;pe(this)}.bind(b));G(b.c,b.a,"playing",function(){this.j=!1;pe(this)}.bind(b));G(b.c,b.a,"pause",function(){pe(this)}.bind(b));G(b.c,b.b,"unloading",function(){this.j=!0;pe(this)}.bind(b));G(b.c,b.a,"ended",function(){window.setTimeout(function(){this.a&&this.a.ended&&
(this.j=!0,pe(this))}.bind(this),5E3)}.bind(b))}n=ne.prototype;n.je=function(){this.g=0;this.m=!0;this.v=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;pe(this)};function pe(b){Promise.resolve().then(function(){this.b&&(this.dispatchEvent(new C("caststatuschanged")),qe(this)||re(this,0))}.bind(b))}
function se(b,c,d){for(var e in c.player)b.b[e](c.player[e]);b.A(d);d=Promise.resolve();var f=b.a.autoplay;c.manifest&&(b.a.autoplay=!1,d=b.b.load(c.manifest,c.startTime));d.then(function(){if(b.b){for(var d in c.video)b.a[d]=c.video[d];for(var e in c.playerAfterLoad)b.b[e](c.playerAfterLoad[e]);b.a.autoplay=f;c.manifest&&(b.a.play(),re(b,0))}},function(c){b.b.dispatchEvent(new C("error",{detail:c}))})}n.qe=function(b,c){this.b&&(this.$c(),te(this,{type:"event",targetName:b,event:c},this.f))};
n.$c=function(){null!=this.o&&window.clearTimeout(this.o);this.o=window.setTimeout(this.$c.bind(this),500);var b={video:{},player:{}};Ud.forEach(function(c){b.video[c]=this.a[c]}.bind(this));if(this.b.Z())for(var c in Zd)0==this.g%Zd[c]&&(b.player[c]=this.b[c]());for(var d in Yd)0==this.g%Yd[d]&&(b.player[d]=this.b[d]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;this.u&&(this.g+=1);te(this,{type:"update",update:b},this.f);qe(this)};
function qe(b){return b.m&&(b.a.duration||b.b.Z())?(ue(b),b.m=!1,!0):!1}function ue(b){var c={contentId:b.b.Hc(),streamType:b.b.Z()?"LIVE":"BUFFERED",duration:b.a.duration,contentType:""};re(b,0,c)}n.hf=function(){var b=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();b&&te(this,{type:"update",update:{video:{volume:b.level,muted:b.muted}}},this.f);te(this,{type:"event",targetName:"video",event:{type:"volumechange"}},this.f)};
n.qg=function(b){var c=ee(b.data);switch(c.type){case "init":this.g=0;this.u=!1;this.m=!0;se(this,c.initState,c.appData);this.$c();break;case "appData":this.A(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}}this.w[d][e]=c;break;case "call":d=this.w[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=
c.targetName;e=c.methodName;"player"==d&&"load"==e&&(this.g=0,this.u=!1);f=c.id;b=b.senderId;var g=this.w[d];c=g[e].apply(g,c.args);"player"==d&&"load"==e&&(c=c.then(function(){this.m=!0}.bind(this)));c.then(this.Be.bind(this,b,f,null),this.Be.bind(this,b,f))}};
n.Zf=function(b){var c=ee(b.data);switch(c.type){case "PLAY":this.a.play();re(this,0);break;case "PAUSE":this.a.pause();re(this,0);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(this.a.currentTime=Number(b));d&&"PLAYBACK_START"==d?(this.a.play(),re(this,0)):d&&"PLAYBACK_PAUSE"==d&&(this.a.pause(),re(this,0));break;case "STOP":this.b.$b().then(function(){this.b&&re(this,0)}.bind(this));break;case "GET_STATUS":re(this,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=
d.muted;var e=this.a.volume,f=this.a.muted;null!=b&&(this.a.volume=Number(b));null!=d&&(this.a.muted=d);e==this.a.volume&&f==this.a.muted||re(this,0);break;case "LOAD":this.g=0;this.m=this.u=!1;b=c.currentTime;d=this.B(c.media.contentId);this.a.autoplay=!0;this.b.load(d,b).then(function(){this.b&&ue(this)}.bind(this))["catch"](function(b){var d="LOAD_FAILED";7==b.category&&7E3==b.code&&(d="LOAD_CANCELLED");te(this,{requestId:Number(c.requestId),type:d},this.l)}.bind(this));break;default:te(this,{requestId:Number(c.requestId),
type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},this.l)}};n.Be=function(b,c,d){this.b&&te(this,{type:"asyncComplete",id:c,error:d},this.f,b)};function te(b,c,d,e){b.v&&(b=de(c),e?d.getCastChannel(e).send(b):d.broadcast(b))}
function re(b,c,d){var e=b.a.playbackRate;var f=ve;f=b.j?f.IDLE:b.b.Td()?f.Oe:b.a.paused?f.Qe:f.Re;e={mediaSessionId:0,playbackRate:e,playerState:f,currentTime:b.a.currentTime,supportedMediaCommands:15,volume:{level:b.a.volume,muted:b.a.muted}};d&&(e.media=d);te(b,{requestId:c,type:"MEDIA_STATUS",status:[e]},b.l)}var ve={IDLE:"IDLE",Re:"PLAYING",Oe:"BUFFERING",Qe:"PAUSED"};var M={gc:function(b,c){var d=M.X(b,c);return 1!=d.length?null:d[0]},Fd:function(b,c,d){b=M.Gd(b,c,d);return 1!=b.length?null:b[0]},X:function(b,c){return Array.prototype.filter.call(b.childNodes,function(b){return b instanceof Element&&b.tagName==c})},Gd:function(b,c,d){return Array.prototype.filter.call(b.childNodes,function(b){return b instanceof Element&&b.localName==d&&b.namespaceURI==c})},getAttributeNS:function(b,c,d){return b.hasAttributeNS(c,d)?b.getAttributeNS(c,d):null},jc:function(b){return Array.prototype.every.call(b.childNodes,
function(b){return b.nodeType==Node.TEXT_NODE||b.nodeType==Node.CDATA_SECTION_NODE})?b.textContent.trim():null},M:function(b,c,d,e){e=void 0===e?null:e;var f=null;b=b.getAttribute(c);null!=b&&(f=d(b));return null==f?e:f},zg:function(b){if(!b)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(b)&&(b+="Z");b=Date.parse(b);return isNaN(b)?null:Math.floor(b/1E3)},Oa:function(b){if(!b)return null;b=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(b);
if(!b)return null;b=31536E3*Number(b[1]||null)+2592E3*Number(b[2]||null)+86400*Number(b[3]||null)+3600*Number(b[4]||null)+60*Number(b[5]||null)+Number(b[6]||null);return isFinite(b)?b:null},sc:function(b){var c=/([0-9]+)-([0-9]+)/.exec(b);if(!c)return null;b=Number(c[1]);if(!isFinite(b))return null;c=Number(c[2]);return isFinite(c)?{start:b,end:c}:null},parseInt:function(b){b=Number(b);return 0===b%1?b:null},rc:function(b){b=Number(b);return 0===b%1&&0<b?b:null},Eb:function(b){b=Number(b);return 0===
b%1&&0<=b?b:null},parseFloat:function(b){b=Number(b);return isNaN(b)?null:b},gf:function(b){var c;b=(c=b.match(/^(\d+)\/(\d+)$/))?Number(c[1]/c[2]):Number(b);return isNaN(b)?null:b},me:function(b,c){var d=new DOMParser;try{var e=d.parseFromString(b,"text/xml")}catch(g){}if(e&&e.documentElement.tagName==c)var f=e.documentElement;return f&&0<f.getElementsByTagName("parsererror").length?null:f},le:function(b,c){try{var d=bc(b);return M.me(d,c)}catch(e){}}};var we=(new Map).set("urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b","org.w3.clearkey").set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine.alpha").set("urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95","com.microsoft.playready").set("urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb","com.adobe.primetime");
function xe(b,c,d){var e=ye(b),f=null;b=[];var g=[],h=new Set(e.map(function(b){return b.keyId}));h["delete"](null);if(1<h.size)throw new A(2,4,4010);d||(g=e.filter(function(b){return"urn:mpeg:dash:mp4protection:2011"==b.we?(f=b.init||f,!1):!0}),g.length&&(b=ze(f,c,g),0==b.length&&(b=[bd("",f)])));if(e.length&&(d||!g.length))for(b=[],c=q(we.values()),d=c.next();!d.done;d=c.next())d=d.value,"org.w3.clearkey"!=d&&b.push(bd(d,f));if(h=Array.from(h)[0]||null)for(c=q(b),d=c.next();!d.done;d=c.next())for(d=
q(d.value.initData),e=d.next();!e.done;e=d.next())e.value.keyId=h;return{xd:h,qh:f,drmInfos:b,Hd:!0}}function Ae(b,c,d,e){var f=xe(b,c,e);if(d.Hd){b=1==d.drmInfos.length&&!d.drmInfos[0].keySystem;c=0==f.drmInfos.length;if(0==d.drmInfos.length||b&&!c)d.drmInfos=f.drmInfos;d.Hd=!1}else if(0<f.drmInfos.length&&(d.drmInfos=d.drmInfos.filter(function(b){return f.drmInfos.some(function(c){return c.keySystem==b.keySystem})}),0==d.drmInfos.length))throw new A(2,4,4008);return f.xd||d.xd}
function Be(b){var c=0,d=(new DataView(b)).getUint32(c,!0);if(d!==b.byteLength)return[];c+=6;d=[];for(var e=new DataView(b);c<b.byteLength-1;){var f=e.getUint16(c,!0);c+=2;var g=e.getUint16(c,!0);c+=2;var h=new Uint8Array(b,c,g);d.push({type:f,value:h});c+=g}return d}function Ce(b){return(b=b.querySelector("DATA > LA_URL"))?b.textContent:""}
function ze(b,c,d){var e=[];d=q(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=we.get(f.we);if(g){var h=bd(g,f.init||b);if(g=De.get(g))h.licenseServerUri=g(f);e.push(h)}else for(f=c(f.node)||[],f=q(f),h=f.next();!h.done;h=f.next())e.push(h.value)}return e}
var De=(new Map).set("com.widevine.alpha",function(b){return(b=M.Fd(b.node,"urn:microsoft","laurl"))?b.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",function(b){b=M.Fd(b.node,"urn:microsoft:playready","pro");if(!b)return"";b=ic(b.textContent);b=Be(b.buffer).filter(function(b){return 1===b.type})[0];if(!b)return"";b=dc(b.value,!0);return(b=M.me(b,"WRMHEADER"))?Ce(b):""});function ye(b){var c=[];b=q(b);for(var d=b.next();!d.done;d=b.next())(d=Ee(d.value))&&c.push(d);return c}
function Ee(b){var c=b.getAttribute("schemeIdUri"),d=M.getAttributeNS(b,"urn:mpeg:cenc:2013","default_KID"),e=M.Gd(b,"urn:mpeg:cenc:2013","pssh").map(M.jc);if(!c)return null;c=c.toLowerCase();if(d&&(d=d.replace(/-/g,"").toLowerCase(),d.includes(" ")))throw new A(2,4,4009);var f=[];try{f=e.map(function(b){return{initDataType:"cenc",initData:ic(b),keyId:null}})}catch(g){throw new A(2,4,4007);}return{node:b,we:c,keyId:d,init:0<f.length?f:null}};function Fe(b,c,d,e,f){var g={RepresentationID:c,Number:d,Bandwidth:e,Time:f};return b.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(b,c,d,e){if("$$"==b)return"$";var f=g[c];if(null==f)return b;"RepresentationID"==c&&d&&(d=void 0);"Time"==c&&(f=Math.round(f));switch(e){case void 0:case "d":case "i":case "u":b=f.toString();break;case "o":b=f.toString(8);break;case "x":b=f.toString(16);break;case "X":b=f.toString(16).toUpperCase();break;default:b=f.toString()}d=
window.parseInt(d,10)||1;return Array(Math.max(0,d-b.length)+1).join("0")+b})}
function Ge(b,c){var d=He(b,c,"timescale"),e=1;d&&(e=M.rc(d)||1);d=He(b,c,"duration");(d=M.rc(d||""))&&(d/=e);var f=He(b,c,"startNumber"),g=Number(He(b,c,"presentationTimeOffset"))||0,h=M.Eb(f||"");if(null==f||null==h)h=1;var k=Ie(b,c,"SegmentTimeline");f=null;if(k){f=e;var l=b.Y.duration||Infinity;k=M.X(k,"S");for(var m=[],p=0,t=0;t<k.length;++t){var w=k[t],x=M.M(w,"t",M.Eb),F=M.M(w,"d",M.Eb);w=M.M(w,"r",M.parseInt);null!=x&&(x-=g);if(!F)break;x=null!=x?x:p;w=w||0;if(0>w)if(t+1<k.length){w=M.M(k[t+
1],"t",M.Eb);if(null==w)break;else if(x>=w)break;w=Math.ceil((w-x)/F)-1}else{if(Infinity==l)break;else if(x/f>=l)break;w=Math.ceil((l*f-x)/F)-1}0<m.length&&x!=p&&(m[m.length-1].end=x/f);for(var R=0;R<=w;++R)p=x+F,m.push({start:x/f,end:p/f,gh:x}),x=p}f=m}return{timescale:e,ma:d,kb:h,Aa:g/e||0,od:g,U:f}}function He(b,c,d){return[c(b.D),c(b.ra),c(b.ya)].filter($c.Sa).map(function(b){return b.getAttribute(d)}).reduce(function(b,c){return b||c})}
function Ie(b,c,d){return[c(b.D),c(b.ra),c(b.ya)].filter($c.Sa).map(function(b){return M.gc(b,d)}).reduce(function(b,c){return b||c})}
function Je(b,c,d,e,f,g){for(var h=M.getAttributeNS(b,"http://www.w3.org/1999/xlink","href"),k=M.getAttributeNS(b,"http://www.w3.org/1999/xlink","actuate")||"onRequest",l=0;l<b.attributes.length;l++){var m=b.attributes[l];"http://www.w3.org/1999/xlink"==m.namespaceURI&&(b.removeAttributeNS(m.namespaceURI,m.localName),--l)}if(5<=g)return sb(new A(2,4,4028));if("onLoad"!=k)return sb(new A(2,4,4027));var p=ad([e],[h]);return f.request(0,Jb(p,c)).sa(function(e){e=M.le(e.data,b.tagName);if(!e)return sb(new A(2,
4,4001,h));for(;b.childNodes.length;)b.removeChild(b.childNodes[0]);for(;e.childNodes.length;){var k=e.childNodes[0];e.removeChild(k);b.appendChild(k)}for(k=0;k<e.attributes.length;k++){var l=e.attributes[k].nodeName,m=e.getAttribute(l);b.setAttribute(l,m)}return Ke(b,c,d,p[0],f,g+1)})}
function Ke(b,c,d,e,f,g){g=void 0===g?0:g;if(M.getAttributeNS(b,"http://www.w3.org/1999/xlink","href")){var h=Je(b,c,d,e,f,g);d&&(h=h.sa(void 0,function(){return Ke(b,c,d,e,f,g)}));return h}h=[];for(var k=0;k<b.childNodes.length;k++){var l=b.childNodes[k];l instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==M.getAttributeNS(l,"http://www.w3.org/1999/xlink","href")?(b.removeChild(l),--k):"SegmentTimeline"!=l.tagName&&h.push(Ke(l,c,d,e,f,g)))}return wb(h).sa(function(){return b})};function Le(b,c,d){this.c=b;this.b=c;this.a=d}y("shaka.media.InitSegmentReference",Le);Le.prototype.Ec=function(){return this.c()};Le.prototype.createUris=Le.prototype.Ec;Le.prototype.Kc=function(){return this.b};Le.prototype.getStartByte=Le.prototype.Kc;Le.prototype.Jc=function(){return this.a};Le.prototype.getEndByte=Le.prototype.Jc;function N(b,c,d,e,f,g){this.position=b;this.startTime=c;this.endTime=d;this.c=e;this.b=f;this.a=g}y("shaka.media.SegmentReference",N);N.prototype.oa=function(){return this.position};
N.prototype.getPosition=N.prototype.oa;N.prototype.Lc=function(){return this.startTime};N.prototype.getStartTime=N.prototype.Lc;N.prototype.uf=function(){return this.endTime};N.prototype.getEndTime=N.prototype.uf;N.prototype.Ec=function(){return this.c()};N.prototype.createUris=N.prototype.Ec;N.prototype.Kc=function(){return this.b};N.prototype.getStartByte=N.prototype.Kc;N.prototype.Jc=function(){return this.a};N.prototype.getEndByte=N.prototype.Jc;function O(b,c){this.N=b;this.b=c==Me;this.a=0}y("shaka.util.DataViewReader",O);var Me=1;O.Endianness={nh:0,oh:Me};O.prototype.Fa=function(){return this.a<this.N.byteLength};O.prototype.hasMoreData=O.prototype.Fa;O.prototype.oa=function(){return this.a};O.prototype.getPosition=O.prototype.oa;O.prototype.vf=function(){return this.N.byteLength};O.prototype.getLength=O.prototype.vf;O.prototype.za=function(){try{var b=this.N.getUint8(this.a);this.a+=1;return b}catch(c){Ne()}};O.prototype.readUint8=O.prototype.za;
O.prototype.Ub=function(){try{var b=this.N.getUint16(this.a,this.b);this.a+=2;return b}catch(c){Ne()}};O.prototype.readUint16=O.prototype.Ub;O.prototype.J=function(){try{var b=this.N.getUint32(this.a,this.b);this.a+=4;return b}catch(c){Ne()}};O.prototype.readUint32=O.prototype.J;O.prototype.re=function(){try{var b=this.N.getInt32(this.a,this.b);this.a+=4;return b}catch(c){Ne()}};O.prototype.readInt32=O.prototype.re;
O.prototype.Gb=function(){try{if(this.b){var b=this.N.getUint32(this.a,!0);var c=this.N.getUint32(this.a+4,!0)}else c=this.N.getUint32(this.a,!1),b=this.N.getUint32(this.a+4,!1)}catch(d){Ne()}if(2097151<c)throw new A(2,3,3001);this.a+=8;return c*Math.pow(2,32)+b};O.prototype.readUint64=O.prototype.Gb;O.prototype.hb=function(b){this.a+b>this.N.byteLength&&Ne();var c=new Uint8Array(this.N.buffer,this.N.byteOffset+this.a,b);this.a+=b;return new Uint8Array(c)};O.prototype.readBytes=O.prototype.hb;
O.prototype.O=function(b){this.a+b>this.N.byteLength&&Ne();this.a+=b};O.prototype.skip=O.prototype.O;O.prototype.ve=function(b){this.a<b&&Ne();this.a-=b};O.prototype.rewind=O.prototype.ve;O.prototype.seek=function(b){(0>b||b>this.N.byteLength)&&Ne();this.a=b};O.prototype.seek=O.prototype.seek;O.prototype.ad=function(){for(var b=this.a;this.Fa()&&0!=this.N.getUint8(this.a);)this.a+=1;b=new Uint8Array(this.N.buffer,this.N.byteOffset+b,this.a-b);this.a+=1;return bc(b)};
O.prototype.readTerminatedString=O.prototype.ad;function Ne(){throw new A(2,3,3E3);};function P(){this.c=[];this.b=[];this.a=!1}y("shaka.util.Mp4Parser",P);P.prototype.L=function(b,c){var d=Oe(b);this.c[d]=0;this.b[d]=c;return this};P.prototype.box=P.prototype.L;P.prototype.va=function(b,c){var d=Oe(b);this.c[d]=1;this.b[d]=c;return this};P.prototype.fullBox=P.prototype.va;P.prototype.stop=function(){this.a=!0};P.prototype.stop=P.prototype.stop;
P.prototype.parse=function(b,c){var d=new Uint8Array(b);d=new O(new DataView(d.buffer,d.byteOffset,d.byteLength),0);for(this.a=!1;d.Fa()&&!this.a;)this.qc(0,d,c)};P.prototype.parse=P.prototype.parse;
P.prototype.qc=function(b,c,d){var e=c.oa(),f=c.J(),g=c.J();switch(f){case 0:f=c.N.byteLength-e;break;case 1:f=c.Gb()}var h=this.b[g];if(h){var k=null,l=null;1==this.c[g]&&(l=c.J(),k=l>>>24,l&=16777215);g=e+f;d&&g>c.N.byteLength&&(g=c.N.byteLength);g-=c.oa();c=0<g?c.hb(g):new Uint8Array(0);c=new O(new DataView(c.buffer,c.byteOffset,c.byteLength),0);h({parser:this,partialOkay:d||!1,version:k,flags:l,reader:c,size:f,start:e+b})}else c.O(Math.min(e+f-c.oa(),c.N.byteLength-c.oa()))};
P.prototype.parseNext=P.prototype.qc;function Pe(b){for(;b.reader.Fa()&&!b.parser.a;)b.parser.qc(b.start,b.reader,b.partialOkay)}P.children=Pe;function Qe(b){for(var c=b.reader.J();0<c&&!b.parser.a;--c)b.parser.qc(b.start,b.reader,b.partialOkay)}P.sampleDescription=Qe;function Re(b){return function(c){b(c.reader.hb(c.reader.N.byteLength-c.reader.oa()))}}P.allData=Re;function Oe(b){for(var c=0,d=0;d<b.length;d++)c=c<<8|b.charCodeAt(d);return c}
function Se(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}P.typeToString=Se;function Te(b,c,d,e){var f,g=(new P).va("sidx",function(b){f=Ue(c,e,d,b)});b&&g.parse(b);if(f)return f;throw new A(2,3,3004);}
function Ue(b,c,d,e){var f=[];e.reader.O(4);var g=e.reader.J();if(0==g)throw new A(2,3,3005);if(0==e.version){var h=e.reader.J();var k=e.reader.J()}else h=e.reader.Gb(),k=e.reader.Gb();e.reader.O(2);var l=e.reader.Ub();b=b+e.size+k;for(k=0;k<l;k++){var m=e.reader.J(),p=(m&2147483648)>>>31;m&=2147483647;var t=e.reader.J();e.reader.O(4);if(1==p)throw new A(2,3,3006);f.push(new N(f.length,h/g-c,(h+t)/g-c,function(){return d},b,b+m-1));h+=t;b+=m}e.parser.stop();return f};function Q(b){this.a=b}y("shaka.media.SegmentIndex",Q);Q.prototype.destroy=function(){this.a=null;return Promise.resolve()};Q.prototype.destroy=Q.prototype.destroy;Q.prototype.find=function(b){for(var c=this.a.length-1;0<=c;--c){var d=this.a[c];if(b>=d.startTime&&b<d.endTime)return d.position}return this.a.length&&b<this.a[0].startTime?this.a[0].position:null};Q.prototype.find=Q.prototype.find;
Q.prototype.get=function(b){if(0==this.a.length)return null;b-=this.a[0].position;return 0>b||b>=this.a.length?null:this.a[b]};Q.prototype.get=Q.prototype.get;Q.prototype.offset=function(b){for(var c=0;c<this.a.length;++c)this.a[c].startTime+=b,this.a[c].endTime+=b};Q.prototype.offset=Q.prototype.offset;
Q.prototype.Rc=function(b){for(var c=[],d=0,e=0;d<this.a.length&&e<b.length;){var f=this.a[d],g=b[e];f.startTime<g.startTime?(c.push(f),d++):(f.startTime>g.startTime?0==d&&c.push(g):(.1<Math.abs(f.endTime-g.endTime)?c.push(new N(f.position,g.startTime,g.endTime,g.c,g.b,g.a)):c.push(f),d++),e++)}for(;d<this.a.length;)c.push(this.a[d++]);if(c.length)for(d=c[c.length-1].position+1;e<b.length;)f=b[e++],f=new N(d++,f.startTime,f.endTime,f.c,f.b,f.a),c.push(f);else c=b;this.a=c};Q.prototype.merge=Q.prototype.Rc;
Q.prototype.Fc=function(b){for(var c=0;c<this.a.length;++c)if(this.a[c].endTime>b){this.a.splice(0,c);return}this.a=[]};Q.prototype.evict=Q.prototype.Fc;function Ve(b,c){for(;b.a.length;)if(b.a[b.a.length-1].startTime>=c)b.a.pop();else break;for(;b.a.length;)if(0>=b.a[0].endTime)b.a.shift();else break;if(0!=b.a.length){var d=b.a[b.a.length-1];b.a[b.a.length-1]=new N(d.position,d.startTime,c,d.c,d.b,d.a)}};function We(b){this.b=b;this.a=new O(b,0);Xe||(Xe=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}var Xe;We.prototype.Fa=function(){return this.a.Fa()};
function Ye(b){var c=Ze(b);if(7<c.length)throw new A(2,3,3002);for(var d=0,e=0;e<c.length;e++)d=256*d+c[e];c=d;d=Ze(b);a:{for(e=0;e<Xe.length;e++)if(lc(d,Xe[e])){e=!0;break a}e=!1}if(e)d=b.b.byteLength-b.a.oa();else{if(8==d.length&&d[1]&224)throw new A(2,3,3001);e=d[0]&(1<<8-d.length)-1;for(var f=1;f<d.length;f++)e=256*e+d[f];d=e}d=b.a.oa()+d<=b.b.byteLength?d:b.b.byteLength-b.a.oa();e=new DataView(b.b.buffer,b.b.byteOffset+b.a.oa(),d);b.a.O(d);return new $e(c,e)}
function Ze(b){var c=b.a.za(),d;for(d=1;8>=d&&!(c&1<<8-d);d++);if(8<d)throw new A(2,3,3002);var e=new Uint8Array(d);e[0]=c;for(c=1;c<d;c++)e[c]=b.a.za();return e}function $e(b,c){this.id=b;this.a=c}function af(b){if(8<b.a.byteLength)throw new A(2,3,3002);if(8==b.a.byteLength&&b.a.getUint8(0)&224)throw new A(2,3,3001);for(var c=0,d=0;d<b.a.byteLength;d++){var e=b.a.getUint8(d);c=256*c+e}return c};function bf(){}
bf.prototype.parse=function(b,c,d,e){var f;c=new We(new DataView(c));if(440786851!=Ye(c).id)throw new A(2,3,3008);var g=Ye(c);if(408125543!=g.id)throw new A(2,3,3009);c=g.a.byteOffset;g=new We(g.a);for(f=null;g.Fa();){var h=Ye(g);if(357149030==h.id){f=h;break}}if(!f)throw new A(2,3,3010);g=new We(f.a);f=1E6;for(h=null;g.Fa();){var k=Ye(g);if(2807729==k.id)f=af(k);else if(17545==k.id)if(h=k,4==h.a.byteLength)h=h.a.getFloat32(0);else if(8==h.a.byteLength)h=h.a.getFloat64(0);else throw new A(2,3,3003);
}if(null==h)throw new A(2,3,3011);g=f/1E9;f=h*g;b=Ye(new We(new DataView(b)));if(475249515!=b.id)throw new A(2,3,3007);return cf(b,c,g,f,d,e)};function cf(b,c,d,e,f,g){function h(){return f}var k=[];b=new We(b.a);for(var l=null,m=null;b.Fa();){var p=Ye(b);if(187==p.id){var t=df(p);t&&(p=d*t.hh,t=c+t.Ig,null!=l&&k.push(new N(k.length,l-g,p-g,h,m,t-1)),l=p,m=t)}}null!=l&&k.push(new N(k.length,l-g,e-g,h,m,null));return k}
function df(b){var c=new We(b.a);b=Ye(c);if(179!=b.id)throw new A(2,3,3013);b=af(b);c=Ye(c);if(183!=c.id)throw new A(2,3,3012);c=new We(c.a);for(var d=0;c.Fa();){var e=Ye(c);if(241==e.id){d=af(e);break}}return{hh:b,Ig:d}};function ef(b,c){var d=Ie(b,c,"Initialization");if(!d)return null;var e=b.D.Ba,f=d.getAttribute("sourceURL");f&&(e=ad(b.D.Ba,[f]));f=0;var g=null;if(d=M.M(d,"range",M.sc))f=d.start,g=d.end;return new Le(function(){return e},f,g)}
function ff(b,c){var d=Number(He(b,gf,"presentationTimeOffset"))||0,e=He(b,gf,"timescale"),f=1;e&&(f=M.rc(e)||1);d=d/f||0;e=ef(b,gf);var g=b.D.contentType;f=b.D.mimeType.split("/")[1];if("text"!=g&&"mp4"!=f&&"webm"!=f)throw new A(2,4,4006);if("webm"==f&&!e)throw new A(2,4,4005);g=Ie(b,gf,"RepresentationIndex");var h=He(b,gf,"indexRange"),k=b.D.Ba;h=M.sc(h||"");if(g){var l=g.getAttribute("sourceURL");l&&(k=ad(b.D.Ba,[l]));h=M.M(g,"range",M.sc,h)}if(!h)throw new A(2,4,4002);f=hf(b,c,e,k,h.start,h.end,
f,d);return{createSegmentIndex:f.createSegmentIndex,findSegmentPosition:f.findSegmentPosition,getSegmentReference:f.getSegmentReference,initSegmentReference:e,Aa:d}}
function hf(b,c,d,e,f,g,h,k){var l=b.presentationTimeline,m=!b.ub||!b.Y.Nc,p=b.Y.start,t=b.Y.duration,w=c,x=null;return{createSegmentIndex:function(){var b=[w(e,f,g),"webm"==h?w(d.c(),d.b,d.a):null];w=null;return Promise.all(b).then(function(b){var c=b[0];b=b[1]||null;c="mp4"==h?Te(c,f,e,k):(new bf).parse(c,b,e,k);l.Cb(c,p);x=new Q(c);m&&Ve(x,t)})},findSegmentPosition:function(b){return x.find(b)},getSegmentReference:function(b){return x.get(b)}}}function gf(b){return b.Vb};function jf(b,c){var d=ef(b,kf);var e=lf(b);var f=Ge(b,kf),g=f.kb;0==g&&(g=1);var h=0;f.ma?h=f.ma*(g-1):f.U&&0<f.U.length&&(h=f.U[0].start);e={ma:f.ma,startTime:h,kb:g,Aa:f.Aa,U:f.U,Bb:e};if(!e.ma&&!e.U&&1<e.Bb.length)throw new A(2,4,4002);if(!e.ma&&!b.Y.duration&&!e.U&&1==e.Bb.length)throw new A(2,4,4002);if(e.U&&0==e.U.length)throw new A(2,4,4002);g=f=null;b.ya.id&&b.D.id&&(g=b.ya.id+","+b.D.id,f=c[g]);h=mf(b.Y.duration,e.kb,b.D.Ba,e);f?(f.Rc(h),g=b.presentationTimeline.Lb(),f.Fc(g-b.Y.start)):
(b.presentationTimeline.Cb(h,b.Y.start),f=new Q(h),g&&b.ub&&(c[g]=f));b.ub&&b.Y.Nc||Ve(f,b.Y.duration);return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:f.find.bind(f),getSegmentReference:f.get.bind(f),initSegmentReference:d,Aa:e.Aa}}function kf(b){return b.Va}
function mf(b,c,d,e){var f=e.Bb.length;e.U&&e.U.length!=e.Bb.length&&(f=Math.min(e.U.length,e.Bb.length));for(var g=[],h=e.startTime,k=0;k<f;k++){var l=e.Bb[k],m=ad(d,[l.Sf]),p=void 0;p=null!=e.ma?h+e.ma:e.U?e.U[k].end:h+b;g.push(new N(k+c,h,p,function(b){return b}.bind(null,m),l.start,l.end));h=p}return g}
function lf(b){return[b.D.Va,b.ra.Va,b.ya.Va].filter($c.Sa).map(function(b){return M.X(b,"SegmentURL")}).reduce(function(b,d){return 0<b.length?b:d}).map(function(c){c.getAttribute("indexRange")&&!b.Sd&&(b.Sd=!0);var d=c.getAttribute("media");c=M.M(c,"mediaRange",M.sc,{start:0,end:null});return{Sf:d,start:c.start,end:c.end}})};function nf(b,c,d,e){var f=of(b);var g=Ge(b,pf);var h=He(b,pf,"media"),k=He(b,pf,"index");g={ma:g.ma,timescale:g.timescale,kb:g.kb,Aa:g.Aa,od:g.od,U:g.U,Pc:h,Ob:k};h=g.Ob?1:0;h+=g.U?1:0;h+=g.ma?1:0;if(0==h)throw new A(2,4,4002);1!=h&&(g.Ob&&(g.U=null),g.ma=null);if(!g.Ob&&!g.Pc)throw new A(2,4,4002);if(g.Ob){d=b.D.mimeType.split("/")[1];if("mp4"!=d&&"webm"!=d)throw new A(2,4,4006);if("webm"==d&&!f)throw new A(2,4,4005);e=Fe(g.Ob,b.D.id,null,b.bandwidth||null,null);e=ad(b.D.Ba,[e]);b=hf(b,c,f,e,0,
null,d,g.Aa)}else g.ma?(e||(b.presentationTimeline.Tc(g.ma),b.presentationTimeline.Uc(b.Y.start)),b=qf(b,g)):(h=c=null,b.ya.id&&b.D.id&&(h=b.ya.id+","+b.D.id,c=d[h]),k=rf(b,g),e=!b.ub||!b.Y.Nc,c?(e&&Ve(new Q(k),b.Y.duration),c.Rc(k),d=b.presentationTimeline.Lb(),c.Fc(d-b.Y.start)):(b.presentationTimeline.Cb(k,b.Y.start),c=new Q(k),h&&b.ub&&(d[h]=c)),e&&Ve(c,b.Y.duration),b={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:c.find.bind(c),getSegmentReference:c.get.bind(c)});return{createSegmentIndex:b.createSegmentIndex,
findSegmentPosition:b.findSegmentPosition,getSegmentReference:b.getSegmentReference,initSegmentReference:f,Aa:g.Aa}}function pf(b){return b.Xb}
function qf(b,c){var d=b.Y.duration,e=c.ma,f=c.kb,g=c.timescale,h=c.Pc,k=b.bandwidth||null,l=b.D.id,m=b.D.Ba;return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(b){return 0>b||d&&b>=d?null:Math.floor(b/e)},getSegmentReference:function(b){var c=b*e,p=c+e;d&&(p=Math.min(p,d));return 0>p||d&&c>=d?null:new N(b,c,p,function(){var d=Fe(h,l,b+f,k,c*g);return ad(m,[d])},0,null)}}}
function rf(b,c){for(var d=[],e=0;e<c.U.length;e++){var f=e+c.kb;d.push(new N(f,c.U[e].start,c.U[e].end,function(b,c,d,e,f,p){b=Fe(b,c,f,d,p);return ad(e,[b]).map(function(b){return b.toString()})}.bind(null,c.Pc,b.D.id,b.bandwidth||null,b.D.Ba,f,c.U[e].gh+c.od),0,null))}return d}function of(b){var c=He(b,pf,"initialization");if(!c)return null;var d=b.D.id,e=b.bandwidth||null,f=b.D.Ba;return new Le(function(){var b=Fe(c,d,null,e,null);return ad(f,[b])},0,null)};var sf={},tf={};y("shaka.media.ManifestParser.registerParserByExtension",function(b,c){tf[b]=c});y("shaka.media.ManifestParser.registerParserByMime",function(b,c){sf[b]=c});function uf(){var b={},c;for(c in sf)b[c]=!0;for(var d in tf)b[d]=!0;["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"].forEach(function(c){b[c]=!!sf[c]});["mpd","m3u8","ism"].forEach(function(c){b[c]=!!tf[c]});return b}
function vf(b,c,d,e){return r(function g(){var h,k;return v(g,function(g){switch(g.s){case 1:return za(g,2),u(g,wf(b,c,d,e),4);case 4:return h=g.C,g["return"](new h);case 2:throw k=Ca(g),k.severity=2,k;}})})}
function wf(b,c,d,e){return r(function g(){var h,k,l,m,p,t,w,x,F,R;return v(g,function(g){switch(g.s){case 1:if(e&&(h=e.toLowerCase(),k=sf[h]))return g["return"](k);l=new Za(b);m=l.xa.split("/");p=m.pop();t=p.split(".");return 1<t.length&&(w=t.pop().toLowerCase(),x=tf[w])?g["return"](x):u(g,xf(b,c,d),2);case 2:F=g.C;if(R=sf[F])return g["return"](R);throw new A(2,4,4E3,b);}})})}
function xf(b,c,d){return r(function f(){var g,h,k;return v(f,function(f){switch(f.s){case 1:return g=Jb([b],d),g.method="HEAD",u(f,c.request(0,g).promise,2);case 2:return h=f.C,k=h.headers["content-type"],f["return"](k?k.toLowerCase():"")}})})};function S(b,c,d){this.f=b;this.tc=c;this.j=this.g=Infinity;this.a=1;this.b=this.c=null;this.m=0;this.o=!0;this.l=0;this.u=void 0===d?!0:d}y("shaka.media.PresentationTimeline",S);S.prototype.ka=function(){return this.g};S.prototype.getDuration=S.prototype.ka;S.prototype.Ia=function(b){this.g=b};S.prototype.setDuration=S.prototype.Ia;S.prototype.Df=function(){return this.f};S.prototype.getPresentationStartTime=S.prototype.Df;S.prototype.Ce=function(b){this.m=b};S.prototype.setClockOffset=S.prototype.Ce;
S.prototype.Yb=function(b){this.o=b};S.prototype.setStatic=S.prototype.Yb;S.prototype.hd=function(b){this.j=b};S.prototype.setSegmentAvailabilityDuration=S.prototype.hd;S.prototype.Sg=function(b){this.tc=b};S.prototype.setDelay=S.prototype.Sg;S.prototype.tf=function(){return this.tc};S.prototype.getDelay=S.prototype.tf;
S.prototype.Cb=function(b,c){if(0!=b.length){var d=b[b.length-1].endTime+c;this.Uc(b[0].startTime+c);this.a=b.reduce(function(b,c){return Math.max(b,c.endTime-c.startTime)},this.a);this.b=Math.max(this.b,d);null!=this.f&&this.u&&(this.f=(Date.now()+this.m)/1E3-this.b-this.a)}};S.prototype.notifySegments=S.prototype.Cb;S.prototype.Uc=function(b){this.c=null==this.c?b:Math.min(this.c,b)};S.prototype.notifyMinSegmentStartTime=S.prototype.Uc;S.prototype.Tc=function(b){this.a=Math.max(this.a,b)};
S.prototype.notifyMaxSegmentDuration=S.prototype.Tc;S.prototype.offset=function(b){null!=this.c&&(this.c+=b);null!=this.b&&(this.b+=b)};S.prototype.offset=S.prototype.offset;S.prototype.Z=function(){return Infinity==this.g&&!this.o};S.prototype.isLive=S.prototype.Z;S.prototype.fb=function(){return Infinity!=this.g&&!this.o};S.prototype.isInProgress=S.prototype.fb;S.prototype.Lb=function(){if(Infinity==this.j)return this.l;var b=this.xb()-this.j;return Math.max(this.l,b)};
S.prototype.getSegmentAvailabilityStart=S.prototype.Lb;S.prototype.Fe=function(b){this.l=b};S.prototype.setUserSeekStart=S.prototype.Fe;S.prototype.xb=function(){return this.Z()||this.fb()?Math.min(Math.max(0,(Date.now()+this.m)/1E3-this.a-this.f),this.g):this.g};S.prototype.getSegmentAvailabilityEnd=S.prototype.xb;S.prototype.Kb=function(b){var c=Math.max(this.c,this.l);if(Infinity==this.j)return c;var d=this.xb()-this.j;b=Math.min(d+b,this.Ma());return Math.max(c,b)};
S.prototype.getSafeSeekRangeStart=S.prototype.Kb;S.prototype.wb=function(){return this.Kb(0)};S.prototype.getSeekRangeStart=S.prototype.wb;S.prototype.Ma=function(){var b=this.Z()||this.fb()?this.tc:0;return Math.max(0,this.xb()-b)};S.prototype.getSeekRangeEnd=S.prototype.Ma;S.prototype.Ke=function(){return null==this.f||null!=this.b?!1:!0};S.prototype.usingPresentationStartTime=S.prototype.Ke;function yf(){this.b=this.a=null;this.j=[];this.c=null;this.m=[];this.l=1;this.o={};this.u=0;this.v=new Qa(5);this.g=null;this.f=new Eb}y("shaka.dash.DashParser",yf);n=yf.prototype;n.configure=function(b){this.a=b};n.start=function(b,c){this.j=[b];this.b=c;return zf(this).then(function(b){this.b&&Af(this,b);return this.c}.bind(this))};n.stop=function(){this.a=this.b=null;this.j=[];this.c=null;this.m=[];this.o={};null!=this.g&&(window.clearTimeout(this.g),this.g=null);return this.f.destroy()};
n.update=function(){zf(this)["catch"](function(b){if(this.b)this.b.onError(b)}.bind(this))};n.onExpirationUpdated=function(){};function zf(b){var c=Date.now(),d=b.b.networkingEngine.request(0,Jb(b.j,b.a.retryParameters));Gb(b.f,d);return d.promise.then(function(c){if(b.b)return Bf(b,c.data,c.uri)}).then(function(){var d=(Date.now()-c)/1E3;Sa(b.v,1,d);return d})}
function Bf(b,c,d){c=M.le(c,"MPD");if(!c)throw new A(2,4,4001,d);c=Ke(c,b.a.retryParameters,b.a.dash.xlinkFailGracefully,d,b.b.networkingEngine);Gb(b.f,c);return c.promise.then(function(c){return Cf(b,c,d)})}
function Cf(b,c,d){return r(function f(){var g,h,k,l,m,p,t,w,x,F,R,ca,da,ma,ra,Ra,fb,sa,ch,dd,dh,eh,fh,rl,gh,hh;return v(f,function(f){switch(f.s){case 1:l=$c;m=M;p=[d];t=m.X(c,"Location").map(m.jc).filter(l.Sa);0<t.length&&(w=ad(p,t),p=b.j=w);x=m.X(c,"BaseURL").map(m.jc);F=ad(p,x);(R=b.a.dash.ignoreMinBufferTime)||(ca=m.M(c,"minBufferTime",m.Oa));b.u=m.M(c,"minimumUpdatePeriod",m.Oa,-1);da=m.M(c,"availabilityStartTime",m.zg);ma=m.M(c,"timeShiftBufferDepth",m.Oa);ra=m.M(c,"suggestedPresentationDelay",
m.Oa);Ra=m.M(c,"maxSegmentDuration",m.Oa);fb=c.getAttribute("type")||"static";b.c?sa=b.c.presentationTimeline:(ch=Math.max(b.a.dash.defaultPresentationDelay,1.5*ca),dd=null!=ra?ra:ch,sa=new S(da,dd,b.a.dash.autoCorrectDrift));dh={ub:"static"!=fb,presentationTimeline:sa,ya:null,Y:null,ra:null,D:null,bandwidth:0,Sd:!1};for(var ih=dh,sl=F,ed=M.M(c,"mediaPresentationDuration",M.Oa),fd=[],gb=0,hc=M.X(c,"Period"),Fb=0;Fb<hc.length;Fb++){var rb=hc[Fb];gb=M.M(rb,"start",M.Oa,gb);var gd=M.M(rb,"duration",
M.Oa),hb=null;if(Fb!=hc.length-1){var jh=M.M(hc[Fb+1],"start",M.Oa);null!=jh&&(hb=jh-gb)}else null!=ed&&(hb=ed-gb);null==hb&&(hb=gd);rb=Df(b,ih,sl,{start:gb,duration:hb,node:rb,Nc:null==hb||Fb==hc.length-1});fd.push(rb);gd=ih.ya.id;b.m.includes(gd)||(b.m.push(gd),b.c&&(b.b.filterNewPeriod(rb),b.c.periods.push(rb)));if(null==hb){gb=null;break}gb+=hb}null==b.c&&b.b.filterAllPeriods(fd);null!=ed?(g=fd,h=ed,k=!1):(g=fd,h=gb,k=!0);eh=h;fh=g;sa.Yb("static"==fb);"static"!=fb&&k||sa.Ia(eh||Infinity);(rl=
sa.Z())&&!isNaN(b.a.availabilityWindowOverride)&&(ma=b.a.availabilityWindowOverride);null==ma&&(ma=Infinity);sa.hd(ma);sa.Tc(Ra||1);if(b.c){f.I(0);break}b.c={presentationTimeline:sa,periods:fh,offlineSessionIds:[],minBufferTime:ca||0};if(!sa.Ke()){f.I(0);break}gh=m.X(c,"UTCTiming");return u(f,Ef(b,F,gh),4);case 4:hh=f.C;if(!b.b)return f["return"]();sa.Ce(hh);f.s=0}})})}
function Df(b,c,d,e){c.ya=Ff(e.node,null,d);c.Y=e;c.ya.id||(c.ya.id="__shaka_period_"+e.start);M.X(e.node,"EventStream").forEach(b.Bg.bind(b,e.start,e.duration));d=M.X(e.node,"AdaptationSet").map(b.yg.bind(b,c)).filter($c.Sa);if(c.ub){c=[];for(var f=q(d),g=f.next();!g.done;g=f.next()){g=q(g.value.Lg);for(var h=g.next();!h.done;h=g.next())c.push(h.value)}if(c.length!=(new Set(c)).size)throw new A(2,4,4018);}var k=d.filter(function(b){return!b.md});d.filter(function(b){return b.md}).forEach(function(b){var c=
b.streams[0],d=b.md;k.forEach(function(b){b.id==d&&b.streams.forEach(function(b){b.trickModeVideo=c})})});c=Gf(k,"video");f=Gf(k,"audio");if(!c.length&&!f.length)throw new A(2,4,4004);f.length||(f=[null]);c.length||(c=[null]);d=[];for(g=0;g<f.length;g++)for(h=0;h<c.length;h++)Hf(b,f[g],c[h],d);b=Gf(k,"text");c=[];for(f=0;f<b.length;f++)c.push.apply(c,b[f].streams);return{startTime:e.start,textStreams:c,variants:d}}function Gf(b,c){return b.filter(function(b){return b.contentType==c})}
function Hf(b,c,d,e){if(c||d)if(c&&d){var f=c.drmInfos;var g=d.drmInfos;if(f.length&&g.length?0<Sc(f,g).length:1){g=Sc(c.drmInfos,d.drmInfos);for(var h=0;h<c.streams.length;h++)for(var k=0;k<d.streams.length;k++)f=(d.streams[k].bandwidth||0)+(c.streams[h].bandwidth||0),f={id:b.l++,language:c.language,primary:c.Oc||d.Oc,audio:c.streams[h],video:d.streams[k],bandwidth:f,drmInfos:g,allowedByApplication:!0,allowedByKeySystem:!0},e.push(f)}}else for(g=c||d,h=0;h<g.streams.length;h++)f=g.streams[h].bandwidth||
0,f={id:b.l++,language:g.language||"und",primary:g.Oc,audio:c?g.streams[h]:null,video:d?g.streams[h]:null,bandwidth:f,drmInfos:g.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0},e.push(f)}
n.yg=function(b,c){b.ra=Ff(c,b.ya,null);var d=!1,e=M.X(c,"Role"),f=e.map(function(b){return b.getAttribute("value")}).filter($c.Sa),g=void 0,h="text"==b.ra.contentType;h&&(g="subtitle");for(var k=0;k<e.length;k++){var l=e[k].getAttribute("schemeIdUri");if(null==l||"urn:mpeg:dash:role:2011"==l)switch(l=e[k].getAttribute("value"),l){case "main":d=!0;break;case "caption":case "subtitle":g=l}}var m=null,p=!1;M.X(c,"EssentialProperty").forEach(function(b){"http://dashif.org/guidelines/trickmode"==b.getAttribute("schemeIdUri")?
m=b.getAttribute("value"):p=!0});k=M.X(c,"Accessibility");var t=new Map;e={};k=q(k);for(l=k.next();!l.done;e={Ib:e.Ib},l=k.next()){l=l.value;var w=l.getAttribute("schemeIdUri");if("urn:scte:dash:cc:cea-608:2015"==w||"urn:scte:dash:cc:cea-708:2015"==w)e.Ib=1,l=l.getAttribute("value"),null!=l?l.split(";").forEach(function(b){return function(c){if(c.includes("=")){c=c.split("=");var d=c[0].startsWith("CC")?c[0]:"CC"+c[0];c=c[1].split(",")[0].split(":").pop()}else d="CC"+b.Ib,b.Ib+=2;t.set(d,I(c))}}(e)):
t.set("CC1","und")}if(p)return null;e=M.X(c,"ContentProtection");var x=xe(e,this.a.dash.customScheme,this.a.dash.ignoreDrmInfo);e=I(c.getAttribute("lang")||"und");l=c.getAttribute("label");k=M.X(c,"Representation");f=k.map(this.Cg.bind(this,b,x,g,e,l,d,f,t)).filter(function(b){return!!b});if(0==f.length){if(h)return null;throw new A(2,4,4003);}b.ra.contentType&&"application"!=b.ra.contentType||(b.ra.contentType=If(f[0].mimeType,f[0].codecs),f.forEach(function(c){c.type=b.ra.contentType}));f.forEach(function(b){x.drmInfos.forEach(function(c){b.keyId&&
c.keyIds.push(b.keyId)})});h=k.map(function(b){return b.getAttribute("id")}).filter($c.Sa);return{id:b.ra.id||"__fake__"+this.l++,contentType:b.ra.contentType,language:e,Oc:d,streams:f,drmInfos:x.drmInfos,md:m,Lg:h}};
n.Cg=function(b,c,d,e,f,g,h,k,l){b.D=Ff(l,b.ra,null);if(!Jf(b.D))return null;b.bandwidth=M.M(l,"bandwidth",M.rc)||0;var m=b.D.contentType;m="text"==m||"application"==m;try{var p=this.Mg.bind(this);if(b.D.Vb)var t=ff(b,p);else if(b.D.Va)t=jf(b,this.o);else if(b.D.Xb)t=nf(b,p,this.o,!!this.c);else{var w=b.D.Ba,x=b.Y.duration||0;t={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(b){return 0<=b&&b<x?1:null},getSegmentReference:function(b){return 1!=b?null:new N(1,0,x,function(){return w},
0,null)},initSegmentReference:null,Aa:0}}}catch(F){if(m&&4002==F.code)return null;throw F;}l=M.X(l,"ContentProtection");l=Ae(l,this.a.dash.customScheme,c,this.a.dash.ignoreDrmInfo);return{id:this.l++,originalId:b.D.id,createSegmentIndex:t.createSegmentIndex,findSegmentPosition:t.findSegmentPosition,getSegmentReference:t.getSegmentReference,initSegmentReference:t.initSegmentReference,presentationTimeOffset:t.Aa,mimeType:b.D.mimeType,codecs:b.D.codecs,frameRate:b.D.frameRate,bandwidth:b.bandwidth,width:b.D.width,
height:b.D.height,kind:d,encrypted:0<c.drmInfos.length,keyId:l,language:e,label:f,type:b.ra.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.D.emsgSchemeIdUris,roles:h,channelsCount:b.D.Vc,closedCaptions:k}};n.$g=function(){this.g=null;zf(this).then(function(b){this.b&&Af(this,b)}.bind(this))["catch"](function(b){this.b&&(b.severity=1,this.b.onError(b),Af(this,0))}.bind(this))};function Af(b,c){0>b.u||(b.g=window.setTimeout(b.$g.bind(b),1E3*Math.max(3,b.u-c,Ta(b.v))))}
function Ff(b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,Vc:null};d=d||c.Ba;var e=M.Eb,f=M.gf,g=M.X(b,"BaseURL").map(M.jc),h=b.getAttribute("contentType")||c.contentType,k=b.getAttribute("mimeType")||c.mimeType,l=b.getAttribute("codecs")||c.codecs;f=M.M(b,"frameRate",f)||c.frameRate;var m=M.X(b,"InbandEventStream"),p=c.emsgSchemeIdUris.slice();m=q(m);for(var t=m.next();!t.done;t=m.next())t=t.value.getAttribute("schemeIdUri"),p.includes(t)||p.push(t);m=M.X(b,
"AudioChannelConfiguration");m=Kf(m)||c.Vc;h||(h=If(k,l));return{Ba:ad(d,g),Vb:M.gc(b,"SegmentBase")||c.Vb,Va:M.gc(b,"SegmentList")||c.Va,Xb:M.gc(b,"SegmentTemplate")||c.Xb,width:M.M(b,"width",e)||c.width,height:M.M(b,"height",e)||c.height,contentType:h,mimeType:k,codecs:l,frameRate:f,emsgSchemeIdUris:p,id:b.getAttribute("id"),Vc:m}}
function Kf(b){for(var c=0;c<b.length;++c){var d=b[c],e=d.getAttribute("schemeIdUri");if(e&&(d=d.getAttribute("value")))switch(e){case "urn:mpeg:dash:outputChannelPositionList:2012":return d.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":e=parseInt(d,10);if(!e)continue;return e;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":if(e=parseInt(d,
16)){for(b=0;e;)e&1&&++b,e>>=1;return b}}}return null}function Jf(b){var c=b.Vb?1:0;c+=b.Va?1:0;c+=b.Xb?1:0;if(0==c)return"text"==b.contentType||"application"==b.contentType?!0:!1;1!=c&&(b.Vb&&(b.Va=null),b.Xb=null);return!0}
function Lf(b,c,d,e){c=ad(c,[d]);c=Jb(c,b.a.retryParameters);c.method=e;c=b.b.networkingEngine.request(4,c);Gb(b.f,c);return c.promise.then(function(b){if("HEAD"==e){if(!b.headers||!b.headers.date)return 0;b=b.headers.date}else b=bc(b.data);b=Date.parse(b);return isNaN(b)?0:b-Date.now()})}
function Ef(b,c,d){d=d.map(function(b){return{scheme:b.getAttribute("schemeIdUri"),value:b.getAttribute("value")}});var e=b.a.dash.clockSyncUri;!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e});return $c.df(d,function(b){var d=b.scheme;b=b.value;switch(d){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return Lf(this,c,b,"HEAD");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 Lf(this,
c,b,"GET");case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return d=Date.parse(b),isNaN(d)?0:d-Date.now();case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":return Wa("NTP UTCTiming scheme is not supported"),Promise.reject();default:return Wa("Unrecognized scheme in UTCTiming element",d),Promise.reject()}}.bind(b))["catch"](function(){Wa("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!");
return 0})}n.Bg=function(b,c,d){var e=M.Eb,f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=M.M(d,"timescale",e)||1;M.X(d,"Event").forEach(function(d){var k=M.M(d,"presentationTime",e)||0,m=M.M(d,"duration",e)||0;k=k/h+b;m=k+m/h;null!=c&&(k=Math.min(k,b+c),m=Math.min(m,b+c));d={schemeIdUri:f,value:g,startTime:k,endTime:m,id:d.getAttribute("id")||"",eventElement:d};this.b.onTimelineRegionAdded(d)}.bind(this))};
n.Mg=function(b,c,d){b=Jb(b,this.a.retryParameters);null!=c&&(b.headers.Range="bytes="+c+"-"+(null!=d?d:""));c=this.b.networkingEngine.request(1,b);Gb(this.f,c);return c.promise.then(function(b){return b.data})};function If(b,c){return od(Xb(b,c))?"text":b.split("/")[0]}tf.mpd=yf;sf["application/dash+xml"]=yf;function Mf(b,c,d,e){this.b=b;this.type=c;this.a=d;this.segments=e||null}function Nf(b,c,d,e){this.id=b;this.name=c;this.a=d;this.value=void 0===e?null:e}Nf.prototype.toString=function(){function b(b){return b.name+"="+(isNaN(Number(b.value))?'"'+b.value+'"':b.value)}var c="#"+this.name,d=this.a?this.a.map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};function Of(b,c){this.name=b;this.value=c}
Nf.prototype.getAttribute=function(b){var c=this.a.filter(function(c){return c.name==b});return c.length?c[0]:null};function Pf(b,c,d){return(b=b.getAttribute(c))?b.value:d||null}function Qf(b,c){this.b=c;this.a=b};function Rf(b,c){return b.filter(function(b){return b.name==c})}function Sf(b,c){var d=Rf(b,c);return d.length?d[0]:null}function Tf(b,c,d){return b.filter(function(b){var e=b.getAttribute("TYPE");b=b.getAttribute("GROUP-ID");return e.value==c&&b.value==d})};function Uf(b){this.b=b;this.a=0}function Vf(b){Wf(b,/[ \t]+/gm)}function Wf(b,c){c.lastIndex=b.a;var d=c.exec(b.b);d=null==d?null:{position:d.index,length:d[0].length,Pg:d};if(b.a==b.b.length||null==d||d.position!=b.a)return null;b.a+=d.length;return d.Pg}function Xf(b){return b.a==b.b.length?null:(b=Wf(b,/[^ \t\n]*/gm))?b[0]:null};function Yf(){this.a=0}
function Zf(b,c,d){c=bc(c);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var e=c.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(e[0]))throw new A(2,4,4015);c=0;for(var f=1;f<e.length;f++)if(!/^#(?!EXT)/m.test(e[f])){var g=$f(b,e[f]);--b.a;if(ag.includes(g.name)){c=1;break}else"EXT-X-STREAM-INF"==g.name&&(f+=1)}f=[];for(g=1;g<e.length;)if(/^#(?!EXT)/m.test(e[g]))g+=1;else{var h=$f(b,e[g]);if(bg.includes(h.name)){if(1!=c)throw new A(2,4,4017);e=e.splice(g,e.length-g);b=cg(b,d,e,f);return new Mf(d,
c,f,b)}f.push(h);g+=1;"EXT-X-STREAM-INF"==h.name&&(h.a.push(new Of("URI",e[g])),g+=1)}return new Mf(d,c,f)}function cg(b,c,d,e){var f=[],g=[];d.forEach(function(d){if(/^(#EXT)/.test(d))d=$f(b,d),ag.includes(d.name)?e.push(d):g.push(d);else{if(/^#(?!EXT)/m.test(d))return[];d=ad([c],[d.trim()])[0];f.push(new Qf(d,g));g=[]}});return f}
function $f(b,c){var d=b.a++,e=c.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!e)throw new A(2,4,4016,c);var f=e[1],g=e[2];e=[];var h;if(g){g=new Uf(g);var k;(k=Wf(g,/^([^,=]+)(?:,|$)/g))&&(h=k[1]);for(var l=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;k=Wf(g,l);)e.push(new Of(k[1],k[2]||k[3]))}return new Nf(d,f,e,h)}var ag="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-MAP EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST".split(" "),bg="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE".split(" ");function dg(b){try{var c=dg.parse(b);return ub({uri:b,data:c.data,headers:{"content-type":c.contentType}})}catch(d){return sb(d)}}y("shaka.net.DataUriPlugin",dg);
dg.parse=function(b){var c=b.split(":");if(2>c.length||"data"!=c[0])throw new A(2,1,1004,b);c=c.slice(1).join(":").split(",");if(2>c.length)throw new A(2,1,1004,b);var d=c[0];c=window.decodeURIComponent(c.slice(1).join(","));d=d.split(";");var e=null;1<d.length&&(e=d[1]);if("base64"==e)b=ic(c).buffer;else{if(e)throw new A(2,1,1005,b);b=fc(c)}return{data:b,contentType:d[0]}};Ib("data",dg);function eg(){var b=this;this.g=this.c=null;this.K=1;this.B=new Map;this.H=new Set;this.a=new Map;this.b=null;this.w="";this.v=new Yf;this.u=0;this.l=new H(function(){fg(b)});this.f=gg;this.o=null;this.A=0;this.F=Infinity;this.j=new Eb;this.G=[];this.m=new Map}y("shaka.hls.HlsParser",eg);n=eg.prototype;n.configure=function(b){this.g=b};
n.start=function(b,c){var d=this;return r(function f(){var g;return v(f,function(f){switch(f.s){case 1:return d.c=c,u(f,hg(d,b),2);case 2:return g=f.C,d.w=g.uri,u(f,ig(d,g.data),3);case 3:return 0<d.u&&d.l.start(d.u,!1),f["return"](d.o)}})})};n.stop=function(){this.l.stop();this.g=this.c=null;this.B.clear();this.H.clear();this.a.clear();this.o=null;return this.j.destroy()};
n.update=function(){if(this.f!=jg.Ya){for(var b=[],c=q(this.a.values()),d=c.next();!d.done;d=c.next())b.push(kg(this,d.value));return Promise.all(b)}};function kg(b,c){hg(b,c.We).then(function(b){var d=jg,f=Zf(this.v,b.data,b.uri);if(1!=f.type)throw new A(2,4,4017);b=Sf(f.a,"EXT-X-MEDIA-SEQUENCE");var g=c.stream;lg(this,c.xc,f,b?Number(b.value):0,g.mimeType,g.codecs).then(function(b){c.Wb.a=b;b=b[b.length-1];Sf(f.a,"EXT-X-ENDLIST")&&(mg(this,d.Ya),this.b.Ia(b.endTime))}.bind(this))}.bind(b))}
n.onExpirationUpdated=function(){};
function ig(b,c){var d=Zf(b.v,c,b.w);if(0!=d.type)throw new A(2,4,4022);return ng(b,d).then(function(b){this.c.filterAllPeriods([b]);for(var c=Infinity,d=0,e=Infinity,k=q(this.a.values()),l=k.next();!l.done;l=k.next())l=l.value,c=Math.min(c,l.Sc),d=Math.max(d,l.Sc),"text"!=l.stream.type&&(e=Math.min(e,l.duration));this.f!=jg.Ya?(this.b=new S(0,3*this.A),this.b.Yb(!1)):(this.b=new S(null,0),this.b.Yb(!0));og(this);if(this.f!=jg.Ya){this.u=this.F;this.f==jg.qd&&(c=this.b.tc,isNaN(this.g.availabilityWindowOverride)||
(c=this.g.availabilityWindowOverride),this.b.hd(c));for(c=0;95443.7176888889<=d;)c+=95443.7176888889,d-=95443.7176888889;if(c)for(d=q(this.a.values()),l=d.next();!l.done;l=d.next())e=l.value,95443.7176888889>e.Sc&&(e.stream.presentationTimeOffset=-c,e.Wb.offset(c))}else for(this.b.Ia(e),this.b.offset(-c),d=q(this.a.values()),l=d.next();!l.done;l=d.next())l=l.value,l.stream.presentationTimeOffset=c,l.Wb.offset(-c),Ve(l.Wb,e);this.o={presentationTimeline:this.b,periods:[b],offlineSessionIds:[],minBufferTime:0}}.bind(b))}
function ng(b,c){var d=c.a,e=Rf(c.a,"EXT-X-MEDIA"),f=e.filter(function(b){return"SUBTITLES"==pg(b,"TYPE")}.bind(b)).map(function(b){return qg(this,b)}.bind(b));e=e.filter(function(b){return"CLOSED-CAPTIONS"==pg(b,"TYPE")});rg(b,e);return Promise.all(f).then(function(b){var e=Rf(d,"EXT-X-STREAM-INF").map(function(b){return sg(this,b,c)}.bind(this));return Promise.all(e).then(function(c){return{startTime:0,variants:c.reduce($c.Dc,[]),textStreams:b}}.bind(this))}.bind(b))}
function sg(b,c,d){var e=Pf(c,"CODECS","avc1.42E01E,mp4a.40.2").split(/\s*,\s*/),f=c.getAttribute("RESOLUTION"),g=null,h=null,k=Pf(c,"FRAME-RATE"),l=Number(pg(c,"BANDWIDTH"));if(f){var m=f.value.split("x");g=m[0];h=m[1]}d=Rf(d.a,"EXT-X-MEDIA");d=d.filter(function(b){return"CLOSED-CAPTIONS"!=pg(b,"TYPE")});d=d.filter(function(b){var c=Pf(b,"URI")||"";return"SUBTITLES"==(Pf(b,"TYPE")||"")||""!=c});var p=Pf(c,"AUDIO"),t=Pf(c,"VIDEO");p?d=Tf(d,"AUDIO",p):t&&(d=Tf(d,"VIDEO",t));if(m=tg("text",e)){var w=
Pf(c,"SUBTITLES");w&&(w=Tf(d,"SUBTITLES",w),w.length&&(b.B.get(w[0].id).stream.codecs=m));Bb(e,m)}d=d.map(function(b){return ug(this,b,e)}.bind(b));var x=[],F=[];return Promise.all(d).then(function(b){p?x=b:t&&(F=b);b=!1;if(x.length||F.length)if(x.length)if(pg(c,"URI")==x[0].xc){var d="audio";b=!0}else d="video";else d="audio";else 1==e.length?(d=tg("video",e),d=f||k||d?"video":"audio"):(d="video",e=[e.join(",")]);return b?Promise.resolve():vg(this,c,e,d)}.bind(b)).then(function(b){b&&("audio"==b.stream.type?
x=[b]:F=[b]);F&&wg(F);x&&wg(x);return xg(this,x,F,l,g,h,k)}.bind(b))}function wg(b){b.forEach(function(b){var c=b.stream.codecs.split(",");c=c.filter(function(b){return"mp4a.40.34"!=b});b.stream.codecs=c.join(",")})}
function xg(b,c,d,e,f,g,h){d.forEach(function(b){if(b=b.stream)b.width=Number(f)||void 0,b.height=Number(g)||void 0,b.frameRate=Number(h)||void 0}.bind(b));c.length||(c=[null]);d.length||(d=[null]);for(var k=[],l=0;l<c.length;l++)for(var m=0;m<d.length;m++){var p=c[l]?c[l].stream:null,t=d[m]?d[m].stream:null,w=c[l]?c[l].drmInfos:null,x=d[m]?d[m].drmInfos:null,F=void 0;if(p&&t)if(w.length&&x.length?0<Sc(w,x).length:1)F=Sc(w,x);else continue;else p?F=w:t&&(F=x);w=(d[l]?d[l].xc:"")+" - "+(c[l]?c[l].xc:
"");b.H.has(w)||(p=yg(b,p,t,e,F),k.push(p),b.H.add(w))}return k}function yg(b,c,d,e,f){return{id:b.K++,language:c?c.language:"und",primary:!!c&&c.primary||!!d&&d.primary,audio:c,video:d,bandwidth:e,drmInfos:f,allowedByApplication:!0,allowedByKeySystem:!0}}function qg(b,c){pg(c,"TYPE");return ug(b,c,[]).then(function(b){return b.stream})}
function rg(b,c){for(var d=q(c),e=d.next();!e.done;e=d.next()){e=e.value;pg(e,"TYPE");var f=Pf(e,"LANGUAGE")||"und";f=I(f);var g=pg(e,"GROUP-ID");e=pg(e,"INSTREAM-ID");b.m.get(g)||b.m.set(g,new Map);b.m.get(g).set(e,f)}}
function ug(b,c,d){var e=pg(c,"URI");if(b.a.has(e))return Promise.resolve(b.a.get(e));var f=pg(c,"TYPE").toLowerCase();"subtitles"==f&&(f="text");var g=I(Pf(c,"LANGUAGE","und")),h=Pf(c,"NAME"),k=c.getAttribute("DEFAULT"),l=c.getAttribute("AUTOSELECT"),m=Pf(c,"CHANNELS");return zg(b,e,d,f,g,!!k||!!l,h,"audio"==f?Ag(m):null,null).then(function(b){if(this.a.has(e))return this.a.get(e);this.B.set(c.id,b);this.a.set(e,b);return b}.bind(b))}
function Ag(b){if(!b)return null;b=b.split("/")[0];return parseInt(b,10)}function vg(b,c,d,e){var f=pg(c,"URI");if(b.a.has(f))return Promise.resolve(b.a.get(f));c=Pf(c,"CLOSED-CAPTIONS");var g=null;"video"==e&&c&&"NONE"!=c&&(g=b.m.get(c));return zg(b,f,d,e,"und",!1,null,null,g).then(function(b){if(this.a.has(f))return this.a.get(f);this.a.set(f,b);return b}.bind(b))}
function zg(b,c,d,e,f,g,h,k,l){var m=ad([b.w],[c])[0],p,t="",w;return hg(b,m).then(function(c){m=c.uri;p=Zf(b.v,c.data,m);if(1!=p.type)throw new A(2,4,4017);c=p;var f=jg,g=Sf(c.a,"EXT-X-PLAYLIST-TYPE"),h=Sf(c.a,"EXT-X-ENDLIST");h=g&&"VOD"==g.value||h;g=g&&"EVENT"==g.value&&!h;g=!h&&!g;h?mg(b,f.Ya):(g?mg(b,f.qd):mg(b,f.Pe),c=Bg(c.a,"EXT-X-TARGETDURATION"),c=Number(c.value),b.A=Math.max(c,b.A),b.F=Math.min(c,b.F));if(1==d.length)t=d[0];else if(c=tg(e,d),null!=c)t=c;else throw new A(2,4,4025,d);return Cg(b,
e,t,p)}).then(function(d){w=d;d=Sf(p.a,"EXT-X-MEDIA-SEQUENCE");return lg(b,c,p,d?Number(d.value):0,w,t)}).then(function(d){var x=d[0].startTime,R=d[d.length-1].endTime,ca=R-x;d=new Q(d);var da=Dg(p),ma=void 0;"text"==e&&(ma="subtitle");var ra=[];p.segments.forEach(function(b){b=Rf(b.b,"EXT-X-KEY");ra.push.apply(ra,b)});var Ra=!1,fb=[],sa=null;ra.forEach(function(b){if("NONE"!=pg(b,"METHOD")){Ra=!0;var c=pg(b,"KEYFORMAT");if(b=(c=Eg[c])?c(b):null)b.keyIds.length&&(sa=b.keyIds[0]),fb.push(b)}});if(Ra&&
!fb.length)throw new A(2,4,4026);return{stream:{id:b.K++,originalId:h,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:d.find.bind(d),getSegmentReference:d.get.bind(d),initSegmentReference:da,presentationTimeOffset:0,mimeType:w,codecs:t,kind:ma,encrypted:Ra,keyId:sa,language:f,label:h,type:e,primary:g,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:[],channelsCount:k,closedCaptions:l},Wb:d,drmInfos:fb,xc:c,We:m,Sc:x,
sh:R,duration:ca}})}function Dg(b){var c=Rf(b.a,"EXT-X-MAP");if(!c.length)return null;if(1<c.length)throw new A(2,4,4020);c=c[0];var d=pg(c,"URI"),e=ad([b.b],[d])[0];b=0;d=null;if(c=Pf(c,"BYTERANGE"))b=c.split("@"),c=Number(b[0]),b=Number(b[1]),d=b+c-1;return new Le(function(){return[e]},b,d)}
function Fg(b,c,d,e){var f=c.b,g=c.a;c=Bg(f,"EXTINF").value.split(",");c=e+Number(c[0]);var h=0,k=null;if(f=Sf(f,"EXT-X-BYTERANGE"))h=f.value.split("@"),f=Number(h[0]),h=h[1]?Number(h[1]):b.a+1,k=h+f-1;return new N(d,e,c,function(){return[g]},h,k)}function og(b){b.b&&(b.G.forEach(function(c){b.b.Cb(c,0)}),b.G=[])}
function lg(b,c,d,e,f,g){var h=d.segments,k=[],l=h[0].a,m=Fg(null,h[0],e,0);d=Dg(d);return Gg(b,c,d,m,f,g).then(function(b){l.split("/").pop();for(var c=0;c<h.length;++c){var d=k[k.length-1];d=Fg(d,h[c],e+c,0==c?b:d.endTime);k.push(d)}this.G.push(k);og(this);return k}.bind(b))}
function Hg(b,c){var d=b.c.networkingEngine,e=Jb(c.c(),b.g.retryParameters),f={},g=c.b;f.Range="bytes="+g+"-"+(g+2048-1);var h={};if(0!=g||null!=c.a)g="bytes="+g+"-",null!=c.a&&(g+=c.a),h.Range=g;e.headers=f;f=d.request(1,e);Gb(b.j,f);return f.promise["catch"](function(){Wa("Unable to fetch a partial HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",e.uris[0]);e.headers=h;var c=d.request(1,e);Gb(b.j,c);return c.promise})}
function Gg(b,c,d,e,f,g){if(b.o&&(c=b.a.get(c).Wb.get(e.position)))return Promise.resolve(c.startTime);e=[Hg(b,e)];if("video/mp4"==f||"audio/mp4"==f)d?e.push(Hg(b,d)):e.push(e[0]);return Promise.all(e).then(function(b){if("video/mp4"==f||"audio/mp4"==f)return Ig(b[0].data,b[1].data);if("audio/mpeg"==f)return 0;if("video/mp2t"==f)return Jg(b[0].data);if("application/mp4"==f||f.startsWith("text/")){b=b[0].data;var c=Xb(f,g);if(od(c)){var d=new md(null);pd(d,c);b=d.Lc(b)}else b=0;return b}throw new A(2,
4,4030);}.bind(b))}function Ig(b,c){var d=0;(new P).L("moov",Pe).L("trak",Pe).L("mdia",Pe).va("mdhd",function(b){b.reader.O(0==b.version?8:16);d=b.reader.J();b.parser.stop()}).parse(c,!0);if(!d)throw new A(2,4,4030);var e=0,f=!1;(new P).L("moof",Pe).L("traf",Pe).va("tfdt",function(b){e=(0==b.version?b.reader.J():b.reader.Gb())/d;f=!0;b.parser.stop()}).parse(b,!0);if(!f)throw new A(2,4,4030);return e}
function Jg(b){function c(){throw new A(2,4,4030);}b=new O(new DataView(b),0);for(var d=0,e=0;;)if(d=b.oa(),e=b.za(),71!=e&&c(),b.Ub()&16384||c(),e=(b.za()&48)>>4,0!=e&&2!=e||c(),3==e&&(e=b.za(),b.O(e)),1!=b.J()>>8)b.seek(d+188),e=b.za(),71!=e&&(b.seek(d+192),e=b.za()),71!=e&&(b.seek(d+204),e=b.za()),71!=e&&c(),b.ve(1);else return b.O(3),d=b.za()>>6,0!=d&&1!=d||c(),0==b.za()&&c(),d=b.za(),e=b.Ub(),b=b.Ub(),(1073741824*((d&14)>>1)+((e&65534)<<14|(b&65534)>>1))/9E4}
function tg(b,c){for(var d=Kg[b],e=0;e<d.length;e++)for(var f=0;f<c.length;f++)if(d[e].test(c[f].trim()))return c[f].trim();return"text"==b?"":null}
function Cg(b,c,d,e){e=e.segments[0].a;var f=(new Za(e)).xa.split(".").pop(),g=Lg[c][f];if(g)return Promise.resolve(g);if("text"==c)return d&&"vtt"!=d?Promise.resolve("application/mp4"):Promise.resolve("text/vtt");c=Jb([e],b.g.retryParameters);c.method="HEAD";c=b.c.networkingEngine.request(1,c);Gb(b.j,c);return c.promise.then(function(b){b=b.headers["content-type"];if(!b)throw new A(2,4,4021,f);return b.split(";")[0]})}
function pg(b,c){var d=b.getAttribute(c);if(!d)throw new A(2,4,4023,c);return d.value}function Bg(b,c){var d=Sf(b,c);if(!d)throw new A(2,4,4024,c);return d}function hg(b,c){var d=b.c.networkingEngine.request(0,Jb([c],b.g.retryParameters));Gb(b.j,d);return d.promise}
var Kg={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},Lg={audio:{mp4:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",ts:"video/mp2t"},video:{mp4:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"}};
function fg(b){r(function d(){var e;return v(d,function(d){switch(d.s){case 1:if(!b.c)return d["return"]();za(d,2);return u(d,b.update(),4);case 4:b.l.start(b.u,!1);Ba(d,0);break;case 2:e=Ca(d),e.severity=1,b.c.onError(e),b.l.start(.1,!1),d.s=0}})})}function mg(b,c){b.f=c;b.b&&b.b.Yb(b.f==jg.Ya);b.f!=jg.Ya||b.l.stop()}
var Eg={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(b){var c=pg(b,"METHOD");Pd("HLS SAMPLE-AES-CENC","SAMPLE-AES-CENC will no longer be supported, see Issue #1227");if(!["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].includes(c))return null;c=pg(b,"URI");c=dg.parse(c);c=new Uint8Array(c.data);c=bd("com.widevine.alpha",[{initDataType:"cenc",initData:c}]);if(b=Pf(b,"KEYID"))c.keyIds=[b.substr(2).toLowerCase()];return c}},gg="VOD",jg={Ya:gg,Pe:"EVENT",qd:"LIVE"};tf.m3u8=eg;
sf["application/x-mpegurl"]=eg;sf["application/vnd.apple.mpegurl"]=eg;function Mg(){this.a=new Map}function Ng(b,c){b.a.has(c)||b.a.set(c,new Og);return b.a.get(c)}function Og(){this.text=this.variant=null};function Pg(b,c){this.a=b;this.b=new Set([b]);c=c||[];for(var d=q(c),e=d.next();!e.done;e=d.next())this.add(e.value)}Pg.prototype.add=function(b){return Qg(this.a,b)?(this.b.add(b),!0):!1};function Qg(b,c){var d;if(!(d=!!b.audio!=!!c.audio||!!b.video!=!!c.video||b.language!=c.language)&&(d=b.audio&&c.audio)){d=b.audio;var e=c.audio;d=!(d.channelsCount==e.channelsCount&&Rg(d,e)&&Sg(d.roles,e.roles))}!d&&(d=b.video&&c.video)&&(d=b.video,e=c.video,d=!(Rg(d,e)&&Sg(d.roles,e.roles)));return d?!1:!0}
Pg.prototype.values=function(){return this.b.values()};function Rg(b,c){if(b.mimeType!=c.mimeType)return!1;var d=b.codecs.split(",").map(function(b){return $b(b)[0]}),e=c.codecs.split(",").map(function(b){return $b(b)[0]});if(d.length!=e.length)return!1;d.sort();e.sort();for(var f=0;f<d.length;f++)if(d[f]!=e[f])return!1;return!0}
function Sg(b,c){var d=new Set(b),e=new Set(c);d["delete"]("main");e["delete"]("main");if(d.size!=e.size)return!1;d=q(d);for(var f=d.next();!f.done;f=d.next())if(!e.has(f.value))return!1;return!0};function Tg(b){this.a=b;this.b=new Ug(b.language,"",b.audio&&b.audio.channelsCount?b.audio.channelsCount:0)}Tg.prototype.create=function(b){var c=this,d=b.filter(function(b){return Qg(c.a,b)});return d.length?new Pg(d[0],d):this.b.create(b)};function Ug(b,c,d){this.c=b;this.b=c;this.a=d}
Ug.prototype.create=function(b){var c=[];c=Vg(b,this.c);var d=b.filter(function(b){return b.primary});c=c.length?c:d.length?d:b;this.b&&(b=Wg(c,this.b),b.length&&(c=b));this.a&&(b=J.Ed(c,this.a),b.length&&(c=b));b=new Pg(c[0]);c=q(c);for(d=c.next();!d.done;d=c.next())d=d.value,Qg(b.a,d)&&b.add(d);return b};function Vg(b,c){var d=I(c),e=Md(d,b.map(function(b){return Ld(b)}));return e?b.filter(function(b){return e==Ld(b)}):[]}
function Wg(b,c){return b.filter(function(b){var d=b.audio;b=b.video;return d&&0<=d.roles.indexOf(c)||b&&0<=b.roles.indexOf(c)})};function Xg(b){var c=this;this.c=b;this.a=new Set;this.b=new H(function(){Yg(c,!1)});this.b.start(.25,!0)}Xg.prototype.R=function(){this.b.stop();for(var b=q(this.a),c=b.next();!c.done;c=b.next())c.value.R();this.a.clear()};function Yg(b,c){for(var d=q(b.a),e=d.next();!e.done;e=d.next())e.value.g(b.c.currentTime,c)};function Zg(b,c,d){var e=this;this.c=$g;this.f=.5;this.j=b;this.m=d;this.l=c;this.b=function(){};this.a=function(){};this.o=[{Me:$g,is:ah,yd:function(){return e.a()}},{Me:ah,is:$g,yd:function(){return e.b()}}];this.f>=this.j&&(Wa("Rebuffering threshold is set too low! This could cause poor buffering behavior during playback!"),this.f=this.j/2)}Zg.prototype.R=function(){this.b=function(){};this.a=function(){}};
Zg.prototype.g=function(b){var c=this.c==ah?this.f:this.j;b=this.l(b);c=this.m()||b>=c?ah:$g;b=q(this.o);for(var d=b.next();!d.done;d=b.next())d=d.value,this.c==d.Me&&c==d.is&&d.yd();this.c=c};function bh(b,c,d){b.b=c;b.a=d}var $g=0,ah=1;function kh(b){this.g=b;this.f=lh(b);this.a=b.a.currentTime;this.b=Date.now()/1E3;this.c=function(){}}function mh(b,c){b.c=c}function nh(b){this.a=b}function lh(b){if(b.a.paused||0==b.a.playbackRate||null==b.a.buffered)var c=!1;else a:{c=b.a.buffered;b=b.a.currentTime;for(var d=0;d<c.length;d++){var e=c.start(d),f=c.end(d);if(!(b<e||b>f-.5)){c=!0;break a}}c=!1}return c};function oh(b,c,d,e){this.a=b;this.v=c;this.o=d;this.u=e;this.f=new Nb;this.b=null;this.j=!1;this.m=b.readyState;this.c=!1;this.w=new kh(new nh(b));mh(this.w,function(){b.currentTime+=.1});this.g=!1;c=this.l.bind(this);G(this.f,b,"waiting",c);this.b=new H(c);this.b.start(.25,!0)}oh.prototype.R=function(){this.f&&(this.f.R(),this.f=null);null!=this.b&&(this.b.stop(),this.b=null);this.a=this.v=this.u=null};oh.prototype.Tb=function(){this.g=!0;this.l()};
oh.prototype.l=function(){if(0!=this.a.readyState){if(this.a.seeking){if(!this.j)return}else this.j=!1;if(!this.a.paused){this.a.readyState!=this.m&&(this.c=!1,this.m=this.a.readyState);var b=this.o.smallGapLimit,c=this.a.currentTime,d=this.a.buffered;a:{if(d&&d.length&&!(1==d.length&&1E-6>d.end(0)-d.start(0))){var e=ac("Edge/")||ac("Trident/")||ac("Tizen")||ac("CrKey")?.5:.1;for(var f=0;f<d.length;f++)if(d.start(f)>c&&(0==f||d.end(f-1)-c<=e)){e=f;break a}}e=null}if(null==e){d=this.w;e=d.g;c=lh(e);
e=e.a.currentTime;f=Date.now()/1E3;if(d.a!=e||d.f!=c)d.b=f,d.a=e,d.f=c;e=f-d.b;1<=e&&c&&d.c(d.a,e)}else if(0!=e||this.g){f=d.start(e);var g=this.v.Ma();if(!(f>=g)){g=f-c;b=g<=b;var h=!1;.001>g||(b||this.c||(this.c=!0,c=new C("largegap",{currentTime:c,gapSize:g}),c.cancelable=!0,this.u(c),this.o.jumpLargeGaps&&!c.defaultPrevented&&(h=!0)),!b&&!h)||(0!=e&&d.end(e-1),this.a.currentTime=f)}}}}};function ph(b){this.c=b;this.a=null;this.b=function(){}}ph.prototype.R=function(){this.a=this.c=null;this.b=function(){}};ph.prototype.g=function(b){for(var c=this.a,d=this.c.periods[0],e=q(this.c.periods),f=e.next();!f.done;f=e.next())f=f.value,b>=f.startTime&&(d=f);b=d;c!=b&&this.b(b);this.a=b};function qh(b,c){b.b=c};function rh(b,c,d){this.a=b;this.l=c;this.j=d;this.c=new Nb;this.f=1;this.g=!1;this.b=null;0<b.readyState?this.ee():Qb(this.c,b,"loadedmetadata",this.ee.bind(this));G(this.c,b,"ratechange",this.lg.bind(this))}n=rh.prototype;n.R=function(){this.c&&(this.c.R(),this.c=null);null!=this.b&&(this.b.stop(),this.b=null);this.a=this.l=null};function sh(b){return 0<b.a.readyState?b.a.currentTime:b.j}function th(b,c){0<b.a.readyState?uh(b,b.a.currentTime,c):(b.j=c,setTimeout(b.l,0))}n.bb=function(){return this.f};
function vh(b,c){null!=b.b&&(b.b.stop(),b.b=null);b.f=c;b.a.playbackRate=b.g||0>c?0:c;!b.g&&0>c&&(b.b=new H(function(){b.a.currentTime+=c/4}),b.b.start(.25,!0))}n.lg=function(){var b=this.g||0>this.f?0:this.f;this.a.playbackRate&&this.a.playbackRate!=b&&vh(this,this.a.playbackRate)};n.ee=function(){.001>Math.abs(this.a.currentTime-this.j)?this.ie():(Qb(this.c,this.a,"seeking",this.ie.bind(this)),this.a.currentTime=0==this.a.currentTime?this.j:this.a.currentTime)};
n.ie=function(){var b=this;G(this.c,this.a,"seeking",function(){return b.l()})};function uh(b,c,d){function e(){!b.a||10<=f++||b.a.currentTime!=c||(b.a.currentTime=d,setTimeout(e,100))}b.a.currentTime=d;var f=0;setTimeout(e,100)};function wh(b,c,d,e,f,g,h){this.c=b;this.a=c;this.o=d;this.j=e;this.m=g;this.f=null;this.g=new oh(b,c,e,h);c=this.og.bind(this);null==f?f=Infinity>this.a.ka()?this.a.wb():this.a.Ma():0>f&&(f=this.a.Ma()+f);f=xh(this,yh(this,f));this.b=new rh(b,c,f);this.f=new H(this.kg.bind(this));this.f.start(.25,!0)}n=wh.prototype;n.R=function(){this.b&&(this.b.R(),this.b=null);this.g&&(this.g.R(),this.g=null);this.f&&(this.f.stop(),this.f=null);this.c=this.b=this.a=this.m=this.j=null};
function zh(b){var c=sh(b.b);0<b.c.readyState&&(b.c.paused||(c=yh(b,c)));return c}n.bb=function(){return this.b.bb()};n.Tb=function(){this.g.Tb()};n.kg=function(){if(0!=this.c.readyState&&!this.c.paused){var b=this.c.currentTime,c=this.a.wb(),d=this.a.Ma();3>d-c&&(c=d-3);b<c&&(b=Ah(this,b),this.c.currentTime=b)}};n.og=function(){var b=this.g;b.j=!0;b.g=!1;b.c=!1;var c=sh(this.b);b=Ah(this,c);if(.001<Math.abs(b-c)&&(c=(new Date).getTime()/1E3,!this.l||this.l<c-1)){this.l=c;th(this.b,b);return}this.m()};
function xh(b,c){var d=b.a.ka();return c>=d?d-b.j.durationBackoff:c}function Ah(b,c){var d=Xc.bind(null,b.c.buffered),e=Math.max(b.o,b.j.rebufferingGoal),f=b.j.safeSeekOffset,g=b.a.wb(),h=b.a.Ma(),k=b.a.ka();3>h-g&&(g=h-3);var l=b.a.Kb(e),m=b.a.Kb(f);e=b.a.Kb(e+f);return c>=k?xh(b,c):c>h?h:c<g?d(m)?m:e:c>=l||d(c)?c:e}function yh(b,c){var d=b.a.wb();if(c<d)return d;d=b.a.Ma();return c>d?d:c};function Bh(){this.b=function(){};this.a=new Set}Bh.prototype.R=function(){this.b=function(){};this.a.clear()};function Ch(b,c){b.b=c};function Dh(b){var c=this;this.j=b;this.f=new Map;this.a=function(){};this.b=function(){};this.c=function(){};this.l=[{qb:null,pb:Eh,eb:function(b,e){return c.a(b,e)}},{qb:Fh,pb:Eh,eb:function(b,e){return c.a(b,e)}},{qb:Gh,pb:Eh,eb:function(b,e){return c.a(b,e)}},{qb:Eh,pb:Fh,eb:function(b,e){return c.b(b,e)}},{qb:Eh,pb:Gh,eb:function(b,e){return c.b(b,e)}},{qb:Fh,pb:Gh,eb:function(b,e){return c.c(b,e)}},{qb:Gh,pb:Fh,eb:function(b,e){return c.c(b,e)}}]}
Dh.prototype.R=function(){this.j=null;this.f.clear();this.a=function(){};this.b=function(){};this.c=function(){}};Dh.prototype.g=function(b,c){for(var d=q(this.j.a),e=d.next();!e.done;e=d.next()){e=e.value;var f=this.f.get(e),g=b<e.startTime?Fh:b>e.endTime?Gh:Eh;this.f.set(e,g);for(var h=q(this.l),k=h.next();!k.done;k=h.next())k=k.value,k.qb==f&&k.pb==g&&k.eb(e,c)}};function Hh(b,c,d,e){b.a=c;b.b=d;b.c=e}var Fh=1,Eh=2,Gh=3;function Ih(b,c){this.a=c;this.b=b;this.g=null;this.m=1;this.v=Promise.resolve();this.j=[];this.l=new Map;this.c=new Map;this.u=!1;this.B=null;this.A=this.f=this.o=!1;this.w=0}n=Ih.prototype;n.destroy=function(){for(var b=q(this.c.values()),c=b.next();!c.done;c=b.next())Jh(c.value);this.c.clear();this.l.clear();this.g=this.j=this.v=this.b=this.a=null;this.f=!0;return Promise.resolve()};
n.configure=function(b){this.g=b;this.B=new ob({maxAttempts:Math.max(b.retryParameters.maxAttempts,2),baseDelay:b.retryParameters.baseDelay,backoffFactor:b.retryParameters.backoffFactor,fuzzFactor:b.retryParameters.fuzzFactor,timeout:0},!0)};
n.init=function(){var b=this;return r(function d(){var e,f,g;return v(d,function(d){switch(d.s){case 1:return e=b.a.vb(),f=J.hc(b.b,e),g=b.a.Yd(b.b.periods[f]),g.variant||g.text?u(d,Kh(b,g.variant?g.variant.audio:null,g.variant?g.variant.video:null,g.text,e),2):d["return"](Promise.reject(new A(2,5,5005)));case 2:if(b.f)return d["return"]();b.a&&b.a.$f&&b.a.$f();d.s=0}})})};function Lh(b){return Mh(b,"audio")}function Nh(b){return Mh(b,"video")}
function Mh(b,c){var d=b.c.get(c);return d?d.Ua||d.stream:null}function Oh(b,c){return r(function e(){var f,g,h,k,l,m,p,t;return v(e,function(e){switch(e.s){case 1:return f=cd,Dd(b.a.T,f.rb),b.w++,b.A=!1,g=b.w,h=b.a.T,k=new Map,l=new Set,k.set(f.rb,c),l.add(c),u(e,h.init(k,!1),2);case 2:return b.f?e["return"]():u(e,Ph(b,l),3);case 3:if(b.f)return e["return"]();b.w!=g||b.c.has(f.rb)||b.A||(m=b.a.vb(),p=J.hc(b.b,m),t=Qh(c,p,0),b.c.set(f.rb,t),b.u&&Rh(b,t,0));e.s=0}})})}
function Sh(b,c){var d=b.c.get("video");if(d){var e=d.stream;if(e)if(c){var f=e.trickModeVideo;f&&!d.Ua&&(Th(b,f,!1,0),d.Ua=e)}else if(e=d.Ua)d.Ua=null,Th(b,e,!0,0)}}function Uh(b,c,d,e){c.video&&Th(b,c.video,d,e);c.audio&&Th(b,c.audio,d,e)}
function Th(b,c,d,e){var f=b.c.get(c.type);if(!f&&"text"==c.type&&b.g.ignoreTextStreamFailures)Oh(b,c);else if(f){var g=Vh(b,c);d&&g!=f.Ta?Wh(b):(f.Ua&&(c.trickModeVideo?(f.Ua=c,c=c.trickModeVideo):f.Ua=null),(g=b.j[g])&&g.Hb&&(g=b.l.get(c.id))&&g.Hb&&f.stream!=c&&("text"==c.type&&wd(b.a.T,Xb(c.mimeType,c.codecs)),f.stream=c,f.pc=!0,d&&(f.$a?f.yc=!0:f.gb?(f.Xa=!0,f.dc=e,f.yc=!0):(Jh(f),Xh(b,f,!0,e)))))}}
function Yh(b){var c=b.a.vb(),d=b.g.smallGapLimit;Array.from(b.c.keys()).every(function(e){var f=b.a.T;"text"==e?(e=f.a,e=c>=e.a&&c<e.b):(e=yd(f,e),e=Xc(e,c,d));return e})||Wh(b)}function Wh(b){b.c.forEach(function(c,d){c.$a||c.Xa||(c.gb?(c.Xa=!0,c.dc=0):null==xd(b.a.T,d)?null==c.Wa&&Rh(b,c,0):(Jh(c),Xh(b,c,!1,0)))})}
function Kh(b,c,d,e,f){return r(function h(){var k,l,m,p,t,w,x;return v(h,function(h){switch(h.s){case 1:return k=b.a.vb(),l=J.hc(b.b,k),m=cd,p=new Map,t=new Set,c&&(p.set(m.Ne,c),t.add(c)),d&&(p.set(m.Te,d),t.add(d)),e&&(p.set(m.rb,e),t.add(e)),w=b.a.T,x=b.g.forceTransmuxTS,u(h,w.init(p,x),2);case 2:if(b.f)return h["return"]();Zh(b);return u(h,Ph(b,t),3);case 3:if(b.f)return h["return"]();p.forEach(function(c,d){if(!b.c.has(d)){var e=Qh(c,l,f);b.c.set(d,e);Rh(b,e,0)}});h.s=0}})})}
function Qh(b,c,d){return{stream:b,type:b.type,Ab:null,Na:null,Ua:null,pc:!0,Ta:c,endOfStream:!1,gb:!1,Wa:null,Xa:!1,dc:0,yc:!1,$a:!1,bd:!1,Nb:!1,ue:d}}
function $h(b,c){var d=b.j[c];if(d)return d.promise;d={promise:new z,Hb:!1};b.j[c]=d;for(var e=new Set,f=q(b.b.periods[c].variants),g=f.next();!g.done;g=f.next())g=g.value,g.video&&e.add(g.video),g.video&&g.video.trickModeVideo&&e.add(g.video.trickModeVideo),g.audio&&e.add(g.audio);f=q(b.b.periods[c].textStreams);for(g=f.next();!g.done;g=f.next())e.add(g.value);b.v=b.v.then(function(){if(!this.f)return Ph(this,e)}.bind(b)).then(function(){this.f||(this.j[c].promise.resolve(),this.j[c].Hb=!0)}.bind(b))["catch"](function(b){this.f||
(this.j[c].promise["catch"](function(){}),this.j[c].promise.reject(),delete this.j[c],this.a.onError(b))}.bind(b));return d.promise}
function Ph(b,c){return r(function e(){var f,g,h,k,l,m,p;return v(e,function(e){switch(e.s){case 1:f=[];for(var t=q(c),x=t.next();!x.done;x=t.next())g=x.value,(h=b.l.get(g.id))?f.push(h.promise):(b.l.set(g.id,{promise:new z,Hb:!1}),f.push(g.createSegmentIndex()));za(e,2);return u(e,Promise.all(f),4);case 4:if(b.f)return e["return"]();Ba(e,3);break;case 2:k=Ca(e);if(b.f)return e["return"]();e=q(c);for(x=e.next();!x.done;x=e.next())l=x.value,b.l.get(l.id).promise["catch"](function(){}),b.l.get(l.id).promise.reject(),
b.l["delete"](l.id);throw k;case 3:t=q(c);for(x=t.next();!x.done;x=t.next())m=x.value,p=b.l.get(m.id),p.Hb||(p.promise.resolve(),p.Hb=!0);e.s=0}})})}function Zh(b){var c=b.b.presentationTimeline.ka();Infinity>c?b.a.T.Ia(c):b.a.T.Ia(Math.pow(2,32))}
n.bh=function(b){if(!this.f&&!b.gb&&null!=b.Wa&&!b.$a)if(b.Wa=null,b.Xa)Xh(this,b,b.yc,b.dc);else{try{var c=ai(this,b);null!=c&&(Rh(this,b,c),b.Nb=!1)}catch(d){bi(this,d);return}c=Array.from(this.c.values());ci(this,b);c.every(function(b){return b.endOfStream})&&this.a.T.endOfStream().then(function(){if(!this.f){var b=this.a.T.ka();b<this.b.presentationTimeline.ka()&&this.b.presentationTimeline.Ia(b)}}.bind(this))}};
function ai(b,c){function d(b){return"text"==b.type&&"application/cea-608"==b.stream.mimeType}if(d(c))return b.a.T.vc(c.stream.originalId||""),null;var e=b.a.vb(),f=di(b,c,e),g=Vh(b,c.stream),h=J.hc(b.b,f),k=Ad(b.a.T,c.type,e),l=Math.max(b.b.minBufferTime||0,b.g.rebufferingGoal,b.g.bufferingGoal)*b.m;if(f>=b.b.presentationTimeline.ka())return c.endOfStream=!0,"video"==c.type&&(f=b.c.get("text"))&&"application/cea-608"==f.stream.mimeType&&(f.endOfStream=!0),null;c.endOfStream=!1;c.Ta=h;if(h!=g)return null;
if(k>=l)return.5;h=zd(b.a.T,c.type);h=ei(b,c,e,h,g);if(!h)return 1;var m=Infinity;Array.from(b.c.values()).forEach(function(c){d(c)||(c=di(b,c,e),m=Math.min(m,c))});if(f>=m+b.b.presentationTimeline.a)return 1;c.ue=0;fi(b,c,e,g,h);return null}function di(b,c,d){if(!c.Ab||!c.Na)return Math.max(d,c.ue);d=Vh(b,c.Ab);return b.b.periods[d].startTime+c.Na.endTime}
function ei(b,c,d,e,f){if(c.Na&&c.stream==c.Ab)return gi(b,c,f,c.Na.position+1);c.Na?(d=Vh(b,c.Ab),d=c.stream.findSegmentPosition(Math.max(0,b.b.periods[d].startTime+c.Na.endTime-b.b.periods[f].startTime))):d=c.stream.findSegmentPosition(Math.max(0,(e||d)-b.b.periods[f].startTime));if(null==d)return null;var g=null;null==e&&(g=gi(b,c,f,Math.max(0,d-1)));return g||gi(b,c,f,d)}
function gi(b,c,d,e){d=b.b.periods[d];c=c.stream.getSegmentReference(e);if(!c)return null;e=b.b.presentationTimeline;b=e.Lb();e=e.xb();return d.startTime+c.endTime<b||d.startTime+c.startTime>e?null:c}
function fi(b,c,d,e,f){var g=b.b.periods[e],h=c.stream,k=b.b.presentationTimeline.ka(),l=b.b.periods[e+1];e=hi(b,c,e,Math.max(0,g.startTime-.1),l?l.startTime+.01:k);c.gb=!0;c.pc=!1;k=ii(b,f);Promise.all([e,k]).then(function(b){if(!this.f&&!this.o)return ji(this,c,d,g,h,f,b[1])}.bind(b)).then(function(){this.f||this.o||(c.gb=!1,c.bd=!1,c.Xa||this.a.Tb(),Rh(this,c,0),ki(this,h))}.bind(b))["catch"](function(b){this.f||this.o||(c.gb=!1,"text"==c.type&&this.g.ignoreTextStreamFailures?this.c["delete"]("text"):
3017==b.code?li(this,c,b):(c.Nb=!0,b.severity=2,bi(this,b)))}.bind(b))}function li(b,c,d){if(!Array.from(b.c.values()).some(function(b){return b!=c&&b.bd})){var e=Math.round(100*b.m);if(20<e)b.m-=.2;else if(4<e)b.m-=.04;else{c.Nb=!0;b.o=!0;b.a.onError(d);return}c.bd=!0}Rh(b,c,4)}
function hi(b,c,d,e,f){if(!c.pc)return Promise.resolve();d=Ed(b.a.T,c.type,b.b.periods[d].startTime-c.stream.presentationTimeOffset,e,f);if(!c.stream.initSegmentReference)return d;b=ii(b,c.stream.initSegmentReference).then(function(b){if(!this.f)return Bd(this.a.T,c.type,b,null,null,c.stream.closedCaptions&&0<c.stream.closedCaptions.size)}.bind(b))["catch"](function(b){c.pc=!0;return Promise.reject(b)});return Promise.all([d,b])}
function ji(b,c,d,e,f,g,h){var k=f.closedCaptions&&0<f.closedCaptions.size;null!=f.emsgSchemeIdUris&&0<f.emsgSchemeIdUris.length&&(new P).va("emsg",b.Ag.bind(b,e,g,f.emsgSchemeIdUris)).parse(h);return mi(b,c,d).then(function(){if(!this.f)return Bd(this.a.T,c.type,h,g.startTime+e.startTime,g.endTime+e.startTime,k)}.bind(b)).then(function(){if(!this.f)return c.Ab=f,c.Na=g,Promise.resolve()}.bind(b))}
n.Ag=function(b,c,d,e){var f=e.reader.ad(),g=e.reader.ad(),h=e.reader.J(),k=e.reader.J(),l=e.reader.J(),m=e.reader.J();e=e.reader.hb(e.reader.N.byteLength-e.reader.oa());b=b.startTime+c.startTime+k/h;if(d.includes(f))if("urn:mpeg:dash:event:2012"==f)this.a.cg();else this.a.onEvent(new C("emsg",{detail:{startTime:b,endTime:b+l/h,schemeIdUri:f,value:g,timescale:h,presentationTimeDelta:k,eventDuration:l,id:m,messageData:e}}))};
function mi(b,c,d){var e=Math.max(b.g.bufferBehind,b.b.presentationTimeline.a),f=xd(b.a.T,c.type);if(null==f)return Promise.resolve();d=d-f-e;return 0>=d?Promise.resolve():b.a.T.remove(c.type,f,f+d).then(function(){}.bind(b))}
function ki(b,c){if(!b.u&&(b.u=Array.from(b.c.values()).every(function(b){return"text"==b.type?!0:!b.Xa&&!b.$a&&b.Na}),b.u)){var d=Vh(b,c);b.j[d]||$h(b,d).then(function(){this.f||this.a.Xd()}.bind(b))["catch"]($c.Qb);for(d=0;d<b.b.periods.length;++d)$h(b,d)["catch"]($c.Qb);b.a.rg&&b.a.rg()}}
function ci(b,c){var d=Vh(b,c.stream);if(c.Ta!=d){var e=c.Ta,f=Array.from(b.c.values());f.every(function(b){return b.Ta==e})&&f.every(ni)&&$h(b,e).then(function(){if(!this.f&&f.every(function(b){var c=ni(b),d=Vh(this,b.stream);return c&&b.Ta==e&&d!=e}.bind(this))){var b=this.b.periods[e],c=this.a.Yd(b),d=new Map;c.variant&&c.variant.video&&d.set("video",c.variant.video);c.variant&&c.variant.audio&&d.set("audio",c.variant.audio);c.text&&d.set("text",c.text);var l=q(this.c.keys());for(c=l.next();!c.done;c=
l.next())if(c=c.value,!d.has(c)&&"text"!=c){this.a.onError(new A(2,5,5005));return}l=q(Array.from(d.keys()));for(c=l.next();!c.done;c=l.next())if(c=c.value,!this.c.has(c))if("text"==c)Kh(this,null,null,d.get("text"),b.startTime),d["delete"](c);else{this.a.onError(new A(2,5,5005));return}b=q(Array.from(this.c.keys()));for(c=b.next();!c.done;c=b.next())c=c.value,(l=d.get(c))?(Th(this,l,!1,0),Rh(this,this.c.get(c),0)):this.c["delete"](c);this.a.Xd()}}.bind(b))["catch"]($c.Qb)}}
function ni(b){return!b.gb&&null==b.Wa&&!b.Xa&&!b.$a}function Vh(b,c){for(var d=b.b.periods,e=0;e<d.length;e++){for(var f=d[e],g=new Set,h=q(f.variants),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&g.add(k.audio),k.video&&g.add(k.video),k.video&&k.video.trickModeVideo&&g.add(k.video.trickModeVideo);f=q(f.textStreams);for(h=f.next();!h.done;h=f.next())g.add(h.value);if(g.has(c))return e}return-1}
function ii(b,c){var d=Jb(c.c(),b.g.retryParameters);if(0!=c.b||null!=c.a){var e="bytes="+c.b+"-";null!=c.a&&(e+=c.a);d.headers.Range=e}return b.a.Pb.request(1,d).promise.then(function(b){return b.data})}
function Xh(b,c,d,e){r(function g(){var h,k,l;return v(g,function(g){switch(g.s){case 1:return c.Xa=!1,c.yc=!1,c.dc=0,c.$a=!0,e?(k=b.a.vb(),l=b.a.T.ka(),h=b.a.T.remove(c.type,k+e,l)):h=Dd(b.a.T,c.type).then(function(){if(!this.f&&d)return this.a.T.flush(c.type)}.bind(b)),u(g,h,2);case 2:if(b.f)return g["return"]();c.Ab=null;c.Na=null;c.$a=!1;c.endOfStream=!1;Rh(b,c,0);g.s=0}})})}function Rh(b,c,d){c.Wa=window.setTimeout(b.bh.bind(b,c),1E3*d)}
function Jh(b){null!=b.Wa&&(window.clearTimeout(b.Wa),b.Wa=null)}function bi(b,c){qb(b.B).then(function(){this.f||(this.a.onError(c),c.handled||this.g.failureCallback(c))}.bind(b))};function oi(b,c,d,e,f,g){if(200<=d&&299>=d&&202!=d)return f&&(e=f),{uri:e,data:c,headers:b,fromCache:!!b["x-shaka-from-cache"]};f=null;try{f=ec(c)}catch(h){}throw new A(401==d||403==d?2:1,1,1001,e,d,f,b,g);};function pi(b,c,d,e){var f=new pi.b;Vb(c.headers).forEach(function(b,c){f.append(c,b)});var g=new pi.a,h={body:c.body||void 0,headers:f,method:c.method,signal:g.signal,credentials:c.allowCrossSiteCredentials?"include":void 0},k={vd:!1,Je:!1},l;c.retryParameters.timeout&&(l=setTimeout(function(){k.Je=!0;g.abort()},c.retryParameters.timeout));b=pi.j(b,d,h,k,l,e);return new B(b,function(){k.vd=!0;g.abort();return Promise.resolve()})}y("shaka.net.HttpFetchPlugin",pi);
pi.j=function(b,c,d,e,f,g){return r(function k(){var l,m,p,t,w,x,F,R,ca,da,ma,ra;return v(k,function(k){switch(k.s){case 1:return l=pi.g,m=pi.c,x=w=0,F=Date.now(),za(k,2,3),u(k,l(b,d),5);case 5:return p=k.C,R=p.clone().body.getReader(),ca=function(b){function c(){return r(function dd(){var d,e;return v(dd,function(f){switch(f.s){case 1:return u(f,R.read(),2);case 2:d=f.C;d.done||(w+=d.value.byteLength);e=Date.now();if(100<e-F||d.done)g(e-F,w-x),x=w,F=e;d.done?b.close():(b.enqueue(d.value),c());f.s=
0}})})}c()},new m({start:ca}),u(k,p.arrayBuffer(),6);case 6:t=k.C;case 3:Da(k);clearTimeout(f);Ea(k,4);break;case 2:da=Ca(k);if(e.vd)throw new A(1,1,7001,b,c);if(e.Je)throw new A(1,1,1003,b,c);throw new A(1,1,1002,b,da,c);case 4:return ma={},ra=p.headers,ra.forEach(function(b,c){ma[c.trim()]=b}),k["return"](oi(ma,t,p.status,b,p.url,c))}})})};pi.isSupported=function(){if(window.ReadableStream)try{new ReadableStream({})}catch(b){return!1}else return!1;return!(!window.fetch||!window.AbortController)};
pi.isSupported=pi.isSupported;pi.g=window.fetch;pi.a=window.AbortController;pi.c=window.ReadableStream;pi.b=window.Headers;pi.isSupported()&&(Ib("http",pi,2),Ib("https",pi,2));function qi(b,c,d,e){var f=new qi.f,g=Date.now(),h=0,k=new Promise(function(k,m){f.open(c.method,b,!0);f.responseType="arraybuffer";f.timeout=c.retryParameters.timeout;f.withCredentials=c.allowCrossSiteCredentials;f.onabort=function(){m(new A(1,1,7001,b,d))};f.onload=function(c){c=c.target;var e=c.getAllResponseHeaders().trim().split("\r\n"),f={};e=q(e);for(var g=e.next();!g.done;g=e.next())g=g.value.split(": "),f[g[0].toLowerCase()]=g.slice(1).join(": ");try{var h=oi(f,c.response,c.status,b,c.responseURL,
d);k(h)}catch(ca){m(ca)}};f.onerror=function(c){m(new A(1,1,1002,b,c,d))};f.ontimeout=function(){m(new A(1,1,1003,b,d))};f.onprogress=function(b){var c=Date.now();if(100<c-g||b.lengthComputable&&b.loaded==b.total)e(c-g,b.loaded-h),h=b.loaded,g=c};for(var l in c.headers)f.setRequestHeader(l.toLowerCase(),c.headers[l]);f.send(c.body)});return new B(k,function(){f.abort();return Promise.resolve()})}y("shaka.net.HttpXHRPlugin",qi);qi.f=window.XMLHttpRequest;Ib("http",qi,1);Ib("https",qi,1);function ri(b,c){this.l=b;this.c=new Map;this.g=!1;this.j=c;this.a=this.b=this.f=0}ri.prototype.destroy=function(){this.g=!0;return Promise.all(this.c.values()).then(function(){},function(){})};
function si(b,c,d,e,f){b.b+=e;var g=b.c.get(c)||Promise.resolve();b.c.set(c,g.then(function(){return r(function k(){var c,g;return v(k,function(k){switch(k.s){case 1:return u(k,ti(b,d),2);case 2:c=k.C;if(b.g)throw new A(2,9,7001);b.f+=e;b.a+=c.byteLength;g=b.b?b.f/b.b:0;b.j(g,b.a);return k["return"](f(c))}})})}))}function ui(b){return r(function d(){return v(d,function(d){switch(d.s){case 1:return u(d,Promise.all(b.c.values()),2);case 2:return d["return"](b.a)}})})}
function ti(b,c){return r(function e(){var f,g;return v(e,function(e){switch(e.s){case 1:return f=b.l.request(1,c),u(e,f.promise,2);case 2:return g=e.C,e["return"](g.data)}})})};function vi(b,c){var d=this;this.c=b;this.b=b.objectStore(c);this.a=new z;b.onabort=function(b){b.preventDefault();d.a.reject()};b.onerror=function(b){b.preventDefault();d.a.reject()};b.oncomplete=function(){d.a.resolve()}}vi.prototype.abort=function(){try{this.c.abort()}catch(b){}return this.a["catch"](function(){})};
function wi(b,c){return new Promise(function(d,e){var f=b.b.openCursor();f.onerror=e;f.onsuccess=function(b){b=b.target.result;if(!b)return d();c(b.key,b.value,b);b["continue"]()}})}vi.prototype.store=function(){return this.b};vi.prototype.promise=function(){return this.a};function xi(b){this.b=b;this.a=[]}xi.prototype.destroy=function(){return Promise.all(this.a.map(function(b){return b.abort()}))};function yi(b,c){return zi(b,c,"readonly")}function Ai(b,c){return zi(b,c,"readwrite")}function zi(b,c,d){d=b.b.transaction([c],d);var e=new vi(d,c);b.a.push(e);e.promise().then(function(){Bb(b.a,e)},function(){Bb(b.a,e)});return e};function Bi(b){this.a=new xi(b)}Bi.prototype.destroy=function(){return this.a.destroy()};Bi.prototype.getAll=function(){var b=this;return r(function d(){var e,f;return v(d,function(d){switch(d.s){case 1:return e=yi(b.a,"session-ids"),f=[],u(d,wi(e,function(b,d){f.push(d)}),2);case 2:return u(d,e.promise(),3);case 3:return d["return"](f)}})})};Bi.prototype.add=function(b){var c=Ai(this.a,"session-ids"),d=c.store();b=q(b);for(var e=b.next();!e.done;e=b.next())d.add(e.value);return c.promise()};
Bi.prototype.remove=function(b){var c=this;return r(function e(){var f;return v(e,function(e){switch(e.s){case 1:return f=Ai(c.a,"session-ids"),u(e,wi(f,function(c,e,f){0<=b.indexOf(e.sessionId)&&f["delete"]()}),2);case 2:return u(e,f.promise(),0)}})})};function Ci(){this.a=new Map}Ci.prototype.destroy=function(){for(var b=[],c=q(this.a.values()),d=c.next();!d.done;d=c.next())b.push(d.value.destroy());this.a.clear();return Promise.all(b)};Ci.prototype.init=function(){var b=this;Di.forEach(function(c,d){var e=c();e&&b.a.set(d,e)});for(var c=[],d=q(this.a.values()),e=d.next();!e.done;e=d.next())c.push(e.value.init());return Promise.all(c)};
function Ei(b){var c=null;b.a.forEach(function(b,e){b.getCells().forEach(function(b,d){b.hasFixedKeySpace()||c||(c={path:{Ga:e,na:d},na:b})})});if(c)return c;throw new A(2,9,9013,"Could not find a cell that supports add-operations");}function Fi(b,c){b.a.forEach(function(b,e){b.getCells().forEach(function(b,d){c({Ga:e,na:d},b)})})}
function Gi(b,c,d){b=b.a.get(c);if(!b)throw new A(2,9,9013,"Could not find mechanism with name "+c);c=b.getCells().get(d);if(!c)throw new A(2,9,9013,"Could not find cell with name "+d);return c}function Hi(b,c){b.a.forEach(function(b){c(b.getEmeSessionCell())})}function Ii(b){var c=Array.from(b.a.keys());if(!c.length)throw new A(2,9,9E3,"No supported storage mechanisms found");return b.a.get(c[0]).getEmeSessionCell()}
Ci.prototype.erase=function(){var b=this;return r(function d(){var e,f,g;return v(d,function(d){switch(d.s){case 1:return e=Array.from(b.a.values()),f=0<e.length,f||(g=Di,g.forEach(function(b){(b=b())&&e.push(b)})),u(d,Promise.all(e.map(function(b){return b.erase()})),2);case 2:if(f)d.I(0);else return u(d,Promise.all(e.map(function(b){return b.destroy()})),0)}})})};function Ji(b,c){Di.set(b,c)}y("shaka.offline.StorageMuxer.register",Ji);y("shaka.offline.StorageMuxer.unregister",function(b){Di["delete"](b)});
function Ki(){for(var b=q(Di.values()),c=b.next();!c.done;c=b.next())if(c=c.value,c=c())return c.destroy(),!0;return!1}var Di=new Map;function Li(b){this.a=new xi(b)}n=Li.prototype;n.destroy=function(){return this.a.destroy()};n.hasFixedKeySpace=function(){return!0};n.addSegments=function(){return Mi("segment")};n.removeSegments=function(b,c){return Ni(this,"segment",b,c)};n.getSegments=function(b){return Oi(this,"segment",b).then(function(b){return b.map(Pi)})};n.addManifests=function(){return Mi("manifest")};
n.updateManifestExpiration=function(b,c){var d=Ai(this.a,"manifest"),e=d.store(),f=new z;e.get(b).onsuccess=function(d){(d=d.target.result)?(d.expiration=c,e.put(d),f.resolve()):f.reject(new A(2,9,9012,"Could not find values for "+b))};return d.promise().then(function(){return f})};n.removeManifests=function(b,c){return Ni(this,"manifest",b,c)};n.getManifests=function(b){return Oi(this,"manifest",b).then(function(b){return b.map(Qi)})};
n.getAllManifests=function(){var b=this;return r(function d(){var e,f,g;return v(d,function(d){switch(d.s){case 1:return e=Qi,f=yi(b.a,"manifest"),g=new Map,u(d,wi(f,function(b,d){g.set(b,e(d))}),2);case 2:return u(d,f.promise(),3);case 3:return d["return"](g)}})})};function Mi(b){return Promise.reject(new A(2,9,9011,"Cannot add new value to "+b))}function Ni(b,c,d,e){b=Ai(b.a,c);var f=b.store();d.forEach(function(b){f["delete"](b).onsuccess=function(){return e(b)}});return b.promise()}
function Oi(b,c,d){b=yi(b.a,c);var e=b.store(),f={},g=[];d.forEach(function(b){e.get(b).onsuccess=function(c){c=c.target.result;void 0==c&&g.push(b);f[b]=c}});return b.promise().then(function(){return g.length?Promise.reject(new A(2,9,9012,"Could not find values for "+g)):d.map(function(b){return f[b]})})}
function Qi(b){return{originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:null==b.expiration?Infinity:b.expiration,periods:b.periods.map(Ri),sessionIds:b.sessionIds,drmInfo:b.drmInfo,appMetadata:b.appMetadata}}function Ri(b){Si(b);b.streams.forEach(function(){});return{startTime:b.startTime,streams:b.streams.map(Ti)}}
function Ti(b){var c=b.Jf?Ui(b.Jf):null;return{id:b.id,originalId:null,primary:b.primary,presentationTimeOffset:b.presentationTimeOffset,contentType:b.contentType,mimeType:b.mimeType,codecs:b.codecs,frameRate:b.frameRate,kind:b.kind,language:b.language,label:b.label,width:b.width,height:b.height,initSegmentKey:c,encrypted:b.encrypted,keyId:b.keyId,segments:b.segments.map(Vi),variantIds:b.variantIds}}function Vi(b){var c=Ui(b.uri);return{startTime:b.startTime,endTime:b.endTime,dataKey:c}}
function Pi(b){return{data:b.data}}function Ui(b){var c;if((c=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(b))||(c=/^offline:segment\/([0-9]+)$/.exec(b)))return Number(c[1]);throw new A(2,9,9004,"Could not parse uri "+b);}
function Si(b){var c=b.streams.filter(function(b){return"audio"==b.contentType}),d=b.streams.filter(function(b){return"video"==b.contentType});if(!c.every(function(b){return b.variantIds})||!d.every(function(b){return b.variantIds})){c.forEach(function(b){b.variantIds=[]});d.forEach(function(b){b.variantIds=[]});var e=0;if(d.length&&!c.length){var f=e++;d.forEach(function(b){b.variantIds.push(f)})}if(!d.length&&c.length){var g=e++;c.forEach(function(b){b.variantIds.push(g)})}d.length&&c.length&&c.forEach(function(b){d.forEach(function(c){var d=
e++;b.variantIds.push(d);c.variantIds.push(d)})})}};function Wi(b,c,d,e){this.a=new xi(b);this.c=c;this.b=d;this.f=e}n=Wi.prototype;n.destroy=function(){return this.a.destroy()};n.hasFixedKeySpace=function(){return this.f};n.addSegments=function(b){return Xi(this,this.c,b)};n.removeSegments=function(b,c){return Yi(this,this.c,b,c)};n.getSegments=function(b){return Zi(this,this.c,b)};n.addManifests=function(b){return Xi(this,this.b,b)};
n.updateManifestExpiration=function(b,c){var d=Ai(this.a,this.b),e=d.store();e.get(b).onsuccess=function(d){if(d=d.target.result)d.expiration=c,e.put(d,b)};return d.promise()};n.removeManifests=function(b,c){return Yi(this,this.b,b,c)};n.getManifests=function(b){return Zi(this,this.b,b)};
n.getAllManifests=function(){var b=this;return r(function d(){var e,f;return v(d,function(d){switch(d.s){case 1:return e=yi(b.a,b.b),f=new Map,u(d,wi(e,function(b,d){f.set(b,d)}),2);case 2:return u(d,e.promise(),3);case 3:return d["return"](f)}})})};
function Xi(b,c,d){if(b.f)return Promise.reject(new A(1,9,9011,"Cannot add new value to "+c));b=Ai(b.a,c);var e=b.store(),f=[];d.forEach(function(b){e.add(b).onsuccess=function(b){f.push(b.target.result)}});return b.promise().then(function(){return f})}function Yi(b,c,d,e){b=Ai(b.a,c);var f=b.store();d.forEach(function(b){f["delete"](b).onsuccess=function(){return e(b)}});return b.promise()}
function Zi(b,c,d){b=yi(b.a,c);var e=b.store(),f={},g=[];d.forEach(function(b){var c=e.get(b);c.onsuccess=function(){void 0==c.result&&g.push(b);f[b]=c.result}});return b.promise().then(function(){return g.length?Promise.reject(new A(1,9,9012,"Could not find values for "+g)):d.map(function(b){return f[b]})})};function $i(){this.g=this.c=this.b=this.a=this.f=null}n=$i.prototype;
n.init=function(){var b=this,c=new z,d=window.indexedDB.open("shaka_offline_db",4);d.onsuccess=function(d){d=d.target.result;b.f=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new Li(d):null;b.a=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new Wi(d,"segment-v2","manifest-v2",!0):null;b.b=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new Wi(d,"segment-v3","manifest-v3",!1):null;b.c=e;d=d.objectStoreNames.contains("session-ids")?
new Bi(d):null;b.g=d;c.resolve()};d.onupgradeneeded=function(b){b=b.target.result;for(var c=q(["segment-v3","manifest-v3","session-ids"]),d=c.next();!d.done;d=c.next())d=d.value,b.objectStoreNames.contains(d)||b.createObjectStore(d,{autoIncrement:!0})};d.onerror=function(b){c.reject(new A(2,9,9001,d.error));b.preventDefault()};return c};
n.destroy=function(){var b=this;return r(function d(){return v(d,function(d){switch(d.s){case 1:if(!b.a){d.I(2);break}return u(d,b.a.destroy(),2);case 2:if(!b.b){d.I(4);break}return u(d,b.b.destroy(),4);case 4:if(!b.c){d.I(6);break}return u(d,b.c.destroy(),6);case 6:if(!b.g){d.I(8);break}return u(d,b.g.destroy(),8);case 8:b.f&&b.f.close(),d.s=0}})})};n.getCells=function(){var b=new Map;this.a&&b.set("v1",this.a);this.b&&b.set("v2",this.b);this.c&&b.set("v3",this.c);return b};n.getEmeSessionCell=function(){return this.g};
n.erase=function(){var b=this;return r(function d(){return v(d,function(d){switch(d.s){case 1:if(!b.a){d.I(2);break}return u(d,b.a.destroy(),2);case 2:if(!b.b){d.I(4);break}return u(d,b.b.destroy(),4);case 4:if(!b.c){d.I(6);break}return u(d,b.c.destroy(),6);case 6:return b.f&&b.f.close(),u(d,aj(),8);case 8:return b.f=null,b.a=null,b.b=null,b.c=null,u(d,b.init(),0)}})})};
function aj(){var b=new z,c=window.indexedDB.deleteDatabase("shaka_offline_db");c.onblocked=function(){};c.onsuccess=function(){b.resolve()};c.onerror=function(d){b.reject(new A(2,9,9001,c.error));d.preventDefault()};return b}Ji("idb",function(){return window.indexedDB?new $i:null});function bj(b,c,d,e){this.a=b;this.g=c;this.f=d;this.c=e;this.b=["offline:",b,"/",c,"/",d,"/",e].join("")}bj.prototype.Ga=function(){return this.g};bj.prototype.na=function(){return this.f};bj.prototype.key=function(){return this.c};bj.prototype.toString=function(){return this.b};
function cj(b){b=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(b);if(null==b)return null;var c=b[1];if("manifest"!=c&&"segment"!=c)return null;var d=b[2];if(!d)return null;var e=b[3];return e&&null!=c?new bj(c,d,e,Number(b[4])):null};function dj(b,c){this.b=b;this.a=c}function ej(b,c){var d=new S(null,0);d.Ia(c.duration);var e=c.periods.map(function(c){return fj(b,c,d)}),f=c.drmInfo?[c.drmInfo]:[];c.drmInfo&&e.forEach(function(b){b.variants.forEach(function(b){b.drmInfos=f})});return{presentationTimeline:d,minBufferTime:2,offlineSessionIds:c.sessionIds,periods:e}}
function fj(b,c,d){var e=c.streams.filter(function(b){return"audio"==b.contentType}),f=c.streams.filter(function(b){return"video"==b.contentType});e=gj(b,e,f);f=c.streams.filter(function(b){return"text"==b.contentType}).map(function(c){return hj(b,c)});c.streams.forEach(function(e){e=e.segments.map(function(c,d){return ij(b,d,c)});d.Cb(e,c.startTime)});return{startTime:c.startTime,variants:Array.from(e.values()),textStreams:f}}
function gj(b,c,d){for(var e=new Set,f=q(c),g=f.next();!g.done;g=f.next()){var h=q(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=q(d);for(g=f.next();!g.done;g=f.next())for(h=q(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=q(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,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0});c=q(c);for(e=c.next();!e.done;e=c.next())for(e=
e.value,g=hj(b,e),h=q(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;d=q(d);for(c=d.next();!c.done;c=d.next())for(e=c.value,c=hj(b,e),g=q(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||c.primary,e.video=c;return f}
function hj(b,c){var d=c.segments.map(function(c,d){return ij(b,d,c)}),e=new Q(d);d={id:c.id,originalId:c.originalId,createSegmentIndex:function(){return Promise.resolve()},findSegmentPosition:function(b){return e.find(b)},getSegmentReference:function(b){return e.get(b)},initSegmentReference:null,presentationTimeOffset:c.presentationTimeOffset,mimeType:c.mimeType,codecs:c.codecs,width:c.width||void 0,height:c.height||void 0,frameRate:c.frameRate||void 0,kind:c.kind,encrypted:c.encrypted,keyId:c.keyId,
language:c.language,label:c.label||null,type:c.contentType,primary:c.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null};null!=c.initSegmentKey&&(d.initSegmentReference=jj(b,c.initSegmentKey));return d}function ij(b,c,d){var e=new bj("segment",b.b,b.a,d.dataKey);return new N(c,d.startTime,d.endTime,function(){return[e.toString()]},0,null)}function jj(b,c){var d=new bj("segment",b.b,b.a,c);return new Le(function(){return[d.toString()]},0,null)};function kj(b){this.a=!1;this.b=new z;this.c=b}kj.prototype.destroy=function(){var b=this;if(this.a)return this.b;this.a=!0;return this.c().then(function(){b.b.resolve()},function(){b.b.resolve()})};function lj(b,c){return r(function e(){return v(e,function(e){switch(e.s){case 1:return Aa(e,2),u(e,Promise.resolve(c()),4);case 4:return e["return"](e.C);case 2:return Da(e),u(e,Promise.all(b.map(function(b){return b.destroy()})),5);case 5:Ea(e,0)}})})};function mj(){this.a=null}n=mj.prototype;n.configure=function(){};n.start=function(b){var c=cj(b);this.a=c;if(null==c||"manifest"!=c.a)return Promise.reject(new A(2,1,9004,c));var d=new Ci;return lj([d],function(){return r(function f(){var b,h,k,l;return v(f,function(f){switch(f.s){case 1:return u(f,d.init(),2);case 2:return u(f,Gi(d,c.Ga(),c.na()),3);case 3:return b=f.C,u(f,b.getManifests([c.key()]),4);case 4:return h=f.C,k=h[0],l=new dj(c.Ga(),c.na()),f["return"](ej(l,k))}})})})};n.stop=function(){return Promise.resolve()};
n.update=function(){};n.onExpirationUpdated=function(b,c){var d=this.a,e=new Ci;return lj([e],function(){return r(function g(){var h,k,l,m,p;return v(g,function(g){switch(g.s){case 1:return u(g,e.init(),2);case 2:return u(g,Gi(e,d.Ga(),d.na()),3);case 3:return h=g.C,u(g,h.getManifests([d.key()]),4);case 4:k=g.C;l=k[0];m=l.sessionIds.includes(b);p=void 0==l.expiration||l.expiration>c;if(m&&p)return u(g,h.updateManifestExpiration(d.key(),c),0);g.I(0)}})})})["catch"](function(){})};
sf["application/x-offline-manifest"]=mj;function nj(b){var c=cj(b);return c&&"manifest"==c.a?nj.a(b):c&&"segment"==c.a?nj.b(c.key(),c):sb(new A(2,1,9004,b))}y("shaka.offline.OfflineScheme",nj);nj.a=function(b){b={uri:b,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}};return ub(b)};
nj.b=function(b,c){var d=new Ci,e=lj([d],function(){return r(function g(){var b,e,l;return v(g,function(g){switch(g.s){case 1:return u(g,d.init(),2);case 2:return u(g,Gi(d,c.Ga(),c.na()),3);case 3:return b=g.C,u(g,b.getSegments([c.key()]),4);case 4:return e=g.C,l=e[0],g["return"]({uri:c,data:l.data,headers:{}})}})})});return vb(e)};Ib("offline",nj);function oj(b,c,d){return r(function f(){var g,h,k,l,m,p;return v(f,function(f){switch(f.s){case 1:g=[];for(var t=[],x=q(d),F=x.next();!F.done;F=x.next()){F=F.value;for(var R=!1,ca=q(t),da=ca.next();!da.done;da=ca.next())if(da=da.value,pj(da.info,F)){da.sessionIds.push(F.sessionId);R=!0;break}R||t.push({info:F,sessionIds:[F.sessionId]})}h=q(t);k=h.next();case 2:if(k.done){f.I(4);break}l=k.value;m=qj(b,c,l);return u(f,m,5);case 5:p=f.C;g=g.concat(p);k=h.next();f.I(2);break;case 4:return f["return"](g)}})})}
function qj(b,c,d){return r(function f(){var g,h;return v(f,function(f){switch(f.s){case 1:return g=new nc({Pb:c,onError:function(){},Xc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),za(f,2),g.configure(b),u(f,vc(g,d.info.keySystem,d.info.licenseUri,d.info.serverCertificate,d.info.audioCapabilities,d.info.videoCapabilities),4);case 4:Ba(f,3);break;case 2:return Ca(f),u(f,g.destroy(),5);case 5:return f["return"]([]);case 3:return za(f,6),u(f,Cc(g),8);case 8:Ba(f,7);break;case 6:return Ca(f),
u(f,g.destroy(),9);case 9:return f["return"]([]);case 7:return h=[],u(f,Promise.all(d.sessionIds.map(function(b){return r(function p(){return v(p,function(c){switch(c.s){case 1:return za(c,2),u(c,Fc(g,b),4);case 4:h.push(b);Ba(c,0);break;case 2:Ca(c),c.s=0}})})})),10);case 10:return u(f,g.destroy(),11);case 11:return f["return"](h)}})})}
function pj(b,c){function d(b,c){return b.robustness==c.robustness&&b.contentType==c.contentType}return b.keySystem==c.keySystem&&b.licenseUri==c.licenseUri&&Db(b.audioCapabilities,c.audioCapabilities,d)&&Db(b.videoCapabilities,c.videoCapabilities,d)};function rj(b,c,d,e,f){var g=f in e,h=!0,k;for(k in c){var l=f+"."+k,m=g?e[f]:d[k];g||k in d?void 0===c[k]?void 0===m||g?delete b[k]:b[k]=zb(m):m.constructor==Object&&c[k]&&c[k].constructor==Object?(b[k]||(b[k]=zb(m)),l=rj(b[k],c[k],m,e,l),h=h&&l):typeof c[k]!=typeof m||null==c[k]||c[k].constructor!=m.constructor?h=!1:b[k]=c[k]:h=!1}return h}y("shaka.util.ConfigUtils.mergeConfigObjects",rj);function sj(){var b=5E5,c=Infinity;navigator.connection&&navigator.connection.type&&(b=1E6*navigator.connection.downlink,navigator.connection.saveData&&(c=360));var d={trackSelectionCallback:function(b){return b},progressCallback:function(){},usePersistentLicense:!0},e={drm:{retryParameters:pb(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1},manifest:{retryParameters:pb(),availabilityWindowOverride:NaN,dash:{customScheme:function(b){if(b)return null},clockSyncUri:"",ignoreDrmInfo:!1,
xlinkFailGracefully:!1,defaultPresentationDelay:10,ignoreMinBufferTime:!1,autoCorrectDrift:!0}},streaming:{retryParameters:pb(),failureCallback:function(){},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5},offline:d,abrFactory:K,abr:{enabled:!0,defaultBandwidthEstimate:b,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,
restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:c,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null}};d.trackSelectionCallback=
function(b){return tj(b,e.preferredAudioLanguage)};return e}function uj(b,c,d){return rj(b,c,d||sj(),{".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0),individualizationServer:""}},"")}
function tj(b,c){var d=b.filter(function(b){return"variant"==b.type}),e=[],f=Md(c,d.map(function(b){return b.language}));f&&(e=d.filter(function(b){return I(b.language)==f}));0==e.length&&(e=d.filter(function(b){return b.primary}));0==e.length&&(d.map(function(b){return b.language}),e=d);var g=e.filter(function(b){return b.height&&480>=b.height});g.length&&(g.sort(function(b,c){return c.height-b.height}),e=g.filter(function(b){return b.height==g[0].height}));d=[];if(e.length){var h=Math.floor(e.length/
2);e.sort(function(b,c){return b.bandwidth-c.bandwidth});d.push(e[h])}e=q(b);for(h=e.next();!h.done;h=e.next())h=h.value,"text"==h.type&&d.push(h);return d};function vj(b){this.c=b;this.a=null;this.b=[]}function wj(b){function c(b){return{timestamp:b.timestamp,state:b.state,duration:b.duration}}for(var d=[],e=q(b.b),f=e.next();!f.done;f=e.next())d.push(c(f.value));b.a&&d.push(c(b.a));return d}function xj(b,c){return c?"buffering":b.c.ended?"ended":b.c.paused?"paused":"playing"};function yj(){this.b=this.c=null;this.a=[]}function zj(b,c,d){b.b!=c&&(b.b=c,b.a.push({timestamp:Date.now()/1E3,id:c.id,type:"text",fromAdaptation:d,bandwidth:null}))};function Aj(b){this.m=this.A=NaN;this.b=this.j=0;this.l=this.w=this.f=this.g=this.u=this.v=NaN;this.c=null;this.o=new vj(b);this.a=new yj}function Bj(b,c){var d=Date.now()/1E3,e=null==b.c?0:d-b.c;c?b.b+=e:b.j+=e;b.c=d};function T(b,c){var d=this;D.call(this);this.f=null;this.ha=!1;this.u=new Nb;this.Qa=this.g=this.V=this.c=this.o=this.a=this.H=this.P=this.l=this.v=this.j=this.A=null;this.tb=1E9;this.ua=new Set;this.aa=!1;this.S=!0;this.F=this.Ea=this.K=null;this.sb=!1;this.Za=0;this.B=null;this.w=new Mg;this.b=Cj(this);this.Da={width:Infinity,height:Infinity};this.m=null;this.qa=new Ug(this.b.preferredAudioLanguage,this.b.preferredVariantRole,this.b.preferredAudioChannelCount);this.G=this.b.preferredTextLanguage;
this.$=this.b.preferredTextRole;c&&c(this);this.A=Dj(this);b&&this.bc(b,!0);this.ea=new kj(function(){d.u&&(d.u.R(),d.u=null);var b=[];d.A&&(b.push(d.A.destroy()),d.A=null);d.ha=!1;d.u=null;d.g=null;d.Qa=null;d.b=null;return Promise.all(b)});G(this.u,window,"online",function(){d.dd()})}Pa(T,D);y("shaka.Player",T);function Ej(b){if(!b.K)return Promise.resolve();var c=Promise.resolve();b.o&&(c=b.o.stop(),b.o=null);return Promise.all([c,b.K()])}
T.prototype.destroy=function(){var b=this;return r(function d(){return v(d,function(d){switch(d.s){case 1:return u(d,b.detach(),2);case 2:return u(d,b.ea.destroy(),0)}})})};T.prototype.destroy=T.prototype.destroy;T.version="v2.5.0-beta3-uncompiled";var Fj=["2","5"];Qd=new function(b){this.a=b;this.c=Rd;this.b=Sd}(new Od(Number(Fj[0]),Number(Fj[1])));var Gj=["output-restricted","internal-error"],Hj={};T.registerSupportPlugin=function(b,c){Hj[b]=c};
function Ij(){return!!window.Promise&&!!window.Uint8Array&&!!Array.prototype.forEach&&!!window.MediaSource&&!!MediaSource.isTypeSupported&&!!window.MediaKeys&&!!window.navigator&&!!window.navigator.requestMediaKeySystemAccess&&!!window.MediaKeySystemAccess&&!!window.MediaKeySystemAccess.prototype.getConfiguration}T.isBrowserSupported=Ij;T.probeSupport=function(){return Qc().then(function(b){var c=uf(),d=vd();b={manifest:c,media:d,drm:b};for(var e in Hj)b[e]=Hj[e]();return b})};
T.prototype.bc=function(b,c){var d=this;return r(function f(){return v(f,function(f){switch(f.s){case 1:void 0===c&&(c=!0);if(!d.f){f.I(2);break}return u(f,d.detach(),2);case 2:d.f=b;G(d.u,d.f,"error",d.sg.bind(d));if(c)return d.v=Jj(d),u(f,d.v.u,0);f.I(0)}})})};T.prototype.attach=T.prototype.bc;T.prototype.detach=function(){var b=this;return r(function d(){return v(d,function(d){switch(d.s){case 1:return b.f?u(d,b.$b(!1),2):d["return"]();case 2:b.u.Ja(b.f,"error"),b.f=null,d.s=0}})})};
T.prototype.detach=T.prototype.detach;function Kj(b,c,d){return r(function f(){var g;return v(f,function(f){switch(f.s){case 1:return u(f,vf(c,b.A,b.b.manifest.retryParameters,d),2);case 2:return g=f.C,f["return"](g)}})})}
function Lj(b){b.H=new Bh;Ch(b.H,function(c){Mj(b,"timelineregionadded",c)});return b.o.start(b.V,{networkingEngine:b.A,filterNewPeriod:b.Gc.bind(b),filterAllPeriods:b.Cd.bind(b),onTimelineRegionAdded:function(c){var d=b.H;a:{var e=q(d.a);for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.schemeIdUri==c.schemeIdUri&&f.startTime==c.startTime&&f.endTime==c.endTime){e=f;break a}e=null}null==e&&(d.a.add(c),d.b(c))},onEvent:b.Zb.bind(b),onError:b.jb.bind(b)})}
function Nj(b){function c(b){return b.video&&b.audio||b.video&&b.video.codecs.includes(",")}b.c.periods.some(function(b){return b.variants.some(c)})&&b.c.periods.forEach(function(b){b.variants=b.variants.filter(c)});if(0==b.c.periods.length)throw new A(2,4,4014);}
T.prototype.load=function(b,c,d){c=void 0===c?null:c;var e=this;return r(function g(){var h,k,l,m,p,t,w,x,F,R,ca,da,ma,ra,Ra;return v(g,function(g){switch(g.s){case 1:if(!e.f)throw new A(2,7,7002);k=new z;l=function(){h=new A(2,7,7E3);return k};e.dispatchEvent(new C("loading"));za(g,2);m=e.f;p=e.$b();e.K=l;return u(g,p,4);case 4:e.m=new Aj(m);e.m.g=Date.now()/1E3;G(e.u,m,"playing",function(){Oj(e)});G(e.u,m,"pause",function(){Oj(e)});G(e.u,m,"ended",function(){Oj(e)});t=e.b.abrFactory;e.g&&e.Qa==
t||(e.Qa=t,e.g=new t,e.g.configure(e.b.abr));if(h)throw h;x=w=null;d&&("string"==typeof d?x=d:(Pd("Loading with a manifest parser factory","Please register a manifest parser and for the mime-type."),w=d));F=e;if(w){R=new w;g.I(5);break}return u(g,Kj(e,b,x),6);case 6:R=g.C;case 5:return F.o=R,e.o.configure(e.b.manifest),e.V=b,u(g,Lj(e),7);case 7:ca=g.C;e.c=ca;if(h)throw h;Nj(e);da=e;return u(g,Pj(e,ca),8);case 8:da.j=g.C;if(h)throw h;e.Cd(e.c.periods);Qj(e,e.c.periods);e.qa=new Ug(e.b.preferredAudioLanguage,
e.b.preferredVariantRole,e.b.preferredAudioChannelCount);e.G=e.b.preferredTextLanguage;Rj(e.c.presentationTimeline,e.b.playRangeStart,e.b.playRangeEnd);return u(g,e.j.bc(m),9);case 9:if(h)throw h;e.g.init(function(b,c,d){c=void 0===c?!1:c;d=void 0===d?0:d;Sj(e,e.c.periods[J.jf(e.c,b)],b,!0);e.a&&(Uh(e.a,b,c,d),Tj(e))});e.v||(e.v=Jj(e));e.l=new wh(e.f,e.c.presentationTimeline,e.c.minBufferTime||0,e.b.streaming,c,e.Vg.bind(e),e.Zb.bind(e));e.P=Uj(e);e.a=Vj(e);e.a.configure(e.b.streaming);Wj(e);e.dispatchEvent(new C("streaming"));
return u(g,e.a.init(),10);case 10:if(h)throw h;e.b.streaming.startAtSegmentBoundary&&(ma=Xj(e,zh(e.l)),th(e.l.b,ma));e.c.periods.forEach(e.Gc.bind(e));Yj(e);Tj(e);ra=Zj(e);ra.variants.some(function(b){return b.primary});ak(e,ra.variants);Qb(e.u,m,"loadeddata",function(){e.m.f=Date.now()/1E3});if(h)throw h;e.K=null;Ba(g,0);break;case 2:return Ra=Ca(g),k.resolve(),e.K==l&&(e.K=null,e.dispatchEvent(new C("unloading"))),g["return"](Promise.reject(h||Ra))}})})};T.prototype.load=T.prototype.load;
function Wj(b){function c(b){var c="";b.video&&(c=$b(b.video.codecs)[0]);var d="";b.audio&&(d=$b(b.audio.codecs)[0]);return c+"-"+d}var d=b.c.periods.reduce(function(b,c){return b.concat(c.variants)},[]);d=J.Ed(d,b.b.preferredAudioChannelCount);var e=new yb;d.forEach(function(b){var d=c(b);e.push(d,b)});var f=null,g=Infinity;e.forEach(function(b,c){var d=0,e=0;c.forEach(function(b){d+=b.bandwidth||0;++e});var h=d/e;h<g&&(f=b,g=h)});b.c.periods.forEach(function(b){b.variants=b.variants.filter(function(b){return c(b)==
f?!0:!1})})}function Pj(b,c){return r(function e(){var f,g,h;return v(e,function(e){switch(e.s){case 1:return f={Pb:b.A,onError:function(c){b.jb(c)},Xc:function(c){bk(b,c)},onExpirationUpdated:function(c,e){if(b.o&&b.o.onExpirationUpdated)b.o.onExpirationUpdated(c,e);b.dispatchEvent(new C("expirationupdated"))},onEvent:function(c){b.Zb(c)}},g=new nc(f),g.configure(b.b.drm),h=J.Id(c),u(e,uc(g,h,c.offlineSessionIds),2);case 2:return e["return"](g)}})})}
function Dj(b){return new E(function(c,d){b.g&&b.g.segmentDownloaded(c,d)})}
function Uj(b){var c=new ph(b.c);qh(c,function(){Yj(b)});var d=new Dh(b.H);Hh(d,function(c){Mj(b,"timelineregionenter",c)},function(c){Mj(b,"timelineregionexit",c)},function(c,d){d||(Mj(b,"timelineregionenter",c),Mj(b,"timelineregionexit",c))});var e=new Zg(Math.max(b.c.minBufferTime,b.b.streaming.rebufferingGoal),function(c){return Yc(b.f.buffered,c)},function(){var c;a:if((c=b.f.ended)||(c=b.v,c=c.g?"ended"==c.g.readyState:!0),c)c=!0;else{if(b.c.presentationTimeline.Z()&&(c=b.c.presentationTimeline.xb(),
Wc(b.f.buffered)>=c)){c=!0;break a}c=!1}return c});bh(e,function(){return ck(b,!0)},function(){return ck(b,!1)});var f=new Xg(b.f);f.a.add(c);f.a.add(d);f.a.add(e);return f}function Jj(b){var c=window.muxjs?new Uc:new Vc,d=new b.b.textDisplayFactory;d.setTextVisibility(b.ha);return new td(b.f,c,d)}function Vj(b){return new Ih(b.c,{vb:function(){return zh(b.l)},T:b.v,Pb:b.A,Yd:b.Wf.bind(b),Xd:b.$e.bind(b),onError:b.jb.bind(b),onEvent:b.Zb.bind(b),cg:b.dg.bind(b),Tb:b.pg.bind(b)})}
T.prototype.configure=function(b,c){if(2==arguments.length&&"string"==typeof b){for(var d=b,e={},f=e,g=0,h=0;;){g=d.indexOf(".",g);if(0>g)break;if(0==g||"\\"!=d[g-1])h=d.substring(h,g).replace(/\\\./g,"."),f[h]={},f=f[h],h=g+1;g+=1}f[d.substring(h).replace(/\\\./g,".")]=c;b=e}d=uj(this.b,b,Cj(this));dk(this);return d};T.prototype.configure=T.prototype.configure;
function dk(b){b.o&&b.o.configure(b.b.manifest);b.j&&b.j.configure(b.b.drm);if(b.a){b.a.configure(b.b.streaming);try{b.c.periods.forEach(b.Gc.bind(b))}catch(f){b.jb(f)}var c=Lh(b.a),d=Nh(b.a),e=Zj(b);c=J.Nd(c,d,e.variants);b.g&&c&&c.allowedByApplication&&c.allowedByKeySystem?ak(b,e.variants):ek(b,e)}b.g&&(b.g.configure(b.b.abr),b.b.abr.enabled&&!b.S?b.g.enable():b.g.disable())}T.prototype.getConfiguration=function(){var b=Cj(this);uj(b,this.b,Cj(this));return b};T.prototype.getConfiguration=T.prototype.getConfiguration;
T.prototype.Ng=function(){for(var b in this.b)delete this.b[b];uj(this.b,Cj(this),Cj(this));dk(this)};T.prototype.resetConfiguration=T.prototype.Ng;T.prototype.Af=function(){return this.f};T.prototype.getMediaElement=T.prototype.Af;T.prototype.Jb=function(){return this.A};T.prototype.getNetworkingEngine=T.prototype.Jb;T.prototype.Hc=function(){return this.V};T.prototype.getAssetUri=T.prototype.Hc;T.prototype.zf=function(){Pd("getManifestUri",'Please use "getAssetUri" instead.');return this.V};
T.prototype.getManifestUri=T.prototype.zf;T.prototype.Z=function(){return this.c?this.c.presentationTimeline.Z():!1};T.prototype.isLive=T.prototype.Z;T.prototype.fb=function(){return this.c?this.c.presentationTimeline.fb():!1};T.prototype.isInProgress=T.prototype.fb;T.prototype.Lf=function(){if(!this.c||!this.c.periods.length)return!1;var b=this.c.periods[0].variants;return b.length?!b[0].video:!1};T.prototype.isAudioOnly=T.prototype.Lf;
T.prototype.ib=function(){var b=0,c=0;this.c&&(c=this.c.presentationTimeline,b=c.wb(),c=c.Ma());return{start:b,end:c}};T.prototype.seekRange=T.prototype.ib;T.prototype.keySystem=function(){return this.j?this.j.keySystem():""};T.prototype.keySystem=T.prototype.keySystem;T.prototype.drmInfo=function(){return this.j?this.j.a:null};T.prototype.drmInfo=T.prototype.drmInfo;T.prototype.kc=function(){return this.j?this.j.kc():Infinity};T.prototype.getExpiration=T.prototype.kc;T.prototype.Td=function(){return this.aa};
T.prototype.isBuffering=T.prototype.Td;T.prototype.$b=function(b){var c=this;return r(function e(){return v(e,function(e){switch(e.s){case 1:if(c.ea.a)return e["return"]();void 0===b&&(b=!0);c.dispatchEvent(new C("unloading"));return u(e,Ej(c),2);case 2:return c.Ea||(c.Ea=fk(c).then(function(){ck(c,!1);c.Ea=null})),u(e,c.Ea,3);case 3:if(b)return c.v=Jj(c),u(e,c.v.u,0);e.I(0)}})})};T.prototype.unload=T.prototype.$b;T.prototype.bb=function(){return this.l?this.l.bb():0};
T.prototype.getPlaybackRate=T.prototype.bb;T.prototype.nd=function(b){this.l&&vh(this.l.b,b);this.a&&Sh(this.a,1!=b)};T.prototype.trickPlay=T.prototype.nd;T.prototype.ud=function(){this.l&&vh(this.l.b,1);this.a&&Sh(this.a,!1)};T.prototype.cancelTrickPlay=T.prototype.ud;T.prototype.mc=function(){for(var b=gk(this),c=[],d=q(hk(this)),e=d.next();!e.done;e=d.next()){e=e.value;var f=J.pd(e);f.active=e==b;c.push(f)}return c};T.prototype.getVariantTracks=T.prototype.mc;
T.prototype.lc=function(){var b=Zj(this);if(null==b)b=null;else{if(!Ng(this.w,b).text){var c=J.fc(b.textStreams,this.G,this.$);c.length&&(c=c[0],Ng(this.w,b).text=c)}b=Ng(this.w,b).text}c=[];for(var d=q(ik(this)),e=d.next();!e.done;e=d.next()){e=e.value;var f=J.kd(e);f.active=e==b;c.push(f)}return c};T.prototype.getTextTracks=T.prototype.lc;T.prototype.ze=function(b){var c=Zj(this);null!=c&&(b=J.kf(c,b))&&(Ng(this.w,c).text=b,zj(this.m.a,b,!1),jk(this,b),this.G=b.language)};
T.prototype.selectTextTrack=T.prototype.ze;T.prototype.Qg=function(){Pd("selectEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. Please use SelectTextTrack.");var b=this.lc().filter(function(b){return"application/cea-608"==b.mimeType});0<b.length&&this.ze(b[0])};T.prototype.selectEmbeddedTextTrack=T.prototype.Qg;
T.prototype.ih=function(){Pd("usingEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. There should be no reason to know if the player is playing embedded text.");var b=this.a?Mh(this.a,"text"):null;return null!=b&&"application/cea-608"==b.mimeType};T.prototype.usingEmbeddedTextTrack=T.prototype.ih;
T.prototype.Ae=function(b,c,d){d=void 0===d?0:d;var e=Zj(this);null!=e&&(this.b.abr.enabled&&Wa("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack()."),(b=J.lf(e,b))&&J.yb(b)&&(Sj(this,e,b,!1),kk(this,b,c,d),this.qa=new Tg(b),ak(this,e.variants)))};T.prototype.selectVariantTrack=T.prototype.Ae;
T.prototype.Jd=function(){for(var b=[],c=q(hk(this)),d=c.next();!d.done;d=c.next())b.push(d.value.audio);return lk(b)};T.prototype.getAudioLanguagesAndRoles=T.prototype.Jd;T.prototype.Md=function(){return lk(ik(this))};T.prototype.getTextLanguagesAndRoles=T.prototype.Md;T.prototype.nf=function(){for(var b=[],c=q(hk(this)),d=c.next();!d.done;d=c.next())b.push(d.value.audio);return Array.from(mk(b))};T.prototype.getAudioLanguages=T.prototype.nf;T.prototype.Ff=function(){return Array.from(mk(ik(this)))};
T.prototype.getTextLanguages=T.prototype.Ff;T.prototype.xe=function(b,c){var d=Zj(this);null!=d&&(this.qa=new Ug(b,c||"",0),ek(this,d))};T.prototype.selectAudioLanguage=T.prototype.xe;T.prototype.ye=function(b,c){var d=Zj(this);null!=d&&(this.G=b,this.$=c||"",ek(this,d))};T.prototype.selectTextLanguage=T.prototype.ye;T.prototype.zb=function(){return this.ha};T.prototype.isTextTrackVisible=T.prototype.zb;
T.prototype.wc=function(b){var c=this;return r(function e(){var f,g,h,k;return v(e,function(e){switch(e.s){case 1:if(b==c.ha)return e["return"]();c.v&&c.v.m.setTextVisibility(b);c.ha=b;nk(c);if(c.b.streaming.alwaysStreamText||!c.a)return e["return"]();f=J;if(b){if(g=Zj(c),h=f.fc(g.textStreams,c.G,c.$),k=h[0])return u(e,Oh(c.a,k),0)}else{var l=c.a;l.A=!0;var p=l.c.get("text");p&&(Jh(p),l.c["delete"]("text"))}e.I(0)}})})};T.prototype.setTextTrackVisibility=T.prototype.wc;
T.prototype.Cf=function(){return this.c?new Date(1E3*this.c.presentationTimeline.f+1E3*this.f.currentTime):null};T.prototype.getPlayheadTimeAsDate=T.prototype.Cf;T.prototype.Ef=function(){return this.c?new Date(1E3*this.c.presentationTimeline.f):null};T.prototype.getPresentationStartTimeAsDate=T.prototype.Ef;T.prototype.Ic=function(){return this.v?this.v.Ic():{total:[],audio:[],video:[],text:[]}};T.prototype.getBufferedInfo=T.prototype.Ic;
T.prototype.getStats=function(){if(null==this.m)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:NaN,bufferingTime:NaN,switchHistory:[],stateHistory:[]};Bj(this.m,this.aa);Oj(this);var b=this.f;if(b.getVideoPlaybackQuality){b=b.getVideoPlaybackQuality();var c=this.m,d=Number(b.totalVideoFrames);c.v=Number(b.droppedVideoFrames);c.u=d}if(b=gk(this))this.m.w=b.bandwidth;b&&b.video&&(c=this.m,d=b.video.height||NaN,c.A=
b.video.width||NaN,c.m=d);this.g&&(b=this.g.getBandwidthEstimate(),this.m.l=b);b=this.m;c=b.A;d=b.m;for(var e=b.w,f=b.u,g=b.v,h=b.l,k=b.f>b.g?b.f-b.g:NaN,l=b.j,m=b.b,p=[],t=q(b.a.a),w=t.next();!w.done;w=t.next())w=w.value,p.push({timestamp:w.timestamp,id:w.id,type:w.type,fromAdaptation:w.fromAdaptation,bandwidth:w.bandwidth});return{width:c,height:d,streamBandwidth:e,decodedFrames:f,droppedFrames:g,estimatedBandwidth:h,loadLatency:k,playTime:l,bufferingTime:m,switchHistory:p,stateHistory:wj(b.o)}};
T.prototype.getStats=T.prototype.getStats;
T.prototype.addTextTrack=function(b,c,d,e,f,g){var h=Zj(this);if(null==h)return Promise.reject();var k=this.c.periods.indexOf(h)+1,l=(k>=this.c.periods.length?this.c.presentationTimeline.ka():this.c.periods[k].startTime)-h.startTime;if(Infinity==l)return Promise.reject(new A(1,4,4033));var m={id:this.tb++,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return 1},getSegmentReference:function(c){return 1!=c?null:new N(1,0,l,function(){return[b]},0,null)},
initSegmentReference:null,presentationTimeOffset:0,mimeType:e,codecs:f||"",kind:d,encrypted:!1,keyId:null,language:c,label:g||null,type:"text",primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null};this.ua.add(m);h.textStreams.push(m);return Oh(this.a,m).then(function(){if(!this.ea.a){var b=Mh(this.a,"text");b&&(Ng(this.w,h).text=b);this.ua["delete"](m);ek(this,h);Yj(this);return{id:m.id,active:!1,type:"text",bandwidth:0,language:c,label:g||null,kind:d,
width:null,height:null}}}.bind(this))};T.prototype.addTextTrack=T.prototype.addTextTrack;T.prototype.gd=function(b,c){this.Da.width=b;this.Da.height=c};T.prototype.setMaxHardwareResolution=T.prototype.gd;T.prototype.dd=function(){if(this.a){var b=this.a;if(b.f)b=!1;else if(b.o)b=!1;else{for(var c=q(b.c.values()),d=c.next();!d.done;d=c.next())d=d.value,d.Nb&&(d.Nb=!1,Rh(b,d,.1));b=!0}}else b=!1;return b};T.prototype.retryStreaming=T.prototype.dd;T.prototype.yf=function(){return this.c};
T.prototype.getManifest=T.prototype.yf;function Sj(b,c,d,e){Ng(b.w,c).variant=d;b=b.m.a;b.c!=d&&(b.c=d,b.a.push({timestamp:Date.now()/1E3,id:d.id,type:"variant",fromAdaptation:e,bandwidth:d.bandwidth}))}
function fk(b){b.u&&(b.u.Ja(b.f,"loadeddata"),b.u.Ja(b.f,"playing"),b.u.Ja(b.f,"pause"),b.u.Ja(b.f,"ended"));b.P&&(b.P.R(),b.P=null);b.l&&(b.l.R(),b.l=null);var c=b.j,d=Promise.all([b.g?b.g.stop():null,b.v?b.v.destroy():null,b.a?b.a.destroy():null,b.o?b.o.stop():null]).then(function(){return c?c.destroy():null});b.H&&(b.H.R(),b.H=null);b.S=!0;b.j=null;b.v=null;b.a=null;b.o=null;b.c=null;b.V=null;b.w.a.clear();b.ua.clear();b.m=null;return d}
function Cj(b){var c=sj();c.streaming.failureCallback=function(c){var d=[1001,1002,1003];b.Z()&&d.includes(c.code)&&(c.severity=1,b.dd())};c.textDisplayFactory=function(){return new ok(b.f)};return c}
function Qj(b,c){for(var d=0;d<c.length;d++){for(var e=c[d],f=new Map,g=q(e.variants),h=g.next();!h.done;h=g.next())if(h=h.value,h.video&&h.video.closedCaptions){h=h.video;for(var k=q(h.closedCaptions.keys()),l=k.next();!l.done;l=k.next())if(l=l.value,!f.has(l)){var m={id:b.tb++,originalId:l,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,presentationTimeOffset:0,mimeType:"application/cea-608",
codecs:"",kind:"caption",encrypted:!1,keyId:null,language:h.closedCaptions.get(l),label:null,type:"text",primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:h.roles,channelsCount:null,closedCaptions:null};f.set(l,m)}}f=q(f.values());for(g=f.next();!g.done;g=f.next())e.textStreams.push(g.value)}}n=T.prototype;
n.Cd=function(b){var c=this.a?Lh(this.a):null,d=this.a?Nh(this.a):null;b.forEach(J.filterNewPeriod.bind(null,this.j,c,d));c=Cb(b,function(b){return b.variants.some(J.yb)});if(0==c)throw new A(2,4,4032);if(c<b.length)throw new A(2,4,4011);b.forEach(function(b){J.rd(b.variants,this.b.restrictions,this.Da)&&this.a&&Zj(this)==b&&Yj(this);pk(this,b.variants)}.bind(this))};
n.Gc=function(b){var c=this.a?Lh(this.a):null,d=this.a?Nh(this.a):null;J.filterNewPeriod(this.j,c,d,b);c=b.variants;if(!c.some(J.yb))throw new A(2,4,4011);pk(this,b.variants);J.rd(c,this.b.restrictions,this.Da)&&this.a&&Zj(this)==b&&Yj(this);if(b=this.j?this.j.a:null)for(c=q(c),d=c.next();!d.done;d=c.next()){d=q(d.value.drmInfos);for(var e=d.next();!e.done;e=d.next())if(e=e.value,e.keySystem==b.keySystem){e=q(e.initData||[]);for(var f=e.next();!f.done;f=e.next())f=f.value,Ec(this.j,f.initDataType,
f.initData)}}};function kk(b,c,d,e){d=void 0===d?!1:d;e=void 0===e?0:e;b.S?(b.F=c,b.sb=d,b.Za=e):(Uh(b.a,c,d,e),qk(b,new C("variantchanged")))}function jk(b,c){b.S?b.B=c:(Th(b.a,c,!0,0),qk(b,new C("textchanged")))}function Xj(b,c){function d(b,c){if(!b)return null;var d=b.findSegmentPosition(c-g.startTime);return null==d?null:(d=b.getSegmentReference(d))?d.startTime+g.startTime:null}var e=Lh(b.a),f=Nh(b.a),g=Zj(b);e=d(e,c);f=d(f,c);return null!=f&&null!=e?Math.max(f,e):null!=f?f:null!=e?e:c}
function ck(b,c){b.m&&Bj(b.m,b.aa);b.aa=c;Oj(b);if(b.l){var d=b.l.b;c!=d.g&&(d.g=c,vh(d,d.f))}b.dispatchEvent(new C("buffering",{buffering:c}))}function Oj(b){if(b.m){var c=b.m.o,d=b.aa;null==c.a?c.a={timestamp:Date.now()/1E3,state:xj(c,d),duration:0}:(b=Date.now()/1E3,d=xj(c,d),c.a.duration=b-c.a.timestamp,c.a.state!=d&&(c.b.push(c.a),c.a={timestamp:b,state:d,duration:0}))}}n.Vg=function(){this.P&&Yg(this.P,!0);this.a&&Yh(this.a)};
function ak(b,c){try{pk(b,c)}catch(e){return b.jb(e),null}var d=c.filter(function(b){return J.yb(b)});d=b.qa.create(d);b.g.setVariants(Array.from(d.values()));return b.g.chooseVariant()}function ek(b,c){var d=ak(b,c.variants);d&&(Sj(b,c,d,!0),kk(b,d,!0));(d=J.fc(c.textStreams,b.G,b.$)[0]||null)&&(b.b.streaming.alwaysStreamText||b.zb())&&(Ng(b.w,c).text=d,zj(b.m.a,d,!0),jk(b,d));Tj(b)}
n.Wf=function(b){try{this.S=!0;this.g.disable();var c=ak(this,b.variants),d=J.fc(b.textStreams,this.G,this.$)[0]||null;this.F&&(b.variants.includes(this.F)&&(c=this.F),this.F=null);this.B&&(b.textStreams.includes(this.B)&&(d=this.B),this.B=null);c&&Sj(this,b,c,!0);if(d){var e=d;Ng(this.w,b).text=e;zj(this.m.a,e,!0)}var f=this.a,g=f.c.get("video");if(g)var h=f.b.periods[g.Ta];else{var k=f.c.get("audio");h=k?f.b.periods[k.Ta]:null}var l=c?c.audio:null,m;if(m=!h&&l&&d){b=d;var p=I(this.b.preferredTextLanguage),
t=I(l.language),w=I(b.language);m=Hd(w,p)&&!Hd(t,w)}m&&(this.wc(!0),nk(this));return this.b.streaming.alwaysStreamText||this.zb()?{variant:c,text:d}:{variant:c,text:null}}catch(x){return this.jb(x),{variant:null,text:null}}};n.$e=function(){this.S=!1;this.b.abr.enabled&&this.g.enable();this.F&&(Uh(this.a,this.F,this.sb,this.Za),this.F=null);this.B&&(Th(this.a,this.B,!0,0),this.B=null)};n.dg=function(){this.o&&this.o.update&&this.o.update()};n.pg=function(){this.l&&this.l.Tb()};
function Tj(b){qk(b,new C("adaptation"))}function Yj(b){qk(b,new C("trackschanged"))}function nk(b){b.dispatchEvent(new C("texttrackvisibility"))}n.jb=function(b){if(!this.ea.a){var c=new C("error",{detail:b});this.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}};n.Zb=function(b){this.dispatchEvent(b)};function Mj(b,c,d){b.Zb(new C(c,{detail:{schemeIdUri:d.schemeIdUri,value:d.value,startTime:d.startTime,endTime:d.endTime,id:d.id,eventElement:d.eventElement}}))}
n.sg=function(){if(this.f.error){var b=this.f.error.code;if(1!=b){var c=this.f.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));this.jb(new A(2,3,3016,b,c,this.f.error.message))}}};
function bk(b,c){var d=Zj(b),e=!1,f=Object.keys(c),g=1==f.length&&"00"==f[0];f.length&&d.variants.forEach(function(b){J.Gf(b).forEach(function(d){var f=b.allowedByKeySystem;d.keyId&&(d=c[g?"00":d.keyId],b.allowedByKeySystem=!!d&&!Gj.includes(d));f!=b.allowedByKeySystem&&(e=!0)})});f=Lh(b.a);var h=Nh(b.a);(f=J.Nd(f,h,d.variants))&&!f.allowedByKeySystem&&ek(b,d);e&&(Yj(b),ak(b,d.variants))}function Rj(b,c,d){0<c&&(b.Z()||b.Fe(c));d<b.ka()&&(b.Z()||b.Ia(d))}
function pk(b,c){var d=b.j?Wb(b.j.K):{},e=Object.keys(d);e=e.length&&"00"==e[0];for(var f=!1,g=!1,h=[],k=[],l=q(c),m=l.next();!m.done;m=l.next()){m=m.value;var p=[];m.audio&&p.push(m.audio);m.video&&p.push(m.video);p=q(p);for(var t=p.next();!t.done;t=p.next())if(t=t.value,t.keyId){var w=d[e?"00":t.keyId];w?Gj.includes(w)&&(k.includes(w)||k.push(w)):h.includes(t.keyId)||h.push(t.keyId)}m.allowedByApplication?m.allowedByKeySystem&&(f=!0):g=!0}if(!f)throw new A(2,4,4012,{hasAppRestrictions:g,missingKeys:h,
restrictedKeyStatuses:k});}function qk(b,c){r(function e(){return v(e,function(e){switch(e.s){case 1:return u(e,Promise.resolve(),2);case 2:b.ea.a||b.dispatchEvent(c),e.s=0}})})}function mk(b){var c=new Set;b=q(b);for(var d=b.next();!d.done;d=b.next())(d=d.value)&&d.language?c.add(I(d.language)):c.add("und");return c}
function lk(b){var c=new Map,d=[""];b=q(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value;e="und";var g=d;f&&f.language&&(e=I(f.language));f&&f.roles.length&&(g=f.roles);c.has(e)||c.set(e,new Set);f=q(g);for(g=f.next();!g.done;g=f.next())g=g.value,c.get(e).add(g)}var h=[];c.forEach(function(b,c){for(var d=q(b),e=d.next();!e.done;e=d.next())h.push({language:c,role:e.value})});return h}function hk(b){b=Zj(b);return null==b?[]:b.variants.filter(function(b){return J.yb(b)})}
function ik(b){var c=Zj(b);return null==c?[]:c.textStreams.filter(function(c){return!b.ua.has(c)})}function Zj(b){if(null==b.c||null==b.l)return null;var c=zh(b.l),d=null;b=q(b.c.periods);for(var e=b.next();!e.done;e=b.next())e=e.value,e.startTime<=c&&(d=e);return d}function gk(b){var c=Zj(b);return c?Ng(b.w,c).variant:null};function rk(b,c,d){var e=void 0==c.expiration?Infinity:c.expiration,f=c.presentationTimeline.ka();c=sk(c.periods[0]);return{offlineUri:null,originalManifestUri:b,duration:f,size:0,expiration:e,tracks:c,appMetadata:d}}function tk(b,c){var d=fj(new dj(b.Ga(),b.na()),c.periods[0],new S(null,0)),e=c.appMetadata||{};d=sk(d);return{offlineUri:b.toString(),originalManifestUri:c.originalManifestUri,duration:c.duration,size:c.size,expiration:c.expiration,tracks:d,appMetadata:e}}
function sk(b){var c=[],d=J.Bf(b.variants);d=q(d);for(var e=d.next();!e.done;e=d.next())c.push(J.pd(e.value));b=q(b.textStreams);for(d=b.next();!d.done;d=b.next())c.push(J.kd(d.value));return c};function uk(){this.a={}}function vk(b,c,d){d=d.endTime-d.startTime;return wk(b,c)*d}function wk(b,c){var d=b.a[c];null==d&&(d=0);return d};function xk(b,c){for(var d={width:Infinity,height:Infinity},e=q(b.periods),f=e.next();!f.done;f=e.next())f=f.value,f.variants=f.variants.filter(function(b){return J.Qc(b,c,d)})}function yk(b){b=q(b.periods);for(var c=b.next();!c.done;c=b.next())c=c.value,c.variants=c.variants.filter(function(b){var c=!0;b.audio&&(c=c&&ud(b.audio));b.video&&(c=c&&ud(b.video));return c})}
function zk(b,c){for(var d=q(b.periods),e=d.next();!e.done;e=d.next())e=e.value,e.variants=e.variants.filter(function(b){return Rc(c,b)})}function Ak(b){var c=new Bk;b.periods.forEach(function(b,d){var e=Ck(b.variants);if(0==d){e=q(e.a);for(var f=e.next();!f.done;f=e.next())c.add(f.value)}else Dk(c,e)});b=q(b.periods);for(var d=b.next();!d.done;d=b.next())d=d.value,d.variants=d.variants.filter(function(b){return c.contains(new Ek(b))})}
function Fk(b,c){var d=new Bk;b.periods.forEach(function(b,f){0<f&&(b.variants=b.variants.filter(function(b){return d.contains(new Ek(b))}));c(b);d=Ck(b.variants)})}function Ek(b){var c=b.audio;b=b.video;this.b=c?c.mimeType:null;this.a=c?c.codecs.split(".")[0]:null;this.f=b?b.mimeType:null;this.c=b?b.codecs.split(".")[0]:null}function Bk(){this.a=[]}Bk.prototype.add=function(b){this.contains(b)||this.a.push(b)};function Dk(b,c){b.a=b.a.filter(function(b){return c.contains(b)})}
Bk.prototype.contains=function(b){return this.a.some(function(c){return b.b==c.b&&b.a==c.a&&b.f==c.f&&b.c==c.c})};function Ck(b){var c=new Bk;b=q(b);for(var d=b.next();!d.done;d=b.next())c.add(new Ek(d.value));return c};function U(b){var c=this;if(b&&b.constructor!=T)throw new A(2,9,9008);this.b=this.a=null;b?(this.a=b.b,this.b=b.Jb()):(this.a=sj(),this.b=new E);this.g=!1;this.c=[];this.f=[];var d=!b;this.j=new kj(function(){return r(function f(){var b;return v(f,function(f){switch(f.s){case 1:return b=function(){},u(f,Promise.all(c.f.map(function(c){return c.then(b,b)})),2);case 2:if(!d){f.I(3);break}return u(f,c.b.destroy(),3);case 3:c.a=null,c.b=null,f.s=0}})})})}y("shaka.offline.Storage",U);
function Gk(){return Ki()}U.support=Gk;U.prototype.destroy=function(){return this.j.destroy()};U.prototype.destroy=U.prototype.destroy;
U.prototype.configure=function(b){var c=!1;null!=b.trackSelectionCallback&&(c=!0,b.offline=b.offline||{},b.offline.trackSelectionCallback=b.trackSelectionCallback);null!=b.progressCallback&&(c=!0,b.offline=b.offline||{},b.offline.progressCallback=b.progressCallback);null!=b.usePersistentLicense&&(c=!0,b.offline=b.offline||{},b.offline.usePersistentLicense=b.usePersistentLicense);c&&Pd("Storage.configure with OfflineConfig","Please configure storage with a player configuration.");return uj(this.a,
b)};U.prototype.configure=U.prototype.configure;U.prototype.Jb=function(){return this.b};U.prototype.getNetworkingEngine=U.prototype.Jb;
U.prototype.store=function(b,c,d){var e=this;return Hk(this,Ik(this,b,c||{},function(){return r(function g(){var c,k;return v(g,function(g){switch(g.s){case 1:return d&&"string"!=typeof d?(Pd("Storing with a manifest parser factory","Please register a manifest parser and for the mime-type."),c=d,g["return"](new c)):u(g,vf(b,e.b,e.a.manifest.retryParameters,d),2);case 2:return k=g.C,g["return"](k)}})})}))};U.prototype.store=U.prototype.store;
function Ik(b,c,d,e){return r(function g(){var h,k,l,m,p,t,w,x,F,R;return v(g,function(g){switch(g.s){case 1:Jk();if(b.g)return g["return"](Promise.reject(new A(2,9,9006)));b.g=!0;return u(g,Kk(b,c,e),2);case 2:h=g.C;Lk(b);k=!h.presentationTimeline.Z()&&!h.presentationTimeline.fb();if(!k)throw new A(2,9,9005,c);l=null;m=new Ci;t=p=null;za(g,3,4);return u(g,Mk(b,h,function(b){t=t||b}),6);case 6:l=g.C;Lk(b);if(t)throw t;Nk(b,h,l);return u(g,m.init(),7);case 7:return Lk(b),u(g,Ei(m),8);case 8:return p=
g.C,Lk(b),u(g,Ok(b,p.na,l,h,c,d),9);case 9:w=g.C;Lk(b);if(t)throw t;return u(g,p.na.addManifests([w]),10);case 10:return x=g.C,Lk(b),F=new bj("manifest",p.path.Ga,p.path.na,x[0]),g["return"](tk(F,w));case 4:return Da(g),b.g=!1,b.c=[],u(g,m.destroy(),11);case 11:if(!l){g.I(12);break}return u(g,l.destroy(),12);case 12:Ea(g,0);break;case 3:R=Ca(g);if(!p){g.I(14);break}return u(g,p.na.removeSegments(b.c,function(){}),14);case 14:throw t||R;}})})}
function Nk(b,c,d){xk(c,b.a.restrictions);yk(c);zk(c,d);Ak(c);Fk(c,function(c){for(var d=[],e=q(c.variants),h=e.next();!h.done;h=e.next())d.push(J.pd(h.value));e=q(c.textStreams);for(h=e.next();!h.done;h=e.next())d.push(J.kd(h.value));d=b.a.offline.trackSelectionCallback(d);var k=new Set,l=new Set;d=q(d);for(e=d.next();!e.done;e=d.next())e=e.value,"variant"==e.type&&k.add(e.id),"text"==e.type&&l.add(e.id);c.variants=c.variants.filter(function(b){return k.has(b.id)});c.textStreams=c.textStreams.filter(function(b){return l.has(b.id)})});
Pk(c)}function Ok(b,c,d,e,f,g){return r(function k(){var l,m,p,t;return v(k,function(k){switch(k.s){case 1:return l=rk(f,e,g),m=new ri(b.b,function(c,d){l.size=d;b.a.offline.progressCallback(l,c)}),Aa(k,2),t=p=Qk(b,m,c,d,e,f,g),u(k,ui(m),4);case 4:return t.size=k.C,k["return"](p);case 2:return Da(k),u(k,m.destroy(),5);case 5:Ea(k,0)}})})}U.prototype.remove=function(b){return Hk(this,Rk(this,b))};U.prototype.remove=U.prototype.remove;
function Rk(b,c){Jk();var d=cj(c);if(null==d||"manifest"!=d.a)return Promise.reject(new A(2,9,9004,c));var e=new Ci;return lj([e],function(){return r(function g(){var c,k,l;return v(g,function(g){switch(g.s){case 1:return u(g,e.init(),2);case 2:return u(g,Gi(e,d.Ga(),d.na()),3);case 3:return c=g.C,u(g,c.getManifests([d.key()]),4);case 4:return k=g.C,l=k[0],u(g,Promise.all([Sk(b,l,e),Tk(b,c,d,l)]),0)}})})})}
function Uk(b,c){for(var d=[],e=q(b.periods),f=e.next();!f.done;f=e.next()){f=q(f.value.streams);for(var g=f.next();!g.done;g=f.next())g=g.value,c&&"video"==g.contentType?d.push({contentType:Xb(g.mimeType,g.codecs),robustness:b.drmInfo.videoRobustness}):c||"audio"!=g.contentType||d.push({contentType:Xb(g.mimeType,g.codecs),robustness:b.drmInfo.audioRobustness})}return d}function Sk(b,c,d){return r(function f(){return v(f,function(f){switch(f.s){case 1:return u(f,Vk(b.b,b.a.drm,d,c),0)}})})}
function Tk(b,c,d,e){function f(){k+=1;b.a.offline.progressCallback(l,k/h)}var g=Wk(e),h=g.length+1,k=0,l=tk(d,e);return Promise.all([c.removeSegments(g,f),c.removeManifests([d.key()],f)])}U.prototype.Kg=function(){return Hk(this,Xk(this))};U.prototype.removeEmeSessions=U.prototype.Kg;
function Xk(b){Jk();var c=b.b,d=b.a.drm,e=new Ci;return lj([e],function(){return r(function g(){var b,k,l,m,p,t,w;return v(g,function(g){switch(g.s){case 1:return u(g,e.init(),2);case 2:b=!1,k=[],Hi(e,function(b){return k.push(b)}),l=q(k),m=l.next();case 3:if(m.done){g.I(5);break}p=m.value;return u(g,p.getAll(),6);case 6:return t=g.C,u(g,oj(d,c,t),7);case 7:return w=g.C,u(g,p.remove(w),8);case 8:w.length!=t.length&&(b=!0);m=l.next();g.I(3);break;case 5:return g["return"](!b)}})})})}
U.prototype.list=function(){return Hk(this,Yk())};U.prototype.list=U.prototype.list;
function Yk(){function b(b,d){return r(function h(){var e;return v(h,function(f){switch(f.s){case 1:return u(f,d.getAllManifests(),2);case 2:e=f.C,e.forEach(function(d,e){var f=tk(new bj("manifest",b.Ga,b.na,e),d);c.push(f)}),f.s=0}})})}Jk();var c=[],d=new Ci;return lj([d],function(){return r(function f(){var c;return v(f,function(f){switch(f.s){case 1:return u(f,d.init(),2);case 2:return c=Promise.resolve(),Fi(d,function(d,f){c=c.then(function(){return b(d,f)})}),u(f,c,0)}})})}).then(function(){return c})}
function Kk(b,c,d){return r(function f(){var g,h,k,l,m,p;return v(f,function(f){switch(f.s){case 1:return g=null,h=b.b,k={networkingEngine:h,filterAllPeriods:function(){},filterNewPeriod:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(b){g=b}},u(f,d(),2);case 2:return l=f.C,l.configure(b.a.manifest),Lk(b),Aa(f,3),u(f,l.start(c,k),5);case 5:return m=f.C,Lk(b),p=Zk(m),u(f,Promise.all(Array.from(p).map(function(b){return b.createSegmentIndex()})),6);case 6:Lk(b);
if(g)throw g;return f["return"](m);case 3:return Da(f),u(f,l.stop(),7);case 7:Ea(f,0)}})})}function Mk(b,c,d){return r(function f(){var g,h,k;return v(f,function(f){switch(f.s){case 1:return g=new nc({Pb:b.b,onError:d,Xc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),h=J.Id(c),k=b.a,g.configure(k.drm),u(f,sc(g,h,k.offline.usePersistentLicense),2);case 2:return u(f,Cc(g),3);case 3:return u(f,Dc(g),4);case 4:return f["return"](g)}})})}
function Qk(b,c,d,e,f,g,h){var k=new uk,l=f.periods.map(function(e){return $k(b,c,d,k,f,e)}),m=e.a,p=Jc(e);if(m&&b.a.offline.usePersistentLicense){if(!p.length)throw new A(2,9,9007,g);m.initData=[]}return{originalManifestUri:g,duration:f.presentationTimeline.ka(),size:0,expiration:e.kc(),periods:l,sessionIds:b.a.offline.usePersistentLicense?p:[],drmInfo:m,appMetadata:h}}
function $k(b,c,d,e,f,g){f.periods.forEach(function(b){b.variants.forEach(function(b){var c=b.audio,d=b.video;c&&!d&&(e.a[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(e.a[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var f=c.bandwidth||393216,g=d.bandwidth||b.bandwidth-f;0>=g&&(g=b.bandwidth);e.a[c.id]=f;e.a[d.id]=g}});b.textStreams.forEach(function(b){e.a[b.id]=52})});var h=Zk(f),k=new Map;h=q(h);for(var l=h.next();!l.done;l=h.next()){l=l.value;var m=al(b,c,d,e,f,l);k.set(l.id,m)}g.variants.forEach(function(b){b.audio&&
k.get(b.audio.id).variantIds.push(b.id);b.video&&k.get(b.video.id).variantIds.push(b.id)});return{startTime:g.startTime,streams:Array.from(k.values())}}
function al(b,c,d,e,f,g){var h={id:g.id,originalId:g.originalId,primary:g.primary,presentationTimeOffset:g.presentationTimeOffset||0,contentType:g.type,mimeType:g.mimeType,codecs:g.codecs,frameRate:g.frameRate,kind:g.kind,language:g.language,label:g.label,width:g.width||null,height:g.height||null,initSegmentKey:null,encrypted:g.encrypted,keyId:g.keyId,segments:[],variantIds:[]};f=f.presentationTimeline.Lb();var k=g.id;bl(g,f,function(f){si(c,k,cl(b,f),vk(e,g.id,f),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);
h.segments.push({startTime:f.startTime,endTime:f.endTime,dataKey:c[0]})})})});(f=g.initSegmentReference)&&si(c,k,cl(b,f),.5*wk(e,g.id),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);h.initSegmentKey=c[0]})});return h}function bl(b,c,d){c=b.findSegmentPosition(c);for(var e=null==c?null:b.getSegmentReference(c);e;)d(e),e=b.getSegmentReference(++c)}function Lk(b){if(b.j.a)throw new A(2,9,7001);}function Jk(){if(!Ki())throw new A(2,9,9E3);}
function cl(b,c){var d=b.a.streaming.retryParameters;d=Jb(c.c(),d);if(0!=c.b||null!=c.a)d.headers.Range="bytes="+c.b+"-"+(null==c.a?"":c.a);return d}function Hk(b,c){return r(function e(){return v(e,function(e){switch(e.s){case 1:return b.f.push(c),Aa(e,2),u(e,c,4);case 4:return e["return"](e.C);case 2:Da(e),Bb(b.f,c),Ea(e,0)}})})}
function Wk(b){var c=[];b.periods.forEach(function(b){b.streams.forEach(function(b){null!=b.initSegmentKey&&c.push(b.initSegmentKey);b.segments.forEach(function(b){c.push(b.dataKey)})})});return c}U.deleteAll=function(){return r(function c(){var d;return v(c,function(c){switch(c.s){case 1:return d=new Ci,Aa(c,2),u(c,d.erase(),2);case 2:return Da(c),u(c,d.destroy(),5);case 5:Ea(c,0)}})})};
function Vk(b,c,d,e){return r(function g(){var h,k,l;return v(g,function(g){switch(g.s){case 1:if(!e.drmInfo)return g["return"]();h=Ii(d);k=e.sessionIds.map(function(b){return{sessionId:b,keySystem:e.drmInfo.keySystem,licenseUri:e.drmInfo.licenseServerUri,serverCertificate:e.drmInfo.serverCertificate,audioCapabilities:Uk(e,!1),videoCapabilities:Uk(e,!0)}});return u(g,oj(c,b,k),2);case 2:return l=g.C,u(g,h.remove(l),3);case 3:return u(g,h.add(k.filter(function(b){return-1==l.indexOf(b.sessionId)})),
0)}})})}function Zk(b){var c=new Set;b=q(b.periods);for(var d=b.next();!d.done;d=b.next()){d=d.value;for(var e=q(d.textStreams),f=e.next();!f.done;f=e.next())c.add(f.value);d=q(d.variants);for(e=d.next();!e.done;e=d.next())e=e.value,e.audio&&c.add(e.audio),e.video&&c.add(e.video)}return c}function Pk(b){if(0==b.periods.length)throw new A(2,4,4014);b=q(b.periods);for(var c=b.next();!c.done;c=b.next())dl(c.value)}
function dl(b){b.variants.map(function(b){return b.video});var c=new Set(b.variants.map(function(b){return b.audio}));b=b.textStreams;for(var d=q(c),e=d.next();!e.done;e=d.next()){e=q(c);for(var f=e.next();!f.done;f=e.next());}c=q(b);for(d=c.next();!d.done;d=c.next())for(d=q(b),e=d.next();!e.done;e=d.next());}Hj.offline=Gk;function el(){for(var b=0;b<fl.length;++b)fl[b].Ze()}y("shaka.polyfill.installAll",el);var fl=[];function gl(b,c){c=c||0;for(var d={priority:c,Ze:b},e=0;e<fl.length;e++)if(fl[e].priority<c){fl.splice(e,0,d);return}fl.push(d)}y("shaka.polyfill.register",gl);function hl(b){var c=b.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();if("function"===typeof Event)var d=new Event(c,b);else d=document.createEvent("Event"),d.initEvent(c,b.bubbles,b.cancelable);b.target.dispatchEvent(d)}
gl(function(){if(window.Document){var b=Element.prototype;b.requestFullscreen=b.requestFullscreen||b.mozRequestFullScreen||b.msRequestFullscreen||b.webkitRequestFullscreen;b=Document.prototype;b.exitFullscreen=b.exitFullscreen||b.mozCancelFullScreen||b.msExitFullscreen||b.webkitExitFullscreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,
"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",hl);document.addEventListener("webkitfullscreenerror",hl);document.addEventListener("mozfullscreenchange",hl);document.addEventListener("mozfullscreenerror",hl);document.addEventListener("MSFullscreenChange",hl);document.addEventListener("MSFullscreenError",hl)}});gl(function(){ac("CrKey")&&delete window.indexedDB});var il;function jl(b,c,d){if("input"==b)switch(this.type){case "range":b="change"}il.call(this,b,c,d)}gl(function(){ac("Trident/")&&HTMLInputElement.prototype.addEventListener!=jl&&(il=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=jl)});gl(function(){});function kl(){var b=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(c){for(var d=[],e=0;e<arguments.length;++e)d[e]=arguments[e];d=b.apply(this,d);d.abort=function(){};return d}}function ll(){var b=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(c,d){return b.call(this,c,d-.001)}}
function ml(){var b=MediaSource.prototype.endOfStream;MediaSource.prototype.endOfStream=function(c){for(var d=[],e=0;e<arguments.length;++e)d[e]=arguments[e];for(var h=e=0;h<this.sourceBuffers.length;++h){var k=this.sourceBuffers[h];k=k.buffered.end(k.buffered.length-1);e=Math.max(e,k)}if(!isNaN(this.duration)&&e<this.duration)for(this.Rd=!0,e=0;e<this.sourceBuffers.length;++e)this.sourceBuffers[e].Ad=!1;return b.apply(this,d)};var c=!1,d=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=
function(b){for(var e=[],g=0;g<arguments.length;++g)e[g]=arguments[g];e=d.apply(this,e);e.mediaSource_=this;e.addEventListener("updateend",nl,!1);c||(this.addEventListener("sourceclose",ol,!1),c=!0);return e}}function nl(b){var c=b.target,d=c.mediaSource_;if(d.Rd){b.preventDefault();b.stopPropagation();b.stopImmediatePropagation();c.Ad=!0;for(b=0;b<d.sourceBuffers.length;++b)if(0==d.sourceBuffers[b].Ad)return;d.Rd=!1}}
function ol(b){b=b.target;for(var c=0;c<b.sourceBuffers.length;++c)b.sourceBuffers[c].removeEventListener("updateend",nl,!1);b.removeEventListener("sourceclose",ol,!1)}function pl(){var b=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(c){return"mp2t"==c.split(/ *; */)[0].split("/")[1]?!1:b(c)}}function ql(){var b=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(c){return"opus"!=$b(c)[0]&&b(c)}}
function tl(){var b=MediaSource.isTypeSupported,c=/^dv(?:he|av)\./;MediaSource.isTypeSupported=function(d){for(var e=d.split(/ *; */),f=e[0],g={},h=1;h<e.length;++h){var k=e[h].split("="),l=k[0];k=k[1].replace(/"(.*)"/,"$1");g[l]=k}e=g.codecs;if(!e)return b(d);var m=!1,p=!1;d=e.split(",").filter(function(b){if(c.test(b))return p=!0,!1;/^(hev|hvc)1\.2/.test(b)&&(m=!0);return!0});p&&(m=!1);g.codecs=d.join(",");m&&(g.eotf="smpte2084");for(var t in g)f+="; "+t+'="'+g[t]+'"';return cast.__platform__.canDisplayType(f)}}
gl(function(){if(window.MediaSource)if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType)tl();else if(navigator.vendor&&navigator.vendor.includes("Apple")){var b=navigator.appVersion;pl();if(b.includes("Version/8"))window.MediaSource=null;else if(b.includes("Version/9"))kl();else if(b.includes("Version/10"))kl(),ml();else if(b.includes("Version/11")||b.includes("Version/12"))kl(),ll()}else ac("Tizen")&&ql()});function ul(b){this.f=[];this.b=[];this.a=[];(new P).va("pssh",this.c.bind(this)).parse(b.buffer)}ul.prototype.c=function(b){if(!(1<b.version)){var c=kc(b.reader.hb(16)),d=[];if(0<b.version)for(var e=b.reader.J(),f=0;f<e;++f){var g=kc(b.reader.hb(16));d.push(g)}e=b.reader.J();b.reader.O(e);this.b.push.apply(this.b,d);this.f.push(c);this.a.push({start:b.start,end:b.start+b.size-1})}};function vl(b,c){try{var d=new wl(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}
function wl(b,c){this.keySystem=b;for(var d=!1,e=0;e<c.length;++e){var f=c[e],g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=0;k<f.audioCapabilities.length;++k){var l=f.audioCapabilities[k];if(l.contentType){h=!0;var m=l.contentType.split(";")[0];MSMediaKeys.isTypeSupported(this.keySystem,m)&&(g.audioCapabilities.push(l),d=!0)}}if(f.videoCapabilities)for(k=
0;k<f.videoCapabilities.length;++k)l=f.videoCapabilities[k],l.contentType&&(h=!0,m=l.contentType.split(";")[0],MSMediaKeys.isTypeSupported(this.keySystem,m)&&(g.videoCapabilities.push(l),d=!0));h||(d=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==f.persistentState&&(d=!1);if(d){this.a=g;return}}d=Error("Unsupported keySystem");d.name="NotSupportedError";d.code=DOMException.NOT_SUPPORTED_ERR;throw d;}wl.prototype.createMediaKeys=function(){var b=new xl(this.keySystem);return Promise.resolve(b)};
wl.prototype.getConfiguration=function(){return this.a};function yl(b){var c=this.mediaKeys;c&&c!=b&&zl(c,null);delete this.mediaKeys;return(this.mediaKeys=b)?zl(b,this):Promise.resolve()}function xl(b){this.a=new MSMediaKeys(b);this.b=new Nb}xl.prototype.createSession=function(b){b=b||"temporary";if("temporary"!=b)throw new TypeError("Session type "+b+" is unsupported on this platform.");return new Al(this.a,b)};xl.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
function zl(b,c){function d(){c.msSetMediaKeys(e.a);c.removeEventListener("loadedmetadata",d)}Ob(b.b);if(!c)return Promise.resolve();G(b.b,c,"msneedkey",Bl);var e=b;try{return 1<=c.readyState?c.msSetMediaKeys(b.a):c.addEventListener("loadedmetadata",d),Promise.resolve()}catch(f){return Promise.reject(f)}}function Al(b){D.call(this);this.c=null;this.g=b;this.b=this.a=null;this.f=new Nb;this.sessionId="";this.expiration=NaN;this.closed=new z;this.keyStatuses=new Cl}Pa(Al,D);n=Al.prototype;
n.generateRequest=function(b,c){this.a=new z;try{this.c=this.g.createSession("video/mp4",new Uint8Array(c),null),G(this.f,this.c,"mskeymessage",this.jg.bind(this)),G(this.f,this.c,"mskeyadded",this.hg.bind(this)),G(this.f,this.c,"mskeyerror",this.ig.bind(this)),Dl(this,"status-pending")}catch(d){this.a.reject(d)}return this.a};n.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};n.update=function(b){this.b=new z;try{this.c.update(new Uint8Array(b))}catch(c){this.b.reject(c)}return this.b};
n.close=function(){try{this.c.close(),this.closed.resolve(),Ob(this.f)}catch(b){this.closed.reject(b)}return this.closed};n.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Bl(b){if(b.initData){var c=document.createEvent("CustomEvent");c.initCustomEvent("encrypted",!1,!1,null);c.initDataType="cenc";c.initData=El(b.initData);this.dispatchEvent(c)}}
function El(b){if(!b)return b;var c=new ul(b);if(1>=c.a.length)return b;for(var d=[],e=0;e<c.a.length;e++)d.push(b.subarray(c.a[e].start,c.a[e].end+1));b=[];c={};e=q(d);for(d=e.next();!d.done;c={nc:c.nc},d=e.next())c.nc=d.value,b.some(function(b){return function(c){return lc(c,b.nc)}}(c))||b.push(c.nc);c=0;e=q(b);for(d=e.next();!d.done;d=e.next())c+=d.value.length;c=new Uint8Array(c);e=0;b=q(b);for(d=b.next();!d.done;d=b.next())d=d.value,c.set(d,e),e+=d.length;return c}
n.jg=function(b){this.a&&(this.a.resolve(),this.a=null);this.dispatchEvent(new C("message",{messageType:void 0==this.keyStatuses.a?"license-request":"license-renewal",message:b.message.buffer}))};n.hg=function(){this.a?(Dl(this,"usable"),this.a.resolve(),this.a=null):this.b&&(Dl(this,"usable"),this.b.resolve(),this.b=null)};
n.ig=function(){var b=Error("EME PatchedMediaKeysMs key error");b.errorCode=this.c.error;if(null!=this.a)this.a.reject(b),this.a=null;else if(null!=this.b)this.b.reject(b),this.b=null;else switch(this.c.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Dl(this,"output-not-allowed");break;default:Dl(this,"internal-error")}};function Dl(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;b.dispatchEvent(new C("keystatuseschange"))}
function Cl(){this.size=0;this.a=void 0}var Fl;n=Cl.prototype;n.forEach=function(b){this.a&&b(this.a,Fl)};n.get=function(b){if(this.has(b))return this.a};n.has=function(b){var c=Fl;return this.a&&lc(new Uint8Array(b),new Uint8Array(c))?!0:!1};n.entries=function(){};n.keys=function(){};n.values=function(){};
gl(function(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(Fl=(new Uint8Array([0])).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=yl,window.MediaKeys=xl,window.MediaKeySystemAccess=wl,navigator.requestMediaKeySystemAccess=vl)});function Gl(){return Promise.reject(Error("The key system specified is not supported."))}function Hl(b){return null==b?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function Il(){throw new TypeError("Illegal constructor.");}Il.prototype.createSession=function(){};Il.prototype.setServerCertificate=function(){};function Jl(){throw new TypeError("Illegal constructor.");}Jl.prototype.getConfiguration=function(){};Jl.prototype.createMediaKeys=function(){};
gl(function(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Gl,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Hl,window.MediaKeys=Il,window.MediaKeySystemAccess=Jl)},-10);var Kl="";function Ll(b){var c=Kl;return c?c+b.charAt(0).toUpperCase()+b.slice(1):b}function Ml(b,c){try{var d=new Nl(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}function Ol(b){var c=this.mediaKeys;c&&c!=b&&Pl(c,null);delete this.mediaKeys;(this.mediaKeys=b)&&Pl(b,this);return Promise.resolve()}
function Nl(b,c){this.a=this.keySystem=b;var d=!1;"org.w3.clearkey"==b&&(this.a="webkit-org.w3.clearkey",d=!1);var e=!1;var f=document.getElementsByTagName("video");f=f.length?f[0]:document.createElement("video");for(var g=0;g<c.length;++g){var h=c[g],k={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:h.initDataTypes,sessionTypes:["temporary"],label:h.label},l=!1;if(h.audioCapabilities)for(var m=0;m<h.audioCapabilities.length;++m){var p=
h.audioCapabilities[m];if(p.contentType){l=!0;var t=p.contentType.split(";")[0];f.canPlayType(t,this.a)&&(k.audioCapabilities.push(p),e=!0)}}if(h.videoCapabilities)for(m=0;m<h.videoCapabilities.length;++m)p=h.videoCapabilities[m],p.contentType&&(l=!0,f.canPlayType(p.contentType,this.a)&&(k.videoCapabilities.push(p),e=!0));l||(e=f.canPlayType("video/mp4",this.a)||f.canPlayType("video/webm",this.a));"required"==h.persistentState&&(d?(k.persistentState="required",k.sessionTypes=["persistent-license"]):
e=!1);if(e){this.b=k;return}}d="Unsupported keySystem";if("org.w3.clearkey"==b||"com.widevine.alpha"==b)d="None of the requested configurations were supported.";d=Error(d);d.name="NotSupportedError";d.code=DOMException.NOT_SUPPORTED_ERR;throw d;}Nl.prototype.createMediaKeys=function(){var b=new Ql(this.a);return Promise.resolve(b)};Nl.prototype.getConfiguration=function(){return this.b};function Ql(b){this.g=b;this.b=null;this.a=new Nb;this.c=[];this.f={}}
function Pl(b,c){b.b=c;Ob(b.a);var d=Kl;c&&(G(b.a,c,d+"needkey",b.xg.bind(b)),G(b.a,c,d+"keymessage",b.wg.bind(b)),G(b.a,c,d+"keyadded",b.ug.bind(b)),G(b.a,c,d+"keyerror",b.vg.bind(b)))}n=Ql.prototype;n.createSession=function(b){b=b||"temporary";if("temporary"!=b&&"persistent-license"!=b)throw new TypeError("Session type "+b+" is unsupported on this platform.");var c=this.b||document.createElement("video");c.src||(c.src="about:blank");b=new Rl(c,this.g,b);this.c.push(b);return b};
n.setServerCertificate=function(){return Promise.resolve(!1)};n.xg=function(b){var c=document.createEvent("CustomEvent");c.initCustomEvent("encrypted",!1,!1,null);c.initDataType="webm";c.initData=b.initData;this.b.dispatchEvent(c)};n.wg=function(b){var c=Sl(this,b.sessionId);c&&(b=new C("message",{messageType:void 0==c.keyStatuses.a?"licenserequest":"licenserenewal",message:b.message}),c.b&&(c.b.resolve(),c.b=null),c.dispatchEvent(b))};
n.ug=function(b){if(b=Sl(this,b.sessionId))Tl(b,"usable"),b.a&&b.a.resolve(),b.a=null};
n.vg=function(b){var c=Sl(this,b.sessionId);if(c){var d=Error("EME v0.1b key error");d.errorCode=b.errorCode;d.errorCode.systemCode=b.systemCode;!b.sessionId&&c.b?(d.method="generateRequest",45==b.systemCode&&(d.message="Unsupported session type."),c.b.reject(d),c.b=null):b.sessionId&&c.a?(d.method="update",c.a.reject(d),c.a=null):(d=b.systemCode,b.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Tl(c,"output-restricted"):1==d?Tl(c,"expired"):Tl(c,"internal-error"))}};
function Sl(b,c){var d=b.f[c];return d?d:(d=b.c.shift())?(d.sessionId=c,b.f[c]=d):null}function Rl(b,c,d){D.call(this);this.f=b;this.j=!1;this.a=this.b=null;this.c=c;this.g=d;this.sessionId="";this.expiration=NaN;this.closed=new z;this.keyStatuses=new Ul}Pa(Rl,D);
function Vl(b,c,d){if(b.j)return Promise.reject(Error("The session is already initialized."));b.j=!0;try{if("persistent-license"==b.g)if(d)var e=new Uint8Array(fc("LOAD_SESSION|"+d));else{var f=fc("PERSISTENT|"),g=new Uint8Array(f.byteLength+c.byteLength);g.set(new Uint8Array(f),0);g.set(new Uint8Array(c),f.byteLength);e=g}else e=new Uint8Array(c)}catch(k){return Promise.reject(k)}b.b=new z;var h=Ll("generateKeyRequest");try{b.f[h](b.c,e)}catch(k){if("InvalidStateError"!=k.name)return b.b=null,Promise.reject(k);
setTimeout(function(){try{this.f[h](this.c,e)}catch(l){this.b.reject(l),this.b=null}}.bind(b),10)}return b.b}n=Rl.prototype;
n.jd=function(b,c){if(this.a)this.a.then(this.jd.bind(this,b,c))["catch"](this.jd.bind(this,b,c));else{this.a=b;if("webkit-org.w3.clearkey"==this.c){var d=bc(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(this.a.reject(Error("Response is not a valid JSON Web Key Set.")),this.a=null);d=ic(e.keys[0].k);e=ic(e.keys[0].kid)}else d=new Uint8Array(c),e=null;var f=Ll("addKey");try{this.f[f](this.c,d,e,this.sessionId)}catch(g){this.a.reject(g),this.a=null}}};
function Tl(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;b.dispatchEvent(new C("keystatuseschange"))}n.generateRequest=function(b,c){return Vl(this,c,null)};n.load=function(b){return"persistent-license"==this.g?Vl(this,null,b):Promise.reject(Error("Not a persistent session."))};n.update=function(b){var c=new z;this.jd(c,b);return c};
n.close=function(){if("persistent-license"!=this.g){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var b=Ll("cancelKeyRequest");try{this.f[b](this.c,this.sessionId)}catch(c){}}this.closed.resolve();return this.closed};n.remove=function(){return"persistent-license"!=this.g?Promise.reject(Error("Not a persistent session.")):this.close()};function Ul(){this.size=0;this.a=void 0}var Wl;n=Ul.prototype;n.forEach=function(b){this.a&&b(this.a,Wl)};n.get=function(b){if(this.has(b))return this.a};
n.has=function(b){var c=Wl;return this.a&&lc(new Uint8Array(b),new Uint8Array(c))?!0:!1};n.entries=function(){};n.keys=function(){};n.values=function(){};
gl(function(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Kl="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;Wl=(new Uint8Array([0])).buffer;navigator.requestMediaKeySystemAccess=Ml;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Ol;window.MediaKeys=Ql;window.MediaKeySystemAccess=
Nl}});gl(function(){if(window.HTMLMediaElement){var b=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var c=b.apply(this);c&&c["catch"](function(){});return c}}});function Xl(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}gl(function(){if(window.HTMLVideoElement){var b=HTMLVideoElement.prototype;!b.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in b&&(b.getVideoPlaybackQuality=Xl)}});function Yl(b,c,d){return new window.TextTrackCue(b,c,d)}function Zl(b,c,d){return new window.TextTrackCue(b+"-"+c+"-"+d,b,c,d)}gl(function(){if(!window.VTTCue&&window.TextTrackCue){var b=TextTrackCue.length;if(3==b)window.VTTCue=Yl;else if(6==b)window.VTTCue=Zl;else{try{var c=!!Yl(1,2,"")}catch(d){c=!1}c&&(window.VTTCue=Yl)}}});function sd(b,c,d){this.startTime=b;this.direction=$l;this.endTime=c;this.payload=d;this.region=new am;this.position=null;this.positionAlign=bm;this.size=100;this.textAlign=cm;this.writingMode=dm;this.lineInterpretation=em;this.line=null;this.lineHeight="";this.lineAlign=fm;this.displayAlign=gm;this.fontSize=this.backgroundColor=this.color="";this.fontWeight=hm;this.fontStyle=im;this.fontFamily="";this.textDecoration=[];this.wrapLine=!0;this.id=""}y("shaka.text.Cue",sd);var bm="auto";
sd.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:bm};var cm="center",jm={LEFT:"left",RIGHT:"right",CENTER:cm,START:"start",END:"end"};sd.textAlign=jm;var gm="after",km={BEFORE:"before",CENTER:"center",AFTER:gm};sd.displayAlign=km;var $l="ltr";sd.direction={HORIZONTAL_LEFT_TO_RIGHT:$l,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var dm="horizontal-tb";sd.writingMode={HORIZONTAL_TOP_TO_BOTTOM:dm,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var em=0;
sd.lineInterpretation={LINE_NUMBER:em,PERCENTAGE:1};var fm="start",lm={CENTER:"center",START:fm,END:"end"};sd.lineAlign=lm;var hm=400;sd.fontWeight={NORMAL:hm,BOLD:700};var im="normal",mm={NORMAL:im,ITALIC:"italic",OBLIQUE:"oblique"};sd.fontStyle=mm;sd.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};
function am(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=nm;this.scroll=om}y("shaka.text.CueRegion",am);var nm=1;am.units={PX:0,PERCENTAGE:nm,LINES:2};var om="";am.scrollMode={NONE:om,UP:"up"};function pm(){}pm.prototype.parseInit=function(){};
pm.prototype.parseMedia=function(b,c){var d=bc(b),e=[],f=new DOMParser,g=null;try{g=f.parseFromString(d,"text/xml")}catch(R){throw new A(2,2,2005);}if(g){if(f=g.getElementsByTagName("tt")[0]){g=M.getAttributeNS(f,"http://www.w3.org/ns/ttml#parameter","frameRate");var h=M.getAttributeNS(f,"http://www.w3.org/ns/ttml#parameter","subFrameRate");var k=M.getAttributeNS(f,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier");var l=M.getAttributeNS(f,"http://www.w3.org/ns/ttml#parameter","tickRate");
d=f.getAttribute("xml:space")||"default"}else throw new A(2,2,2005);if("default"!=d&&"preserve"!=d)throw new A(2,2,2005);d="default"==d;g=new qm(g,h,k,l);h=rm(f.getElementsByTagName("styling")[0]);k=rm(f.getElementsByTagName("layout")[0]);l=[];for(var m=0;m<k.length;m++){var p=k[m],t=h;var w=new am;var x=p.getAttribute("xml:id");if(x){w.id=x;var F;if(F=sm(p,t,"extent"))F=(x=tm.exec(F))||um.exec(F),null!=F&&(w.width=Number(F[1]),w.height=Number(F[2]),w.widthUnits=x?nm:0,w.heightUnits=x?nm:0);if(p=
sm(p,t,"origin"))F=(x=tm.exec(p))||um.exec(p),null!=F&&(w.viewportAnchorX=Number(F[1]),w.viewportAnchorY=Number(F[2]),w.viewportAnchorUnits=x?nm:0)}else w=null;w&&l.push(w)}f=rm(f.getElementsByTagName("body")[0]);for(m=0;m<f.length;m++)(w=vm(f[m],c.periodStart,g,h,k,l,d))&&e.push(w)}return e};
var tm=/^(\d{1,2}|100)% (\d{1,2}|100)%$/,wm=/^(\d+px|\d+em)$/,um=/^(\d+)px (\d+)px$/,xm=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,ym=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,zm=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Am=/^(\d*(?:\.\d*)?)f$/,Bm=/^(\d*(?:\.\d*)?)t$/,Cm=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,Dm={left:fm,center:"center",right:"end",start:fm,end:"end"},Em={left:"line-left",center:"center",right:"line-right"};
function rm(b){var c=[];if(!b)return c;for(var d=b.childNodes,e=0;e<d.length;e++){var f="span"==d[e].nodeName&&"p"==b.nodeName;d[e].nodeType!=Node.ELEMENT_NODE||"br"==d[e].nodeName||f||(f=rm(d[e]),c=c.concat(f))}c.length||c.push(b);return c}function Fm(b,c){for(var d=b.childNodes,e=0;e<d.length;e++)if("br"==d[e].nodeName&&0<e)d[e-1].textContent+="\n";else if(0<d[e].childNodes.length)Fm(d[e],c);else if(c){var f=d[e].textContent.trim();f=f.replace(/\s+/g," ");d[e].textContent=f}}
function vm(b,c,d,e,f,g,h){if(!b.hasAttribute("begin")&&!b.hasAttribute("end")&&/^\s*$/.test(b.textContent))return null;Fm(b,h);h=Gm(b.getAttribute("begin"),d);var k=Gm(b.getAttribute("end"),d);d=Gm(b.getAttribute("dur"),d);var l=b.textContent;null==k&&null!=d&&(k=h+d);if(null==h||null==k)throw new A(2,2,2001);c=new sd(h+c,k+c,l);if((f=Hm(b,"region",f))&&f.getAttribute("xml:id")){var m=f.getAttribute("xml:id");g=g.filter(function(b){return b.id==m});c.region=g[0]}Im(c,b,f,e);return c}
function Im(b,c,d,e){"rtl"==Jm(c,d,e,"direction")&&(b.direction="rtl");var f=Jm(c,d,e,"writingMode");"tb"==f||"tblr"==f?b.writingMode="vertical-lr":"tbrl"==f?b.writingMode="vertical-rl":"rltb"==f||"rl"==f?b.direction="rtl":f&&(b.direction=$l);if(f=Jm(c,d,e,"textAlign"))b.positionAlign=Em[f],b.lineAlign=Dm[f],b.textAlign=jm[f.toUpperCase()];if(f=Jm(c,d,e,"displayAlign"))b.displayAlign=km[f.toUpperCase()];if(f=Jm(c,d,e,"color"))b.color=f;if(f=Jm(c,d,e,"backgroundColor"))b.backgroundColor=f;if(f=Jm(c,
d,e,"fontFamily"))b.fontFamily=f;(f=Jm(c,d,e,"fontWeight"))&&"bold"==f&&(b.fontWeight=700);(f=Jm(c,d,e,"wrapOption"))&&"noWrap"==f&&(b.wrapLine=!1);(f=Jm(c,d,e,"lineHeight"))&&f.match(wm)&&(b.lineHeight=f);(f=Jm(c,d,e,"fontSize"))&&f.match(wm)&&(b.fontSize=f);if(f=Jm(c,d,e,"fontStyle"))b.fontStyle=mm[f.toUpperCase()];(d=sm(d,e,"textDecoration"))&&Km(b,d);(c=Lm(c,e,"textDecoration"))&&Km(b,c)}
function Km(b,c){for(var d=c.split(" "),e=0;e<d.length;e++)switch(d[e]){case "underline":b.textDecoration.includes("underline")||b.textDecoration.push("underline");break;case "noUnderline":b.textDecoration.includes("underline")&&Bb(b.textDecoration,"underline");break;case "lineThrough":b.textDecoration.includes("lineThrough")||b.textDecoration.push("lineThrough");break;case "noLineThrough":b.textDecoration.includes("lineThrough")&&Bb(b.textDecoration,"lineThrough");break;case "overline":b.textDecoration.includes("overline")||
b.textDecoration.push("overline");break;case "noOverline":b.textDecoration.includes("overline")&&Bb(b.textDecoration,"overline")}}function Jm(b,c,d,e){return(b=Lm(b,d,e))?b:sm(c,d,e)}function sm(b,c,d){for(var e=rm(b),f=0;f<e.length;f++){var g=M.getAttributeNS(e[f],"http://www.w3.org/ns/ttml#styling",d);if(g)return g}return(b=Hm(b,"style",c))?M.getAttributeNS(b,"http://www.w3.org/ns/ttml#styling",d):null}
function Lm(b,c,d){return(b=Hm(b,"style",c))?M.getAttributeNS(b,"http://www.w3.org/ns/ttml#styling",d):null}function Hm(b,c,d){if(!b||1>d.length)return null;var e=null,f=b;for(b=null;f&&!(b=f.getAttribute(c))&&(f=f.parentNode,f instanceof Element););if(c=b)for(b=0;b<d.length;b++)if(d[b].getAttribute("xml:id")==c){e=d[b];break}return e}
function Gm(b,c){var d=null;if(xm.test(b)){d=xm.exec(b);var e=Number(d[1]),f=Number(d[2]),g=Number(d[3]),h=Number(d[4]);h+=(Number(d[5])||0)/c.b;g+=h/c.frameRate;d=g+60*f+3600*e}else ym.test(b)?d=Mm(ym,b):zm.test(b)?d=Mm(zm,b):Am.test(b)?(d=Am.exec(b),d=Number(d[1])/c.frameRate):Bm.test(b)?(d=Bm.exec(b),d=Number(d[1])/c.a):Cm.test(b)&&(d=Mm(Cm,b));return d}
function Mm(b,c){var d=b.exec(c);return null==d||""==d[0]?null:(Number(d[4])||0)/1E3+(Number(d[3])||0)+60*(Number(d[2])||0)+3600*(Number(d[1])||0)}function qm(b,c,d,e){this.frameRate=Number(b)||30;this.b=Number(c)||1;this.a=Number(e);0==this.a&&(this.a=b?this.frameRate*this.b:1);d&&(b=/^(\d+) (\d+)$/g.exec(d))&&(this.frameRate*=b[1]/b[2])}nd["application/ttml+xml"]=pm;function Nm(){this.a=new pm}Nm.prototype.parseInit=function(b){var c=!1;(new P).L("moov",Pe).L("trak",Pe).L("mdia",Pe).L("minf",Pe).L("stbl",Pe).va("stsd",Qe).L("stpp",function(b){c=!0;b.parser.stop()}).parse(b);if(!c)throw new A(2,2,2007);};Nm.prototype.parseMedia=function(b,c){var d=!1,e=[];(new P).L("mdat",Re(function(b){d=!0;e=e.concat(this.a.parseMedia(b,c))}.bind(this))).parse(b);if(!d)throw new A(2,2,2007);return e};nd['application/mp4; codecs="stpp"']=Nm;
nd['application/mp4; codecs="stpp.TTML.im1t"']=Nm;function Om(){}Om.prototype.parseInit=function(){};
Om.prototype.parseMedia=function(b,c){var d=bc(b);d=d.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");d=d.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new A(2,2,2E3);var e=c.segmentStart;if(null==e&&(e=0,d[0].includes("X-TIMESTAMP-MAP"))){var f=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),g=d[0].match(/MPEGTS:(\d+)/m);f&&g&&(e=Pm(new Uf(f[1])),e=c.periodStart+(Number(g[1])/9E4-e))}g=[];var h=d[0].split("\n");for(f=1;f<h.length;f++)if(/^Region:/.test(h[f])){var k=new Uf(h[f]),
l=new am;Xf(k);Vf(k);for(var m=Xf(k);m;){var p=l,t=m;(m=/^id=(.*)$/.exec(t))?p.id=m[1]:(m=/^width=(\d{1,2}|100)%$/.exec(t))?p.width=Number(m[1]):(m=/^lines=(\d+)$/.exec(t))?(p.height=Number(m[1]),p.heightUnits=2):(m=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(t))?(p.regionAnchorX=Number(m[1]),p.regionAnchorY=Number(m[2])):(m=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(t))?(p.viewportAnchorX=Number(m[1]),p.viewportAnchorY=Number(m[2])):/^scroll=up$/.exec(t)&&(p.scroll="up");Vf(k);
m=Xf(k)}g.push(l)}f=[];for(k=1;k<d.length;k++){h=d[k].split("\n");m=h;t=e;h=g;if(1==m.length&&!m[0]||/^NOTE($|[ \t])/.test(m[0])||"STYLE"==m[0])h=null;else{l=null;m[0].includes("--\x3e")||(l=m[0],m.splice(0,1));p=new Uf(m[0]);var w=Pm(p),x=Wf(p,/[ \t]+--\x3e[ \t]+/g),F=Pm(p);if(null==w||null==x||null==F)throw new A(2,2,2001);m=new sd(w+t,F+t,m.slice(1).join("\n").trim());Vf(p);for(t=Xf(p);t;)Qm(m,t,h),Vf(p),t=Xf(p);null!=l&&(m.id=l);h=m}h&&f.push(h)}return f};
function Qm(b,c,d){var e;if(e=/^align:(start|middle|center|end|left|right)$/.exec(c))c=e[1],"middle"==c?b.textAlign=cm:b.textAlign=jm[c.toUpperCase()];else if(e=/^vertical:(lr|rl)$/.exec(c))b.writingMode="lr"==e[1]?"vertical-lr":"vertical-rl";else if(e=/^size:([\d.]+)%$/.exec(c))b.size=Number(e[1]);else if(e=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(c))b.position=Number(e[1]),e[2]&&(c=e[2],b.positionAlign="line-left"==c||"start"==c?"line-left":"line-right"==c||"end"==
c?"line-right":"center");else if(e=/^region:(.*)$/.exec(c)){if(c=Rm(d,e[1]))b.region=c}else if(d=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(c))b.lineInterpretation=1,b.line=Number(d[1]),d[2]&&(b.lineAlign=lm[d[2].toUpperCase()]);else if(d=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(c))b.lineInterpretation=em,b.line=Number(d[1]),d[2]&&(b.lineAlign=lm[d[2].toUpperCase()])}function Rm(b,c){var d=b.filter(function(b){return b.id==c});return d.length?d[0]:null}
function Pm(b){b=Wf(b,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3})/g);if(null==b)return null;var c=Number(b[2]),d=Number(b[3]);return 59<c||59<d?null:Number(b[4])/1E3+d+60*c+3600*(Number(b[1])||0)}nd["text/vtt"]=Om;nd['text/vtt; codecs="vtt"']=Om;function Sm(){this.a=null}Sm.prototype.parseInit=function(b){var c=!1;(new P).L("moov",Pe).L("trak",Pe).L("mdia",Pe).va("mdhd",function(b){0==b.version?(b.reader.O(4),b.reader.O(4),this.a=b.reader.J(),b.reader.O(4)):(b.reader.O(8),b.reader.O(8),this.a=b.reader.J(),b.reader.O(8));b.reader.O(4)}.bind(this)).L("minf",Pe).L("stbl",Pe).va("stsd",Qe).L("wvtt",function(){c=!0}).parse(b);if(!this.a)throw new A(2,2,2008);if(!c)throw new A(2,2,2008);};
Sm.prototype.parseMedia=function(b,c){var d=this;if(!this.a)throw new A(2,2,2008);var e=0,f=[],g,h=[],k=!1,l=!1,m=!1,p=null;(new P).L("moof",Pe).L("traf",Pe).va("tfdt",function(b){k=!0;e=0==b.version?b.reader.J():b.reader.Gb()}).va("tfhd",function(b){var c=b.flags;b=b.reader;b.O(4);c&1&&b.O(8);c&2&&b.O(4);p=c&8?b.J():null}).va("trun",function(b){l=!0;var c=b.version,d=b.flags;b=b.reader;var e=b.J();d&1&&b.O(4);d&4&&b.O(4);for(var g=[],h=0;h<e;h++){var k={duration:null,sampleSize:null,ld:null};d&256&&
(k.duration=b.J());d&512&&(k.sampleSize=b.J());d&1024&&b.O(4);d&2048&&(k.ld=0==c?b.J():b.re());g.push(k)}f=g}).L("mdat",Re(function(b){m=!0;g=b})).parse(b);if(!m&&!k&&!l)throw new A(2,2,2008);var t=e,w=new DataView(g.buffer,g.byteOffset,g.byteLength),x=new O(w,0);f.forEach(function(b){var f=b.duration||p,g=b.ld?e+b.ld:t;t=g+(f||0);var k=0;do{var l=x.J();k+=l;var m=x.J(),w=null;"vttc"==Se(m)?8<l&&(w=x.hb(l-8)):x.O(l-8);f&&w&&h.push(Tm(w,c.periodStart+g/d.a,c.periodStart+t/d.a))}while(b.sampleSize&&
k<b.sampleSize)});return h.filter($c.Sa)};function Tm(b,c,d){var e,f,g;(new P).L("payl",Re(function(b){e=bc(b)})).L("iden",Re(function(b){f=bc(b)})).L("sttg",Re(function(b){g=bc(b)})).parse(b);return e?Um(e,f,g,c,d):null}function Um(b,c,d,e,f){b=new sd(e,f,b);c&&(b.id=c);if(d)for(c=new Uf(d),d=Xf(c);d;)Qm(b,d,[]),Vf(c),d=Xf(c);return b}nd['application/mp4; codecs="wvtt"']=Sm;function ok(b){this.a=null;for(var c=0;c<b.textTracks.length;++c){var d=b.textTracks[c];d.mode="disabled";"Shaka Player TextTrack"==d.label&&(this.a=d)}this.a||(this.a=b.addTextTrack("subtitles","Shaka Player TextTrack"));this.a.mode="hidden"}y("shaka.text.SimpleTextDisplayer",ok);ok.prototype.remove=function(b,c){if(!this.a)return!1;Vm(this.a,function(d){return d.startTime<c&&d.endTime>b});return!0};ok.prototype.remove=ok.prototype.remove;
ok.prototype.append=function(b){for(var c=Wm,d=[],e=0;e<b.length;e++){var f=c(b[e]);f&&d.push(f)}d.slice().sort(function(b,c){return b.startTime!=c.startTime?b.startTime-c.startTime:b.endTime!=c.endTime?b.endTime-c.startTime:d.indexOf(c)-d.indexOf(b)}).forEach(function(b){this.a.addCue(b)}.bind(this))};ok.prototype.append=ok.prototype.append;ok.prototype.destroy=function(){this.a&&Vm(this.a,function(){return!0});this.a=null;return Promise.resolve()};ok.prototype.destroy=ok.prototype.destroy;
ok.prototype.isTextVisible=function(){return"showing"==this.a.mode};ok.prototype.isTextVisible=ok.prototype.isTextVisible;ok.prototype.setTextVisibility=function(b){this.a.mode=b?"showing":"hidden"};ok.prototype.setTextVisibility=ok.prototype.setTextVisibility;
function Wm(b){if(b.startTime>=b.endTime)return null;var c=new VTTCue(b.startTime,b.endTime,b.payload);c.lineAlign=b.lineAlign;c.positionAlign=b.positionAlign;c.size=b.size;try{c.align=b.textAlign}catch(d){}"center"==b.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==b.writingMode?c.vertical="lr":"vertical-rl"==b.writingMode&&(c.vertical="rl");1==b.lineInterpretation&&(c.snapToLines=!1);null!=b.line&&(c.line=b.line);null!=b.position&&(c.position=b.position);return c}
function Vm(b,c){var d=b.mode;b.mode="showing"==d?"showing":"hidden";for(var e=b.cues,f=e.length-1;0<=f;f--){var g=e[f];g&&c(g)&&b.removeCue(g)}b.mode=d};/*
Copyright 2013 Ali Al Dallal
Licensed under the MIT license.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
for(var Xm={ach:{h:"Lwo",i:"Acholi"},ady:{h:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",i:"Adyghe"},af:{h:"Afrikaans",i:"Afrikaans"},"af-NA":{h:"Afrikaans (Namibia)",i:"Afrikaans (Namibia)"},"af-ZA":{h:"Afrikaans (South Africa)",i:"Afrikaans (South Africa)"},ak:{h:"T\u0255\u0265i",i:"Akan"},ar:{h:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",i:"Arabic"},"ar-AR":{h:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",i:"Arabic"},"ar-MA":{h:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",i:"Arabic (Morocco)"},
"ar-SA":{h:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)",i:"Arabic (Saudi Arabia)"},"ay-BO":{h:"Aymar aru",i:"Aymara"},az:{h:"Az\u0259rbaycan dili",i:"Azerbaijani"},"az-AZ":{h:"Az\u0259rbaycan dili",i:"Azerbaijani"},"be-BY":{h:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",i:"Belarusian"},bg:{h:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",i:"Bulgarian"},"bg-BG":{h:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",
i:"Bulgarian"},bn:{h:"\u09ac\u09be\u0982\u09b2\u09be",i:"Bengali"},"bn-IN":{h:"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)",i:"Bengali (India)"},"bn-BD":{h:"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)",i:"Bengali (Bangladesh)"},"bs-BA":{h:"Bosanski",i:"Bosnian"},ca:{h:"Catal\u00e0",i:"Catalan"},"ca-ES":{h:"Catal\u00e0",i:"Catalan"},cak:{h:"Maya Kaqchikel",i:"Kaqchikel"},"ck-US":{h:"\u13e3\u13b3\u13a9 (tsalagi)",i:"Cherokee"},cs:{h:"\u010ce\u0161tina",
i:"Czech"},"cs-CZ":{h:"\u010ce\u0161tina",i:"Czech"},cy:{h:"Cymraeg",i:"Welsh"},"cy-GB":{h:"Cymraeg",i:"Welsh"},da:{h:"Dansk",i:"Danish"},"da-DK":{h:"Dansk",i:"Danish"},de:{h:"Deutsch",i:"German"},"de-AT":{h:"Deutsch (\u00d6sterreich)",i:"German (Austria)"},"de-DE":{h:"Deutsch (Deutschland)",i:"German (Germany)"},"de-CH":{h:"Deutsch (Schweiz)",i:"German (Switzerland)"},dsb:{h:"Dolnoserb\u0161\u0107ina",i:"Lower Sorbian"},el:{h:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",i:"Greek"},"el-GR":{h:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",
i:"Greek (Greece)"},en:{h:"English",i:"English"},"en-GB":{h:"English (UK)",i:"English (UK)"},"en-AU":{h:"English (Australia)",i:"English (Australia)"},"en-CA":{h:"English (Canada)",i:"English (Canada)"},"en-IE":{h:"English (Ireland)",i:"English (Ireland)"},"en-IN":{h:"English (India)",i:"English (India)"},"en-PI":{h:"English (Pirate)",i:"English (Pirate)"},"en-UD":{h:"English (Upside Down)",i:"English (Upside Down)"},"en-US":{h:"English (US)",i:"English (US)"},"en-ZA":{h:"English (South Africa)",
i:"English (South Africa)"},"en@pirate":{h:"English (Pirate)",i:"English (Pirate)"},eo:{h:"Esperanto",i:"Esperanto"},"eo-EO":{h:"Esperanto",i:"Esperanto"},es:{h:"Espa\u00f1ol",i:"Spanish"},"es-AR":{h:"Espa\u00f1ol (Argentine)",i:"Spanish (Argentina)"},"es-419":{h:"Espa\u00f1ol (Latinoam\u00e9rica)",i:"Spanish (Latin America)"},"es-CL":{h:"Espa\u00f1ol (Chile)",i:"Spanish (Chile)"},"es-CO":{h:"Espa\u00f1ol (Colombia)",i:"Spanish (Colombia)"},"es-EC":{h:"Espa\u00f1ol (Ecuador)",i:"Spanish (Ecuador)"},
"es-ES":{h:"Espa\u00f1ol (Espa\u00f1a)",i:"Spanish (Spain)"},"es-LA":{h:"Espa\u00f1ol (Latinoam\u00e9rica)",i:"Spanish (Latin America)"},"es-NI":{h:"Espa\u00f1ol (Nicaragua)",i:"Spanish (Nicaragua)"},"es-MX":{h:"Espa\u00f1ol (M\u00e9xico)",i:"Spanish (Mexico)"},"es-US":{h:"Espa\u00f1ol (Estados Unidos)",i:"Spanish (United States)"},"es-VE":{h:"Espa\u00f1ol (Venezuela)",i:"Spanish (Venezuela)"},et:{h:"eesti keel",i:"Estonian"},"et-EE":{h:"Eesti (Estonia)",i:"Estonian (Estonia)"},eu:{h:"Euskara",i:"Basque"},
"eu-ES":{h:"Euskara",i:"Basque"},fa:{h:"\u0641\u0627\u0631\u0633\u06cc",i:"Persian"},"fa-IR":{h:"\u0641\u0627\u0631\u0633\u06cc",i:"Persian"},"fb-LT":{h:"Leet Speak",i:"Leet"},ff:{h:"Fulah",i:"Fulah"},fi:{h:"Suomi",i:"Finnish"},"fi-FI":{h:"Suomi",i:"Finnish"},"fo-FO":{h:"F\u00f8royskt",i:"Faroese"},fr:{h:"Fran\u00e7ais",i:"French"},"fr-CA":{h:"Fran\u00e7ais (Canada)",i:"French (Canada)"},"fr-FR":{h:"Fran\u00e7ais (France)",i:"French (France)"},"fr-BE":{h:"Fran\u00e7ais (Belgique)",i:"French (Belgium)"},
"fr-CH":{h:"Fran\u00e7ais (Suisse)",i:"French (Switzerland)"},"fy-NL":{h:"Frysk",i:"Frisian (West)"},ga:{h:"Gaeilge",i:"Irish"},"ga-IE":{h:"Gaeilge (Gaelic)",i:"Irish (Gaelic)"},gl:{h:"Galego",i:"Galician"},"gl-ES":{h:"Galego",i:"Galician"},"gn-PY":{h:"Ava\u00f1e'\u1ebd",i:"Guarani"},"gu-IN":{h:"\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0",i:"Gujarati"},"gx-GR":{h:"\u1f19\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ae \u1f00\u03c1\u03c7\u03b1\u03af\u03b1",i:"Classical Greek"},he:{h:"\u05e2\u05d1\u05e8\u05d9\u05ea\u200f",
i:"Hebrew"},"he-IL":{h:"\u05e2\u05d1\u05e8\u05d9\u05ea\u200f",i:"Hebrew"},hi:{h:"\u0939\u093f\u0928\u094d\u0926\u0940",i:"Hindi"},"hi-IN":{h:"\u0939\u093f\u0928\u094d\u0926\u0940",i:"Hindi"},hr:{h:"Hrvatski",i:"Croatian"},"hr-HR":{h:"Hrvatski",i:"Croatian"},hsb:{h:"Hornjoserb\u0161\u0107ina",i:"Upper Sorbian"},ht:{h:"Krey\u00f2l",i:"Haitian Creole"},hu:{h:"Magyar",i:"Hungarian"},"hu-HU":{h:"Magyar",i:"Hungarian"},"hy-AM":{h:"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",i:"Armenian"},id:{h:"Bahasa Indonesia",
i:"Indonesian"},"id-ID":{h:"Bahasa Indonesia",i:"Indonesian"},is:{h:"\u00cdslenska",i:"Icelandic"},"is-IS":{h:"\u00cdslenska (Iceland)",i:"Icelandic (Iceland)"},it:{h:"Italiano",i:"Italian"},"it-IT":{h:"Italiano",i:"Italian"},ja:{h:"\u65e5\u672c\u8a9e",i:"Japanese"},"ja-JP":{h:"\u65e5\u672c\u8a9e",i:"Japanese"},"jv-ID":{h:"Basa Jawa",i:"Javanese"},"ka-GE":{h:"\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8",i:"Georgian"},"kk-KZ":{h:"\u049a\u0430\u0437\u0430\u049b\u0448\u0430",i:"Kazakh"},km:{h:"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a",
i:"Khmer"},"km-KH":{h:"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a",i:"Khmer"},kab:{h:"Taqbaylit",i:"Kabyle"},kn:{h:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1",i:"Kannada"},"kn-IN":{h:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1 (India)",i:"Kannada (India)"},ko:{h:"\ud55c\uad6d\uc5b4",i:"Korean"},"ko-KR":{h:"\ud55c\uad6d\uc5b4 (\u97e9\u56fd)",i:"Korean (Korea)"},ku:{h:"Kurd\u00ee",i:"Kurdish"},"ku-TR":{h:"Kurd\u00ee",i:"Kurdish"},la:{h:"Latin",i:"Latin"},"la-VA":{h:"Latin",i:"Latin"},lb:{h:"L\u00ebtzebuergesch",
i:"Luxembourgish"},"li-NL":{h:"L\u00e8mb\u00f6rgs",i:"Limburgish"},lt:{h:"Lietuvi\u0173",i:"Lithuanian"},"lt-LT":{h:"Lietuvi\u0173",i:"Lithuanian"},lv:{h:"Latvie\u0161u",i:"Latvian"},"lv-LV":{h:"Latvie\u0161u",i:"Latvian"},mai:{h:"\u092e\u0948\u0925\u093f\u0932\u0940, \u09ae\u09c8\u09a5\u09bf\u09b2\u09c0",i:"Maithili"},"mg-MG":{h:"Malagasy",i:"Malagasy"},mk:{h:"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438",i:"Macedonian"},"mk-MK":{h:"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438 (\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438)",
i:"Macedonian (Macedonian)"},ml:{h:"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02",i:"Malayalam"},"ml-IN":{h:"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02",i:"Malayalam"},"mn-MN":{h:"\u041c\u043e\u043d\u0433\u043e\u043b",i:"Mongolian"},mr:{h:"\u092e\u0930\u093e\u0920\u0940",i:"Marathi"},"mr-IN":{h:"\u092e\u0930\u093e\u0920\u0940",i:"Marathi"},ms:{h:"Bahasa Melayu",i:"Malay"},"ms-MY":{h:"Bahasa Melayu",i:"Malay"},mt:{h:"Malti",i:"Maltese"},"mt-MT":{h:"Malti",i:"Maltese"},my:{h:"\u1017\u1019\u102c\u1005\u1000\u102c",
i:"Burmese"},nb:{h:"Norsk (bokm\u00e5l)",i:"Norwegian (bokmal)"},"nb-NO":{h:"Norsk (bokm\u00e5l)",i:"Norwegian (bokmal)"},ne:{h:"\u0928\u0947\u092a\u093e\u0932\u0940",i:"Nepali"},"ne-NP":{h:"\u0928\u0947\u092a\u093e\u0932\u0940",i:"Nepali"},nl:{h:"Nederlands",i:"Dutch"},"nl-BE":{h:"Nederlands (Belgi\u00eb)",i:"Dutch (Belgium)"},"nl-NL":{h:"Nederlands (Nederland)",i:"Dutch (Netherlands)"},"nn-NO":{h:"Norsk (nynorsk)",i:"Norwegian (nynorsk)"},no:{h:"Norsk",i:"Norwegian"},oc:{h:"Occitan",i:"Occitan"},
"or-IN":{h:"\u0b13\u0b21\u0b3c\u0b3f\u0b06",i:"Oriya"},pa:{h:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40",i:"Punjabi"},"pa-IN":{h:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40 (\u0a2d\u0a3e\u0a30\u0a24 \u0a28\u0a42\u0a70)",i:"Punjabi (India)"},pl:{h:"Polski",i:"Polish"},"pl-PL":{h:"Polski",i:"Polish"},"ps-AF":{h:"\u067e\u069a\u062a\u0648",i:"Pashto"},pt:{h:"Portugu\u00eas",i:"Portuguese"},"pt-BR":{h:"Portugu\u00eas (Brasil)",i:"Portuguese (Brazil)"},"pt-PT":{h:"Portugu\u00eas (Portugal)",i:"Portuguese (Portugal)"},
"qu-PE":{h:"Qhichwa",i:"Quechua"},"rm-CH":{h:"Rumantsch",i:"Romansh"},ro:{h:"Rom\u00e2n\u0103",i:"Romanian"},"ro-RO":{h:"Rom\u00e2n\u0103",i:"Romanian"},ru:{h:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439",i:"Russian"},"ru-RU":{h:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439",i:"Russian"},"sa-IN":{h:"\u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d",i:"Sanskrit"},"se-NO":{h:"Davvis\u00e1megiella",i:"Northern S\u00e1mi"},"si-LK":{h:"\u0db4\u0dc5\u0dcf\u0dad",i:"Sinhala (Sri Lanka)"},sk:{h:"Sloven\u010dina",
i:"Slovak"},"sk-SK":{h:"Sloven\u010dina (Slovakia)",i:"Slovak (Slovakia)"},sl:{h:"Sloven\u0161\u010dina",i:"Slovenian"},"sl-SI":{h:"Sloven\u0161\u010dina",i:"Slovenian"},"so-SO":{h:"Soomaaliga",i:"Somali"},sq:{h:"Shqip",i:"Albanian"},"sq-AL":{h:"Shqip",i:"Albanian"},sr:{h:"\u0421\u0440\u043f\u0441\u043a\u0438",i:"Serbian"},"sr-RS":{h:"\u0421\u0440\u043f\u0441\u043a\u0438 (Serbia)",i:"Serbian (Serbia)"},su:{h:"Basa Sunda",i:"Sundanese"},sv:{h:"Svenska",i:"Swedish"},"sv-SE":{h:"Svenska",i:"Swedish"},
sw:{h:"Kiswahili",i:"Swahili"},"sw-KE":{h:"Kiswahili",i:"Swahili (Kenya)"},ta:{h:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",i:"Tamil"},"ta-IN":{h:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",i:"Tamil"},te:{h:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",i:"Telugu"},"te-IN":{h:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",i:"Telugu"},tg:{h:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301",i:"Tajik"},"tg-TJ":{h:"\u0442\u043e\u04b7\u0438\u043a\u04e3",i:"Tajik"},th:{h:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",
i:"Thai"},"th-TH":{h:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",i:"Thai (Thailand)"},tl:{h:"Filipino",i:"Filipino"},"tl-PH":{h:"Filipino",i:"Filipino"},tlh:{h:"tlhIngan-Hol",i:"Klingon"},tr:{h:"T\u00fcrk\u00e7e",i:"Turkish"},"tr-TR":{h:"T\u00fcrk\u00e7e",i:"Turkish"},"tt-RU":{h:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",i:"Tatar"},uk:{h:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",i:"Ukrainian"},"uk-UA":{h:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
i:"Ukrainian"},ur:{h:"\u0627\u0631\u062f\u0648",i:"Urdu"},"ur-PK":{h:"\u0627\u0631\u062f\u0648",i:"Urdu"},uz:{h:"O'zbek",i:"Uzbek"},"uz-UZ":{h:"O'zbek",i:"Uzbek"},vi:{h:"Ti\u1ebfng Vi\u1ec7t",i:"Vietnamese"},"vi-VN":{h:"Ti\u1ebfng Vi\u1ec7t",i:"Vietnamese"},"xh-ZA":{h:"isiXhosa",i:"Xhosa"},yi:{h:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",i:"Yiddish"},"yi-DE":{h:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",i:"Yiddish (German)"},zh:{h:"\u4e2d\u6587",i:"Chinese"},"zh-HANS":{h:"\u4e2d\u6587\u7b80\u4f53",
i:"Chinese Simplified"},"zh-HANT":{h:"\u4e2d\u6587\u7e41\u9ad4",i:"Chinese Traditional"},"zh-CN":{h:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",i:"Chinese Simplified (China)"},"zh-HK":{h:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",i:"Chinese Traditional (Hong Kong)"},"zh-SG":{h:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",i:"Chinese Simplified (Singapore)"},"zh-TW":{h:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",i:"Chinese Traditional (Taiwan)"},"zu-ZA":{h:"isiZulu",i:"Zulu"}},Ym=q(Object.keys(Xm)),Zm=Ym.next();!Zm.done;Zm=
Ym.next()){var $m=Zm.value;Xm[$m.toLowerCase()]=Xm[$m]};function V(b){this.g=I(b);this.f=new Map;this.b=new Set;this.c=new Map;this.a=new D}y("shaka.ui.Localization",V);V.prototype.addEventListener=function(b,c,d){this.a.addEventListener(b,c,d)};V.prototype.addEventListener=V.prototype.addEventListener;V.prototype.removeEventListener=function(b,c,d){this.a.removeEventListener(b,c,d||void 0)};V.prototype.removeEventListener=V.prototype.removeEventListener;V.prototype.dispatchEvent=function(b){return this.a.dispatchEvent(b)};V.prototype.dispatchEvent=V.prototype.dispatchEvent;
V.prototype.wd=function(b){var c=this;this.b.clear();b=q(b);for(var d=b.next();!d.done;d=b.next())this.b.add(I(d.value));an(this);this.a.dispatchEvent(new C("locale-changed"));b=Ub(this.b,function(b){return!c.c.has(b)});b.length&&this.a.dispatchEvent(new C("unknown-locales",{Rf:b}))};V.prototype.changeLocale=V.prototype.wd;
V.prototype.W=function(b,c,d){var e=bn;b=I(b);void 0===d&&(d=e.Se);var f=this.c.get(b)||new Map;c.forEach(function(b,c){f.has(c)&&d!=e.Se||f.set(c,b)});this.c.set(b,f);an(this);this.a.dispatchEvent(new C("locale-updated"));return this};V.prototype.insert=V.prototype.W;V.prototype.Og=function(b){for(var c=q(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,this.resolve(d))};V.prototype.resolveDictionary=V.prototype.Og;
V.prototype.resolve=function(b){var c=this.f.get(b);if(c)return c;b={locales:Array.from(this.b),missing:b};this.a.dispatchEvent(new C("unknown-localization",b));return""};V.prototype.resolve=V.prototype.resolve;
function an(b){for(var c=b.c,d=b.g,e=b.b,f=new Set,g={},h=q(e),k=h.next();!k.done;g={locale:g.locale},k=h.next()){g.locale=k.value;f.add(g.locale);f.add(Kd(g.locale));k=Ub(c.keys(),function(b){return function(c){var d=b.locale,e=Kd(c),f=Kd(d);return c!=e&&d!=f&&e==f}}(g));k.sort();var l=q(k);for(k=l.next();!k.done;k=l.next())f.add(k.value);k=Ub(c.keys(),function(b){return function(c){return Kd(c)==b.locale}}(g));k.sort();l=q(k);for(k=l.next();!k.done;k=l.next())f.add(k.value)}f.add(d);d=[];f=q(f);
for(k=f.next();!k.done;k=f.next())(k=c.get(k.value))&&d.push(k);d.reverse();b.f.clear();c=q(d);for(k=c.next();!k.done;k=c.next())k.value.forEach(function(c,d){b.f.set(d,c)});c=b.f.keys();f=new Set;d=q(b.b);for(k=d.next();!k.done;k=d.next())k=b.c.get(k.value)||new Map,cn(k,c,f);0<f.size&&(e={Rf:Array.from(e),uh:Array.from(f)},b.a.dispatchEvent(new C("missing-localizations",e)))}function cn(b,c,d){c=q(c);for(var e=c.next();!e.done;e=c.next())e=e.value,b.get(e)||d.add(e)}var bn={USE_OLD:0,USE_NEW:1};
V.ConflictResolution=bn;y("shaka.ui.Utils.getFirstDescendantWithClassName",function(b,c){return dn(b,c)});function dn(b,c){var d=b.getElementsByClassName(c);return d.length?d[0]:null}function en(b){return(b=b.mc().filter(function(b){return 1==b.active})[0])?"video/mp2t"==b.mimeType:!1}function W(b){return document.createElement(b)};function X(b,c,d,e){var f=this;D.call(this);this.w=!0;this.$=!1;this.P=e;this.o=new L(d,b,this.P.castReceiverAppId);this.ea=!0;this.a=this.o.Mb();this.qa=d;this.A=this.o.cb();this.f=c;this.g=!1;this.V=new H(function(){f.a.currentTime=parseFloat(f.b.value)});this.H=new H(function(){f.f.style.cursor="none";f.a.paused&&!f.g||f.$?fn(f,1):fn(f,0)});this.j=new H(function(){for(var b=q(f.K),c=b.next();!c.done;c=b.next())Y(c.value,!1)});this.aa=new H(function(){gn(f)});this.v=null;this.ua=[];this.l=hn();
jn(this);kn(this);this.F=new Nb;ln(this);this.S=new Set;mn(this);this.aa.start(.125,!0)}Pa(X,D);y("shaka.ui.Controls",X);var nn=new Map;X.prototype.destroy=function(){this.F&&(this.F.R(),this.F=null);this.V&&(this.V.stop(),this.V=null);this.H&&(this.H.stop(),this.H=null);this.j&&(this.j.stop(),this.j=null);this.aa&&(this.aa.stop(),this.aa=null);this.l=null;this.S.clear();return Promise.resolve()};X.prototype.destroy=X.prototype.destroy;function on(b,c){nn.set(b,c)}X.registerElement=on;
X.prototype.Xe=function(b){this.ea=b;mn(this)};X.prototype.allowCast=X.prototype.Xe;X.prototype.Qf=function(){this.Sb()};X.prototype.loadComplete=X.prototype.Qf;X.prototype.fd=function(b){(this.w=b)?(Y(this.u.parentElement,!0),this.a.tabIndex=-1,this.a.controls=!1):Y(this.u.parentElement,!1);this.Sb()};X.prototype.setEnabledShakaControls=X.prototype.fd;X.prototype.De=function(b){this.a.controls=b;this.a.tabIndex=b?0:-1;b&&this.fd(!1)};X.prototype.setEnabledNativeControls=X.prototype.De;
X.prototype.pf=function(){return this.o};X.prototype.getCastProxy=X.prototype.pf;X.prototype.xf=function(){return this.l};X.prototype.getLocalization=X.prototype.xf;X.prototype.Hf=function(){return this.f};X.prototype.getVideoContainer=X.prototype.Hf;X.prototype.Mb=function(){return this.a};X.prototype.getVideo=X.prototype.Mb;X.prototype.wf=function(){return this.qa};X.prototype.getLocalVideo=X.prototype.wf;X.prototype.cb=function(){return this.A};X.prototype.getPlayer=X.prototype.cb;
X.prototype.sf=function(){return this.c};X.prototype.getControlsContainer=X.prototype.sf;X.prototype.qf=function(){return this.P};X.prototype.getConfig=X.prototype.qf;X.prototype.Of=function(){return this.g};X.prototype.isSeeking=X.prototype.Of;X.prototype.Mf=function(){return this.ea};X.prototype.isCastAllowed=X.prototype.Mf;X.prototype.Kd=function(){return this.g?Number(this.b.value):Number(this.a.currentTime)};X.prototype.getDisplayTime=X.prototype.Kd;X.prototype.Ee=function(b){this.v=b};
X.prototype.setLastTouchEventTime=X.prototype.Ee;function Y(b,c){b&&(c?(b.classList.add("shaka-displayed"),b.classList.remove("shaka-hidden")):(b.classList.add("shaka-hidden"),b.classList.remove("shaka-displayed")))}X.setDisplay=Y;X.prototype.Zc=function(){this.$=!0};X.prototype.overrideCssShowControls=X.prototype.Zc;X.prototype.ac=function(){return this.K.some(function(b){return b.classList.contains("shaka-displayed")})};X.prototype.anySettingsMenusAreOpen=X.prototype.ac;X.prototype.Mc=function(){this.j.mb()};
X.prototype.hideSettingsMenus=X.prototype.Mc;function kn(b){b.b&&b.b.setAttribute("aria-label",b.l.resolve("5553522235935533682"));b.m.setAttribute("aria-label",b.l.resolve(b.a.paused&&!b.g?"836055097473758014":"9042260521669277115"))}
function jn(b){b.B=null;b.b=null;b.f.classList.add("shaka-video-container");b.a.classList.add("shaka-video");b.c=W("div");b.c.classList.add("shaka-controls-container");b.f.appendChild(b.c);b.ha=W("div");b.ha.classList.add("shaka-play-button-container");b.c.appendChild(b.ha);b.m=W("button");b.m.classList.add("shaka-play-button");b.m.setAttribute("icon","play");b.ha.appendChild(b.m);b.G=document.createElementNS("http://www.w3.org/2000/svg","svg");b.G.setAttribute("class","shaka-spinner-svg");b.G.setAttribute("viewBox",
"0 0 30 30");b.m.appendChild(b.G);var c=document.createElementNS("http://www.w3.org/2000/svg","circle");c.setAttribute("class","shaka-spinner-path");c.setAttribute("cx","15");c.setAttribute("cy","15");c.setAttribute("r","14.5");c.setAttribute("fill","none");c.setAttribute("stroke-width","1");c.setAttribute("stroke-miterlimit","10");b.G.appendChild(c);b.u=W("div");b.u.classList.add("shaka-controls-button-panel");b.u.classList.add("shaka-no-propagation");b.u.classList.add("shaka-show-controls-on-mouse-over");
b.c.appendChild(b.u);for(c=0;c<b.P.controlPanelElements.length;c++){var d=b.P.controlPanelElements[c];nn.get(d)&&-1!=pn.indexOf(d)&&(d=nn.get(d),b.ua.push(d.create(b.u,b)))}b.P.addSeekBar&&(b.B=W("div"),b.B.classList.add("shaka-seek-bar-container"),b.b=document.createElement("input"),b.b.classList.add("shaka-seek-bar"),b.b.type="range",b.b.setAttribute("step","any"),b.b.setAttribute("min","0"),b.b.setAttribute("max","1"),b.b.value="0",b.b.classList.add("shaka-no-propagation"),b.b.classList.add("shaka-show-controls-on-mouse-over"),
b.B.appendChild(b.b),b.c.appendChild(b.B));b.K=Array.from(b.f.getElementsByClassName("shaka-settings-menu"));if(!b.b)for(b=q(b.K),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position")}
function ln(b){b.A.addEventListener("buffering",b.Vf.bind(b));G(b.F,window,"keydown",b.be.bind(b));b.a.addEventListener("play",b.Sb.bind(b));b.a.addEventListener("pause",b.Sb.bind(b));b.a.addEventListener("ended",b.Sb.bind(b));b.b&&(b.b.addEventListener("mousedown",b.ge.bind(b)),b.b.addEventListener("touchstart",b.ge.bind(b),{passive:!0}),b.b.addEventListener("input",b.ng.bind(b)),b.b.addEventListener("touchend",b.fe.bind(b)),b.b.addEventListener("mouseup",b.fe.bind(b)));b.c.addEventListener("touchstart",
b.Yf.bind(b),{passive:!1});b.c.addEventListener("click",b.Xf.bind(b));for(var c=b.f.getElementsByClassName("shaka-no-propagation"),d=0;d<c.length;d++)c[d].addEventListener("click",function(b){b.stopPropagation()});c=b.f.getElementsByClassName("shaka-show-controls-on-mouse-over");for(d=0;d<c.length;d++){var e=c[d];e.addEventListener("mouseover",function(){b.$=!0});e.addEventListener("mouseleave",function(){b.$=!1})}b.f.addEventListener("mousemove",b.Rb.bind(b));b.f.addEventListener("touchmove",b.Rb.bind(b),
{passive:!0});b.f.addEventListener("touchend",b.Rb.bind(b),{passive:!0});b.f.addEventListener("mouseleave",b.gg.bind(b));b.u.addEventListener("click",function(){b.j.mb()});b.o.addEventListener("caststatuschanged",function(){mn(b)});b.f.addEventListener("keyup",b.ag.bind(b));b.l.addEventListener("locale-updated",function(){return kn(b)});b.l.addEventListener("locale-changed",function(){return kn(b)})}n=X.prototype;
n.Rb=function(b){"mousemove"==b.type&&this.c.classList.remove("shaka-keyboard-navigation");"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?this.v=Date.now():this.v+1E3<Date.now()&&(this.v=null);this.v&&"mousemove"==b.type||(this.f.style.cursor="",this.j.stop(),fn(this,1),gn(this),this.H.stop(),"touchend"!=b.type&&"keyup"!=b.type&&this.v||this.H.start(3,!1))};n.gg=function(){this.v||this.H.mb()};
n.Yf=function(b){this.a.duration&&(qn(this)?this.v=Date.now():(this.Rb(b),b.preventDefault()))};n.Xf=function(){this.w&&(this.ac()?this.j.mb():rn(this))};function rn(b){b.w&&b.a.duration&&(b.A.ud(),b.a.paused?b.a.play():b.a.pause())}function mn(b){var c=b.o.ba();b.dispatchEvent(new C("caststatuschanged",{vh:c}));c?b.c.setAttribute("casting","true"):b.c.removeAttribute("casting")}
n.Sb=function(){this.a.ended&&!this.a.paused&&this.a.pause();this.w&&this.a.paused&&!this.g?(this.m.setAttribute("icon","play"),this.m.setAttribute("aria-label",this.l.resolve("836055097473758014"))):(this.m.setAttribute("icon","pause"),this.m.setAttribute("aria-label",this.l.resolve("9042260521669277115")))};n.ge=function(){this.w&&(this.g=!0,this.a.pause())};n.ng=function(){this.w&&this.a.duration&&(gn(this),this.V.start(.125,!1))};n.fe=function(){this.w&&(this.V.mb(),this.g=!1,this.a.play())};
n.ag=function(b){var c=b.key,d=document.activeElement,e=d&&d.classList?d.classList.contains("shaka-volume-bar"):!1,f=d&&d.classList&&d.classList.contains("shaka-seek-bar");this.c.contains(d)&&this.Rb(b);this.S["delete"](b.keyCode);switch(c){case "ArrowLeft":e||(this.a.currentTime-=5,gn(this));break;case "ArrowRight":e||(this.a.currentTime+=5,gn(this));break;case "Home":b=this.A.ib().start;this.a.currentTime=b;gn(this);break;case "End":b=this.A.ib().end;this.a.currentTime=b;gn(this);break;case " ":f&&
rn(this)}};n.Vf=function(b){b.buffering?this.G.setAttribute("class","shaka-spinner-svg"):this.G.setAttribute("class","shaka-spinner-svg shaka-hidden")};function qn(b){return b.w?b.o&&b.o.ba()?!0:null!=b.c.getAttribute("shown"):!1}
function gn(b){if(qn(b)){b.dispatchEvent(new C("timeandseekrangeupdated"));var c=b.g?Number(b.b.value):Number(b.a.currentTime),d=b.a.buffered.length,e=d?b.a.buffered.start(0):0,f=d?b.a.buffered.end(d-1):0,g=b.A.ib(),h=g.end-g.start;b.b&&(b.b.min=g.start,b.b.max=g.end);b.A.Z()?(c=Math.max(0,Math.floor(g.end-c)),!b.g&&b.b&&(b.b.value=g.end-c)):!b.g&&b.b&&(b.b.value=c);if(b.b)if(g=b.A.ib(),5>g.end-g.start){Y(b.B,!1);b=q(b.K);for(var k=b.next();!k.done;k=b.next())k.value.classList.add("shaka-low-position")}else{Y(b.B,
!0);var l=q(b.K);for(k=l.next();!k.done;k=l.next())k.value.classList.remove("shaka-low-position");k=["to right"];0==d?k.push("#000 0%"):(d=(Math.max(e,g.start)-g.start)/h||0,f=(Math.min(f,g.end)-g.start)/h||0,c=(c-g.start)/h||0,k.push("rgba(255, 255, 255, 0.3) "+100*d+"%"),k.push("rgb(255, 255, 255) "+100*d+"%"),k.push("rgb(255, 255, 255) "+100*c+"%"),k.push("rgba(255, 255, 255, 0.54) "+100*c+"%"),k.push("rgba(255, 255, 255, 0.54) "+100*f+"%"),k.push("rgba(255, 255, 255, 0.3) "+100*f+"%"));b.B.style.background=
"linear-gradient("+k.join(",")+")"}}}n.be=function(b){this.S.add(b.keyCode);var c=this.ac();9==b.keyCode&&(this.c.classList.add("shaka-keyboard-navigation"),G(this.F,window,"mousedown",this.fg.bind(this)));27==b.keyCode&&this.j.mb();c&&this.S.has(9)&&sn(this,b)};
function sn(b,c){var d=b.K.filter(function(b){return b.classList.contains("shaka-displayed")})[0];if(d.childNodes.length){for(var e=d.firstElementChild;e&&e.classList.contains("shaka-hidden");)e=e.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var f=document.activeElement;b.S.has(16)?f==e&&(c.preventDefault(),d.focus()):f==d&&(c.preventDefault(),e.focus())}}n.fg=function(){this.F.Ja(window,"mousedown");G(this.F,window,"keydown",this.be.bind(this))};
function fn(b,c){1==c?b.c.setAttribute("shown","true"):(b.c.removeAttribute("shown"),b.j.start(2,!1))}
function hn(){var b=new V("en");b.W("ar",new Map([["1050953507607739202","\u0627\u0644\u062d\u062c\u0645"],["1077325112364709655","\u0631\u062c\u0648\u0639"],["1142734805932039923","\u0625\u0631\u062c\u0627\u0639"],["142853231704504146","\u062a\u0634\u063a\u064a\u0644"],["1774834209035716827","\u062a\u0642\u062f\u064a\u0645 \u0633\u0631\u064a\u0639"],["1911090580951495029","\u0627\u0644\u062a\u0631\u062c\u0645\u0629"],["2023925063728908356","\u0625\u0644\u063a\u0627\u0621 \u0643\u062a\u0645 \u0627\u0644\u0635\u0648\u062a"],
["298626259350585300","\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641\u0629"],["3045980486001972586","\u0645\u0628\u0627\u0634\u0631"],["3278592358864783064","\u0627\u0644\u0644\u063a\u0629"],["4242938254936928940",'\u0627\u0644\u062f\u062e\u0648\u0644 \u0641\u064a \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["4259064532355692191","\u062a\u0644\u0642\u0627\u0626\u064a"],["4388316720828367903","\u0625\u0639\u062f\u0627\u062f\u0627\u062a \u0625\u0636\u0627\u0641\u064a\u0629"],
["5146287486336231188","\u063a\u064a\u0631 \u0633\u0627\u0631\u064d"],["5553522235935533682","\u0634\u0631\u064a\u0637 \u062a\u0645\u0631\u064a\u0631 \u0627\u0644\u0628\u062d\u062b"],["5963689277976480680","\u0643\u062a\u0645 \u0627\u0644\u0635\u0648\u062a"],["6073266792045231479",""],["6161306839322897077","\u0625\u0646\u0647\u0627\u0621 \u0648\u0636\u0639 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["622115170869907732","\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0627\u0644\u0646\u0627\u0641\u0630\u0629"],
["6614181658619787283",'\u0627\u0644\u062e\u0631\u0648\u062c \u0645\u0646 \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["7071612439610534706","\u0625\u0631\u0633\u0627\u0644..."],["8145129506114534451","\u0625\u064a\u0642\u0627\u0641"],["8345190086337560158","\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["836055097473758014","\u062a\u0634\u063a\u064a\u0644"],["9042260521669277115","\u0625\u064a\u0642\u0627\u0641 \u0645\u0624\u0642\u062a"]]));
b.W("de",new Map([["1050953507607739202","Lautst\u00e4rke"],["1077325112364709655","Zur\u00fcck"],["1142734805932039923","Zur\u00fcckspulen"],["142853231704504146","An"],["1774834209035716827","Vorspulen"],["1911090580951495029","Untertitel"],["2023925063728908356","Stummschaltung aufheben"],["298626259350585300","Unbekannt"],["3045980486001972586","Live"],["3278592358864783064","Sprache"],["4242938254936928940","Bild-im-Bild-Modus aktivieren"],["4259064532355692191","Automatisch"],["4388316720828367903",
"Weitere Einstellungen"],["5146287486336231188","Nicht zutreffend"],["5553522235935533682","Schieberegler f\u00fcr Suche"],["5963689277976480680","Stummschalten"],["6073266792045231479","Aufl\u00f6sung"],["6161306839322897077","Vollbildmodus beenden"],["622115170869907732","Bild-in-Bild"],["6614181658619787283","Bild-im-Bild-Modus beenden"],["7071612439610534706","Streamen\u2026"],["8145129506114534451","Aus"],["8345190086337560158","Vollbild"],["836055097473758014","Wiedergeben"],["9042260521669277115",
"Pausieren"]]));b.W("en",new Map([["1050953507607739202","volume"],["1077325112364709655","Back"],["1142734805932039923","Rewind"],["142853231704504146","on"],["1774834209035716827","Fast-forward"],["1911090580951495029","Captions"],["2023925063728908356","Unmute"],["298626259350585300","Unknown"],["3045980486001972586","Live"],["3278592358864783064","Language"],["4242938254936928940","enter picture-in-picture"],["4259064532355692191","Auto"],["4388316720828367903","More settings"],["5146287486336231188",
"Not applicable"],["5553522235935533682","Seek slider"],["5963689277976480680","Mute"],["6073266792045231479","Resolution"],["6161306839322897077","Exit full screen"],["622115170869907732","Picture in Picture"],["6614181658619787283","exit picture-in-picture"],["7071612439610534706","Cast..."],["8145129506114534451","Off"],["8345190086337560158","Full screen"],["836055097473758014","Play"],["9042260521669277115","Pause"]]));b.W("en-GB",new Map([["1050953507607739202","volume"],["1077325112364709655",
"Back"],["1142734805932039923","Rewind"],["142853231704504146","on"],["1774834209035716827","Fast-forward"],["1911090580951495029","Captions"],["2023925063728908356","Unmute"],["298626259350585300","Unknown"],["3045980486001972586","Live"],["3278592358864783064","Language"],["4242938254936928940","enter picture-in-picture"],["4259064532355692191","Auto"],["4388316720828367903","More settings"],["5146287486336231188","Not applicable"],["5553522235935533682","Seek slider"],["5963689277976480680","Mute"],
["6073266792045231479","Resolution"],["6161306839322897077","Exit full screen"],["622115170869907732","Picture in Picture"],["6614181658619787283","exit picture-in-picture"],["7071612439610534706","Cast..."],["8145129506114534451","Off"],["8345190086337560158","Full screen"],["836055097473758014","Play"],["9042260521669277115","Pause"]]));b.W("es",new Map([["1050953507607739202","volumen"],["1077325112364709655","Atr\u00e1s"],["1142734805932039923","Retroceder"],["142853231704504146","activado"],
["1774834209035716827","Avance r\u00e1pido"],["1911090580951495029","Subt\u00edtulos"],["2023925063728908356","Activar sonido"],["298626259350585300","Desconocido"],["3045980486001972586","En directo"],["3278592358864783064","Idioma"],["4242938254936928940","abrir el modo imagen en imagen"],["4259064532355692191","Autom\u00e1tica"],["4388316720828367903","M\u00e1s ajustes"],["5146287486336231188","No aplicable"],["5553522235935533682","Barra deslizante de b\u00fasqueda"],["5963689277976480680","Silenciar"],
["6073266792045231479","Resoluci\u00f3n"],["6161306839322897077","Salir del modo de pantalla completa"],["622115170869907732","Imagen en imagen"],["6614181658619787283","salir del modo imagen en imagen"],["7071612439610534706","Reparto..."],["8145129506114534451","No"],["8345190086337560158","Pantalla completa"],["836055097473758014","Reproducir"],["9042260521669277115","Pausa"]]));b.W("es-419",new Map([["1050953507607739202","volumen"],["1077325112364709655","Atr\u00e1s"],["1142734805932039923",
"Retroceder"],["142853231704504146","activado"],["1774834209035716827","Avance r\u00e1pido"],["1911090580951495029","Subt\u00edtulos"],["2023925063728908356","Activar sonido"],["298626259350585300","Desconocido"],["3045980486001972586","En vivo"],["3278592358864783064","Idioma"],["4242938254936928940","ingresar al modo de pantalla en pantalla"],["4259064532355692191","Auto"],["4388316720828367903","M\u00e1s opciones de configuraci\u00f3n"],["5146287486336231188","No aplicable"],["5553522235935533682",
"Barra deslizante de b\u00fasqueda"],["5963689277976480680","Silenciar"],["6073266792045231479","Resoluci\u00f3n"],["6161306839322897077","Salir de pantalla completa"],["622115170869907732","Pantalla en pantalla"],["6614181658619787283","salir del modo de pantalla en pantalla"],["7071612439610534706","Transmitir\u2026"],["8145129506114534451","Desactivado"],["8345190086337560158","Pantalla completa"],["836055097473758014","Jugar"],["9042260521669277115","Detener"]]));b.W("fr",new Map([["1050953507607739202",
"volume"],["1077325112364709655","Retour"],["1142734805932039923","Retour arri\u00e8re"],["142853231704504146","activ\u00e9"],["1774834209035716827","Avance rapide"],["1911090580951495029","Sous-titres"],["2023925063728908356","Activer le son"],["298626259350585300","Inconnue"],["3045980486001972586","En direct"],["3278592358864783064","Langue"],["4242938254936928940","utiliser le mode PIP"],["4259064532355692191","Auto"],["4388316720828367903","Autres param\u00e8tres"],["5146287486336231188","Non applicable"],
["5553522235935533682","Barre de recherche"],["5963689277976480680","D\u00e9sactiver le son"],["6073266792045231479","R\u00e9solution"],["6161306839322897077","Quitter le mode plein \u00e9cran"],["622115170869907732","Picture-in-picture"],["6614181658619787283","quitter le mode PIP"],["7071612439610534706","Caster sur\u2026"],["8145129506114534451","D\u00e9sactiv\u00e9e"],["8345190086337560158","Plein \u00e9cran"],["836055097473758014","Lire"],["9042260521669277115","Mettre en veille"]]));b.W("it",
new Map([["1050953507607739202","volume"],["1077325112364709655","Indietro"],["1142734805932039923","Riavvolgi"],["142853231704504146","on"],["1774834209035716827","Avanti veloce"],["1911090580951495029","Sottotitoli"],["2023925063728908356","Riattiva audio"],["298626259350585300","Sconosciuto"],["3045980486001972586","Dal vivo"],["3278592358864783064","Lingua"],["4242938254936928940","attiva picture in picture"],["4259064532355692191","Auto"],["4388316720828367903","Altre impostazioni"],["5146287486336231188",
"Non applicable"],["5553522235935533682","Dispositivo di scorrimento"],["5963689277976480680","Disattiva audio"],["6073266792045231479","Risoluzione"],["6161306839322897077","Esci dalla modalit\u00e0 a schermo intero"],["622115170869907732","Picture in picture"],["6614181658619787283","esci da picture in picture"],["7071612439610534706","Trasmetti\u2026"],["8145129506114534451","Disattivato"],["8345190086337560158","Schermo intero"],["836055097473758014","Riproduci"],["9042260521669277115","Metti in pausa"]]));
b.W("ja",new Map([["1050953507607739202","\u97f3\u91cf"],["1077325112364709655","\u623b\u308b"],["1142734805932039923","\u5dfb\u304d\u623b\u3057"],["142853231704504146","\u30aa\u30f3"],["1774834209035716827","\u65e9\u9001\u308a"],["1911090580951495029","\u5b57\u5e55"],["2023925063728908356","\u30df\u30e5\u30fc\u30c8\u89e3\u9664"],["298626259350585300","\u4e0d\u660e"],["3045980486001972586","\u30e9\u30a4\u30d6"],["3278592358864783064","\u8a00\u8a9e"],["4242938254936928940","\u30d4\u30af\u30c1\u30e3\u30fc \u30a4\u30f3 \u30d4\u30af\u30c1\u30e3\u30fc\u3092\u958b\u59cb\u3057\u307e\u3059"],
["4259064532355692191","\u81ea\u52d5"],["4388316720828367903","\u305d\u306e\u4ed6\u306e\u8a2d\u5b9a"],["5146287486336231188","--"],["5553522235935533682","\u30b7\u30fc\u30af \u30d0\u30fc"],["5963689277976480680","\u30df\u30e5\u30fc\u30c8"],["6073266792045231479","\u89e3\u50cf\u5ea6"],["6161306839322897077","\u5168\u753b\u9762\u30e2\u30fc\u30c9\u306e\u7d42\u4e86"],["622115170869907732","\u30d4\u30af\u30c1\u30e3\u30fc \u30a4\u30f3 \u30d4\u30af\u30c1\u30e3\u30fc"],["6614181658619787283","\u30d4\u30af\u30c1\u30e3\u30fc \u30a4\u30f3 \u30d4\u30af\u30c1\u30e3\u30fc\u3092\u7d42\u4e86\u3057\u307e\u3059"],
["7071612439610534706","\u30ad\u30e3\u30b9\u30c8..."],["8145129506114534451","\u30aa\u30d5"],["8345190086337560158","\u5168\u753b\u9762"],["836055097473758014","\u518d\u751f"],["9042260521669277115","\u4e00\u6642\u505c\u6b62"]]));b.W("ko",new Map([["1050953507607739202","\ubcfc\ub968"],["1077325112364709655","\ub4a4\ub85c"],["1142734805932039923","\ub418\uac10\uae30"],["142853231704504146","\uc0ac\uc6a9"],["1774834209035716827","\ube68\ub9ac\uac10\uae30"],["1911090580951495029","\uc790\ub9c9"],["2023925063728908356",
"\uc74c\uc18c\uac70 \ud574\uc81c"],["298626259350585300","\uc54c \uc218 \uc5c6\uc74c"],["3045980486001972586","\ub77c\uc774\ube0c"],["3278592358864783064","\uc5b8\uc5b4"],["4242938254936928940","PIP \ubaa8\ub4dc \uc2dc\uc791"],["4259064532355692191","\uc790\ub3d9"],["4388316720828367903","\uc124\uc815 \ub354\ubcf4\uae30"],["5146287486336231188","\ud574\ub2f9 \uc0ac\ud56d \uc5c6\uc74c"],["5553522235935533682","\ud0d0\uc0c9 \uc2ac\ub77c\uc774\ub354"],["5963689277976480680","\uc74c\uc18c\uac70"],["6073266792045231479",
"\ud574\uc0c1\ub3c4"],["6161306839322897077","\uc804\uccb4\ud654\uba74 \uc885\ub8cc"],["622115170869907732","PIP \ubaa8\ub4dc"],["6614181658619787283","PIP \ubaa8\ub4dc \uc885\ub8cc"],["7071612439610534706","\uc804\uc1a1..."],["8145129506114534451","\uc0ac\uc6a9 \uc548\ud568"],["8345190086337560158","\uc804\uccb4\ud654\uba74"],["836055097473758014","\uc7ac\uc0dd"],["9042260521669277115","\uc77c\uc2dc\uc911\uc9c0"]]));b.W("nl",new Map([["1050953507607739202","volume"],["1077325112364709655","Terug"],
["1142734805932039923","Terugspoelen"],["142853231704504146","aan"],["1774834209035716827","Vooruitspoelen"],["1911090580951495029","Ondertiteling"],["2023925063728908356","Dempen opheffen"],["298626259350585300","Onbekend"],["3045980486001972586","Live"],["3278592358864783064","Taal"],["4242938254936928940","scherm-in-scherm openen"],["4259064532355692191","Automatisch"],["4388316720828367903","Meer instellingen"],["5146287486336231188","Niet van toepassing"],["5553522235935533682","Zoekschuifbalk"],
["5963689277976480680","Dempen"],["6073266792045231479","Resolutie"],["6161306839322897077","Volledig scherm afsluiten"],["622115170869907732","Scherm-in-scherm"],["6614181658619787283","scherm-in-scherm afsluiten"],["7071612439610534706","Casten..."],["8145129506114534451","Uit"],["8345190086337560158","Volledig scherm"],["836055097473758014","Afspelen"],["9042260521669277115","Onderbreken"]]));b.W("pl",new Map([["1050953507607739202","g\u0142o\u015bno\u015b\u0107"],["1077325112364709655","Wstecz"],
["1142734805932039923","Przewi\u0144 do ty\u0142u"],["142853231704504146","w\u0142."],["1774834209035716827","Przewi\u0144 do przodu"],["1911090580951495029","Napisy"],["2023925063728908356","Wy\u0142\u0105cz wyciszenie"],["298626259350585300","Nieznane"],["3045980486001972586","Na \u017cywo"],["3278592358864783064","J\u0119zyk"],["4242938254936928940","w\u0142\u0105cz tryb obrazu w obrazie"],["4259064532355692191","Automatyczna"],["4388316720828367903","Wi\u0119cej ustawie\u0144"],["5146287486336231188",
"Nie dotyczy"],["5553522235935533682","Suwak przewijania"],["5963689277976480680","Wycisz"],["6073266792045231479","Rozdzielczo\u015b\u0107"],["6161306839322897077","Zamknij pe\u0142ny ekran"],["622115170869907732","Obraz w obrazie"],["6614181658619787283","wy\u0142\u0105cz tryb obrazu w obrazie"],["7071612439610534706","Prze\u015blij..."],["8145129506114534451","Wy\u0142\u0105czone"],["8345190086337560158","Pe\u0142ny ekran"],["836055097473758014","Odtwarzaj"],["9042260521669277115","Wstrzymaj"]]));
b.W("pt-BR",new Map([["1050953507607739202","volume"],["1077325112364709655","Voltar"],["1142734805932039923","Retroceder"],["142853231704504146","ativado"],["1774834209035716827","Avan\u00e7ar"],["1911090580951495029","Legendas ocultas"],["2023925063728908356","Ativar som"],["298626259350585300","Desconhecido"],["3045980486001972586","Ao vivo"],["3278592358864783064","Idioma"],["4242938254936928940","entrar no modo picture-in-picture"],["4259064532355692191","Autom\u00e1tico"],["4388316720828367903",
"Mais configura\u00e7\u00f5es"],["5146287486336231188","N\u00e3o aplic\u00e1vel"],["5553522235935533682","Bot\u00e3o deslizante de busca"],["5963689277976480680","Desativar som"],["6073266792045231479","Resolu\u00e7\u00e3o"],["6161306839322897077","Sair da tela inteira"],["622115170869907732","Picture-in-picture"],["6614181658619787283","sair de picture-in-picture"],["7071612439610534706","Elenco..."],["8145129506114534451","Desativado"],["8345190086337560158","Tela inteira"],["836055097473758014",
"Reproduzir"],["9042260521669277115","Pausar"]]));b.W("pt-PT",new Map([["1050953507607739202","volume"],["1077325112364709655","Anterior"],["1142734805932039923","Recuar"],["142853231704504146","ativado"],["1774834209035716827","Avan\u00e7ar"],["1911090580951495029","Legendas"],["2023925063728908356","Reativar o som"],["298626259350585300","Desconhecida"],["3045980486001972586","Em direto"],["3278592358864783064","Idioma"],["4242938254936928940","entrar no modo ecr\u00e3 no ecr\u00e3"],["4259064532355692191",
"Autom\u00e1tico"],["4388316720828367903","Mais defini\u00e7\u00f5es"],["5146287486336231188","N\u00e3o aplic\u00e1vel"],["5553522235935533682","Controlo de deslize da procura"],["5963689277976480680","Desativar o som"],["6073266792045231479","Resolu\u00e7\u00e3o"],["6161306839322897077","Sair do ecr\u00e3 inteiro"],["622115170869907732","Ecr\u00e3 no ecr\u00e3"],["6614181658619787283","sair do modo ecr\u00e3 no ecr\u00e3"],["7071612439610534706","Transmitir..."],["8145129506114534451","Desativado"],
["8345190086337560158","Ecr\u00e3 inteiro"],["836055097473758014","Reproduzir"],["9042260521669277115","Colocar em pausa"]]));b.W("ru",new Map([["1050953507607739202","\u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c"],["1077325112364709655","\u041d\u0430\u0437\u0430\u0434"],["1142734805932039923","\u041f\u0435\u0440\u0435\u043c\u043e\u0442\u0430\u0442\u044c \u043d\u0430\u0437\u0430\u0434"],["142853231704504146","\u0412\u041a\u041b"],["1774834209035716827","\u041f\u0435\u0440\u0435\u043c\u043e\u0442\u0430\u0442\u044c \u0432\u043f\u0435\u0440\u0435\u0434"],
["1911090580951495029","\u0421\u0443\u0431\u0442\u0438\u0442\u0440\u044b"],["2023925063728908356","\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0432\u0443\u043a"],["298626259350585300","\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e"],["3045980486001972586","\u0412 \u044d\u0444\u0438\u0440\u0435"],["3278592358864783064","\u042f\u0437\u044b\u043a"],["4242938254936928940",'\u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0435\u0436\u0438\u043c "\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435"'],
["4259064532355692191","\u0410\u0432\u0442\u043e\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430"],["4388316720828367903","\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438"],["5146287486336231188","\u041d\u0435\u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e"],["5553522235935533682","\u041f\u043e\u043b\u0437\u0443\u043d\u043e\u043a \u043f\u043e\u0438\u0441\u043a\u0430"],["5963689277976480680","\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0432\u0443\u043a"],
["6073266792045231479","\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435"],["6161306839322897077","\u0412\u044b\u0445\u043e\u0434 \u0438\u0437 \u043f\u043e\u043b\u043d\u043e\u044d\u043a\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430"],["622115170869907732","\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435"],["6614181658619787283",'\u0432\u044b\u0439\u0442\u0438 \u0438\u0437 \u0440\u0435\u0436\u0438\u043c\u0430 "\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435"'],
["7071612439610534706","\u0425\u0440\u043e\u043c\u043a\u0430\u0441\u0442"],["8145129506114534451","\u0412\u044b\u043a\u043b."],["8345190086337560158","\u0412\u043e \u0432\u0435\u0441\u044c \u044d\u043a\u0440\u0430\u043d"],["836055097473758014","\u0421\u043c\u043e\u0442\u0440\u0435\u0442\u044c"],["9042260521669277115","\u041f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c"]]));b.W("th",new Map([["1050953507607739202","\u0e23\u0e30\u0e14\u0e31\u0e1a\u0e40\u0e2a\u0e35\u0e22\u0e07"],
["1077325112364709655","\u0e01\u0e25\u0e31\u0e1a"],["1142734805932039923","\u0e01\u0e23\u0e2d\u0e01\u0e25\u0e31\u0e1a"],["142853231704504146","\u0e40\u0e1b\u0e34\u0e14"],["1774834209035716827","\u0e01\u0e23\u0e2d\u0e44\u0e1b\u0e02\u0e49\u0e32\u0e07\u0e2b\u0e19\u0e49\u0e32"],["1911090580951495029","\u0e04\u0e33\u0e2d\u0e18\u0e34\u0e1a\u0e32\u0e22\u0e27\u0e34\u0e14\u0e35\u0e42\u0e2d"],["2023925063728908356","\u0e40\u0e1b\u0e34\u0e14\u0e40\u0e2a\u0e35\u0e22\u0e07"],["298626259350585300","\u0e44\u0e21\u0e48\u0e17\u0e23\u0e32\u0e1a"],
["3045980486001972586","\u0e2a\u0e14"],["3278592358864783064","\u0e20\u0e32\u0e29\u0e32"],["4242938254936928940","\u0e40\u0e02\u0e49\u0e32\u0e2a\u0e39\u0e48\u0e01\u0e32\u0e23\u0e41\u0e2a\u0e14\u0e07\u0e20\u0e32\u0e1e\u0e0b\u0e49\u0e2d\u0e19\u0e20\u0e32\u0e1e"],["4259064532355692191","\u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34"],["4388316720828367903","\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e15\u0e34\u0e21"],["5146287486336231188",
"\u0e44\u0e21\u0e48\u0e40\u0e01\u0e35\u0e48\u0e22\u0e27\u0e02\u0e49\u0e2d\u0e07"],["5553522235935533682","\u0e41\u0e16\u0e1a\u0e40\u0e25\u0e37\u0e48\u0e2d\u0e19\u0e04\u0e49\u0e19\u0e2b\u0e32"],["5963689277976480680","\u0e1b\u0e34\u0e14\u0e40\u0e2a\u0e35\u0e22\u0e07"],["6073266792045231479","\u0e04\u0e27\u0e32\u0e21\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14"],["6161306839322897077","\u0e2d\u0e2d\u0e01\u0e08\u0e32\u0e01\u0e42\u0e2b\u0e21\u0e14\u0e40\u0e15\u0e47\u0e21\u0e2b\u0e19\u0e49\u0e32\u0e08\u0e2d"],
["622115170869907732","\u0e01\u0e32\u0e23\u0e41\u0e2a\u0e14\u0e07\u0e20\u0e32\u0e1e\u0e0b\u0e49\u0e2d\u0e19\u0e20\u0e32\u0e1e"],["6614181658619787283","\u0e2d\u0e2d\u0e01\u0e08\u0e32\u0e01\u0e01\u0e32\u0e23\u0e41\u0e2a\u0e14\u0e07\u0e20\u0e32\u0e1e\u0e0b\u0e49\u0e2d\u0e19\u0e20\u0e32\u0e1e"],["7071612439610534706","\u0e41\u0e04\u0e2a\u0e15\u0e4c..."],["8145129506114534451","\u0e1b\u0e34\u0e14"],["8345190086337560158","\u0e40\u0e15\u0e47\u0e21\u0e2b\u0e19\u0e49\u0e32\u0e08\u0e2d"],["836055097473758014",
"\u0e40\u0e25\u0e48\u0e19"],["9042260521669277115","\u0e2b\u0e22\u0e38\u0e14\u0e0a\u0e31\u0e48\u0e27\u0e04\u0e23\u0e32\u0e27"]]));b.W("tr",new Map([["1050953507607739202","ses d\u00fczeyi"],["1077325112364709655","Geri"],["1142734805932039923","Geri sar"],["142853231704504146","a\u00e7\u0131k"],["1774834209035716827","\u0130leri sar"],["1911090580951495029","Altyaz\u0131lar"],["2023925063728908356","Sesi a\u00e7"],["298626259350585300","Bilinmiyor"],["3045980486001972586","Canl\u0131"],["3278592358864783064",
"Dil"],["4242938254936928940","pencere i\u00e7inde pencere moduna gir"],["4259064532355692191","Otomatik"],["4388316720828367903","Di\u011fer ayarlar"],["5146287486336231188","Kullan\u0131lm\u0131yor"],["5553522235935533682","Arama kayd\u0131rma \u00e7ubu\u011fu"],["5963689277976480680","Sesi kapat"],["6073266792045231479","\u00c7\u00f6z\u00fcn\u00fcrl\u00fck"],["6161306839322897077","Tam ekrandan \u00e7\u0131k"],["622115170869907732","Pencere i\u00e7inde Pencere"],["6614181658619787283","pencere i\u00e7inde pencere modundan \u00e7\u0131k\u0131n"],
["7071612439610534706","Yay\u0131nla..."],["8145129506114534451","Kapal\u0131"],["8345190086337560158","Tam ekran"],["836055097473758014","Oynat"],["9042260521669277115","Duraklat"]]));b.W("zh-CN",new Map([["1050953507607739202","\u97f3\u91cf"],["1077325112364709655","\u8fd4\u56de"],["1142734805932039923","\u5feb\u9000"],["142853231704504146","\u5f00\u542f"],["1774834209035716827","\u5feb\u8fdb"],["1911090580951495029","\u5b57\u5e55"],["2023925063728908356","\u53d6\u6d88\u9759\u97f3"],["298626259350585300",
"\u672a\u77e5"],["3045980486001972586","\u76f4\u64ad"],["3278592358864783064","\u8bed\u8a00"],["4242938254936928940","\u8fdb\u5165\u201c\u753b\u4e2d\u753b\u201d\u6a21\u5f0f"],["4259064532355692191","\u81ea\u52a8"],["4388316720828367903","\u66f4\u591a\u8bbe\u7f6e"],["5146287486336231188","\u4e0d\u9069\u7528"],["5553522235935533682","\u64ad\u653e\u6ed1\u5757"],["5963689277976480680","\u9759\u97f3"],["6073266792045231479","\u5206\u8fa8\u7387"],["6161306839322897077","\u9000\u51fa\u5168\u5c4f"],["622115170869907732",
"\u753b\u4e2d\u753b"],["6614181658619787283","\u9000\u51fa\u201c\u753b\u4e2d\u753b\u201d\u6a21\u5f0f"],["7071612439610534706","\u6295\u5c04\u2026"],["8145129506114534451","\u5173\u95ed"],["8345190086337560158","\u5168\u5c4f"],["836055097473758014","\u64ad\u653e"],["9042260521669277115","\u6682\u505c"]]));b.W("zh-HK",new Map([["1050953507607739202","\u97f3\u91cf"],["1077325112364709655","\u8fd4\u56de"],["1142734805932039923","\u5012\u5e36"],["142853231704504146",""],["1774834209035716827","\u5feb\u8f49"],
["1911090580951495029","\u5b57\u5e55"],["2023925063728908356","\u89e3\u9664\u975c\u97f3"],["298626259350585300","\u4e0d\u660e"],["3045980486001972586","\u76f4\u64ad"],["3278592358864783064","\u8a9e\u8a00"],["4242938254936928940","\u9032\u5165\u756b\u4e2d\u756b"],["4259064532355692191","\u81ea\u52d5"],["4388316720828367903","\u66f4\u591a\u8a2d\u5b9a"],["5146287486336231188","\u4e0d\u9069\u7528"],["5553522235935533682","\u641c\u5c0b\u6ed1\u687f"],["5963689277976480680","\u975c\u97f3"],["6073266792045231479",
""],["6161306839322897077","\u7d50\u675f\u5168\u87a2\u5e55"],["622115170869907732","\u756b\u4e2d\u756b"],["6614181658619787283","\u9000\u51fa\u756b\u4e2d\u756b"],["7071612439610534706","\u6295\u653e\u2026"],["8145129506114534451","\u672a\u9078\u53d6"],["8345190086337560158","\u5168\u87a2\u5e55"],["836055097473758014","\u64ad\u653e"],["9042260521669277115","\u66ab\u505c"]]));b.W("zh-TW",new Map([["1050953507607739202","\u97f3\u91cf"],["1077325112364709655","\u8fd4\u56de"],["1142734805932039923","\u5012\u8f49"],
["142853231704504146","\u958b\u555f"],["1774834209035716827","\u5feb\u8f49"],["1911090580951495029","\u5b57\u5e55"],["2023925063728908356","\u89e3\u9664\u975c\u97f3"],["298626259350585300","\u672a\u77e5"],["3045980486001972586","\u76f4\u64ad"],["3278592358864783064","\u8a9e\u8a00"],["4242938254936928940","\u9032\u5165\u5b50\u6bcd\u756b\u9762"],["4259064532355692191","\u81ea\u52d5"],["4388316720828367903","\u66f4\u591a\u8a2d\u5b9a"],["5146287486336231188","\u4e0d\u9069\u7528"],["5553522235935533682",
"\u641c\u5c0b\u6ed1\u687f"],["5963689277976480680","\u975c\u97f3"],["6073266792045231479","\u89e3\u6790\u5ea6"],["6161306839322897077","\u7d50\u675f\u5168\u87a2\u5e55"],["622115170869907732","\u5b50\u6bcd\u756b\u9762"],["6614181658619787283","\u96e2\u958b\u5b50\u6bcd\u756b\u9762"],["7071612439610534706","\u6295\u653e\u2026"],["8145129506114534451","\u95dc\u9589"],["8345190086337560158","\u5168\u87a2\u5e55"],["836055097473758014","\u64ad\u653e"],["9042260521669277115","\u66ab\u505c"]]));b.wd(navigator.languages||
[]);return b}var pn="time_and_duration mute volume fullscreen overflow_menu rewind fast_forward spacer".split(" ");function Z(b,c){this.G=b;this.f=c;this.a=new Nb;this.b=this.f.l;this.c=this.f.cb();this.video=this.f.Mb()}y("shaka.ui.Element",Z);Z.prototype.destroy=function(){this.a.R();return Promise.resolve()};Z.prototype.destroy=Z.prototype.destroy;function tn(b,c){Z.call(this,b,c);var d=this;this.g=W("button");this.g.classList.add("material-icons");this.g.classList.add("shaka-fast-forward-button");this.g.textContent="fast_forward";this.G.appendChild(this.g);un(this);G(this.a,this.b,"locale-updated",function(){un(d)});G(this.a,this.b,"locale-changed",function(){un(d)});G(this.a,this.g,"click",function(){if(d.video.duration){var b=d.c.bb();d.c.nd(0>b||4<b?1:2*b)}})}va(tn,Z);y("shaka.ui.FastForwardButton",tn);
function un(b){b.g.setAttribute("aria-label",b.b.resolve("1774834209035716827"))}function vn(){}vn.prototype.create=function(b,c){return new tn(b,c)};on("fast_forward",new vn);function wn(b,c){Z.call(this,b,c);var d=this;this.g=W("button");this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons");this.g.textContent="fullscreen";this.G.appendChild(this.g);xn(this);this.j=this.f.f;G(this.a,this.b,"locale-updated",function(){xn(d)});G(this.a,this.b,"locale-changed",function(){xn(d)});G(this.a,this.g,"click",function(){yn(d)});screen.orientation&&G(this.a,screen.orientation,"change",function(){d.video&&0!=d.video.readyState&&!d.f.o.ba()&&(screen.orientation.type.includes("landscape")&&
!document.fullscreenElement?d.j.requestFullscreen():screen.orientation.type.includes("portrait")&&document.fullscreenElement&&document.exitFullscreen())});G(this.a,document,"fullscreenchange",function(){d.g.textContent=document.fullscreenElement?"fullscreen_exit":"fullscreen";xn(d)})}va(wn,Z);y("shaka.ui.FullscreenButton",wn);function xn(b){b.g.setAttribute("aria-label",b.b.resolve(document.fullscreenElement?"6161306839322897077":"8345190086337560158"))}
function yn(b){r(function d(){return v(d,function(d){switch(d.s){case 1:if(document.fullscreenElement)document.exitFullscreen(),d.I(0);else return u(d,b.j.requestFullscreen(),0)}})})}function zn(){}zn.prototype.create=function(b,c){return new wn(b,c)};on("fullscreen",new zn);function An(b,c){Z.call(this,b,c);var d=this;this.g=W("button");this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons");this.g.textContent="volume_up";this.G.appendChild(this.g);Bn(this);G(this.a,this.b,"locale-updated",function(){Bn(d)});G(this.a,this.b,"locale-changed",function(){Bn(d)});G(this.a,this.g,"click",function(){d.video.muted=!d.video.muted});G(this.a,this.video,"volumechange",function(){Bn(d);d.g.textContent=d.video.muted?"volume_off":"volume_up"})}va(An,Z);
y("shaka.ui.MuteButton",An);function Bn(b){b.g.setAttribute("aria-label",b.b.resolve(b.video.muted?"2023925063728908356":"5963689277976480680"))}function Cn(){}Cn.prototype.create=function(b,c){return new An(b,c)};on("mute",new Cn);function Dn(b,c){Z.call(this,b,c);var d=this;this.Da=this.f.P;this.Vd=this.f.qa;this.ha=this.f.o;this.ea=this.H=this.Za=this.m=this.K=this.Qa=this.tb=this.Ra=this.Cc=this.Ac=this.qa=this.V=this.P=this.S=this.sb=this.zc=this.aa=this.$=this.Bc=this.ua=this.o=this.u=this.j=this.B=this.w=this.F=this.Ca=this.l=this.A=this.v=null;this.Qd=new Map([["captions",function(){d.v=W("button");d.v.classList.add("shaka-caption-button");d.A=W("i");d.A.classList.add("material-icons");d.A.textContent="closed_caption";
d.v.appendChild(d.A);var b=W("label");b.classList.add("shaka-overflow-button-label");d.zc=W("span");b.appendChild(d.zc);d.aa=W("span");d.aa.classList.add("shaka-current-selection-span");b.appendChild(d.aa);d.v.appendChild(b);d.g.appendChild(d.v)}],["cast",function(){d.l=W("button");d.l.classList.add("shaka-cast-button");d.l.classList.add("shaka-hidden");d.l.setAttribute("aria-pressed","false");d.Ca=W("i");d.Ca.classList.add("material-icons");d.Ca.textContent="cast";d.l.appendChild(d.Ca);var b=W("label");
b.classList.add("shaka-overflow-button-label");d.Bc=W("span");b.appendChild(d.Bc);d.qa=W("span");d.qa.classList.add("shaka-current-selection-span");b.appendChild(d.qa);d.l.appendChild(b);d.g.appendChild(d.l)}],["quality",function(){d.w=W("button");d.w.classList.add("shaka-resolution-button");var b=W("i");b.classList.add("material-icons");b.textContent="settings";d.w.appendChild(b);b=W("label");b.classList.add("shaka-overflow-button-label");d.Cc=W("span");b.appendChild(d.Cc);d.ua=W("span");d.ua.classList.add("shaka-current-selection-span");
b.appendChild(d.ua);d.w.appendChild(b);d.g.appendChild(d.w)}],["language",function(){d.B=W("button");d.B.classList.add("shaka-language-button");var b=W("i");b.classList.add("material-icons");b.textContent="language";d.B.appendChild(b);b=W("label");b.classList.add("shaka-overflow-button-label");d.Ra=W("span");d.Ra.classList.add("languageSpan");b.appendChild(d.Ra);d.$=W("span");d.$.classList.add("shaka-current-selection-span");var c=d.c.getConfiguration().preferredAudioLanguage;d.$.textContent=En(d,
c);b.appendChild(d.$);d.B.appendChild(b);d.g.appendChild(d.B)}],["picture_in_picture",function(){d.m=W("button");d.m.classList.add("shaka-pip-button");d.ea=W("i");d.ea.classList.add("material-icons");d.ea.textContent="picture_in_picture_alt";d.m.appendChild(d.ea);var b=W("label");b.classList.add("shaka-overflow-button-label");d.Za=W("span");d.Za.textContent=d.b.resolve("622115170869907732");b.appendChild(d.Za);d.H=W("span");d.H.classList.add("shaka-current-selection-span");d.H.textContent=d.b.resolve("8145129506114534451");
b.appendChild(d.H);d.m.appendChild(b);d.g.appendChild(d.m);document.pictureInPictureEnabled&&!d.video.disablePictureInPicture||Y(d.m,!1)}]]);this.Ea=this.f.c;this.F=W("button");this.F.classList.add("shaka-overflow-menu-button");this.F.classList.add("shaka-no-propagation");this.F.classList.add("material-icons");this.F.textContent="more_vert";this.G.appendChild(this.F);Fn(this);this.Od=this.f.f.getElementsByClassName("shaka-back-to-overflow-button");for(var e=0;e<this.Od.length;e++)this.Od[e].addEventListener("click",
function(){d.f.Mc();Y(d.g,!0);d.g.childNodes.length&&d.g.childNodes[0].focus();d.f.Zc()});G(this.a,this.b,"locale-updated",function(){Gn(d)});G(this.a,this.b,"locale-changed",function(){Gn(d)});G(this.a,this.Vd,"enterpictureinpicture",function(){d.ea.textContent="branding_watermark";d.m.setAttribute("aria-label",d.b.resolve("6614181658619787283"));d.H.textContent=d.b.resolve("142853231704504146")});G(this.a,this.Vd,"leavepictureinpicture",function(){d.ea.textContent="picture_in_picture_alt";d.m.setAttribute("aria-label",
d.b.resolve("4242938254936928940"));d.H.textContent=d.b.resolve("8145129506114534451")});this.l&&G(this.a,this.l,"click",function(){Hn(d)});this.v&&G(this.a,this.v,"click",function(){Y(d.g,!1);Y(d.o,!0);In(d.o)});this.m&&G(this.a,this.m,"click",function(){Jn(d)});G(this.a,this.c,"texttrackvisibility",function(){Kn(d)});G(this.a,this.c,"trackschanged",function(){if(d.v)if(en(d.c))Y(d.v,!0);else{var b=d.c.lc().length;Y(d.v,0<b)}Ln(d);Mn(d);Nn(d)});G(this.a,this.c,"variantchanged",function(){Ln(d);Mn(d)});
G(this.a,this.c,"textchanged",function(){Nn(d)});G(this.a,this.g,"touchstart",function(b){d.f.Ee(Date.now());b.stopPropagation()});G(this.a,this.F,"click",function(){On(d)});this.w&&G(this.a,this.w,"click",function(){Y(d.g,!1);Y(d.j,!0);In(d.j)});this.B&&G(this.a,this.B,"click",function(){Y(d.g,!1);Y(d.u,!0);In(d.u)});G(this.a,this.f,"caststatuschange",function(b){var c=d.ha.td()&&d.f.ea;b=b.newStatus;d.l&&(Y(d.l,c),d.Ca.textContent=b?"cast_connected":"cast",c&&(b?d.l.setAttribute("aria-pressed",
"true"):d.l.setAttribute("aria-pressed","false")));Pn(d);c=document.pictureInPictureEnabled&&!d.video.disablePictureInPicture&&null!=d.m;b?c&&Y(d.m,!1):c&&Y(d.m,!0)});G(this.a,this.Ea,"touchstart",function(b){d.g.classList.contains("shaka-displayed")&&(Y(d.g,!1),b.preventDefault())});Kn(this);this.zd=(new Map).set(this.v,"1911090580951495029").set(this.K,"1077325112364709655").set(this.S,"1077325112364709655").set(this.P,"1077325112364709655").set(this.w,"6073266792045231479").set(this.B,"3278592358864783064").set(this.l,
"7071612439610534706").set(this.F,"4388316720828367903");this.Wd=(new Map).set(this.zc,"1911090580951495029").set(this.sb,"1911090580951495029").set(this.V,"8145129506114534451").set(this.Bc,"7071612439610534706").set(this.Ac,"6073266792045231479").set(this.Cc,"6073266792045231479").set(this.Qa,"4259064532355692191").set(this.Ra,"3278592358864783064").set(this.tb,"3278592358864783064").set(this.Za,"622115170869907732");Gn(this)}va(Dn,Z);y("shaka.ui.OverflowMenu",Dn);
function Fn(b){b.g=W("div");b.g.classList.add("shaka-overflow-menu");b.g.classList.add("shaka-no-propagation");b.g.classList.add("shaka-show-controls-on-mouse-over");b.g.classList.add("shaka-settings-menu");b.Ea.appendChild(b.g);for(var c=0;c<b.Da.overflowMenuButtons.length;c++){var d=b.Da.overflowMenuButtons[c];b.Qd.get(d)&&b.Qd.get(d)()}-1<b.Da.overflowMenuButtons.indexOf("quality")&&(b.j=W("div"),b.j.classList.add("shaka-resolutions"),b.j.classList.add("shaka-no-propagation"),b.j.classList.add("shaka-show-controls-on-mouse-over"),
b.j.classList.add("shaka-settings-menu"),b.S=W("button"),b.S.classList.add("shaka-back-to-overflow-button"),b.j.appendChild(b.S),c=W("i"),c.classList.add("material-icons"),c.textContent="arrow_back",b.S.appendChild(c),b.Ac=W("span"),b.S.appendChild(b.Ac),c=W("button"),c.setAttribute("aria-selected","true"),b.j.appendChild(c),d=W("i"),d.classList.add("material-icons"),d.classList.add("shaka-chosen-item"),d.textContent="done",d.setAttribute("aria-hidden","true"),c.appendChild(d),b.Qa=W("span"),b.Qa.classList.add("shaka-auto-span"),
c.appendChild(b.Qa),b.Ea.appendChild(b.j));-1<b.Da.overflowMenuButtons.indexOf("language")&&(b.u=W("div"),b.u.classList.add("shaka-audio-languages"),b.u.classList.add("shaka-no-propagation"),b.u.classList.add("shaka-show-controls-on-mouse-over"),b.u.classList.add("shaka-settings-menu"),b.P=W("button"),b.P.classList.add("shaka-back-to-overflow-button"),b.u.appendChild(b.P),c=W("i"),c.classList.add("material-icons"),c.textContent="arrow_back",b.P.appendChild(c),b.tb=W("span"),b.P.appendChild(b.tb),
b.Ea.appendChild(b.u));-1<b.Da.overflowMenuButtons.indexOf("captions")&&(b.o=W("div"),b.o.classList.add("shaka-text-languages"),b.o.classList.add("shaka-no-propagation"),b.o.classList.add("shaka-show-controls-on-mouse-over"),b.o.classList.add("shaka-settings-menu"),b.K=W("button"),b.K.classList.add("shaka-back-to-overflow-button"),b.o.appendChild(b.K),c=W("i"),c.classList.add("material-icons"),c.textContent="arrow_back",b.K.appendChild(c),b.sb=W("span"),b.K.appendChild(b.sb),c=W("button"),c.setAttribute("aria-selected",
"true"),b.o.appendChild(c),d=W("i"),d.classList.add("material-icons"),d.classList.add("shaka-chosen-item"),d.textContent="done",d.setAttribute("aria-hidden","true"),c.appendChild(d),b.V=W("span"),b.V.classList.add("shaka-auto-span"),c.appendChild(b.V),b.Ea.appendChild(b.o))}
function Ln(b){if(b.w&&b.j){var c=b.c.mc();if(c.length&&!c[0].height)Y(b.j,!1),Y(b.w,!1);else{c.sort(function(b,c){return b.height-c.height});c.reverse();var d=c.find(function(b){return b.active});if(d){var e=d.language;c=c.filter(function(b){return b.language==e})}for(var f=dn(b.j,"shaka-back-to-overflow-button");b.j.firstChild;)b.j.removeChild(b.j.firstChild);b.j.appendChild(f);var g=b.c.getConfiguration().abr.enabled;c.forEach(function(c){var e=W("button");e.classList.add("explicit-resolution");
e.addEventListener("click",b.Fg.bind(b,c));var f=W("span");f.textContent=c.height+"p";e.appendChild(f);g||c!=d||(e.setAttribute("aria-selected","true"),e.appendChild(Qn()),f.classList.add("shaka-chosen-item"),b.ua.textContent=f.textContent);b.j.appendChild(e)});c=W("button");c.addEventListener("click",function(){this.c.configure({abr:{enabled:!0}});Ln(this)}.bind(b));f=W("span");f.textContent=b.b.resolve("4259064532355692191");c.appendChild(f);g&&(c.setAttribute("aria-selected","true"),c.appendChild(Qn()),
f.classList.add("shaka-chosen-item"),b.ua.textContent=b.b.resolve("4259064532355692191"));b.j.appendChild(c);In(b.j)}}}function Mn(b){if(b.B&&b.u&&b.$){var c=b.c.mc(),d=b.c.Jd().map(function(b){return b.language});Rn(b,c,b.u,d,b.Tf,!0,b.$);In(b.u)}}
function Nn(b){if(b.v&&b.o&&b.aa){var c=b.c.lc(),d=b.c.Md().map(function(b){return b.language});Rn(b,c,b.o,d,b.Uf,b.c.zb(),b.aa);c=W("button");c.addEventListener("click",function(){b.c.wc(!1);Nn(b)});c.appendChild(b.V);b.o.appendChild(c);b.c.zb()||(c.setAttribute("aria-selected","true"),c.appendChild(Qn()),b.V.classList.add("shaka-chosen-item"),b.aa.textContent=b.b.resolve("8145129506114534451"));In(b.o)}}
function Rn(b,c,d,e,f,g,h){var k=c.filter(function(b){return 1==b.active})[0];for(c=dn(d,"shaka-back-to-overflow-button");d.firstChild;)d.removeChild(d.firstChild);d.appendChild(c);e.forEach(function(c){var e=W("button");e.addEventListener("click",f.bind(b,c));var l=W("span");l.textContent=En(b,c);e.appendChild(l);g&&c==k.language&&(e.appendChild(Qn()),l.classList.add("shaka-chosen-item"),e.setAttribute("aria-selected","true"),h.textContent=l.textContent);d.appendChild(e)})}
function En(b,c){if(!c)return"";switch(c){case "mul":return b.b.resolve("411375375680850814");case "zxx":return b.b.resolve("5146287486336231188")}var d=Kd(c);return c in Xm?Xm[c].h:d in Xm?Xm[d].h+" ("+c+")":b.b.resolve("298626259350585300")+" ("+c+")"}Dn.prototype.Fg=function(b){this.c.configure({abr:{enabled:!1}});this.c.Ae(b,!0)};Dn.prototype.Tf=function(b){this.c.xe(b)};
Dn.prototype.Uf=function(b){var c=this;return r(function e(){return v(e,function(e){switch(e.s){case 1:return u(e,c.c.wc(!0),2);case 2:c.c.ye(b),e.s=0}})})};function In(b){b&&(b=dn(b,"shaka-chosen-item"))&&b.parentElement.focus()}function Qn(){var b=W("i");b.classList.add("material-icons");b.textContent="done";b.setAttribute("aria-hidden","true");return b}
function Kn(b){b.A&&(b.c.zb()?(b.A.classList.add("shaka-captions-on"),b.A.classList.remove("shaka-captions-off")):(b.A.classList.add("shaka-captions-off"),b.A.classList.remove("shaka-captions-on")))}
function Hn(b){r(function d(){return v(d,function(d){switch(d.s){case 1:if(b.ha.ba())b.ha.Ie();else if(b.l.disabled=!0,b.ha.cast().then(function(){this.l.disabled=!1}.bind(b),function(b){this.l.disabled=!1;8004!=b.code&&this.f.dispatchEvent(new C("error",{ef:b}))}.bind(b)),document.pictureInPictureElement&&null!=b.m)return u(d,Jn(b),0);d.I(0)}})})}
function Jn(b){return r(function d(){var e;return v(d,function(d){switch(d.s){case 1:return za(d,2),document.pictureInPictureElement?u(d,document.exitPictureInPicture(),5):u(d,b.video.requestPictureInPicture(),5);case 5:Ba(d,0);break;case 2:e=Ca(d),b.f.dispatchEvent(new C("error",{ef:e})),d.s=0}})})}function On(b){if(b.f.ac())b.f.Mc();else{Y(b.g,!0);b.f.Zc();var c=function(b){return 0==b.classList.contains("shaka-hidden")};Tb(b.g.childNodes,c)&&Ub(b.g.childNodes,c)[0].focus()}}
function Pn(b){b.qa&&(b.qa.textContent=b.ha.ba()?b.ha.uc():b.b.resolve("8145129506114534451"))}
function Gn(b){var c=b.zd.keys();c=q(c);for(var d=c.next();!d.done;d=c.next())if(d=d.value,null!=d){var e=b.zd.get(d);d.setAttribute("aria-label",b.b.resolve(e))}b.m&&(b.m.setAttribute("aria-label",b.b.resolve(document.pictureInPictureElement?"6614181658619787283":"4242938254936928940")),b.H.textContent=b.b.resolve(document.pictureInPictureElement?"142853231704504146":"8145129506114534451"));Pn(b);Ln(b);Nn(b);c=b.Wd.keys();c=q(c);for(d=c.next();!d.done;d=c.next())d=d.value,null!=d&&(e=b.Wd.get(d),
d.textContent=b.b.resolve(e))}function Sn(){}Sn.prototype.create=function(b,c){return new Dn(b,c)};on("overflow_menu",new Sn);function Tn(b,c){Z.call(this,b,c);var d=this;this.g=W("div");this.g.classList.add("shaka-current-time");this.g.textContent="0:00";this.G.appendChild(this.g);G(this.a,this.g,"click",function(){d.c.Z()&&(d.video.currentTime=d.c.ib().end)});G(this.a,this.f,"timeandseekrangeupdated",function(){var b=d.f.g,c=d.f.Kd(),g=d.video.duration,h=d.c.ib(),k=h.end-h.start;d.c.Z()?(c=Math.max(0,Math.floor(h.end-c)),g=3600<=k,1<=c||b?(d.g.textContent="- "+Un(c,g),d.g.style.cursor="pointer"):(d.g.textContent=d.b.resolve("3045980486001972586"),
d.g.style.cursor="")):(b=3600<=g,d.g.textContent=Un(c,b),g&&(d.g.textContent+=" / "+Un(g,b)),d.g.style.cursor="")})}va(Tn,Z);y("shaka.ui.PresentationTimeTracker",Tn);function Un(b,c){var d=Math.floor(b/3600),e=Math.floor(b/60%60),f=Math.floor(b%60);10>f&&(f="0"+f);f=e+":"+f;c&&(10>e&&(f="0"+f),f=d+":"+f);return f}function Vn(){}Vn.prototype.create=function(b,c){return new Tn(b,c)};on("time_and_duration",new Vn);function Wn(b,c){Z.call(this,b,c);var d=this;this.g=W("button");this.g.classList.add("material-icons");this.g.classList.add("shaka-rewind-button");this.g.textContent="fast_rewind";this.G.appendChild(this.g);Xn(this);G(this.a,this.b,"locale-updated",function(){Xn(d)});G(this.a,this.b,"locale-changed",function(){Xn(d)});G(this.a,this.g,"click",function(){if(d.video.duration){var b=d.c.bb();d.c.nd(0<b||-4>b?-1:2*b)}})}va(Wn,Z);y("shaka.ui.RewindButton",Wn);
function Xn(b){b.g.setAttribute("aria-label",b.b.resolve("1142734805932039923"))}function Yn(){}Yn.prototype.create=function(b,c){return new Wn(b,c)};on("rewind",new Yn);function Zn(b,c){Z.call(this,b,c);var d=W("div");d.classList.add("shaka-spacer");d.setAttribute("aria-hidden",!0);this.G.appendChild(d)}va(Zn,Z);y("shaka.ui.Spacer",Zn);function $n(){}$n.prototype.create=function(b,c){return new Zn(b,c)};on("spacer",new $n);function ao(b,c){var d=this;this.g=!1;this.c=[];this.l=b;this.j=c;this.a=W("div");this.a.classList.add("shaka-text-container");this.j.appendChild(this.a);this.f=new H(function(){return bo(d)});this.f.start(.25,!0);this.b=new Map}y("shaka.ui.TextDisplayer",ao);ao.prototype.append=function(b){this.c=this.c.concat(b)};ao.prototype.append=ao.prototype.append;ao.prototype.destroy=function(){this.j.removeChild(this.a);this.a=null;this.g=!1;this.c=[];this.f&&this.f.stop();this.b.clear()};
ao.prototype.destroy=ao.prototype.destroy;ao.prototype.remove=function(b,c){if(!this.a)return!1;for(var d=new Set,e=q(this.c),f=e.next();!f.done;f=e.next())f=f.value,f.startTime>b&&f.endTime<c&&d.add(f);e=q(d);for(f=e.next();!f.done;f=e.next()){f=f.value;var g=this.b.get(f);g&&(this.a.removeChild(g),this.b["delete"](f))}this.c=this.c.filter(function(b){return!d.has(b)});return!0};ao.prototype.remove=ao.prototype.remove;ao.prototype.isTextVisible=function(){return this.g};
ao.prototype.isTextVisible=ao.prototype.isTextVisible;ao.prototype.setTextVisibility=function(b){this.g=b};ao.prototype.setTextVisibility=ao.prototype.setTextVisibility;
function bo(b){for(var c=b.l.currentTime,d=q(b.b.keys()),e=d.next();!e.done;e=d.next())if(e=e.value,!(e.startTime<=c&&e.endTime>=c)){var f=b.b.get(e);b.a.removeChild(f);b.b["delete"](e)}d=b.c.filter(function(d){return d.startTime<=c&&d.endTime>=c&&!b.b.has(d)}).sort(function(b,c){return b.startTime!=c.startTime?b.startTime-c.startTime:b.endTime-c.endTime});d=q(d);for(e=d.next();!e.done;e=d.next())e=e.value,f=W("span"),co(b,f,e),b.b.set(e,f),b.a.appendChild(f)}
function co(b,c,d){var e=c.style,f=b.a.style;c.textContent=d.payload;e.backgroundColor=d.backgroundColor;e.color=d.color;e.direction=d.direction;f.alignItems="before"==d.displayAlign?"flex-start":"center"==d.displayAlign?"flex-top":"flex-end";e.fontFamily=d.fontFamily;e.fontWeight=d.fontWeight.toString();e.fontSize=d.fontSize;e.fontStyle=d.fontStyle;d.line&&1==d.lineInterpretation&&(d.writingMode==dm?d.lineAlign==fm?b.a.top=d.line+"%":"end"==d.lineAlign&&(b.a.bottom=d.line+"%"):"vertical-lr"==d.writingMode?
d.lineAlign==fm?b.a.left=d.line+"%":"end"==d.lineAlign&&(b.a.right=d.line+"%"):d.lineAlign==fm?b.a.right=d.line+"%":"end"==d.lineAlign&&(b.a.left=d.line+"%"));e.lineHeight=d.lineHeight;d.position&&(d.writingMode==dm?b.a.paddingLeft=d.position:b.a.paddingTop=d.position);"line-left"==d.positionAlign?f.a="left":"line-right"==d.positionAlign?f.a="right":f.margin="auto";e.textAlign=d.textAlign;e.textDecoration=d.textDecoration.join(" ");e.writingMode=d.writingMode;d.writingMode==dm?b.a.width=d.size+"%":
b.a.height=d.size+"%";e.textAlign=d.textAlign;e.textDecoration=d.textDecoration.join(" ");e.writingMode=d.writingMode};function eo(b,c,d,e){this.c=b;this.a=fo();e&&rj(this.a,e,fo(),{},"");this.a.castReceiverAppId&&!this.a.overflowMenuButtons.includes("cast")&&this.a.overflowMenuButtons.push("cast");this.b=new X(b,c,d,this.a)}y("shaka.ui.Overlay",eo);eo.prototype.cb=function(){return this.c};eo.prototype.getPlayer=eo.prototype.cb;eo.prototype.rf=function(){return this.b};eo.prototype.getControls=eo.prototype.rf;eo.prototype.Tg=function(b){this.b.fd(b)};eo.prototype.setEnabled=eo.prototype.Tg;
function fo(){return{controlPanelElements:"time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:["captions","quality","language","picture_in_picture"],addSeekBar:!0,castReceiverAppId:""}}
function go(){el();if(Ij()){var b=document.querySelectorAll("[data-shaka-player-container]"),c=document.querySelectorAll("[data-shaka-player]");if(c.length||b.length)if(c.length&&!b.length)for(b=0;b<c.length;b++){var d=c[b];d.classList.add("video");var e=document.createElement("div");d.parentElement.replaceChild(e,d);e.appendChild(d);var f="";d.dataset&&d.dataset.shakaPlayerCastReceiverId&&(f=d.dataset.shakaPlayerCastReceiverId);e=ho(e,d,{castReceiverAppId:f});d.controls&&e.b.De(!0)}else for(e=0;e<
b.length;e++){f=b[e];d="";f.dataset&&f.dataset.shakaPlayerCastReceiverId&&(d=f.dataset.shakaPlayerCastReceiverId);for(var g=null,h=0;h<c.length;h++)if(c[h].parentElement==f){g=c[h];break}g||(g=document.createElement("video"),f.appendChild(g));g.dataset&&g.dataset.shakaPlayerCastReceiverId&&(d=g.dataset.shakaPlayerCastReceiverId);ho(f,g,{castReceiverAppId:d})}c=document.createEvent("CustomEvent");c.initCustomEvent("shaka-ui-loaded",!1,!1,null);document.dispatchEvent(c)}}
function ho(b,c,d){var e=new T(c);d=new eo(e,b,c,d);c.controls||e.configure("textDisplayFactory",function(){return new ao(c,b)});b.ui=d;return c.ui=d}"complete"==document.readyState?Promise.resolve().then(go):window.addEventListener("load",go);function io(b,c){Z.call(this,b,c);var d=this;this.j=W("div");this.j.classList.add("shaka-volume-bar-container");this.g=document.createElement("input");this.g.classList.add("shaka-volume-bar");this.g.setAttribute("type","range");this.g.setAttribute("step","any");this.g.setAttribute("min","0");this.g.setAttribute("max","1");this.g.setAttribute("value","0");this.j.appendChild(this.g);this.G.appendChild(this.j);jo(this);G(this.a,this.video,"volumechange",function(){ko(d)});G(this.a,this.g,"input",function(){d.video.volume=
parseFloat(d.g.value);d.video.muted=0==d.video.volume?!0:!1});G(this.a,this.b,"locale-updated",function(){jo(d)});G(this.a,this.b,"locale-changed",function(){jo(d)});ko(this)}va(io,Z);y("shaka.ui.VolumeBar",io);function ko(b){b.g.value=b.video.muted?0:b.video.volume;var c=["to right"];c.push("rgb(255, 255, 255)"+100*b.g.value+"%");c.push("rgba(255, 255, 255, 0.54)"+100*b.g.value+"%");c.push("rgba(255, 255, 255, 0.54)100%");b.j.style.background="linear-gradient("+c.join(",")+")"}
function jo(b){b.g.setAttribute("aria-label",b.b.resolve("1050953507607739202"))}function lo(){}lo.prototype.create=function(b,c){return new io(b,c)};on("volume",new lo);}).call(exportTo,innerGlobal,innerGlobal);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define!="undefined"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
//# sourceMappingURL=shaka-player.ui.map