shaka-player
Version:
DASH/EME video player library
116 lines (112 loc) • 359 kB
JavaScript
(function(){var innerGlobal=typeof window!="undefined"?window:global;var exportTo={};(function(window,global){var p,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(b,c,d){b!=Array.prototype&&b!=Object.prototype&&(b[c]=d.value)},ca="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function da(){da=function(){};ca.Symbol||(ca.Symbol=ea)}var ea=function(){var b=0;return function(c){return"jscomp_symbol_"+(c||"")+b++}}();
function ha(){da();var b=ca.Symbol.iterator;b||(b=ca.Symbol.iterator=ca.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[ca.Symbol.iterator]=function(){return this};return b}function r(b){ha();var c=b[Symbol.iterator];return c?c.call(b):ia(b)}
function la(b,c){if(c){for(var d=ca,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})}}
la("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=ca.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.v),reject:b(this.f)}};c.prototype.v=function(b){if(b===this)this.f(new TypeError("A Promise cannot resolve to itself"));else if(b instanceof c)this.w(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.u(b):this.j(b)}};c.prototype.u=function(b){var c=void 0;try{c=b.then}catch(l){this.f(l);return}"function"==typeof c?this.D(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.o()};c.prototype.o=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.w=function(b){var c=this.c();b.vc(c.resolve,c.reject)};c.prototype.D=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(D){g(D)}}:c}var f,g,h=new c(function(b,c){f=b;g=c});this.vc(e(b,f),e(d,g));return h};c.prototype["catch"]=function(b){return this.then(void 0,b)};c.prototype.vc=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=r(b),g=f.next();!g.done;g=f.next())e(g.value).vc(c,d)})};c.all=function(b){var d=r(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).vc(g(h.length-1),c),f=d.next();
while(!f.done)})};return c});la("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 ma(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 t(b){return ma(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={kf:!0},ra={};try{ra.__proto__=qa;pa=ra.kf;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 ta=oa;
function ua(b,c){b.prototype=na(c.prototype);b.prototype.constructor=b;if(ta)ta(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.bh=c.prototype}function wa(){this.g=!1;this.c=null;this.A=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.A=b};
function ya(b,c){b.a={ae:c,oe:!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.C=function(b){this.s=b};function v(b){b.s=0}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.ae;b.a=null;return c}function Fa(b){b.l=[b.a];b.f=0;b.b=0}
function Ga(b,c){var d=b.l.splice(0)[0];(d=b.a=b.a||d)?d.oe?b.s=b.f||b.b:void 0!=d.C&&b.b<d.C?(b.s=d.C,b.a=null):b.s=b.b:b.s=c}function Ha(b){this.a=new wa;this.b=b}function Ia(b,c){xa(b.a);var d=b.a.c;if(d)return La(b,"return"in d?d["return"]:function(b){return{value:b,done:!0}},c,b.a["return"]);b.a["return"](c);return Ma(b)}
function La(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),Ma(b)}b.a.c=null;e.call(b.a,g);return Ma(b)}
function Ma(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.A=void 0,ya(b.a,d)}b.a.g=!1;if(b.a.a){c=b.a.a;b.a.a=null;if(c.oe)throw c.ae;return{value:c["return"],done:!0}}return{value:void 0,done:!0}}
function Na(b){this.next=function(c){xa(b.a);b.a.c?c=La(b,b.a.c.next,c,b.a.j):(b.a.j(c),c=Ma(b));return c};this["throw"]=function(c){xa(b.a);b.a.c?c=La(b,b.a.c["throw"],c,b.a.j):(ya(b.a,c),c=Ma(b));return c};this["return"]=function(c){return Ia(b,c)};ha();this[Symbol.iterator]=function(){return this}}function y(b,c){Na.prototype=b.prototype;return new Na(new Ha(c))}function Oa(b){if(!(b instanceof Array)){b=r(b);for(var c,d=[];!(c=b.next()).done;)d.push(c.value);b=d}return b}
function Sa(b,c){return Object.prototype.hasOwnProperty.call(b,c)}
la("WeakMap",function(b){function c(b){this.a=(g+=Math.random()+1).toString();if(b){da();ha();b=r(b);for(var c;!(c=b.next()).done;)c=c.value,this.set(c[0],c[1])}}function d(b){Sa(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(!Sa(b,f))throw Error("WeakMap key fail: "+b);b[f][this.a]=c;return this};c.prototype.get=function(b){return Sa(b,f)?b[f][this.a]:void 0};c.prototype.has=function(b){return Sa(b,f)&&Sa(b[f],this.a)};c.prototype["delete"]=function(b){return Sa(b,f)&&Sa(b[f],this.a)?delete b[f][this.a]:!1};return c});
la("Map",function(b){function c(){var b={};return b.Ua=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.Ua;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&&Sa(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,ha:k}}return{id:d,
list:e,index:-1,ha:void 0}}function f(b){this.b={};this.a=c();this.size=0;if(b){b=r(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(r([[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(q){return!1}}())return b;da();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.ha?d.ha.value=c:(d.ha={next:this.a,Ua:this.a.Ua,head:this.a,key:b,value:c},d.list.push(d.ha),this.a.Ua.next=d.ha,this.a.Ua=d.ha,this.size++);return this};f.prototype["delete"]=function(b){b=e(this,b);return b.ha&&b.list?(b.list.splice(b.index,1),b.list.length||delete this.b[b.id],b.ha.Ua.next=b.ha.next,b.ha.next.Ua=b.ha.Ua,
b.ha.head=null,this.size--,!0):!1};f.prototype.clear=function(){this.b={};this.a=this.a.Ua=c();this.size=0};f.prototype.has=function(b){return!!e(this,b).ha};f.prototype.get=function(b){return(b=e(this,b).ha)&&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});
la("Set",function(b){function c(b){this.a=new Map;if(b){b=r(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(r([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;da();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 Ta(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}la("Array.prototype.keys",function(b){return b?b:function(){return Ta(this,function(b){return b})}});
la("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}});function Ua(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{je:f,cf:g}}return{je:-1,cf:void 0}}
la("Array.prototype.findIndex",function(b){return b?b:function(b,d){return Ua(this,b,d).je}});la("Object.is",function(b){return b?b:function(b,d){return b===d?0!==b||1/b===1/d:b!==b&&d!==d}});la("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 Va(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+""}la("String.prototype.includes",function(b){return b?b:function(b,d){return-1!==Va(this,b,"includes").indexOf(b,d||0)}});
la("String.prototype.startsWith",function(b){return b?b:function(b,d){for(var c=Va(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}});la("Array.prototype.find",function(b){return b?b:function(b,d){return Ua(this,b,d).cf}});var Wa=this;Wa.a=!0;
function z(b,c){var d=b.split("."),e=Wa;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 Xa(b,c){function d(){}d.prototype=c.prototype;b.bh=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 B(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}B.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};B.prototype.stopImmediatePropagation=function(){this.a=!0};B.prototype.stopPropagation=function(){};function Ya(){}function Za(){}function $a(){}window.console&&window.console.log.bind&&(Za=console.warn.bind(console),Ya=console.error.bind(console));function bb(){this.a={}}p=bb.prototype;p.push=function(b,c){this.a.hasOwnProperty(b)?this.a[b].push(c):this.a[b]=[c]};p.get=function(b){return(b=this.a[b])?b.slice():null};p.getAll=function(){var b=[],c;for(c in this.a)b.push.apply(b,this.a[c]);return b};p.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)};p.forEach=function(b){for(var c in this.a)b(c,this.a[c])};function cb(){this.fd=new bb;this.rc=this}cb.prototype.addEventListener=function(b,c){this.fd.push(b,c)};cb.prototype.removeEventListener=function(b,c){this.fd.remove(b,c)};cb.prototype.dispatchEvent=function(b){for(var c=this.fd.get(b.type)||[],d=0;d<c.length;++d){b.target=this.rc;b.currentTarget=this.rc;var e=c[d];try{e.handleEvent?e.handleEvent(b):e.call(this,b)}catch(f){}if(b.a)break}return b.defaultPrevented};function db(b,c){for(var d=[],e=r(b),f=e.next();!f.done;f=e.next())d.push(c(f.value));return d}function eb(b,c){for(var d=r(b),e=d.next();!e.done;e=d.next())if(!c(e.value))return!1;return!0}function fb(b,c){for(var d=r(b),e=d.next();!e.done;e=d.next())if(c(e.value))return!0;return!1}function gb(b,c){for(var d=[],e=r(b),f=e.next();!f.done;f=e.next())f=f.value,c(f)&&d.push(f);return d};function hb(b,c){b=C(b);c=C(c);return b.split("-")[0]==c.split("-")[0]}function ib(b,c){b=C(b);c=C(c);var d=b.split("-"),e=c.split("-");return d[0]==e[0]&&1==d.length&&2==e.length}function C(b){var c=b.split("-");b=c[0]||"";c=c[1]||"";b=b.toLowerCase();b=jb.get(b)||b;return(c=c.toUpperCase())?b+"-"+c:b}function kb(b){var c=b.indexOf("-");b=0<=c?b.substring(0,c):b;b=b.toLowerCase();return b=jb.get(b)||b}
function lb(b){return b.language?C(b.language):b.audio&&b.audio.language?C(b.audio.language):b.video&&b.video.language?C(b.video.language):"und"}
function mb(b,c){for(var d=C(b),e=new Set,f=r(c),g=f.next();!g.done;g=f.next())e.add(C(g.value));f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,g==d)return g;f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,ib(g,d))return g;f=r(e);for(g=f.next();!g.done;g=f.next()){var h=g=g.value,k=d;h=C(h);k=C(k);h=h.split("-");k=k.split("-");if(2==h.length&&2==k.length&&h[0]==k[0])return g}e=r(e);for(g=e.next();!g.done;g=e.next())if(f=g.value,ib(d,f))return f;return null}
var jb=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"]]);function E(b){this.g=C(b);this.f=new Map;this.b=new Set;this.c=new Map;this.a=new cb}z("shaka.ui.Localization",E);E.prototype.addEventListener=function(b,c,d){this.a.addEventListener(b,c,d)};E.prototype.addEventListener=E.prototype.addEventListener;E.prototype.removeEventListener=function(b,c,d){this.a.removeEventListener(b,c,d||void 0)};E.prototype.removeEventListener=E.prototype.removeEventListener;E.prototype.dispatchEvent=function(b){return this.a.dispatchEvent(b)};E.prototype.dispatchEvent=E.prototype.dispatchEvent;
E.prototype.Xd=function(b){var c=this;this.b.clear();b=r(b);for(var d=b.next();!d.done;d=b.next())this.b.add(C(d.value));qb(this);this.a.dispatchEvent(new B("locale-changed"));b=gb(this.b,function(b){return!c.c.has(b)});b.length&&this.a.dispatchEvent(new B("unknown-locales",{locales:b}))};E.prototype.changeLocale=E.prototype.Xd;
E.prototype.Y=function(b,c,d){var e=rb;b=C(b);void 0===d&&(d=e.jf);var f=this.c.get(b)||new Map;c.forEach(function(b,c){f.has(c)&&d!=e.jf||f.set(c,b)});this.c.set(b,f);qb(this);this.a.dispatchEvent(new B("locale-updated"));return this};E.prototype.insert=E.prototype.Y;E.prototype.Og=function(b){for(var c=r(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,this.resolve(d))};E.prototype.resolveDictionary=E.prototype.Og;
E.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 B("unknown-localization",b));return""};E.prototype.resolve=E.prototype.resolve;
function qb(b){for(var c=b.c,d=b.g,e=b.b,f=new Set,g={},h=r(e),k=h.next();!k.done;g={locale:g.locale},k=h.next()){g.locale=k.value;f.add(g.locale);f.add(kb(g.locale));k=gb(c.keys(),function(b){return function(c){var d=b.locale,e=kb(c),f=kb(d);return c!=e&&d!=f&&e==f}}(g));k.sort();var l=r(k);for(k=l.next();!k.done;k=l.next())f.add(k.value);k=gb(c.keys(),function(b){return function(c){return kb(c)==b.locale}}(g));k.sort();l=r(k);for(k=l.next();!k.done;k=l.next())f.add(k.value)}f.add(d);d=[];f=r(f);
for(k=f.next();!k.done;k=f.next())(k=c.get(k.value))&&d.push(k);d.reverse();b.f.clear();c=r(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=r(b.b);for(k=d.next();!k.done;k=d.next())k=b.c.get(k.value)||new Map,sb(k,c,f);0<f.size&&(e={locales:Array.from(e),missing:Array.from(f)},b.a.dispatchEvent(new B("missing-localizations",e)))}function sb(b,c,d){c=r(c);for(var e=c.next();!e.done;e=c.next())e=e.value,b.get(e)||d.add(e)}
var rb={USE_OLD:0,USE_NEW:1};E.ConflictResolution=rb;E.UNKNOWN_LOCALES="unknown-locales";E.UNKNOWN_LOCALIZATION="unknown-localization";E.MISSING_LOCALIZATIONS="missing-localizations";E.LOCALE_CHANGED="locale-changed";E.LOCALE_UPDATED="locale-updated";function tb(b){this.c=Math.exp(Math.log(.5)/b);this.b=this.a=0}function ub(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 vb(b){return b.a/(1-Math.pow(b.c,b.b))};function wb(){this.b=new tb(2);this.c=new tb(5);this.a=0}wb.prototype.getBandwidthEstimate=function(b){return 128E3>this.a?b:Math.min(vb(this.b),vb(this.c))};var xb=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function yb(b){var c;b instanceof yb?(zb(this,b.La),this.ub=b.ub,this.Ha=b.Ha,Ab(this,b.Qb),this.xa=b.xa,Bb(this,b.a.clone()),this.ib=b.ib):b&&(c=String(b).match(xb))?(zb(this,c[1]||"",!0),this.ub=Cb(c[2]||""),this.Ha=Cb(c[3]||"",!0),Ab(this,c[4]),this.xa=Cb(c[5]||"",!0),Bb(this,c[6]||"",!0),this.ib=Cb(c[7]||"")):this.a=new Db(null)}p=yb.prototype;p.La="";p.ub="";p.Ha="";p.Qb=null;p.xa="";p.ib="";
p.toString=function(){var b=[],c=this.La;c&&b.push(Ib(c,Jb,!0),":");if(c=this.Ha){b.push("//");var d=this.ub;d&&b.push(Ib(d,Jb,!0),"@");b.push(encodeURIComponent(c).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));c=this.Qb;null!=c&&b.push(":",String(c))}if(c=this.xa)this.Ha&&"/"!=c.charAt(0)&&b.push("/"),b.push(Ib(c,"/"==c.charAt(0)?Kb:Lb,!0));(c=this.a.toString())&&b.push("?",c);(c=this.ib)&&b.push("#",Ib(c,Mb));return b.join("")};
p.resolve=function(b){var c=this.clone();"data"===c.La&&(c=new yb);var d=!!b.La;d?zb(c,b.La):d=!!b.ub;d?c.ub=b.ub:d=!!b.Ha;d?c.Ha=b.Ha:d=null!=b.Qb;var e=b.xa;if(d)Ab(c,b.Qb);else if(d=!!b.xa){if("/"!=e.charAt(0))if(this.Ha&&!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.ib;d&&(c.ib=b.ib);return c};p.clone=function(){return new yb(this)};function zb(b,c,d){b.La=d?Cb(c,!0):c;b.La&&(b.La=b.La.replace(/:$/,""))}function Ab(b,c){if(c){c=Number(c);if(isNaN(c)||0>c)throw Error("Bad port number "+c);b.Qb=c}else b.Qb=null}function Bb(b,c,d){c instanceof Db?b.a=c:(d||(c=Ib(c,Nb)),b.a=new Db(c))}
function Cb(b,c){return b?c?decodeURI(b):decodeURIComponent(b):""}function Ib(b,c,d){return"string"==typeof b?(b=encodeURI(b).replace(c,Pb),d&&(b=b.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),b):null}function Pb(b){b=b.charCodeAt(0);return"%"+(b>>4&15).toString(16)+(b&15).toString(16)}var Jb=/[#\/\?@]/g,Lb=/[#\?:]/g,Kb=/[#\?]/g,Nb=/[#\?@]/g,Mb=/#/g;function Db(b){this.a=b||null}p=Db.prototype;p.va=null;p.xc=null;
p.add=function(b,c){if(!this.va&&(this.va={},this.xc=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.va.hasOwnProperty(b)&&this.va[b])||(this.va[b]=d=[]);d.push(c);this.xc++;return this};
p.toString=function(){if(this.a)return this.a;if(!this.va)return"";var b=[],c;for(c in this.va)for(var d=encodeURIComponent(c),e=this.va[c],f=0;f<e.length;f++){var g=d;""!==e[f]&&(g+="="+encodeURIComponent(e[f]));b.push(g)}return this.a=b.join("&")};p.clone=function(){var b=new Db;b.a=this.a;if(this.va){var c={},d;for(d in this.va)c[d]=this.va[d].concat();b.va=c;b.xc=this.xc}return b};function Qb(b){this.b=b;this.a=null}Qb.prototype.S=function(b){var c=this;this.stop();var d=!0,e=null;this.a=function(){window.clearTimeout(e);d=!1};e=window.setTimeout(function(){d&&c.b()},1E3*b);return this};Qb.prototype.stop=function(){this.a&&(this.a(),this.a=null)};function F(b){this.b=b;this.a=null}z("shaka.util.Timer",F);F.prototype.Oa=function(){this.stop();this.b();return this};F.prototype.tickNow=F.prototype.Oa;F.prototype.S=function(b){var c=this;this.stop();this.a=(new Qb(function(){c.b()})).S(b);return this};F.prototype.tickAfter=F.prototype.S;F.prototype.Na=function(b){var c=this;this.stop();this.a=(new Qb(function(){c.a.S(b);c.b()})).S(b);return this};F.prototype.tickEvery=F.prototype.Na;F.prototype.stop=function(){this.a&&(this.a.stop(),this.a=null)};
F.prototype.stop=F.prototype.stop;function Rb(b,c){var d=Sb();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 Tb(b){return t(function d(){var e,f;return y(d,function(d){switch(d.s){case 1:if(b.a>=b.l)if(b.c)b.a=1,b.b=b.f;else return d["return"](Promise.reject());e=b.a;b.a++;if(0==e)return d["return"]();f=b.b*(1+(2*Math.random()-1)*b.j);return u(d,new Promise(function(b){(new F(b)).S(f/1E3)}),2);case 2:b.b*=b.g,v(d)}})})}function Sb(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}};function G(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}z("shaka.util.Error",G);G.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};G.Severity={RECOVERABLE:1,CRITICAL:2};G.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9};
G.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,HLS_AES_128_ENCRYPTION_NOT_SUPPORTED:4034,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,CAST_RECEIVER_APP_ID_MISSING:8007,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 I(){var b,c,d=new Promise(function(d,f){b=d;c=f});d.resolve=b;d.reject=c;return d}I.prototype.resolve=function(){};I.prototype.reject=function(){};function Ub(b,c){this.promise=b;this.ue=c;this.a=!1}z("shaka.util.AbortableOperation",Ub);function Vb(b){return new Ub(Promise.reject(b),function(){return Promise.resolve()})}Ub.failed=Vb;function Wb(){var b=Promise.reject(new G(2,7,7001));b["catch"](function(){});return new Ub(b,function(){return Promise.resolve()})}Ub.aborted=Wb;function Xb(b){return new Ub(Promise.resolve(b),function(){return Promise.resolve()})}Ub.completed=Xb;
function Yb(b){return new Ub(b,function(){return b["catch"](function(){})})}Ub.notAbortable=Yb;Ub.prototype.abort=function(){this.a=!0;return this.ue()};Ub.prototype.abort=Ub.prototype.abort;function Zb(b){return new Ub(Promise.all(b.map(function(b){return b.promise})),function(){return Promise.all(b.map(function(b){return b.abort()}))})}Ub.all=Zb;Ub.prototype["finally"]=function(b){this.promise.then(function(){return b(!0)},function(){return b(!1)});return this};Ub.prototype["finally"]=Ub.prototype["finally"];
Ub.prototype.aa=function(b,c){function d(){f.reject(new G(2,7,7001));return e.abort()}var e=this,f=new I;this.promise.then(function(c){e.a?f.reject(new G(2,7,7001)):b?d=$b(b,c,f):f.resolve(c)},function(b){c?d=$b(c,b,f):f.reject(b)});return new Ub(f,function(){return d()})};Ub.prototype.chain=Ub.prototype.aa;
function $b(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 ac(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 bc(b,c){return"number"===typeof b&&"number"===typeof c&&isNaN(b)&&isNaN(c)?!0:b===c}function cc(b,c){var d=b.indexOf(c);-1<d&&b.splice(d,1)}function dc(b,c){var d=0;b.forEach(function(b){d+=c(b)?1:0});return d}
function ec(b,c,d){d||(d=bc);if(b.length!=c.length)return!1;c=c.slice();var e={};b=r(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 fc(){this.a=[]}function gc(b,c){b.a.push(c["finally"](function(){cc(b.a,c)}))}fc.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 K(b){cb.call(this);this.f=!1;this.g=new fc;this.a=new Set;this.b=new Set;this.c=b||null}Xa(K,cb);z("shaka.net.NetworkingEngine",K);var hc={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3,TIMING:4};K.RequestType=hc;K.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:3};var ic={};function jc(b,c,d){d=d||3;var e=ic[b];if(!e||d>=e.priority)ic[b]={priority:d,Eg:c}}K.registerScheme=jc;K.unregisterScheme=function(b){delete ic[b]};K.prototype.Gg=function(b){this.a.add(b)};
K.prototype.registerRequestFilter=K.prototype.Gg;K.prototype.dh=function(b){this.a["delete"](b)};K.prototype.unregisterRequestFilter=K.prototype.dh;K.prototype.sf=function(){this.a.clear()};K.prototype.clearAllRequestFilters=K.prototype.sf;K.prototype.Hg=function(b){this.b.add(b)};K.prototype.registerResponseFilter=K.prototype.Hg;K.prototype.eh=function(b){this.b["delete"](b)};K.prototype.unregisterResponseFilter=K.prototype.eh;K.prototype.tf=function(){this.b.clear()};
K.prototype.clearAllResponseFilters=K.prototype.tf;function kc(b,c){return{uris:b,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:c,licenseRequestType:null}}K.prototype.destroy=function(){this.f=!0;this.a.clear();this.b.clear();return this.g.destroy()};K.prototype.destroy=K.prototype.destroy;
K.prototype.request=function(b,c){var d=this,e=new lc;if(this.f){var f=Promise.reject(new G(2,7,7001));f["catch"](function(){});return new mc(f,function(){return Promise.resolve()},e)}c.method=c.method||"GET";c.headers=c.headers||{};c.retryParameters=c.retryParameters?ac(c.retryParameters):Sb();c.uris=ac(c.uris);f=nc(this,b,c);var g=f.aa(function(){return oc(d,b,c,new Rb(c.retryParameters,!1),0,null,e)}),h=g.aa(function(c){return pc(d,b,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-
k},function(){});var m=0;g.promise.then(function(){m=Date.now()},function(){});f=h.aa(function(c){var e=Date.now()-m,f=c.response;f.timeMs+=l;f.timeMs+=e;c.Yf||!d.c||f.fromCache||1!=b||d.c(f.timeMs,f.data.byteLength);return f},function(b){b&&(b.severity=2);throw b;});f=new mc(f.promise,f.ue,e);gc(this.g,f);return f};K.prototype.request=K.prototype.request;
function nc(b,c,d){var e=Xb(void 0),f={};b=r(b.a);for(var g=b.next();!g.done;f={Cd:f.Cd},g=b.next())f.Cd=g.value,e=e.aa(function(b){return function(){return b.Cd(c,d)}}(f));return e.aa(void 0,function(b){if(b&&7001==b.code)throw b;throw new G(2,1,1006,b);})}
function oc(b,c,d,e,f,g,h){var k=new yb(d.uris[f]),l=k.La,m=!1;l||(l=location.protocol,l=l.slice(0,-1),zb(k,l),d.uris[f]=k.toString());var n=(l=ic[l])?l.Eg:null;if(!n)return Vb(new G(2,1,1E3,k));var q;return Yb(Tb(e)).aa(function(){if(b.f)return Wb();q=Date.now();return n(d.uris[f],d,c,function(d,e,f){b.c&&1==c&&(b.c(d,e),m=!0,h.a=f)})}).aa(function(b){void 0==b.timeMs&&(b.timeMs=Date.now()-q);return{response:b,Yf:m}},function(k){if(k&&7001==k.code)throw k;if(b.f)return Wb();if(k&&1==k.severity)return b.dispatchEvent(new B("retry",
{error:k instanceof G?k:null})),f=(f+1)%d.uris.length,oc(b,c,d,e,f,k,h);throw k||g;})}function pc(b,c,d){var e=Xb(void 0);b=r(b.b);for(var f=b.next();!f.done;f=b.next())e=e.aa(f.value.bind(null,c,d.response));return e.aa(function(){return d},function(b){if(b&&7001==b.code)throw b;var c=2;b instanceof G&&(c=b.severity);throw new G(c,1,1007,b);})}function lc(){this.a=0}K.NumBytesRemainingClass=lc;function mc(b,c,d){Ub.call(this,b,c);this.b=d}ua(mc,Ub);K.PendingRequest=mc;mc.all=Zb;mc.notAbortable=Yb;
mc.completed=Xb;mc.aborted=Wb;mc.failed=Vb;function qc(){}z("shaka.util.IReleasable",qc);qc.prototype.release=function(){};function L(){this.a=new bb}z("shaka.util.EventManager",L);L.prototype.release=function(){this.sb();this.a=null};L.prototype.release=L.prototype.release;L.prototype.m=function(b,c,d,e){this.a&&(b=new rc(b,c,d,e),this.a.push(c,b))};L.prototype.listen=L.prototype.m;L.prototype.wa=function(b,c,d,e){function f(e){g.oa(b,c,f);d(e)}var g=this;this.m(b,c,f,e)};L.prototype.listenOnce=L.prototype.wa;
L.prototype.oa=function(b,c,d){if(this.a){var e=this.a.get(c)||[];e=r(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.target!=b||d!=f.listener&&d||(f.oa(),this.a.remove(c,f))}};L.prototype.unlisten=L.prototype.oa;L.prototype.sb=function(){if(this.a){var b=this.a.getAll();b=r(b);for(var c=b.next();!c.done;c=b.next())c.value.oa();this.a.a={}}};L.prototype.removeAll=L.prototype.sb;
function rc(b,c,d,e){this.target=b;this.type=c;this.listener=d;this.a=sc(b,e);this.target.addEventListener(c,d,this.a)}rc.prototype.oa=function(){this.target.removeEventListener(this.type,this.listener,this.a);this.listener=this.target=null;this.a=!1};rc.prototype.unlisten=rc.prototype.oa;function sc(b,c){if(void 0==c)return!1;if("boolean"==typeof c)return c;var d=new Set(["passive","capture"]);Object.keys(c).filter(function(b){return!d.has(b)});return tc(b)?c:c.capture||!1}
function tc(b){var c=uc;if(void 0==c){c=!1;try{var d={},e={get:function(){c=!0;return!1}};Object.defineProperty(d,"passive",e);Object.defineProperty(d,"capture",e);e=function(){};b.addEventListener("test",e,d);b.removeEventListener("test",e,d)}catch(f){c=!1}uc=c}return c||!1}var uc=void 0;function vc(b){var c=new Map;Object.keys(b).forEach(function(d){c.set(d,b[d])});return c}function wc(b){var c={};b.forEach(function(b,e){c[e]=b});return c};function xc(b,c){var d=b;c&&(d+='; codecs="'+c+'"');return d}function yc(b){var c=[b.mimeType];zc.forEach(function(d,e){var f=b[e];f&&c.push(d+'="'+f+'"')});return c.join(";")}function Ac(b){b=b.split(".");var c=b[0];b.pop();return[c,b.join(".")]}var zc=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Bc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function Cc(b){return""!=Dc().canPlayType(b)}function Ec(b){return(navigator.userAgent||"").includes(b)}function Dc(){if(Fc)return Fc;Gc||(Gc=new F(function(){Fc=null}));(Fc=document.querySelector("video")||document.querySelector("audio"))||(Fc=document.createElement("video"));Gc.S(1);return Fc}var Gc=null,Fc=null;function Hc(b){if(!b)return"";b=new Uint8Array(b);239==b[0]&&187==b[1]&&191==b[2]&&(b=b.subarray(3));b=Ic(b);b=escape(b);try{return decodeURIComponent(b)}catch(c){throw new G(2,2,2004);}}z("shaka.util.StringUtils.fromUTF8",Hc);
function Jc(b,c,d){if(!b)return"";if(!d&&0!=b.byteLength%2)throw new G(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 Ic(d)}z("shaka.util.StringUtils.fromUTF16",Jc);
function Mc(b){var c=new Uint8Array(b);if(239==c[0]&&187==c[1]&&191==c[2])return Hc(c);if(254==c[0]&&255==c[1])return Jc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Jc(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 Jc(b,!1);if(0==c[1]&&0==c[3])return Jc(b,!0);if(d(0)&&d(1)&&d(2)&&d(3))return Hc(b);throw new G(2,2,2003);}z("shaka.util.StringUtils.fromBytesAutoDetect",Mc);
function Nc(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}z("shaka.util.StringUtils.toUTF8",Nc);function Oc(b,c){for(var d=new Uint8Array(2*b.length),e=new DataView(d.buffer),f=0;f<b.length;++f)e.setUint16(2*f,b.charCodeAt(f),c);return d.buffer}z("shaka.util.StringUtils.toUTF16",Oc);
function Ic(b){if(!Pc)for(var c=function(b){try{var c=new Uint8Array(b);Oa(c);return!0}catch(g){return!1}},d={size:65536};0<d.size;d={size:d.size},d.size/=2)if(c(d.size)){Pc=function(b){return function(c){for(var d="",e=0;e<c.length;e+=b.size)d+=String.fromCharCode.apply(String,Oa(c.subarray(e,e+b.size)));return d}}(d);break}return Pc(b)}var Pc=null;function Qc(b,c){var d=Ic(b);c=void 0==c?!0:c;d=window.btoa(d).replace(/\+/g,"-").replace(/\//g,"_");return c?d:d.replace(/=*$/,"")}z("shaka.util.Uint8ArrayUtils.toBase64",Qc);function Rc(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}z("shaka.util.Uint8ArrayUtils.fromBase64",Rc);function Sc(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}
z("shaka.util.Uint8ArrayUtils.fromHex",Sc);function Tc(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}z("shaka.util.Uint8ArrayUtils.toHex",Tc);function Uc(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}z("shaka.util.Uint8ArrayUtils.equal",Uc);
function Vc(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}z("shaka.util.Uint8ArrayUtils.concat",Vc);function Wc(b){var c=this;this.D=b;this.w=new Set;this.u=this.j=null;this.K=!1;this.a=null;this.l=new L;this.b=new Map;this.v=[];this.o=new I;this.f=null;this.g=function(d){c.o.reject(d);b.onError(d)};this.ea=new Map;this.L=new Map;this.I=new F(function(){return Xc(c)});this.c=!1;this.W=new I;this.F=!1;this.H=[];this.ba=!1;this.U=(new F(function(){Yc(c)})).Na(1);this.o["catch"](function(){})}p=Wc.prototype;
p.destroy=function(){var b=this;return t(function d(){return y(d,function(d){switch(d.s){case 1:if(b.c)return u(d,b.W,0);b.c=!0;return u(d,Zc(b),4);case 4:b.W.resolve(),d.C(0)}})})};
function Zc(b){return t(function d(){var e;return y(d,function(d){switch(d.s){case 1:return b.l.release(),b.l=null,b.o.reject(),b.U.stop(),b.U=null,b.I.stop(),b.I=null,e=Array.from(b.b.keys()),b.b.clear(),u(d,Promise.all(e.map(function(b){return Promise.resolve().then(function(){return t(function k(){return y(k,function(d){switch(d.s){case 1:return za(d,2),u(d,$c(b),4);case 4:Ba(d,0);break;case 2:Ca(d),v(d)}})})})})),2);case 2:if(!b.u){d.C(3);break}za(d,4);return u(d,b.u.setMediaKeys(null),6);case 6:Ba(d,
5);break;case 4:Ca(d);case 5:b.u=null;case 3:b.a=null,b.w.clear(),b.j=null,b.v=[],b.f=null,b.g=null,b.D=null,v(d)}})})}p.configure=function(b){this.f=b};function ad(b,c,d){b.v=[];b.F=d;return bd(b,c)}function cd(b,c,d){b.v=d;b.F=0<d.length;return bd(b,c)}
function dd(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 ed(b,h)}
function bd(b,c){var d=c.some(function(b){return 0<b.drmInfos.length});if(!d){var e=vc(b.f.servers);fd(c,e)}var f=gd(b);if(f){var g=r(c);for(e=g.next();!e.done;e=g.next())e.value.drmInfos=[f]}f=r(c);for(e=f.next();!e.done;e=f.next())for(e=r(e.value.drmInfos),g=e.next();!g.done;g=e.next())hd(g.value,vc(b.f.servers),vc(b.f.advanced||{}));e=id(b,c);if(!e.size)return b.K=!0,Promise.resolve();e=ed(b,e);return d?e:e["catch"](function(){})}
p.Wb=function(b){var c=this;if(!this.j)return this.l.wa(b,"encrypted",function(){c.g(new G(2,6,6010))}),Promise.resolve();this.u=b;this.l.wa(this.u,"play",function(){for(var b=0;b<c.H.length;b++)jd(c,c.H[b]);c.ba=!0;c.H=[]});b=this.u.setMediaKeys(this.j);b=b["catch"](function(b){return Promise.reject(new G(2,6,6003,b.message))});var d=kd(this);return Promise.all([b,d]).then(function(){if(c.c)return Promise.reject();ld(c);c.a.initData.length||c.v.length||c.l.m(c.u,"encrypted",function(b){return md(c,
b.initDataType,new Uint8Array(b.initData))})})["catch"](function(b){if(!c.c)return Promise.reject(b)})};function kd(b){return t(function d(){var e;return y(d,function(d){switch(d.s){case 1:if(!(b.j&&b.a&&b.a.serverCertificate&&b.a.serverCertificate.length)){d.C(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 G(2,6,6004,e.message)))}})})}
function nd(b,c){return t(function e(){var f,g,h;return y(e,function(e){switch(e.s){case 1:return u(e,od(b,c),2);case 2:f=e.A;if(!f)return e["return"]();g=[];if(h=b.b.get(f))h.Pa=new I,g.push(h.Pa);g.push(f.remove());return u(e,Promise.all(g),0)}})})}function ld(b){var c=b.a?b.a.initData:[];c.forEach(function(c){return pd(b,c.initDataType,c.initData)});b.v.forEach(function(c){return od(b,c)});c.length||b.v.length||b.o.resolve();return b.o}
function md(b,c,d){var e=b.b.values();e=r(e);for(var f=e.next();!f.done;f=e.next())if(Uc(d,f.value.initData))return;pd(b,c,d)}p.keySystem=function(){return this.a?this.a.keySystem:""};function qd(b,c){return Ec("Edge/")?!0:b.w.has(c)}function rd(b){b=b.b.keys();b=db(b,function(b){return b.sessionId});return Array.from(b)}p.Bc=function(){var b=Infinity,c=this.b.keys();c=r(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 id(b,c){for(var d=new Set,e=r(c),f=e.next();!f.done;f=e.next()){var g=r(f.value.drmInfos);for(f=g.next();!f.done;f=g.next())d.add(f.value)}e=r(d);for(f=e.next();!f.done;f=e.next())hd(f.value,vc(b.f.servers),vc(b.f.advanced||{}));g=b.F?"required":"optional";var h=b.F?["persistent-license"]:["temporary"];e=new Map;d=r(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=r(c);for(f=d.next();!f.done;f=d.next()){f=f.value;g=f.audio;h=f.video;var k=g?xc(g.mimeType,g.codecs):"",l=h?xc(h.mimeType,h.codecs):"",m=r(f.drmInfos);for(f=m.next();!f.done;f=m.next()){f=f.value;var n=e.get(f.keySystem);n.drmInfos.push(f);f.distinctiveIdentifierRequired&&(n.distinctiveIdentifier="required");f.persistentStateRequired&&(n.persistentState="required");g&&n.audioCapabilities.push({robustness:f.audioRobustness||"",contentType:k});h&&n.videoCapabilities.push({robustness:f.videoRobustness||
"",contentType:l})}}return e}
function ed(b,c){if(1==c.size&&c.has(""))return Promise.reject(new G(2,6,6E3));for(var d=r(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 I;[!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 G(2,6,6001))});f=f.then(function(b){if(this.c)return Promise.reject();this.w.clear();var d=b.getConfiguration(),e=d.videoCapabilities||[],f=r(d.audioCapabilities||[]);for(d=f.next();!d.done;d=f.next())this.w.add(d.value.contentType);e=r(e);for(d=e.next();!d.done;d=e.next())this.w.add(d.value.contentType);e=b.keySystem;d=c.get(b.keySystem);f=[];var g=[],n=[],q=[];sd(d.drmInfos,f,g,n,q);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:n,keyIds:q};return this.a.licenseServerUri?b.createMediaKeys():Promise.reject(new G(2,6,6012,this.a.keySystem))}.bind(b)).then(function(b){if(this.c)return Promise.reject();this.j=b;this.K=!0}.bind(b))["catch"](function(b){if(!this.c)return this.a=
null,this.w.clear(),b instanceof G?Promise.reject(b):Promise.reject(new G(2,6,6002,b.message))}.bind(b));d.reject();return f}
function gd(b){b=vc(b.f.clearKeys);if(0==b.size)return null;var c=[],d=[];b.forEach(function(b,e){var f=Sc(e),g=Sc(b);f={kty:"oct",kid:Qc(f,!1),k:Qc(g,!1)};c.push(f);d.push(f.kid)});b=JSON.stringify({keys:c});var e=JSON.stringify({kids:d});e=[{initData:new Uint8Array(Nc(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