UNPKG

shaka-player

Version:
126 lines (122 loc) 410 kB
/* @license Shaka Player Copyright 2016 Google LLC SPDX-License-Identifier: Apache-2.0 */ (function(){var innerGlobal=typeof window!="undefined"?window:global;var exportTo={};(function(window,global,module){var m,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 ca(){ca=function(){};ba.Symbol||(ba.Symbol=da)}var da=function(){var b=0;return function(c){return"jscomp_symbol_"+(c||"")+b++}}(); function ea(){ca();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 fa(this)}});ea=function(){}}function fa(b){var c=0;return ha(function(){return c<b.length?{done:!1,value:b[c++]}:{done:!0}})}function ha(b){ea();b={next:b};b[ba.Symbol.iterator]=function(){return this};return b}function r(b){ea();var c=b[Symbol.iterator];return c?c.call(b):fa(b)} function ia(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})}} ia("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(n){this.g(n)}}}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.w),reject:b(this.f)}};c.prototype.w=function(b){if(b===this)this.f(new TypeError("A Promise cannot resolve to itself"));else if(b instanceof c)this.B(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.v(b):this.j(b)}};c.prototype.v=function(b){var c=void 0;try{c=b.then}catch(l){this.f(l);return}"function"==typeof c?this.F(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.s()};c.prototype.s=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.B=function(b){var c=this.c();b.Jc(c.resolve,c.reject)};c.prototype.F=function(b,c){var d=this.c();try{b.call(c,d.resolve,d.reject)}catch(n){d.reject(n)}};c.prototype.then=function(b,d){function e(b,c){return"function"==typeof b?function(c){try{f(b(c))}catch(z){g(z)}}:c}var f,g,h=new c(function(b,c){f=b;g=c});this.Jc(e(b,f),e(d,g));return h};c.prototype["catch"]=function(b){return this.then(void 0,b)};c.prototype.Jc=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).Jc(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).Jc(g(h.length-1),c),f=d.next(); while(!f.done)})};return c});ia("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 ja(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 u(b){return ja(b())} var la="function"==typeof Object.create?Object.create:function(b){function c(){}c.prototype=b;return new c},ma;if("function"==typeof Object.setPrototypeOf)ma=Object.setPrototypeOf;else{var na;a:{var pa={Hf:!0},qa={};try{qa.__proto__=pa;na=qa.Hf;break a}catch(b){}na=!1}ma=na?function(b,c){b.__proto__=c;if(b.__proto__!==c)throw new TypeError(b+" is not extensible");return b}:null}var ra=ma; function ta(b,c){b.prototype=la(c.prototype);b.prototype.constructor=b;if(ra)ra(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.Eh=c.prototype}function va(){this.g=!1;this.c=null;this.A=void 0;this.o=1;this.b=this.f=0;this.l=this.a=null}function wa(b){if(b.g)throw new TypeError("Generator is already running");b.g=!0}va.prototype.j=function(b){this.A=b}; function xa(b,c){b.a={Ge:c,Se:!0};b.o=b.f||b.b}va.prototype["return"]=function(b){this.a={"return":b};this.o=this.b};function v(b,c,d){b.o=d;return{value:c}}va.prototype.C=function(b){this.o=b};function w(b){b.o=0}function ya(b,c,d){b.f=c;void 0!=d&&(b.b=d)}function za(b,c){b.f=0;b.b=c||0}function Aa(b,c){b.o=c;b.f=0}function Ea(b){b.f=0;var c=b.a.Ge;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.Se?b.o=b.f||b.b:void 0!=d.C&&b.b<d.C?(b.o=d.C,b.a=null):b.o=b.b:b.o=c}function Ha(b){this.a=new va;this.b=b}function Ia(b,c){wa(b.a);var d=b.a.c;if(d)return Ja(b,"return"in d?d["return"]:function(b){return{value:b,done:!0}},c,b.a["return"]);b.a["return"](c);return Ka(b)} function Ja(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,xa(b.a,h),Ka(b)}b.a.c=null;e.call(b.a,g);return Ka(b)} function Ka(b){for(;b.a.o;)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,xa(b.a,d)}b.a.g=!1;if(b.a.a){c=b.a.a;b.a.a=null;if(c.Se)throw c.Ge;return{value:c["return"],done:!0}}return{value:void 0,done:!0}} function La(b){this.next=function(c){wa(b.a);b.a.c?c=Ja(b,b.a.c.next,c,b.a.j):(b.a.j(c),c=Ka(b));return c};this["throw"]=function(c){wa(b.a);b.a.c?c=Ja(b,b.a.c["throw"],c,b.a.j):(xa(b.a,c),c=Ka(b));return c};this["return"]=function(c){return Ia(b,c)};ea();this[Symbol.iterator]=function(){return this}}function x(b,c){La.prototype=b.prototype;return new La(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 Pa(b,c){return Object.prototype.hasOwnProperty.call(b,c)} ia("WeakMap",function(b){function c(b){this.a=(g+=Math.random()+1).toString();if(b){ca();ea();b=r(b);for(var c;!(c=b.next()).done;)c=c.value,this.set(c[0],c[1])}}function d(b){Pa(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(n){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(!Pa(b,f))throw Error("WeakMap key fail: "+b);b[f][this.a]=c;return this};c.prototype.get=function(b){return Pa(b,f)?b[f][this.a]:void 0};c.prototype.has=function(b){return Pa(b,f)&&Pa(b[f],this.a)};c.prototype["delete"]=function(b){return Pa(b,f)&&Pa(b[f],this.a)?delete b[f][this.a]:!1};return c}); ia("Map",function(b){function c(){var b={};return b.fb=b.next=b.head=b}function d(b,c){var d=b.a;return ha(function(){if(d){for(;d.head!=b.a;)d=d.fb;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&&Pa(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,qa:k}}return{id:d, list:e,index:-1,qa: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;ca();ea();var g=new WeakMap;f.prototype.set=function(b,c){var d=e(this,b);d.list||(d.list=this.b[d.id]=[]);d.qa?d.qa.value=c:(d.qa={next:this.a,fb:this.a.fb,head:this.a,key:b,value:c},d.list.push(d.qa),this.a.fb.next=d.qa,this.a.fb=d.qa,this.size++);return this};f.prototype["delete"]=function(b){b=e(this,b);return b.qa&&b.list?(b.list.splice(b.index,1),b.list.length||delete this.b[b.id],b.qa.fb.next=b.qa.next,b.qa.next.fb=b.qa.fb, b.qa.head=null,this.size--,!0):!1};f.prototype.clear=function(){this.b={};this.a=this.a.fb=c();this.size=0};f.prototype.has=function(b){return!!e(this,b).qa};f.prototype.get=function(b){return(b=e(this,b).qa)&&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}); ia("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;ca();ea();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 Qa(b,c){ea();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}ia("Array.prototype.keys",function(b){return b?b:function(){return Qa(this,function(b){return b})}}); ia("Array.from",function(b){return b?b:function(b,d,e){ea();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{Pe:f,Bf:g}}return{Pe:-1,Bf:void 0}} ia("Array.prototype.findIndex",function(b){return b?b:function(b,d){return Ua(this,b,d).Pe}});ia("Object.is",function(b){return b?b:function(b,d){return b===d?0!==b||1/b===1/d:b!==b&&d!==d}});ia("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+""}ia("String.prototype.includes",function(b){return b?b:function(b,d){return-1!==Va(this,b,"includes").indexOf(b,d||0)}}); ia("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}});ia("Array.prototype.find",function(b){return b?b:function(b,d){return Ua(this,b,d).Bf}});var Wa="function"==typeof Object.assign?Object.assign:function(b,c){for(var d=1;d<arguments.length;d++){var e=arguments[d];if(e)for(var f in e)Pa(e,f)&&(b[f]=e[f])}return b}; ia("Object.assign",function(b){return b||Wa});var Xa=this;Xa.a=!0;function A(b,c){var d=b.split("."),e=Xa;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 Za(b,c){function d(){}d.prototype=c.prototype;b.Eh=c.prototype;b.prototype=new d;b.prototype.constructor=b;b.base=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}A("shaka.util.FakeEvent",B);B.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};B.prototype.stopImmediatePropagation=function(){this.a=!0};B.prototype.stopPropagation=function(){};var D={Nb:0,Hc:function(){},ba:function(){},error:function(){},u:function(){},info:function(){},debug:function(){},I:function(){},N:function(){}};window.console&&window.console.log.bind&&(D.ba=console.warn.bind(console),D.Hc=console.error.bind(console),1<=D.Nb&&(D.error=console.error.bind(console)),2<=D.Nb&&(D.u=console.warn.bind(console)),3<=D.Nb&&(D.info=console.info.bind(console)),4<=D.Nb&&(D.debug=console.log.bind(console)),5<=D.Nb&&(D.I=console.debug.bind(console)),6<=D.Nb&&(D.N=console.debug.bind(console)));function $a(){this.a={}}m=$a.prototype;m.push=function(b,c){this.a.hasOwnProperty(b)?this.a[b].push(c):this.a[b]=[c]};m.get=function(b){return(b=this.a[b])?b.slice():null};m.getAll=function(){var b=[],c;for(c in this.a)b.push.apply(b,this.a[c]);return b};m.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)};m.forEach=function(b){for(var c in this.a)b(c,this.a[c])};function ab(){this.Cd=new $a;this.Ec=this}ab.prototype.addEventListener=function(b,c){this.Cd.push(b,c)};ab.prototype.removeEventListener=function(b,c){this.Cd.remove(b,c)};ab.prototype.dispatchEvent=function(b){for(var c=this.Cd.get(b.type)||[],d=0;d<c.length;++d){b.target=this.Ec;b.currentTarget=this.Ec;var e=c[d];try{e.handleEvent?e.handleEvent(b):e.call(this,b)}catch(f){D.error("Uncaught exception in event handler",f,f?f.message:null,f?f.stack:null)}if(b.a)break}return b.defaultPrevented};function bb(b,c){for(var d=[],e=r(b),f=e.next();!f.done;f=e.next())d.push(c(f.value));return d}function cb(b,c){for(var d=r(b),e=d.next();!e.done;e=d.next())if(!c(e.value))return!1;return!0}function db(b,c){for(var d=r(b),e=d.next();!e.done;e=d.next())if(c(e.value))return!0;return!1}function eb(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 fb(b,c){b=E(b);c=E(c);return b.split("-")[0]==c.split("-")[0]}function jb(b,c){b=E(b);c=E(c);var d=b.split("-"),e=c.split("-");return d[0]==e[0]&&1==d.length&&2==e.length}function E(b){var c=b.split("-");b=c[0]||"";c=c[1]||"";b=b.toLowerCase();b=kb.get(b)||b;return(c=c.toUpperCase())?b+"-"+c:b}function lb(b){var c=b.indexOf("-");b=0<=c?b.substring(0,c):b;b=b.toLowerCase();return b=kb.get(b)||b} function mb(b){return b.language?E(b.language):b.audio&&b.audio.language?E(b.audio.language):b.video&&b.video.language?E(b.video.language):"und"} function nb(b,c){for(var d=E(b),e=new Set,f=r(c),g=f.next();!g.done;g=f.next())e.add(E(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,jb(g,d))return g;f=r(e);for(g=f.next();!g.done;g=f.next()){var h=g=g.value,k=d;h=E(h);k=E(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,jb(d,f))return f;return null} var kb=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 ob(b){this.g=E(b);this.f=new Map;this.b=new Set;this.c=new Map;this.a=new ab}A("shaka.ui.Localization",ob);ob.prototype.addEventListener=function(b,c,d){this.a.addEventListener(b,c,d)};ob.prototype.addEventListener=ob.prototype.addEventListener;ob.prototype.removeEventListener=function(b,c,d){this.a.removeEventListener(b,c,d||void 0)};ob.prototype.removeEventListener=ob.prototype.removeEventListener;ob.prototype.dispatchEvent=function(b){return this.a.dispatchEvent(b)}; ob.prototype.dispatchEvent=ob.prototype.dispatchEvent;ob.prototype.Be=function(b){var c=this;this.b.clear();b=r(b);for(var d=b.next();!d.done;d=b.next())this.b.add(E(d.value));pb(this);this.a.dispatchEvent(new B("locale-changed"));b=eb(this.b,function(b){return!c.c.has(b)});b.length&&this.a.dispatchEvent(new B("unknown-locales",{locales:b}))};ob.prototype.changeLocale=ob.prototype.Be; ob.prototype.aa=function(b,c,d){var e=qb;b=E(b);void 0===d&&(d=e.Gf);var f=this.c.get(b)||new Map;c.forEach(function(b,c){f.has(c)&&d!=e.Gf||f.set(c,b)});this.c.set(b,f);pb(this);this.a.dispatchEvent(new B("locale-updated"));return this};ob.prototype.insert=ob.prototype.aa;ob.prototype.nh=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))};ob.prototype.resolveDictionary=ob.prototype.nh; ob.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""};ob.prototype.resolve=ob.prototype.resolve; function pb(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(lb(g.locale));k=eb(c.keys(),function(b){return function(c){var d=b.locale,e=lb(c),f=lb(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=eb(c.keys(),function(b){return function(c){return lb(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,rb(k,c,f);0<f.size&&(e={locales:Array.from(e),missing:Array.from(f)},b.a.dispatchEvent(new B("missing-localizations",e)))}function rb(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 qb={USE_OLD:0,USE_NEW:1};ob.ConflictResolution=qb;ob.UNKNOWN_LOCALES="unknown-locales";ob.UNKNOWN_LOCALIZATION="unknown-localization";ob.MISSING_LOCALIZATIONS="missing-localizations";ob.LOCALE_CHANGED="locale-changed";ob.LOCALE_UPDATED="locale-updated";function sb(b){this.c=Math.exp(Math.log(.5)/b);this.b=this.a=0}function tb(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 ub(b){return b.a/(1-Math.pow(b.c,b.b))};function vb(){this.b=new sb(2);this.c=new sb(5);this.a=0}vb.prototype.getBandwidthEstimate=function(b){return 128E3>this.a?b:Math.min(ub(this.b),ub(this.c))};function F(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}A("shaka.util.Error",F);F.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};F.Severity={RECOVERABLE:1,CRITICAL:2};F.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9}; F.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,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,HLS_INTERNAL_SKIP_STREAM:4035,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,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,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};/* @license Copyright 2008 The Closure Library Authors SPDX-License-Identifier: Apache-2.0 */ var zb=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;/* @license Copyright 2006 The Closure Library Authors SPDX-License-Identifier: Apache-2.0 */ function Ab(b){var c;b instanceof Ab?(Bb(this,b.Qa),this.Kb=b.Kb,this.Pa=b.Pa,Cb(this,b.ec),this.Ca=b.Ca,Db(this,b.a.clone()),this.wb=b.wb):b&&(c=String(b).match(zb))?(Bb(this,c[1]||"",!0),this.Kb=Eb(c[2]||""),this.Pa=Eb(c[3]||"",!0),Cb(this,c[4]),this.Ca=Eb(c[5]||"",!0),Db(this,c[6]||"",!0),this.wb=Eb(c[7]||"")):this.a=new Fb(null)}m=Ab.prototype;m.Qa="";m.Kb="";m.Pa="";m.ec=null;m.Ca="";m.wb=""; m.toString=function(){var b=[],c=this.Qa;c&&b.push(Gb(c,Hb,!0),":");if(c=this.Pa){b.push("//");var d=this.Kb;d&&b.push(Gb(d,Hb,!0),"@");b.push(encodeURIComponent(c).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));c=this.ec;null!=c&&b.push(":",String(c))}if(c=this.Ca)this.Pa&&"/"!=c.charAt(0)&&b.push("/"),b.push(Gb(c,"/"==c.charAt(0)?Ib:Jb,!0));(c=this.a.toString())&&b.push("?",c);(c=this.wb)&&b.push("#",Gb(c,Kb));return b.join("")}; m.resolve=function(b){var c=this.clone();"data"===c.Qa&&(c=new Ab);var d=!!b.Qa;d?Bb(c,b.Qa):d=!!b.Kb;d?c.Kb=b.Kb:d=!!b.Pa;d?c.Pa=b.Pa:d=null!=b.ec;var e=b.Ca;if(d)Cb(c,b.ec);else if(d=!!b.Ca){if("/"!=e.charAt(0))if(this.Pa&&!this.Ca)e="/"+e;else{var f=c.Ca.lastIndexOf("/");-1!=f&&(e=c.Ca.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.Ca=e:d=""!==b.a.toString();d?Db(c,b.a.clone()):d=!!b.wb;d&&(c.wb=b.wb);return c};m.clone=function(){return new Ab(this)};function Bb(b,c,d){b.Qa=d?Eb(c,!0):c;b.Qa&&(b.Qa=b.Qa.replace(/:$/,""))}function Cb(b,c){if(c){c=Number(c);if(isNaN(c)||0>c)throw Error("Bad port number "+c);b.ec=c}else b.ec=null}function Db(b,c,d){c instanceof Fb?b.a=c:(d||(c=Gb(c,Lb)),b.a=new Fb(c))} function Eb(b,c){return b?c?decodeURI(b):decodeURIComponent(b):""}function Gb(b,c,d){return"string"==typeof b?(b=encodeURI(b).replace(c,Qb),d&&(b=b.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),b):null}function Qb(b){b=b.charCodeAt(0);return"%"+(b>>4&15).toString(16)+(b&15).toString(16)}var Hb=/[#\/\?@]/g,Jb=/[#\?:]/g,Ib=/[#\?]/g,Lb=/[#\?@]/g,Kb=/#/g;function Fb(b){this.a=b||null}m=Fb.prototype;m.Aa=null;m.Mc=null; m.add=function(b,c){if(!this.Aa&&(this.Aa={},this.Mc=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.Aa.hasOwnProperty(b)&&this.Aa[b])||(this.Aa[b]=d=[]);d.push(c);this.Mc++;return this}; m.toString=function(){if(this.a)return this.a;if(!this.Aa)return"";var b=[],c;for(c in this.Aa)for(var d=encodeURIComponent(c),e=this.Aa[c],f=0;f<e.length;f++){var g=d;""!==e[f]&&(g+="="+encodeURIComponent(e[f]));b.push(g)}return this.a=b.join("&")};m.clone=function(){var b=new Fb;b.a=this.a;if(this.Aa){var c={},d;for(d in this.Aa)c[d]=this.Aa[d].concat();b.Aa=c;b.Mc=this.Mc}return b};var Rb={Pf:function(b,c){return b.reduce(function(b,c,f){return c["catch"](b.bind(null,f))}.bind(null,c),Promise.reject())},nd:function(b,c){return b.concat(c)},Uc:function(){},jb:function(b){return null!=b}};function Sb(b,c){if(0==c.length)return b;var d=c.map(function(b){return new Ab(b)});return b.map(function(b){return new Ab(b)}).map(function(b){return d.map(b.resolve.bind(b))}).reduce(Rb.nd,[]).map(function(b){return b.toString()})}function Tb(b,c){return{keySystem:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:c||[],keyIds:[]}} var Ub={tb:"video",jc:"audio",Oa:"text",Mh:"image",Kh:"application"},Vb=1/15;function G(){var b,c,d=new Promise(function(d,f){b=d;c=f});d.resolve=b;d.reject=c;return d}G.prototype.resolve=function(){};G.prototype.reject=function(){};function Wb(b){if(!b)return"";b=new Uint8Array(b);239==b[0]&&187==b[1]&&191==b[2]&&(b=b.subarray(3));b=Xb(b);b=escape(b);try{return decodeURIComponent(b)}catch(c){throw new F(2,2,2004);}}A("shaka.util.StringUtils.fromUTF8",Wb); function Yb(b,c,d){if(!b)return"";if(!d&&0!=b.byteLength%2)throw D.error("Data has an incorrect length, must be even."),new F(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 Xb(d)}A("shaka.util.StringUtils.fromUTF16",Yb); function Zb(b){var c=new Uint8Array(b);if(239==c[0]&&187==c[1]&&191==c[2])return Wb(c);if(254==c[0]&&255==c[1])return Yb(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Yb(c.subarray(2),!0);var d=function(b,c){return b.byteLength<=c||32<=b[c]&&126>=b[c]}.bind(null,c);D.debug("Unable to find byte-order-mark, making an educated guess.");if(0==c[0]&&0==c[2])return Yb(b,!1);if(0==c[1]&&0==c[3])return Yb(b,!0);if(d(0)&&d(1)&&d(2)&&d(3))return Wb(b);throw new F(2,2,2003);} A("shaka.util.StringUtils.fromBytesAutoDetect",Zb);function $b(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}A("shaka.util.StringUtils.toUTF8",$b);function ac(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}A("shaka.util.StringUtils.toUTF16",ac); function Xb(b){if(!bc)for(var c=function(b){try{var c=new Uint8Array(b);return 0<String.fromCharCode.apply(null,c).length}catch(g){return!1}},d={size:65536};0<d.size;d={size:d.size},d.size/=2)if(c(d.size)){bc=function(b){return function(c){for(var d="",e=0;e<c.length;e+=b.size)d+=String.fromCharCode.apply(null,c.subarray(e,e+b.size));return d}}(d);break}return bc(b)}var bc=null;A("shaka.util.StringUtils.resetFromCharCode",function(){bc=null});var J={gd:function(b,c){var d=Xb(b);c=void 0==c?!0:c;d=window.btoa(d).replace(/\+/g,"-").replace(/\//g,"_");return c?d:d.replace(/=*$/,"")}};A("shaka.util.Uint8ArrayUtils.toBase64",J.gd);J.Za=function(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};A("shaka.util.Uint8ArrayUtils.fromBase64",J.Za); J.vd=function(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};A("shaka.util.Uint8ArrayUtils.fromHex",J.vd);J.hd=function(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};A("shaka.util.Uint8ArrayUtils.toHex",J.hd);J.Xa=function(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};A("shaka.util.Uint8ArrayUtils.equal",J.Xa); J.concat=function(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};A("shaka.util.Uint8ArrayUtils.concat",J.concat);function cc(){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))}cc.prototype.destroy=function(){this.a.dispose();this.a=null;return Promise.resolve()};function dc(b,c){return window.muxjs&&"mp2t"==b.toLowerCase().split(";")[0].split("/")[1]?c?MediaSource.isTypeSupported(ec(c,b)):MediaSource.isTypeSupported(ec("audio",b))||MediaSource.isTypeSupported(ec("video",b)):!1} function ec(b,c){var d=c.replace(/mp2t/i,"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 fc(b,c){b.f=!0;b.b=new G;b.g=[];b.c=[];var d=new Uint8Array(c);b.a.push(d);b.a.flush();b.f&&b.b.reject(new F(2,3,3018));return b.b} cc.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)};cc.prototype.j=function(){var b={data:J.concat.apply(null,this.g),captions:this.c};this.b.resolve(b);this.f=!1};function gc(b){this.b=b;this.a=null}gc.prototype.R=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};gc.prototype.stop=function(){this.a&&(this.a(),this.a=null)};function K(b){this.b=b;this.a=null}A("shaka.util.Timer",K);K.prototype.gb=function(){this.stop();this.b();return this};K.prototype.tickNow=K.prototype.gb;K.prototype.R=function(b){var c=this;this.stop();this.a=(new gc(function(){c.b()})).R(b);return this};K.prototype.tickAfter=K.prototype.R;K.prototype.Ia=function(b){var c=this;this.stop();this.a=(new gc(function(){c.a.R(b);c.b()})).R(b);return this};K.prototype.tickEvery=K.prototype.Ia;K.prototype.stop=function(){this.a&&(this.a.stop(),this.a=null)}; K.prototype.stop=K.prototype.stop;function hc(b,c){var d=ic();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 jc(b){return u(function d(){var e,f;return x(d,function(d){switch(d.o){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 v(d,new Promise(function(b){(new K(b)).R(f/1E3)}),2);case 2:b.b*=b.g,w(d)}})})}function ic(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}};function kc(b,c){this.promise=b;this.We=c;this.a=!1}A("shaka.util.AbortableOperation",kc);function lc(b){return new kc(Promise.reject(b),function(){return Promise.resolve()})}kc.failed=lc;function mc(){var b=Promise.reject(new F(2,7,7001));b["catch"](function(){});return new kc(b,function(){return Promise.resolve()})}kc.aborted=mc;function nc(b){return new kc(Promise.resolve(b),function(){return Promise.resolve()})}kc.completed=nc; function oc(b){return new kc(b,function(){return b["catch"](function(){})})}kc.notAbortable=oc;kc.prototype.abort=function(){this.a=!0;return this.We()};kc.prototype.abort=kc.prototype.abort;function pc(b){return new kc(Promise.all(b.map(function(b){return b.promise})),function(){return Promise.all(b.map(function(b){return b.abort()}))})}kc.all=pc;kc.prototype["finally"]=function(b){this.promise.then(function(){return b(!0)},function(){return b(!1)});return this};kc.prototype["finally"]=kc.prototype["finally"]; kc.prototype.ma=function(b,c){function d(d){return function(k){if(f.a&&d)g.reject(h);else{var l=d?b:c;l?e=qc(l,k,g):(d?g.resolve:g.reject)(k)}}}function e(){g.reject(h);return f.abort()}var f=this,g=new G,h=new F(2,7,7001);this.promise.then(d(!0),d(!1));return new kc(g,function(){return e()})};kc.prototype.chain=kc.prototype.ma; function qc(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(){},function(){})}}catch(f){return d.reject(f),function(){return Promise.resolve()}}};function rc(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 sc(b,c){return"number"===typeof b&&"number"===typeof c&&isNaN(b)&&isNaN(c)?!0:b===c}function uc(b,c){var d=b.indexOf(c);-1<d&&b.splice(d,1)}function vc(b,c){var d=0;b.forEach(function(b){d+=c(b)?1:0});return d} function wc(b,c,d){d||(d=sc);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 xc(b,c,d){d||(d=sc);if(b.length!=c.length)return!1;for(var e=0;e<b.length;e++)if(!d(b[e],c[e]))return!1;return!0};function yc(){this.a=[]}function zc(b,c){b.a.push(c["finally"](function(){uc(b.a,c)}))}yc.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 L(b){ab.call(this);this.f=!1;this.g=new yc;this.a=new Set;this.b=new Set;this.c=b||null}Za(L,ab);A("shaka.net.NetworkingEngine",L);L.RequestType={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3,TIMING:4};L.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:3};var Ac={};function Bc(b,c,d){d=d||3;var e=Ac[b];if(!e||d>=e.priority)Ac[b]={priority:d,dh:c}}L.registerScheme=Bc;L.unregisterScheme=function(b){delete Ac[b]};L.prototype.fh=function(b){this.a.add(b)};L.prototype.registerRequestFilter=L.prototype.fh; L.prototype.Fh=function(b){this.a["delete"](b)};L.prototype.unregisterRequestFilter=L.prototype.Fh;L.prototype.Nf=function(){this.a.clear()};L.prototype.clearAllRequestFilters=L.prototype.Nf;L.prototype.gh=function(b){this.b.add(b)};L.prototype.registerResponseFilter=L.prototype.gh;L.prototype.Gh=function(b){this.b["delete"](b)};L.prototype.unregisterResponseFilter=L.prototype.Gh;L.prototype.Of=function(){this.b.clear()};L.prototype.clearAllResponseFilters=L.prototype.Of; L.defaultRetryParameters=function(){return ic()};function Cc(b,c){return{uris:b,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:c,licenseRequestType:null,sessionId:null}}L.makeRequest=Cc;L.prototype.destroy=function(){this.f=!0;this.a.clear();this.b.clear();return this.g.destroy()};L.prototype.destroy=L.prototype.destroy; L.prototype.request=function(b,c){var d=this,e=new Dc;if(this.f){var f=Promise.reject(new F(2,7,7001));f["catch"](function(){});return new Ec(f,function(){return Promise.resolve()},e)}c.method=c.method||"GET";c.headers=c.headers||{};c.retryParameters=c.retryParameters?rc(c.retryParameters):ic();c.uris=rc(c.uris);f=Fc(this,b,c);var g=f.ma(function(){return Gc(d,b,c,new hc(c.retryParameters,!1),0,null,e)}),h=g.ma(function(c){return Hc(d,b,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()- k},function(){});var n=0;g.promise.then(function(){n=Date.now()},function(){});f=h.ma(function(c){var e=Date.now()-n,f=c.response;f.timeMs+=l;f.timeMs+=e;c.Ag||!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 Ec(f.promise,f.We,e);zc(this.g,f);return f};L.prototype.request=L.prototype.request; function Fc(b,c,d){var e=nc(void 0),f={};b=r(b.a);for(var g=b.next();!g.done;f={Yd:f.Yd},g=b.next())f.Yd=g.value,e=e.ma(function(b){return function(){return b.Yd(c,d)}}(f));return e.ma(void 0,function(b){if(b&&7001==b.code)throw b;throw new F(2,1,1006,b);})} function Gc(b,c,d,e,f,g,h){var k=new Ab(d.uris[f]),l=k.Qa,n=!1;l||(l=location.protocol,l=l.slice(0,-1),Bb(k,l),d.uris[f]=k.toString());l=l.toLowerCase();var p=(l=Ac[l])?l.dh:null;if(!p)return lc(new F(2,1,1E3,k));var q;return oc(jc(e)).ma(function(){if(b.f)return mc();q=Date.now();return p(d.uris[f],d,c,function(d,e,f){b.c&&1==c&&(b.c(d,e),n=!0,h.a=f)})}).ma(function(b){void 0==b.timeMs&&(b.timeMs=Date.now()-q);return{response:b,Ag:n}},function(k){if(k&&7001==k.code)throw k;if(b.f)return mc();if(k&& 1==k.severity)return b.dispatchEvent(new B("retry",{error:k instanceof F?k:null})),f=(f+1)%d.uris.length,Gc(b,c,d,e,f,k,h);throw k||g;})}function Hc(b,c,d){var e=nc(void 0);b=r(b.b);for(var f=b.next();!f.done;f=b.next())e=e.ma(f.value.bind(null,c,d.response));return e.ma(function(){return d},function(b){if(b&&7001==b.code)throw b;var c=2;b instanceof F&&(c=b.severity);throw new F(c,1,1007,b);})}function Dc(){this.a=0}L.NumBytesRemainingClass=Dc;function Ec(b,c,d){kc.call(this,b,c);this.b=d} ta(Ec,kc);L.PendingRequest=Ec;Ec.all=pc;Ec.notAbortable=oc;Ec.completed=nc;Ec.aborted=mc;Ec.failed=lc;function Ic(){}A("shaka.util.IReleasable",Ic);Ic.prototype.release=function(){};function M(){this.a=new $a}A("shaka.util.EventManager",M);M.prototype.release=function(){this.Hb();this.a=null};M.prototype.release=M.prototype.release;M.prototype.m=function(b,c,d,e){this.a&&(b=new Jc(b,c,d,e),this.a.push(c,b))};M.prototype.listen=M.prototype.m;M.prototype.Ha=function(b,c,d,e){function f(e){g.xa(b,c,f);d(e)}var g=this;this.m(b,c,f,e)};M.prototype.listenOnce=M.prototype.Ha; M.prototype.xa=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.xa(),this.a.remove(c,f))}};M.prototype.unlisten=M.prototype.xa;M.prototype.Hb=function(){if(this.a){var b=this.a.getAll();b=r(b);for(var c=b.next();!c.done;c=b.next())c.value.xa();this.a.a={}}};M.prototype.removeAll=M.prototype.Hb; function Jc(b,c,d,e){this.target=b;this.type=c;this.listener=d;this.a=Kc(b,e);this.target.addEventListener(c,d,this.a)}Jc.prototype.xa=function(){this.target.removeEventListener(this.type,this.listener,this.a);this.listener=this.target=null;this.a=!1};Jc.prototype.unlisten=Jc.prototype.xa;function Kc(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 Lc(b)?c:c.capture||!1} function Lc(b){var c=Mc;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}Mc=c}return c||!1}var Mc=void 0;function Nc(b){b=Zb(b);return(new Ab(b)).Pa}A("shaka.util.FairPlayUtils.defaultGetContentId",Nc);function Oc(b,c,d){function e(b){(new DataView(f.buffer)).setUint32(g,b.byteLength,!0);g+=4;f.set(b,g);g+=b.byteLength}if(!d||!d.byteLength)throw new F(2,6,6015);c="string"==typeof c?new Uint8Array(ac(c,!0)):new Uint8Array(c);b=Zb(b);b=ac(b,!0);var f=new Uint8Array(12+b.byteLength+c.byteLength+d.byteLength),g=0;e(new Uint8Array(b));e(c);e(new Uint8Array(d));return f} A("shaka.util.FairPlayUtils.initDataTransform",Oc);function Pc(b){var c=new Map;Object.keys(b).forEach(function(d){c.set(d,b[d])});return c}function Qc(b){var c={};b.forEach(function(b,e){c[e]=b});return c};function Rc(b,c){var d=b;c&&(d+='; codecs="'+c+'"');return d}function Sc(b){var c=[b.mimeType];Tc.forEach(function(d,e){var f=b[e];f&&c.push(d+'="'+f+'"')});return c.join(";")}function Uc(b){b=b.split(".");var c=b[0];b.pop();return[c,b.join(".")]}var Tc=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Vc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function Wc(b){return""!=Xc().canPlayType(b)}function Yc(){return Zc("Tizen")}function $c(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Yc()}function ad(){if(!$c())return null;var b=navigator.userAgent.match(/Version\/(\d+)/);return b?parseInt(b[1],10):(b=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(b[1],10):null}function Zc(b){return(navigator.userAgent||"").includes(b)} function Xc(){if(bd)return bd;cd||(cd=new K(function(){bd=null}));(bd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(bd=document.createElement("video"));cd.R(1);return bd}var cd=null,bd=null;function dd(b,c){var d=this;c=void 0===c?1:c;this.F=b;this.w=new Set;this.j=this.s=null;this.O=!1;this.K=0;this.a=null;this.l=new M;this.b=new Map;this.B=[];this.v=new G;this.f=null;this.g=function(c){d.v.reject(c);b.onError(c)};this.na=new Map;this.Y=new Map;this.L=new K(function(){return ed(d)});this.c=!1;this.ia=new G;this.H=!1;this.J=[];this.ka=!1;this.Z=(new K(function(){fd(d)})).Ia(c);this.v["catch"](function(){})}m=dd.prototype; m.destroy=function(){var b=this;return u(function d(){return x(d,function(d){switch(d.o){case 1:if(b.c)return v(d,b.ia,0);b.c=!0;return v(d,gd(b),4);case 4:b.ia.resolve(),d.C(0)}})})}; function gd(b){return u(function d(){return x(d,function(d){switch(d.o){case 1:return b.l.release(),b.l=null,b.v.reject(),b.Z.stop(),b.Z=null,b.L.stop(),b.L=null,v(d,hd(b),2);case 2:if(!b.j){d.C(3);break}ya(d,4);return v(d,b.j.setMediaKeys(null),6);case 6:Aa(d,5);break;case 4:Ea(d);case 5:b.j=null;case 3:b.a=null,b.w.clear(),b.s=null,b.B=[],b.f=null,b.g=null,b.F=null,w(d)}})})}m.configure=function(b){this.f=b};function id(b,c,d){b.B=[];b.H=d;return jd(b,c)} function kd(b,c,d){b.B=d;b.H=0<d.length;return jd(b,c)}function ld(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 md(b,h)} function jd(b,c){var d=nd(b);if(d)for(var e=r(c),f=e.next();!f.done;f=e.next())f.value.drmInfos=[d];d=c.some(function(b){return 0<b.drmInfos.length});d||(f=Pc(b.f.servers),od(c,f));e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.drmInfos);for(var g=f.next();!g.done;g=f.next())pd(g.value,Pc(b.f.servers),Pc(b.f.advanced||{}))}f=qd(b,c);if(!f.size)return b.O=!0,Promise.resolve();f=md(b,f);return d?f:f["catch"](function(){})} m.kc=function(b){var c=this;if(!this.s)return this.l.Ha(b,"encrypted",function(){c.g(new F(2,6,6010))}),Promise.resolve();this.j=b;this.l.Ha(this.j,"play",function(){for(var b=0;b<c.J.length;b++)rd(c,c.J[b]);c.ka=!0;c.J=[]});"webkitCurrentPlaybackTargetIsWireless"in this.j&&this.l.m(this.j,"webkitcurrentplaybacktargetiswirelesschanged",function(){return hd(c)});b=this.j.setMediaKeys(this.s);b=b["catch"](function(b){return Promise.reject(new F(2,6,6003,b.message))});var d=sd(this);return Promise.all([b, d]).then(function(){if(c.c)return Promise.reject();td(c);c.a.initData.length||c.B.length||c.l.m(c.j,"encrypted",function(b){return ud(c,b.initDataType,new Uint8Array(b.initData))})})["catch"](function(b){if(!c.c)return Promise.reject(b)})}; function sd(b){return u(function d(){var e,f;return x(d,function(d){switch(d.o){case 1:if(!(b.s&&b.a&&b.a.serverCertificate&&b.a.serverCertificate.length)){d.C(0);break}ya(d,3);return v(d,b.s.setServerCertificate(b.a.serverCertificate),5);case 5:(e=d.A)||D.u("Server certificates are not supported by the key