shaka-player 4.6.6 → 4.6.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -74,10 +74,10 @@ var ec=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
74
74
  Copyright 2006 The Closure Library Authors
75
75
  SPDX-License-Identifier: Apache-2.0
76
76
  */
77
- function fc(a){var b;a instanceof fc?(gc(this,a.Ua),this.Pb=a.Pb,hc(this,a.eb),ic(this,a.cc),this.Ba=a.Ba,jc(this,a.g.clone()),this.Cb=a.Cb):a&&(b=String(a).match(ec))?(gc(this,b[1]||"",!0),this.Pb=kc(b[2]||""),hc(this,b[3]||"",!0),ic(this,b[4]),this.Ba=kc(b[5]||"",!0),jc(this,b[6]||"",!0),this.Cb=kc(b[7]||"")):this.g=new lc(null)}q=fc.prototype;q.Ua="";q.Pb="";q.eb="";q.cc=null;q.Ba="";q.Cb="";
78
- q.toString=function(){var a=[],b=this.Ua;b&&a.push(mc(b,nc,!0),":");if(b=this.eb){a.push("//");var c=this.Pb;c&&a.push(mc(c,nc,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.cc;null!=b&&a.push(":",String(b))}if(b=this.Ba)this.eb&&"/"!=b.charAt(0)&&a.push("/"),a.push(mc(b,"/"==b.charAt(0)?oc:pc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Cb)&&a.push("#",mc(b,qc));return a.join("")};
79
- q.resolve=function(a){var b=this.clone();"data"===b.Ua&&(b=new fc);var c=!!a.Ua;c?gc(b,a.Ua):c=!!a.Pb;c?b.Pb=a.Pb:c=!!a.eb;c?hc(b,a.eb):c=null!=a.cc;var d=a.Ba;if(c)ic(b,a.cc);else if(c=!!a.Ba){if("/"!=d.charAt(0))if(this.eb&&!this.Ba)d="/"+d;else{var e=b.Ba.lastIndexOf("/");-1!=e&&(d=b.Ba.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
80
- h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Ba=d:c=""!==a.g.toString();c?jc(b,a.g.clone()):c=!!a.Cb;c&&(b.Cb=a.Cb);return b};q.clone=function(){return new fc(this)};function gc(a,b,c){a.Ua=c?kc(b,!0):b;a.Ua&&(a.Ua=a.Ua.replace(/:$/,""))}function hc(a,b,c){a.eb=c?kc(b,!0):b}function ic(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.cc=b}else a.cc=null}
77
+ function fc(a){var b;a instanceof fc?(gc(this,a.Ua),this.Pb=a.Pb,hc(this,a.fb),ic(this,a.cc),this.Ba=a.Ba,jc(this,a.g.clone()),this.Cb=a.Cb):a&&(b=String(a).match(ec))?(gc(this,b[1]||"",!0),this.Pb=kc(b[2]||""),hc(this,b[3]||"",!0),ic(this,b[4]),this.Ba=kc(b[5]||"",!0),jc(this,b[6]||"",!0),this.Cb=kc(b[7]||"")):this.g=new lc(null)}q=fc.prototype;q.Ua="";q.Pb="";q.fb="";q.cc=null;q.Ba="";q.Cb="";
78
+ q.toString=function(){var a=[],b=this.Ua;b&&a.push(mc(b,nc,!0),":");if(b=this.fb){a.push("//");var c=this.Pb;c&&a.push(mc(c,nc,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.cc;null!=b&&a.push(":",String(b))}if(b=this.Ba)this.fb&&"/"!=b.charAt(0)&&a.push("/"),a.push(mc(b,"/"==b.charAt(0)?oc:pc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Cb)&&a.push("#",mc(b,qc));return a.join("")};
79
+ q.resolve=function(a){var b=this.clone();"data"===b.Ua&&(b=new fc);var c=!!a.Ua;c?gc(b,a.Ua):c=!!a.Pb;c?b.Pb=a.Pb:c=!!a.fb;c?hc(b,a.fb):c=null!=a.cc;var d=a.Ba;if(c)ic(b,a.cc);else if(c=!!a.Ba){if("/"!=d.charAt(0))if(this.fb&&!this.Ba)d="/"+d;else{var e=b.Ba.lastIndexOf("/");-1!=e&&(d=b.Ba.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
80
+ h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Ba=d:c=""!==a.g.toString();c?jc(b,a.g.clone()):c=!!a.Cb;c&&(b.Cb=a.Cb);return b};q.clone=function(){return new fc(this)};function gc(a,b,c){a.Ua=c?kc(b,!0):b;a.Ua&&(a.Ua=a.Ua.replace(/:$/,""))}function hc(a,b,c){a.fb=c?kc(b,!0):b}function ic(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.cc=b}else a.cc=null}
81
81
  function jc(a,b,c){b instanceof lc?a.g=b:(c||(b=mc(b,rc)),a.g=new lc(b))}function kc(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function mc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,sc),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function sc(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var nc=/[#\/\?@]/g,pc=/[#\?:]/g,oc=/[#\?]/g,rc=/[#\?@]/g,qc=/#/g;function lc(a){this.g=a||null}
82
82
  function tc(a){if(!a.sa&&(a.sa={},a.Ec=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}q=lc.prototype;q.sa=null;q.Ec=null;function uc(a){tc(a);return a.Ec}q.add=function(a,b){tc(this);this.g=null;var c=this.sa.hasOwnProperty(a)?this.sa[a]:null;c||(this.sa[a]=c=[]);c.push(b);this.Ec++;return this};
83
83
  q.set=function(a,b){tc(this);this.g=null;this.sa.hasOwnProperty(a)?this.sa[a]=[b]:this.add(a,b);return this};q.get=function(a){tc(this);return this.sa[a]||[]};q.toString=function(){if(this.g)return this.g;if(!this.sa)return"";var a=[],b;for(b in this.sa)for(var c=encodeURIComponent(b),d=this.sa[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};
@@ -92,7 +92,7 @@ NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CE
92
92
  CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1E4,
93
93
  CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005};function wc(a,b){if(0==b.length)return a;if(1==a.length&&1==b.length){var c=new fc(a[0]);b=new fc(b[0]);return[c.resolve(b).toString()]}b=b.map(function(g){return new fc(g)});c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=new fc(d.value);for(var e=t(b),f=e.next();!f.done;f=e.next())c.push(d.resolve(f.value).toString())}return c}
94
94
  function xc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}function yc(a,b){if(1==b.length)return b[0];a=zc(a,b);if(null!=a)return a;throw new O(2,4,4025,b);}
95
- function zc(a,b){for(var c=t(Ac[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Bc?"":null}var Bc="text",Cc={da:"video",P:"audio",ia:Bc,xc:"image",Mh:"application"},Ac={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvh/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Dc(){}function Ec(a,b){var c=a;b&&!Fc.includes(a)&&(c+='; codecs="'+b+'"');return c}function Gc(a,b){b&&(a+='; codecs="'+b+'"');return a}function Hc(a,b,c){var d=Ec(a,b);b=Gc(a,b);$b(b)?(a=$b(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
95
+ function zc(a,b){for(var c=t(Ac[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Bc?"":null}var Bc="text",Cc={ea:"video",P:"audio",ia:Bc,xc:"image",Mh:"application"},Ac={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvh/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Dc(){}function Ec(a,b){var c=a;b&&!Fc.includes(a)&&(c+='; codecs="'+b+'"');return c}function Gc(a,b){b&&(a+='; codecs="'+b+'"');return a}function Hc(a,b,c){var d=Ec(a,b);b=Gc(a,b);$b(b)?(a=$b(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
96
96
  function Ic(a){var b=Jc(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:case "mp4a"===a&&"40.34"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===
97
97
  a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function Kc(a){return a.split(";")[0]}function Lc(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Jc(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}N("shaka.util.MimeUtils",Dc);
98
98
  Dc.getFullTypeWithAllCodecs=Gc;Dc.getFullType=Ec;(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var Fc=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Mc(a){this.i=null;this.j=a;this.u=!1;this.l=this.s=0;this.m=Infinity;this.h=this.g=null;this.A="";this.o=new Map}function Nc(a){return Oc[a]?!0:"application/cea-608"==a||"application/cea-708"==a?!!ub:!1}Mc.prototype.destroy=function(){this.j=this.i=null;this.o.clear();return Promise.resolve()};
@@ -120,8 +120,8 @@ p.push(g.id);e.set(k,l)}a.variants=a.variants.filter(function(u){var v=u.audio;u
120
120
  function Bd(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={Vd:d.Vd},e=b.next())if(d.Vd=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.Vd)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={Od:d.Od},b=c.next())if(d.Od=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Od)}}(d)),b.length){a=b;break}return a}function Cd(a,b,c){a.variants=a.variants.filter(function(d){return Dd(d,b,c)})}
121
121
  function Dd(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
122
122
  function Ed(a,b){return K(function(c){if(1==c.g)return C(c,Fd(a,b,0<b.offlineSessionIds.length),2);Gd(b);return C(c,Hd(b),0)})}
123
- function Fd(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return C(h,Id(b.variants,c,!1,[]),2);d=null;a&&(e=a.g)&&(d=e.keySystem);f=Cc;g=nd();b.variants=b.variants.filter(function(k){var l=k.video,m=l&&l.width||0,n=l&&l.height||0;if(g&&l&&(1920<m||1080<n)&&(l.codecs.includes("avc1.")||l.codecs.includes("avc3.")))return Xa(Jd(k)),!1;if(l){m=Kd(l.codecs);if(l.codecs.includes(",")){n=l.codecs.split(",");m=yc(f.da,n);m=Kd(m);n=yc(f.P,n);n=Ld(n);var r=Hc(l.mimeType,n,f.P);if(!bb(r))return!1;m=[m,n].join()}n=
124
- Hc(l.mimeType,m,f.da);if(!bb(n))return!1;l.codecs=m}if(l=k.audio){m=Ld(l.codecs);n=Hc(l.mimeType,m,f.P);if(!bb(n))return!1;l.codecs=m}(l=k.decodingInfos.some(function(p){return!p.supported||d&&(p=p.keySystemAccess)&&p.keySystem!=d?!1:!0}))||Xa(Jd(k));return l});E(h)})}
123
+ function Fd(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return C(h,Id(b.variants,c,!1,[]),2);d=null;a&&(e=a.g)&&(d=e.keySystem);f=Cc;g=nd();b.variants=b.variants.filter(function(k){var l=k.video,m=l&&l.width||0,n=l&&l.height||0;if(g&&l&&(1920<m||1080<n)&&(l.codecs.includes("avc1.")||l.codecs.includes("avc3.")))return Xa(Jd(k)),!1;if(l){m=Kd(l.codecs);if(l.codecs.includes(",")){n=l.codecs.split(",");m=yc(f.ea,n);m=Kd(m);n=yc(f.P,n);n=Ld(n);var r=Hc(l.mimeType,n,f.P);if(!bb(r))return!1;m=[m,n].join()}n=
124
+ Hc(l.mimeType,m,f.ea);if(!bb(n))return!1;l.codecs=m}if(l=k.audio){m=Ld(l.codecs);n=Hc(l.mimeType,m,f.P);if(!bb(n))return!1;l.codecs=m}(l=k.decodingInfos.some(function(p){return!p.supported||d&&(p=p.keySystemAccess)&&p.keySystem!=d?!1:!0}))||Xa(Jd(k));return l});E(h)})}
125
125
  function Md(a){var b=[];for(c in a)b.push(c);b.sort();var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=JSON.stringify(e);e=a[e];e instanceof Object?(e=Md(e),c.push(d+":"+e)):(e=JSON.stringify(e),c.push(d+":"+e))}return"{"+c.join(",")+"}"}
126
126
  function Nd(a,b){var c,d,e;return K(function(f){switch(f.g){case 1:c=Md(b);sa(f,2);d=Od;if(d[c]){a.decodingInfos.push(d[c]);f.B(4);break}return C(f,navigator.mediaCapabilities.decodingInfo(b),5);case 5:e=f.h,d[c]=e,a.decodingInfos.push(e);case 4:va(f,0);break;case 2:wa(f),JSON.stringify(b),E(f)}})}
127
127
  function Id(a,b,c,d){var e,f,g,h,k,l,m,n,r,p,u,v,y,z,x,A,B;return K(function(D){switch(D.g){case 1:if(e=a.some(function(F){return F.decodingInfos.length}))return D.return();f={};g=t(d);h=g.next();case 2:if(h.done){D.B(4);break}f.Qd=h.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){D.B(7);break}n=m.value;r=Pd(n,b,c).filter(function(F){return function(J){return(J.keySystemConfiguration&&J.keySystemConfiguration.keySystem)===F.Qd}}(f));p=t(r);u=p.next();case 8:if(u.done){D.B(10);break}v=u.value;return C(D,
@@ -169,8 +169,8 @@ Me.prototype.na=function(a,b){function c(h){return function(k){if(e.g&&h)f.rejec
169
169
  function Se(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}N("shaka.util.AbortableOperation",Me);Me.prototype.chain=Me.prototype.na;Me.prototype["finally"]=Me.prototype.finally;Me.all=Re;Me.prototype.abort=Me.prototype.abort;Me.notAbortable=Qe;Me.completed=Pe;Me.aborted=Oe;Me.failed=Ne;function Q(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
170
170
  function Te(a){var b=new Q(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}Q.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};Q.prototype.stopImmediatePropagation=function(){this.g=!0};Q.prototype.stopPropagation=function(){};N("shaka.util.FakeEvent",Q);
171
171
  var Ue={Oh:"abrstatuschanged",Ph:"adaptation",Qh:"buffering",Rh:"complete",Sh:"downloadfailed",Th:"downloadheadersreceived",Uh:"drmsessionupdate",Wh:"emsg",li:"prft",Error:"error",Xh:"expirationupdated",Yh:"firstquartile",Zh:"gapjumped",bi:"keystatuschanged",di:"loaded",ei:"loading",gi:"manifestparsed",hi:"manifestupdated",ii:"mediaqualitychanged",Metadata:"metadata",ji:"midpoint",ki:"onstatechange",ni:"ratechange",oi:"segmentappended",pi:"sessiondata",ri:"stalldetected",si:"started",ti:"statechanged",
172
- ui:"streaming",vi:"textchanged",wi:"texttrackvisibility",xi:"thirdquartile",yi:"timelineregionadded",zi:"timelineregionenter",Ai:"timelineregionexit",Bi:"trackschanged",Di:"unloading",Fi:"variantchanged"};function Ve(){this.ha=new gd;this.pd=this}Ve.prototype.addEventListener=function(a,b){this.ha&&this.ha.push(a,b)};Ve.prototype.removeEventListener=function(a,b){this.ha&&this.ha.remove(a,b)};Ve.prototype.dispatchEvent=function(a){if(!this.ha)return!0;var b=this.ha.get(a.type)||[],c=this.ha.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.pd;a.currentTarget=this.pd;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
173
- Ve.prototype.release=function(){this.ha=null};function We(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new WeakSet;return b(a)}function Xe(a){var b={},c;for(c in a)b[c]=a[c];return b};function Ye(){this.g=[]}function Ze(a,b){a.g.push(b.finally(function(){wb(a.g,b)}))}Ye.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function $e(a,b,c,d,e){Ve.call(this);this.i=!1;this.m=new Ye;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.u=d||null;this.A=e||null;this.o=!1}oa($e,Ve);q=$e.prototype;q.af=function(a){this.o=a};function af(a,b,c,d){c=c||bf;var e=cf[a];if(!e||c>=e.priority)cf[a]={priority:c,Jd:b,ph:void 0===d?!1:d}}q.qh=function(a){this.g.add(a)};q.Ih=function(a){this.g.delete(a)};q.rg=function(){this.g.clear()};q.rh=function(a){this.h.add(a)};q.Jh=function(a){this.h.delete(a)};
172
+ ui:"streaming",vi:"textchanged",wi:"texttrackvisibility",xi:"thirdquartile",yi:"timelineregionadded",zi:"timelineregionenter",Ai:"timelineregionexit",Bi:"trackschanged",Di:"unloading",Fi:"variantchanged"};function Ve(){this.da=new gd;this.pd=this}Ve.prototype.addEventListener=function(a,b){this.da&&this.da.push(a,b)};Ve.prototype.removeEventListener=function(a,b){this.da&&this.da.remove(a,b)};Ve.prototype.dispatchEvent=function(a){if(!this.da)return!0;var b=this.da.get(a.type)||[],c=this.da.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.pd;a.currentTarget=this.pd;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
173
+ Ve.prototype.release=function(){this.da=null};function We(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new WeakSet;return b(a)}function Xe(a){var b={},c;for(c in a)b[c]=a[c];return b};function Ye(){this.g=[]}function Ze(a,b){a.g.push(b.finally(function(){wb(a.g,b)}))}Ye.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function $e(a,b,c,d,e){Ve.call(this);this.i=!1;this.m=new Ye;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.u=d||null;this.A=e||null;this.o=!1}oa($e,Ve);q=$e.prototype;q.af=function(a){this.o=a};function af(a,b,c,d){c=c||bf;var e=cf[a];if(!e||c>=e.priority)cf[a]={priority:c,Jd:b,ph:void 0===d?!1:d}}q.qh=function(a){this.g.add(a)};q.Ih=function(a){this.g.delete(a)};q.rg=function(){this.g.clear()};q.rh=function(a){this.h.add(a)};q.Jh=function(a){this.h.delete(a)};
174
174
  q.sg=function(){this.h.clear()};function df(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();Ve.prototype.release.call(this);return this.m.destroy()};
175
175
  q.request=function(a,b,c){var d=this,e=new ef;if(this.i){var f=Promise.reject(new O(2,7,7001));f.catch(function(){});return new ff(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?We(b.retryParameters):Je();b.uris=We(b.uris);f=gf(this,a,b,c);var g=f.na(function(){return hf(d,a,b,c,new Ie(b.retryParameters,!1),0,null,e)}),h=g.na(function(r){return jf(d,a,r,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
176
176
  var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.na(function(r){var p=Date.now()-m,u=r.response;u.timeMs+=l;u.timeMs+=p;r.Yg||!d.l||u.fromCache||"HEAD"==b.method||a!=kf||d.l(u.timeMs,u.data.byteLength,lf(c));return u},function(r){r&&(r.severity=2);throw r;});f=new ff(n.promise,function(){return n.abort()},e);Ze(this.m,f);return f};
@@ -180,8 +180,8 @@ m=!0,h.g=J)},function(D){a.j&&a.j(D,c,b);y=!0});if(!r)return x;var A=c.retryPara
180
180
  A,B,v)}if(a.i)return Oe();v&&(x=new O(1,1,1003,c.uris[f],b));if(x instanceof O){if(7001==x.code)throw x;if(1010==x.code)throw g;if(1==x.severity)return A=(new Map).set("error",x),A=new Q("retry",A),a.dispatchEvent(A),f=(f+1)%c.uris.length,hf(a,b,c,d,e,f,x,h)}throw x;})}
181
181
  function jf(a,b,c,d){var e=Pe(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={Sd:f.Sd},g=a.next())f.Sd=g.value,e=e.na(function(h){return function(){var k=c.response;k.data&&(k.data=nb(k.data));return h.Sd(b,k,d)}}(f));return e.na(function(){return c},function(h){var k=2;if(h instanceof O){if(7001==h.code)throw h;k=h.severity}throw new O(k,1,1007,h);})}function lf(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.C&&!b.A)return!1}return!0}N("shaka.net.NetworkingEngine",$e);
182
182
  $e.prototype.request=$e.prototype.request;$e.prototype.destroy=$e.prototype.destroy;$e.makeRequest=df;$e.defaultRetryParameters=function(){return Je()};$e.prototype.clearAllResponseFilters=$e.prototype.sg;$e.prototype.unregisterResponseFilter=$e.prototype.Jh;$e.prototype.registerResponseFilter=$e.prototype.rh;$e.prototype.clearAllRequestFilters=$e.prototype.rg;$e.prototype.unregisterRequestFilter=$e.prototype.Ih;$e.prototype.registerRequestFilter=$e.prototype.qh;$e.unregisterScheme=function(a){delete cf[a]};
183
- $e.registerScheme=af;$e.prototype.setForceHTTPS=$e.prototype.af;function ef(){this.g=0}$e.NumBytesRemainingClass=ef;function ff(a,b,c){Me.call(this,a,b);this.h=c}oa(ff,Me);$e.PendingRequest=ff;var kf=1;$e.RequestType={MANIFEST:0,SEGMENT:kf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};$e.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var bf=3;$e.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:bf};var cf={};function mf(a){this.g=!1;this.h=new Le;this.i=a}mf.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function nf(a,b){if(a.g){if(b instanceof O&&7003==b.code)throw b;throw new O(2,7,7003,b);}};function of(){this.g=new gd}q=of.prototype;q.release=function(){this.xb();this.g=null};q.D=function(a,b,c,d){this.g&&(a=new pf(a,b,c,d),this.g.push(b,a))};q.ga=function(a,b,c,d){function e(g){f.Ob(a,b,e);c(g)}var f=this;this.D(a,b,e,d)};q.Ob=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Ob(),this.g.remove(b,e))}};
184
- q.xb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,w(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.Ob();this.g.g={}}};N("shaka.util.EventManager",of);of.prototype.removeAll=of.prototype.xb;of.prototype.unlisten=of.prototype.Ob;of.prototype.listenOnce=of.prototype.ga;of.prototype.listen=of.prototype.D;of.prototype.release=of.prototype.release;function pf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=qf(a,d);this.target.addEventListener(b,c,this.g)}
183
+ $e.registerScheme=af;$e.prototype.setForceHTTPS=$e.prototype.af;function ef(){this.g=0}$e.NumBytesRemainingClass=ef;function ff(a,b,c){Me.call(this,a,b);this.h=c}oa(ff,Me);$e.PendingRequest=ff;var kf=1;$e.RequestType={MANIFEST:0,SEGMENT:kf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};$e.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var bf=3;$e.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:bf};var cf={};function mf(a){this.g=!1;this.h=new Le;this.i=a}mf.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function nf(a,b){if(a.g){if(b instanceof O&&7003==b.code)throw b;throw new O(2,7,7003,b);}};function of(){this.g=new gd}q=of.prototype;q.release=function(){this.xb();this.g=null};q.D=function(a,b,c,d){this.g&&(a=new pf(a,b,c,d),this.g.push(b,a))};q.ha=function(a,b,c,d){function e(g){f.Ob(a,b,e);c(g)}var f=this;this.D(a,b,e,d)};q.Ob=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Ob(),this.g.remove(b,e))}};
184
+ q.xb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,w(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.Ob();this.g.g={}}};N("shaka.util.EventManager",of);of.prototype.removeAll=of.prototype.xb;of.prototype.unlisten=of.prototype.Ob;of.prototype.listenOnce=of.prototype.ha;of.prototype.listen=of.prototype.D;of.prototype.release=of.prototype.release;function pf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=qf(a,d);this.target.addEventListener(b,c,this.g)}
185
185
  pf.prototype.Ob=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function qf(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return rf(a)?b:b.capture||!1}
186
186
  function rf(a){var b=sf;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}sf=b}return b||!1}var sf=void 0;function tf(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function uf(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function vf(a){this.h=a;this.g=void 0}vf.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function wf(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function xf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function yf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next()){var d=t(c.value);c=d.next().value;d=d.next().value;if(!b.has(c))return!1;c=b.get(c);if(c!=d||void 0==c)return!1}return!0};function zf(){}
187
187
  function Af(a){if(!a)return"";a=mb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!ud())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ra('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
@@ -189,12 +189,12 @@ function Af(a){if(!a)return"";a=mb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.suba
189
189
  function Bf(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new O(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=qb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return Cf.value()(d)}
190
190
  function Df(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=mb(a);if(239==c[0]&&187==c[1]&&191==c[2])return Af(c);if(254==c[0]&&255==c[1])return Bf(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Bf(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Bf(a,!1);if(0==c[1]&&0==c[3])return Bf(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Af(a);throw new O(2,2,2003);}
191
191
  function Ef(a){if(window.TextEncoder&&!ud()){var b=new TextEncoder;return nb(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return nb(b)}function Ff(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}N("shaka.util.StringUtils",zf);zf.resetFromCharCode=function(){Cf.g=void 0};zf.toUTF16=Ff;zf.toUTF8=Ef;zf.fromBytesAutoDetect=Df;zf.fromUTF16=Bf;
192
- zf.fromUTF8=Af;var Cf=new vf(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={ob:65536};0<b.ob;b={ob:b.ob},b.ob/=2)if(a(b.ob))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.ob)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.ob));return e}}(b);return null});function Gf(a,b){this.h=qb(a);this.i=b==If;this.g=0}q=Gf.prototype;q.fa=function(){return this.g<this.h.byteLength};q.oa=function(){return this.g};q.getLength=function(){return this.h.byteLength};q.ca=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Jf();}};q.ya=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Jf();}};q.L=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Jf();}};
192
+ zf.fromUTF8=Af;var Cf=new vf(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={ob:65536};0<b.ob;b={ob:b.ob},b.ob/=2)if(a(b.ob))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.ob)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.ob));return e}}(b);return null});function Gf(a,b){this.h=qb(a);this.i=b==If;this.g=0}q=Gf.prototype;q.ga=function(){return this.g<this.h.byteLength};q.oa=function(){return this.g};q.getLength=function(){return this.h.byteLength};q.ca=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Jf();}};q.ya=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Jf();}};q.L=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Jf();}};
193
193
  q.Qf=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Jf();}};q.dc=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw Jf();}if(2097151<b)throw new O(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.kb=function(a){if(this.g+a>this.h.byteLength)throw Jf();var b=mb(this.h,this.g,a);this.g+=a;return b};
194
- q.skip=function(a){if(this.g+a>this.h.byteLength)throw Jf();this.g+=a};q.yh=function(a){if(this.g<a)throw Jf();this.g-=a};q.seek=function(a){if(0>a||a>this.h.byteLength)throw Jf();this.g=a};q.Tc=function(){for(var a=this.g;this.fa()&&0!=this.h.getUint8(this.g);)this.g+=1;a=mb(this.h,a,this.g-a);this.g+=1;return Af(a)};function Jf(){return new O(2,3,3E3)}N("shaka.util.DataViewReader",Gf);Gf.prototype.readTerminatedString=Gf.prototype.Tc;Gf.prototype.seek=Gf.prototype.seek;Gf.prototype.rewind=Gf.prototype.yh;
195
- Gf.prototype.skip=Gf.prototype.skip;Gf.prototype.readBytes=Gf.prototype.kb;Gf.prototype.readUint64=Gf.prototype.dc;Gf.prototype.readInt32=Gf.prototype.Qf;Gf.prototype.readUint32=Gf.prototype.L;Gf.prototype.readUint16=Gf.prototype.ya;Gf.prototype.readUint8=Gf.prototype.ca;Gf.prototype.getLength=Gf.prototype.getLength;Gf.prototype.getPosition=Gf.prototype.oa;Gf.prototype.hasMoreData=Gf.prototype.fa;var If=1;Gf.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:If};function Kf(){this.i=[];this.h=[];this.g=!1}q=Kf.prototype;q.box=function(a,b){a=Lf(a);this.i[a]=Mf;this.h[a]=b;return this};q.O=function(a,b){a=Lf(a);this.i[a]=Nf;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Gf(a,0);for(this.g=!1;a.fa()&&!this.g;)this.Rc(0,a,b,c)};
194
+ q.skip=function(a){if(this.g+a>this.h.byteLength)throw Jf();this.g+=a};q.yh=function(a){if(this.g<a)throw Jf();this.g-=a};q.seek=function(a){if(0>a||a>this.h.byteLength)throw Jf();this.g=a};q.Tc=function(){for(var a=this.g;this.ga()&&0!=this.h.getUint8(this.g);)this.g+=1;a=mb(this.h,a,this.g-a);this.g+=1;return Af(a)};function Jf(){return new O(2,3,3E3)}N("shaka.util.DataViewReader",Gf);Gf.prototype.readTerminatedString=Gf.prototype.Tc;Gf.prototype.seek=Gf.prototype.seek;Gf.prototype.rewind=Gf.prototype.yh;
195
+ Gf.prototype.skip=Gf.prototype.skip;Gf.prototype.readBytes=Gf.prototype.kb;Gf.prototype.readUint64=Gf.prototype.dc;Gf.prototype.readInt32=Gf.prototype.Qf;Gf.prototype.readUint32=Gf.prototype.L;Gf.prototype.readUint16=Gf.prototype.ya;Gf.prototype.readUint8=Gf.prototype.ca;Gf.prototype.getLength=Gf.prototype.getLength;Gf.prototype.getPosition=Gf.prototype.oa;Gf.prototype.hasMoreData=Gf.prototype.ga;var If=1;Gf.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:If};function Kf(){this.i=[];this.h=[];this.g=!1}q=Kf.prototype;q.box=function(a,b){a=Lf(a);this.i[a]=Mf;this.h[a]=b;return this};q.O=function(a,b){a=Lf(a);this.i[a]=Nf;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Gf(a,0);for(this.g=!1;a.ga()&&!this.g;)this.Rc(0,a,b,c)};
196
196
  q.Rc=function(a,b,c,d){var e=b.oa();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.L(),g=b.L(),h=Of(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.oa()+8>b.getLength()){this.g=!0;return}f=b.dc();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Nf){if(d&&b.oa()+4>b.getLength()){this.g=!0;return}n=b.L();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.oa(),b=0<d?b.kb(d):new Uint8Array(0),b=new Gf(b,0),l({name:h,parser:this,
197
- partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.oa(),b.getLength()-b.oa()))}};function Pf(a){for(var b=Qf(a);a.reader.fa()&&!a.parser.g;)a.parser.Rc(a.start+b,a.reader,a.partialOkay)}function Rf(a){for(var b=Qf(a),c=a.reader.L(),d=0;d<c&&(a.parser.Rc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Sf(a){var b=Qf(a);for(a.reader.skip(78);a.reader.fa()&&!a.parser.g;)a.parser.Rc(a.start+b,a.reader,a.partialOkay)}
197
+ partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.oa(),b.getLength()-b.oa()))}};function Pf(a){for(var b=Qf(a);a.reader.ga()&&!a.parser.g;)a.parser.Rc(a.start+b,a.reader,a.partialOkay)}function Rf(a){for(var b=Qf(a),c=a.reader.L(),d=0;d<c&&(a.parser.Rc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Sf(a){var b=Qf(a);for(a.reader.skip(78);a.reader.ga()&&!a.parser.g;)a.parser.Rc(a.start+b,a.reader,a.partialOkay)}
198
198
  function Tf(a){return function(b){a(b.reader.kb(b.reader.getLength()-b.reader.oa()))}}function Lf(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Of(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Qf(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}N("shaka.util.Mp4Parser",Kf);Kf.headerSize=Qf;Kf.typeToString=Of;Kf.allData=Tf;Kf.visualSampleEntry=Sf;Kf.sampleDescription=Rf;Kf.children=Pf;Kf.prototype.parseNext=Kf.prototype.Rc;
199
199
  Kf.prototype.parse=Kf.prototype.parse;Kf.prototype.stop=Kf.prototype.stop;Kf.prototype.fullBox=Kf.prototype.O;Kf.prototype.box=Kf.prototype.box;var Mf=0,Nf=1;function Uf(){}function Vf(a){a=mb(a);a=Cf.value()(a);return btoa(a)}function Wf(a,b){b=void 0==b?!0:b;a=Vf(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Xf(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function Yf(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
200
200
  function Zf(a){var b=mb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function $f(){for(var a=Fa.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];e instanceof Uint8Array?b.set(e,c):b.set(mb(e),c);c+=e.byteLength}return b}N("shaka.util.Uint8ArrayUtils",Uf);Uf.concat=$f;Uf.toHex=Zf;Uf.fromHex=Yf;Uf.fromBase64=Xf;Uf.toBase64=Wf;Uf.toStandardBase64=Vf;function ag(a){var b=this;this.g=[];this.h=[];this.data=[];(new Kf).box("moov",Pf).box("moof",Pf).O("pssh",function(c){if(!(1<c.version)){var d=mb(c.reader.h,-12,c.size);b.data.push(d);b.g.push(Zf(c.reader.kb(16)));if(0<c.version){d=c.reader.L();for(var e=0;e<d;e++){var f=Zf(c.reader.kb(16));b.h.push(f)}}}}).parse(a)}
@@ -205,20 +205,20 @@ function ng(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-
205
205
  function og(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function pg(a){a=Number(a);return 0===a%1?a:null}function qg(a){a=Number(a);return 0===a%1&&0<a?a:null}function rg(a){a=Number(a);return 0===a%1&&0<=a?a:null}function sg(a){a=Number(a);return isNaN(a)?null:a}function tg(a){return a?"true"===a.toLowerCase():!1}
206
206
  function ug(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
207
207
  function vg(a,b){var c=new DOMParser,d=wg.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function xg(a,b){try{var c=Df(a);return vg(c,b)}catch(d){return null}}
208
- var wg=new vf(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function yg(a,b){var c=this;b=void 0===b?1:b;this.C=a;this.G=new Set;this.m=this.s=null;this.la=this.aa=!1;this.H=0;this.g=null;this.A=new of;this.i=new Map;this.u=new Map;this.l=new Le;this.h=null;this.o=function(d){2==d.severity&&c.l.reject(d);a.onError(d)};this.V=new Map;this.ha=new Map;this.W=new id(function(){return zg(c)});this.K=!1;this.J=[];this.N=!1;this.ka=(new id(function(){Ag(c)})).Ta(b);this.l.catch(function(){});this.j=new mf(function(){return Bg(c)});this.Z=!1;this.I=this.F=null}
208
+ var wg=new vf(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function yg(a,b){var c=this;b=void 0===b?1:b;this.C=a;this.G=new Set;this.m=this.s=null;this.la=this.aa=!1;this.H=0;this.g=null;this.A=new of;this.i=new Map;this.u=new Map;this.l=new Le;this.h=null;this.o=function(d){2==d.severity&&c.l.reject(d);a.onError(d)};this.V=new Map;this.da=new Map;this.W=new id(function(){return zg(c)});this.K=!1;this.J=[];this.N=!1;this.ka=(new id(function(){Ag(c)})).Ta(b);this.l.catch(function(){});this.j=new mf(function(){return Bg(c)});this.Z=!1;this.I=this.F=null}
209
209
  q=yg.prototype;q.destroy=function(){return this.j.destroy()};function Bg(a){return K(function(b){switch(b.g){case 1:return a.A.release(),a.A=null,a.l.reject(),a.ka.stop(),a.ka=null,a.W.stop(),a.W=null,C(b,Cg(a),2);case 2:if(!a.m){b.B(3);break}sa(b,4);return C(b,a.m.setMediaKeys(null),6);case 6:va(b,5);break;case 4:wa(b);case 5:a.m=null;case 3:a.g=null,a.G.clear(),a.s=null,a.u=new Map,a.h=null,a.o=function(){},a.C=null,a.Z=!1,a.F=null,E(b)}})}q.configure=function(a){this.h=a};
210
210
  function Dg(a,b,c){a.la=!0;a.u=new Map;a.K=c;return Eg(a,b)}function Fg(a,b,c){a.u=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next())a.u.set(d.value,{initData:null,initDataType:null});c=t(a.h.persistentSessionsMetadata);for(d=c.next();!d.done;d=c.next())d=d.value,a.u.set(d.sessionId,{initData:d.initData,initDataType:d.initDataType});a.K=0<a.u.size;return Eg(a,b)}
211
211
  function Gg(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return Hg(a,g,[])}
212
212
  function Eg(a,b){var c,d,e,f,g,h,k,l,m,n,r,p,u,v,y,z,x;return K(function(A){if(1==A.g){if(c=Ig(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(B){return B.video&&B.video.drmInfos.length||B.audio&&B.audio.drmInfos.length?!0:!1});g||(h=wf(a.h.servers),Jg(b,h));k=new Set;l=t(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,n=Kg(m),r=t(n),p=r.next();!p.done;p=r.next())u=p.value,k.add(u);v=t(k);for(p=v.next();!p.done;p=
213
213
  v.next())y=p.value,Lg(y,wf(a.h.servers),wf(a.h.advanced||{}),a.h.keySystemsMapping);return C(A,Id(b,a.K,a.Z,a.h.preferredKeySystems),2)}z=g||Object.keys(a.h.servers).length;if(!z)return a.aa=!0,A.return(Promise.resolve());x=Hg(a,void 0,b);return A.return(g?x:x.catch(function(){}))})}
214
214
  function Mg(a){var b;return K(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.F){c.B(2);break}return C(c,a.F,3);case 3:return nf(a.j),c.return();case 2:return sa(c,4),a.F=a.m.setMediaKeys(a.s),C(c,a.F,6);case 6:va(c,5);break;case 4:b=wa(c),a.o(new O(2,6,6003,b.message));case 5:nf(a.j),E(c)}})}function Ng(a,b){return K(function(c){if(1==c.g)return C(c,Mg(a),2);Og(a,b.initDataType,mb(b.initData));E(c)})}
215
- q.Ac=function(a){var b=this;return K(function(c){if(1==c.g){if(!b.s)return b.A.ga(a,"encrypted",function(){b.o(new O(2,6,6010))}),c.return();b.m=a;b.A.ga(b.m,"play",function(){for(var d=t(b.J),e=d.next();!e.done;e=d.next())Pg(b,e.value);b.N=!0;b.J=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.A.D(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Cg(b)});b.I=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.I||"com.apple.fps"!==b.g.keySystem||
215
+ q.Ac=function(a){var b=this;return K(function(c){if(1==c.g){if(!b.s)return b.A.ha(a,"encrypted",function(){b.o(new O(2,6,6010))}),c.return();b.m=a;b.A.ha(b.m,"play",function(){for(var d=t(b.J),e=d.next();!e.done;e=d.next())Pg(b,e.value);b.N=!0;b.J=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.A.D(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Cg(b)});b.I=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.I||"com.apple.fps"!==b.g.keySystem||
216
216
  b.u.size?C(c,Mg(b),2):c.B(2)}Qg(b).catch(function(){});b.I||b.u.size||b.h.parseInbandPsshEnabled||b.A.D(b.m,"encrypted",function(d){return Ng(b,d)});E(c)})};
217
217
  function Rg(a){var b,c,d,e,f;return K(function(g){switch(g.g){case 1:if(!a.s||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.B(2);break}b=df([a.g.serverCertificateUri],a.h.retryParameters);sa(g,3);c=a.C.Lb.request(5,b);return C(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=mb(d.data);va(g,4);break;case 3:throw e=wa(g),new O(2,6,6017,e);case 4:if(a.j.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
218
- sa(g,6);return C(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=wa(g),new O(2,6,6004,f.message);}})}function Sg(a,b){var c,d,e;return K(function(f){if(1==f.g)return C(f,Tg(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.$a=new Le,d.push(e.$a);d.push(c.remove());return C(f,Promise.all(d),3)}a.i.delete(c);E(f)})}
218
+ sa(g,6);return C(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=wa(g),new O(2,6,6004,f.message);}})}function Sg(a,b){var c,d,e;return K(function(f){if(1==f.g)return C(f,Tg(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.ab=new Le,d.push(e.ab);d.push(c.remove());return C(f,Promise.all(d),3)}a.i.delete(c);E(f)})}
219
219
  function Qg(a){var b,c,d,e,f;return K(function(g){if(1==g.g){if(!a.u.size)return g.B(2);a.u.forEach(function(h,k){Tg(a,k,h)});return C(g,a.l,3)}if(2!=g.g){b=a.g&&a.g.keyIds||new Set([]);if(0<b.size&&Ug(a))return g.return(a.l);a.l=new Le;a.l.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=t(c);for(e=d.next();!e.done;e=d.next())f=e.value,Og(a,f.initDataType,f.initData);c.length||a.l.resolve();return g.return(a.l)})}
220
220
  function Og(a,b,c){if(c.length){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(kb(c,e.value.initData)&&a.h.ignoreDuplicateInitData)return;0<a.i.size&&Vg(a)&&(a.l.resolve(),a.l=new Le,a.l.catch(function(){}));Wg(a,b,c,a.g.sessionType)}}function Xg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Yg(a){a=a.i.keys();a=tf(a,function(b){return b.sessionId});return Array.from(a)}
221
- q.te=function(){var a=this,b=this.i.keys();b=tf(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};q.Ic=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.sd=function(){return xf(this.ha)};
221
+ q.te=function(){var a=this,b=this.i.keys();b=tf(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};q.Ic=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.sd=function(){return xf(this.da)};
222
222
  function Hg(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,u,v,y,z;return K(function(x){switch(x.g){case 1:d=new Map;if(c.length){e=Zg(a,c,d);x.B(2);break}return C(x,$g(a,b),3);case 3:e=x.h;case 2:f=e;if(!f)throw new O(2,6,6001);nf(a.j);sa(x,4);a.G.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.G.add(n.contentType.toLowerCase());r=t(k);for(m=r.next();!m.done;m=r.next())p=m.value,a.G.add(p.contentType.toLowerCase());if(c.length){var A=
223
223
  f.keySystem;var B=d.get(f.keySystem);var D=[],F=[],J=[],G=[],H=new Set;ah(B,D,J,F,G,H);var I=a.K?"persistent-license":"temporary";A={keySystem:A,licenseServerUri:D[0],distinctiveIdentifierRequired:B[0].distinctiveIdentifierRequired,persistentStateRequired:B[0].persistentStateRequired,sessionType:B[0].sessionType||I,audioRobustness:B[0].audioRobustness||"",videoRobustness:B[0].videoRobustness||"",serverCertificate:J[0],serverCertificateUri:F[0],initData:G,keyIds:H};B=t(B);for(D=B.next();!D.done;D=
224
224
  B.next())D=D.value,D.distinctiveIdentifierRequired&&(A.distinctiveIdentifierRequired=D.distinctiveIdentifierRequired),D.persistentStateRequired&&(A.persistentStateRequired=D.persistentStateRequired);B=A}else B=f.keySystem,A=b.get(f.keySystem),D=[],F=[],J=[],G=[],H=new Set,ah(A.drmInfos,D,J,F,G,H),B={keySystem:B,licenseServerUri:D[0],distinctiveIdentifierRequired:"required"==A.distinctiveIdentifier,persistentStateRequired:"required"==A.persistentState,sessionType:A.sessionTypes[0]||"temporary",audioRobustness:(A.audioCapabilities?
@@ -230,15 +230,15 @@ function $g(a,b){var c,d,e,f,g,h,k,l,m,n,r,p,u,v,y;return K(function(z){switch(z
230
230
  z.h,z.return(c);case 6:wa(z);case 7:nf(a.j);case 3:h=g.next();z.B(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){z.B(11);break}r=n.value;p=t(b.keys());h=p.next();case 12:if(h.done){n=m.next();z.B(9);break}u=h.value;v=b.get(u);y=v.drmInfos.some(function(x){return!!x.licenseServerUri});if(y!=r){z.B(13);break}sa(z,15);return C(z,navigator.requestMediaKeySystemAccess(u,[v]),17);case 17:return c=z.h,z.return(c);case 15:wa(z);case 16:nf(a.j);case 13:h=p.next();z.B(12);break;case 11:return z.return(c)}})}
231
231
  function Ig(a){a=wf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=f;22!=g.length&&(g=Wf(Yf(f),!1));f=e;22!=f.length&&(f=Wf(Yf(e),!1));e={kty:"oct",kid:g,k:f};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:mb(Ef(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",
232
232
  videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}function bh(a){Vg(a)&&a.l.resolve()}function ch(a,b){(new id(function(){b.loaded=!0;bh(a)})).U(dh)}
233
- function Tg(a,b,c){var d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:try{d=a.s.createSession("persistent-license")}catch(n){return e=new O(2,6,6005,n.message),a.o(e),m.return(Promise.reject(e))}a.A.D(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.N?a.J.push(n):Pg(a,n)});a.A.D(d,"keystatuseschange",function(n){return eh(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,Pe:Infinity,$a:null,type:"persistent-license"};a.i.set(d,f);sa(m,2);return C(m,
233
+ function Tg(a,b,c){var d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:try{d=a.s.createSession("persistent-license")}catch(n){return e=new O(2,6,6005,n.message),a.o(e),m.return(Promise.reject(e))}a.A.D(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.N?a.J.push(n):Pg(a,n)});a.A.D(d,"keystatuseschange",function(n){return eh(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,Pe:Infinity,ab:null,type:"persistent-license"};a.i.set(d,f);sa(m,2);return C(m,
234
234
  d.load(b),4);case 4:return g=m.h,nf(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.o(new O(h,6,6013)),f.loaded=!0),ch(a,f),bh(a),m.return(d);case 2:k=wa(m),nf(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.o(new O(l,6,6005,k.message)),f.loaded=!0,bh(a);case 3:return m.return(Promise.resolve())}})}
235
- function Wg(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.o(new O(2,6,6005,f.message));return}a.A.D(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.N?a.J.push(f):Pg(a,f)});a.A.D(e,"keystatuseschange",function(f){return eh(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Pe:Infinity,$a:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof O||(b=new O(2,6,6016,f));a.o(b);return}a.h.logLicenseExchange&&Wf(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
235
+ function Wg(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.o(new O(2,6,6005,f.message));return}a.A.D(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.N?a.J.push(f):Pg(a,f)});a.A.D(e,"keystatuseschange",function(f){return eh(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Pe:Infinity,ab:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof O||(b=new O(2,6,6016,f));a.o(b);return}a.h.logLicenseExchange&&Wf(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
236
236
  var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.o(new O(2,6,6006,f.message,f,h))}})}
237
237
  function Pg(a,b){var c,d,e,f,g,h,k,l,m,n,r,p,u;K(function(v){switch(v.g){case 1:c=b.target;a.h.logLicenseExchange&&Wf(b.message);d=a.i.get(c);e=a.g.licenseServerUri;f=a.h.advanced[a.g.keySystem];"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer);g=df([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(Xg(a.g.keySystem)){var y=
238
238
  Bf(g.body,!0,!0);if(y.includes("PlayReadyKeyMessage")){y=vg(y,"PlayReadyKeyMessage");for(var z=t(y.getElementsByTagName("HttpHeader")),x=z.next();!x.done;x=z.next())x=x.value,g.headers[x.getElementsByTagName("name")[0].textContent]=x.getElementsByTagName("value")[0].textContent;g.body=Xf(y.getElementsByTagName("Challenge")[0].textContent)}else g.headers["Content-Type"]="text/xml; charset=utf-8"}h=Date.now();sa(v,2);l=a.C.Lb.request(2,g);return C(v,l.promise,4);case 4:k=v.h;va(v,3);break;case 2:return m=
239
- wa(v),n=new O(2,6,6007,m),a.o(n),d&&d.$a&&d.$a.reject(n),v.return();case 3:if(a.j.g)return v.return();a.H+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Wf(k.data);sa(v,5);return C(v,c.update(k.data),7);case 7:va(v,6);break;case 5:return r=wa(v),p=new O(2,6,6008,r.message),a.o(p),d&&d.$a&&d.$a.reject(p),v.return();case 6:if(a.j.g)return v.return();u=new Q("drmsessionupdate");a.C.onEvent(u);d&&(d.$a&&d.$a.resolve(),ch(a,d));E(v)}})}
240
- function eh(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Xg(a.g.keySystem)&&16==g.byteLength&&(md()||ud())){h=qb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=Zf(g).slice(0,32);a.V.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.$a&&(a.i.delete(b),b.close().catch(function(){}));
241
- Vg(a)&&(a.l.resolve(),a.W.U(fh))}function zg(a){var b=a.V,c=a.ha;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.o(new O(2,6,6014));a.C.Id(xf(c))}
239
+ wa(v),n=new O(2,6,6007,m),a.o(n),d&&d.ab&&d.ab.reject(n),v.return();case 3:if(a.j.g)return v.return();a.H+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Wf(k.data);sa(v,5);return C(v,c.update(k.data),7);case 7:va(v,6);break;case 5:return r=wa(v),p=new O(2,6,6008,r.message),a.o(p),d&&d.ab&&d.ab.reject(p),v.return();case 6:if(a.j.g)return v.return();u=new Q("drmsessionupdate");a.C.onEvent(u);d&&(d.ab&&d.ab.resolve(),ch(a,d));E(v)}})}
240
+ function eh(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Xg(a.g.keySystem)&&16==g.byteLength&&(md()||ud())){h=qb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=Zf(g).slice(0,32);a.V.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.ab&&(a.i.delete(b),b.close().catch(function(){}));
241
+ Vg(a)&&(a.l.resolve(),a.W.U(fh))}function zg(a){var b=a.V,c=a.da;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.o(new O(2,6,6014));a.C.Id(xf(c))}
242
242
  function gh(){var a,b,c,d,e,f,g,h;return K(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,c],f=new Map,g=function(l){var m,n,
243
243
  r;return K(function(p){switch(p.g){case 1:sa(p,2);if("org.w3.clearkey"===l&&vd())throw Error("Unsupported keySystem");return C(p,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=p.h,r=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,qd()&&(r=!1),f.set(l,{persistentState:r}),C(p,m.createMediaKeys(),5);case 5:va(p,0);break;case 2:wa(p),f.set(l,null),E(p)}})},h=a.map(function(l){return g(l)}),C(k,Promise.all(h),2)):k.return(xf(f))})}
244
244
  function hh(a){var b;return K(function(c){if(1==c.g)return b=new Promise(function(d,e){(new id(e)).U(ih)}),sa(c,2),C(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);wa(c);E(c)})}
@@ -274,7 +274,7 @@ function Ih(a){for(var b=0,c=[];Eh(a,b);){var d=Gh(a,b+6);a[b+5]>>6&1&&(b+=10);b
274
274
  Dh.getID3Frames=Ih;function Kh(a,b){var c=null,d=null,e=null,f=a.L();b&1&&(e=a.dc());b&2&&a.skip(4);b&8&&(c=a.L());b&16&&(d=a.L());return{trackId:f,xf:c,wg:d,Gi:e}}function Lh(a,b){return 1==b?(b=a.L(),a=a.L(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.L()}}function Mh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.L();a.skip(4);a=a.ya();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
275
275
  function Nh(a,b,c){var d=a.L(),e=[],f=null;c&1&&(f=a.L());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={Xe:null,sampleSize:null,Kd:null};c&256&&(h.Xe=a.L());c&512&&(h.sampleSize=a.L());c&1024&&a.skip(4);c&2048&&(h.Kd=0==b?a.L():a.Qf());e.push(h)}return{Ki:d,Tf:e,vg:f}}
276
276
  function Oh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.L();1==b?a.skip(8):a.skip(4);a.skip(4);a.skip(8);a.skip(2);a.skip(2);a.skip(2);a.skip(2);a.skip(36);b=a.ya()+a.ya()/16;a=a.ya()+a.ya()/16;return{trackId:c,width:b,height:a}}
277
- function Ph(a){for(var b="mp4a",c,d;a.fa();){c=a.ca();for(var e=a.ca();e&128;)e=a.ca();if(3==c)a.ya(),e=a.ca(),e&128&&a.ya(),e&64&&a.skip(a.ca()),e&32&&a.ya();else if(4==c)d=a.ca(),a.skip(12);else if(5==c)break}d&&(b+="."+this.g(d),5==c&&a.fa()&&(c=a.ca(),d=(c&248)>>3,31===d&&a.fa()&&(d=32+((c&7)<<3)+((a.ca()&224)>>5)),b+="."+d));return{ea:b}}function Qh(a,b){a.skip(87);return{ea:b+"."+this.g(a.ca())+this.g(a.ca())+this.g(a.ca())}}function Rh(a){a=a.L();return{ea:Of(a)}};/*
277
+ function Ph(a){for(var b="mp4a",c,d;a.ga();){c=a.ca();for(var e=a.ca();e&128;)e=a.ca();if(3==c)a.ya(),e=a.ca(),e&128&&a.ya(),e&64&&a.skip(a.ca()),e&32&&a.ya();else if(4==c)d=a.ca(),a.skip(12);else if(5==c)break}d&&(b+="."+this.g(d),5==c&&a.ga()&&(c=a.ca(),d=(c&248)>>3,31===d&&a.ga()&&(d=32+((c&7)<<3)+((a.ca()&224)>>5)),b+="."+d));return{fa:b}}function Qh(a,b){a.skip(87);return{fa:b+"."+this.g(a.ca())+this.g(a.ca())+this.g(a.ca())}}function Rh(a){a=a.L();return{fa:Of(a)}};/*
278
278
 
279
279
  Copyright Brightcove, Inc.
280
280
 
@@ -290,9 +290,9 @@ function Ph(a){for(var b="mp4a",c,d;a.fa();){c=a.ca();for(var e=a.ca();e&128;)e=
290
290
  See the License for the specific language governing permissions and
291
291
  limitations under the License.
292
292
  */
293
- function Th(a,b){this.j=a;if(void 0===b?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)2<=d&&3==a[d]&&0==a[d-1]&&0==a[d-2]||(b[c]=a[d],c++);this.j=mb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function Uh(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new Gf(c,0)).L(),a.g=8*d,a.i-=d)}function Vh(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;Uh(a)}a.h<<=b;a.g-=b}
293
+ function Sh(a,b){this.j=a;if(void 0===b?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)2<=d&&3==a[d]&&0==a[d-1]&&0==a[d-2]||(b[c]=a[d],c++);this.j=mb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function Uh(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new Gf(c,0)).L(),a.g=8*d,a.i-=d)}function Vh(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;Uh(a)}a.h<<=b;a.g-=b}
294
294
  function Wh(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&Uh(a);c=b-c;return 0<c?d<<c|Wh(a,c):d}function Xh(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;Uh(a);return b+Xh(a)}function Yh(a){Vh(a,1+Xh(a))}function T(a){var b=Xh(a);return Wh(a,b+1)-1}function Zh(a){a=T(a);return 1&a?1+a>>>1:-1*(a>>>1)}function U(a){return 1===Wh(a,1)}function $h(a){return Wh(a,8)}
295
- function ai(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=Zh(a),d=(c+d+256)%256),c=0===d?c:d}function bi(a){$h(a);T(a);return T(a)}N("shaka.util.ExpGolomb",Th);function ci(){this.A=null;this.C=!1;this.m=this.F=null;this.j=[];this.g=[];this.o=this.s=null;this.i=[];this.h=[];this.u=null;this.l=[]}q=ci.prototype;q.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
295
+ function ai(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=Zh(a),d=(c+d+256)%256),c=0===d?c:d}function bi(a){$h(a);T(a);return T(a)}N("shaka.util.ExpGolomb",Sh);function ci(){this.A=null;this.C=!1;this.m=this.F=null;this.j=[];this.g=[];this.o=this.s=null;this.i=[];this.h=[];this.u=null;this.l=[]}q=ci.prototype;q.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
296
296
  q.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,di(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71==a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.A=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.A:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,zd:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h<
297
297
  k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(-1==g.audio&&0<m)for(var n=h+5,r=m;2<r;){switch(f[n]){case 106:g.audio=l;g.audioCodec="ac3";break;case 122:g.audio=l,g.audioCodec="ec3"}var p=f[n+1]+2;n+=p;r-=p}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 21:-1==g.zd&&(g.zd=l);break;case 27:-1==g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1==g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1==g.video&&(g.video=l,g.videoCodec=
298
298
  "hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.F=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.s=f.audio,this.o=f.audioCodec);-1!=f.zd&&(this.u=f.zd);d&&!this.C&&(d=!1,e=b-188);this.C=!0;break;case this.F:h=a.subarray(h,e+188);f?this.j.push([h]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(h);break;case this.s:h=a.subarray(h,e+188);f?this.i.push([h]):this.i.length&&
@@ -305,27 +305,27 @@ q.Db=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.n
305
305
  q.Zb=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=$f.apply(Uf,w(d.value)),f=ei(e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=$f(d.data,e),this.g.push(d))}if(a){var g;c=t(this.g);for(d=c.next();!d.done;d=c.next())d=d.value,d.nalus=this.Se(d,g),d.nalus.length&&
306
306
  (g=d.nalus[d.nalus.length-1]);this.g=this.g.filter(function(h){return h.nalus.length})}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};q.getStartTime=function(a){if("audio"==a){a=null;var b=this.Db();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.Zb(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};q.Fc=function(){return{audio:this.o,video:this.m}};
307
307
  q.wd=function(){for(var a=[],b=t(this.Zb()),c=b.next();!c.done;c=b.next())a.push.apply(a,w(c.value.nalus));return a};q.Wg=function(){le("TsParser","Please use getVideoInfo function instead.");var a=this.xe();return{height:a.height,width:a.width}};q.xe=function(){return"hvc"==this.m?fi(this):gi(this)};
308
- function gi(a){var b={height:null,width:null,ea:null};a=a.wd();if(!a.length)return b;a=a.find(function(r){return 7==r.type});if(!a)return b;a=new Th(a.data);var c=$h(a),d=$h(a),e=$h(a);Yh(a);if(hi.includes(c)){var f=T(a);3===f&&Vh(a,1);Yh(a);Yh(a);Vh(a,1);if(U(a)){f=3!==f?8:12;for(var g=0;g<f;g++)U(a)&&(6>g?ai(a,16):ai(a,64))}}Yh(a);f=T(a);if(0===f)T(a);else if(1===f)for(Vh(a,1),Yh(a),Yh(a),f=T(a),g=0;g<f;g++)Yh(a);Yh(a);Vh(a,1);f=T(a);g=T(a);var h=Wh(a,1);0===h&&Vh(a,1);Vh(a,1);var k=0,l=0,m=0,n=
309
- 0;U(a)&&(k=T(a),l=T(a),m=T(a),n=T(a));b.height=String((2-h)*(g+1)*16-2*m-2*n);b.width=String(16*(f+1)-2*k-2*l);b.ea="avc1."+("0"+c.toString(16).toUpperCase()).slice(-2)+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2);return b}
310
- function fi(a){var b={height:null,width:null,ea:null};a=a.wd();if(!a.length)return b;a=a.find(function(B){return 33==B.type});if(!a)return b;var c=new Th(a.fullData,!0);$h(c);$h(c);Wh(c,4);var d=Wh(c,3);U(c);var e=Wh(c,2),f=Wh(c,1),g=Wh(c,5),h=Wh(c,32);a=$h(c);for(var k=$h(c),l=$h(c),m=$h(c),n=$h(c),r=$h(c),p=$h(c),u=[],v=[],y=0;y<d;y++)u.push(U(c)),v.push(U(c));if(0<d)for(y=d;8>y;y++)Wh(c,2);for(y=0;y<d;y++)u[y]&&Wh(c,88),v[y]&&$h(c);T(c);d=T(c);3==d&&Wh(c,1);u=T(c);v=T(c);var z=y=0,x=0,A=0;U(c)&&
308
+ function gi(a){var b={height:null,width:null,fa:null};a=a.wd();if(!a.length)return b;a=a.find(function(r){return 7==r.type});if(!a)return b;a=new Sh(a.data);var c=$h(a),d=$h(a),e=$h(a);Yh(a);if(hi.includes(c)){var f=T(a);3===f&&Vh(a,1);Yh(a);Yh(a);Vh(a,1);if(U(a)){f=3!==f?8:12;for(var g=0;g<f;g++)U(a)&&(6>g?ai(a,16):ai(a,64))}}Yh(a);f=T(a);if(0===f)T(a);else if(1===f)for(Vh(a,1),Yh(a),Yh(a),f=T(a),g=0;g<f;g++)Yh(a);Yh(a);Vh(a,1);f=T(a);g=T(a);var h=Wh(a,1);0===h&&Vh(a,1);Vh(a,1);var k=0,l=0,m=0,n=
309
+ 0;U(a)&&(k=T(a),l=T(a),m=T(a),n=T(a));b.height=String((2-h)*(g+1)*16-2*m-2*n);b.width=String(16*(f+1)-2*k-2*l);b.fa="avc1."+("0"+c.toString(16).toUpperCase()).slice(-2)+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2);return b}
310
+ function fi(a){var b={height:null,width:null,fa:null};a=a.wd();if(!a.length)return b;a=a.find(function(B){return 33==B.type});if(!a)return b;var c=new Sh(a.fullData,!0);$h(c);$h(c);Wh(c,4);var d=Wh(c,3);U(c);var e=Wh(c,2),f=Wh(c,1),g=Wh(c,5),h=Wh(c,32);a=$h(c);for(var k=$h(c),l=$h(c),m=$h(c),n=$h(c),r=$h(c),p=$h(c),u=[],v=[],y=0;y<d;y++)u.push(U(c)),v.push(U(c));if(0<d)for(y=d;8>y;y++)Wh(c,2);for(y=0;y<d;y++)u[y]&&Wh(c,88),v[y]&&$h(c);T(c);d=T(c);3==d&&Wh(c,1);u=T(c);v=T(c);var z=y=0,x=0,A=0;U(c)&&
311
311
  (y+=T(c),z+=T(c),x+=T(c),A+=T(c));b.width=String(u-(y+z)*(1===d||2===d?2:1));b.height=String(v-(x+A)*(1===d?2:1));c=function(B){for(var D=0,F=0;32>F;F++)D|=(B>>F&1)<<31-F;return D>>>0}(h);f=1==f?"H":"L";e="hvc1"+("."+["","A","B","C"][e]+g);e+="."+c.toString(16).toUpperCase();e+="."+f+p;r&&(e+="."+r.toString(16).toUpperCase());n&&(e+="."+n.toString(16).toUpperCase());m&&(e+="."+m.toString(16).toUpperCase());l&&(e+="."+l.toString(16).toUpperCase());k&&(e+="."+k.toString(16).toUpperCase());a&&(e+="."+
312
- a.toString(16).toUpperCase());b.ea=e;return b}function ii(a){return 0>di(a)?!1:!0}function di(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}N("shaka.util.TsParser",ci);ci.syncOffset=di;ci.probe=ii;ci.prototype.getVideoInfo=ci.prototype.xe;ci.prototype.getVideoResolution=ci.prototype.Wg;ci.prototype.getVideoNalus=ci.prototype.wd;ci.prototype.getCodecs=ci.prototype.Fc;ci.prototype.getStartTime=ci.prototype.getStartTime;
312
+ a.toString(16).toUpperCase());b.fa=e;return b}function ii(a){return 0>di(a)?!1:!0}function di(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}N("shaka.util.TsParser",ci);ci.syncOffset=di;ci.probe=ii;ci.prototype.getVideoInfo=ci.prototype.xe;ci.prototype.getVideoResolution=ci.prototype.Wg;ci.prototype.getVideoNalus=ci.prototype.wd;ci.prototype.getCodecs=ci.prototype.Fc;ci.prototype.getStartTime=ci.prototype.getStartTime;
313
313
  ci.prototype.getVideoData=ci.prototype.Zb;ci.prototype.getAudioData=ci.prototype.Db;ci.prototype.getMetadata=ci.prototype.getMetadata;ci.prototype.parseNalus=ci.prototype.Se;ci.prototype.parseAvcNalus=ci.prototype.oh;ci.prototype.parse=ci.prototype.parse;ci.prototype.clearData=ci.prototype.clearData;ci.Timescale=9E4;var hi=[100,110,122,244,44,83,86,118,128,138,139,134];function ji(a,b,c){this.g=null;this.o=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&Ta("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,le("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Ta("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(Ta("Could not find LCEVC Library on this page"),
314
314
  a=!1):(this.h.SupportObject.SupportStatus||Ta(this.h.SupportObject.SupportError),a="undefined"!==typeof this.h&&"undefined"!==typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function ki(a){a.g&&a.i.classList.add("shaka-hidden")}
315
- ji.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function li(a,b,c){var d=mi,e=ni;switch(b.mimeType){case "video/webm":d=oi;break;case "video/mp4":d=pi}switch(c){case "DASH":e=qi;break;case "HLS":e=ri}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}N("shaka.lcevc.Dec",ji);ji.prototype.release=ji.prototype.release;var mi=0,oi=1,pi=2,ri=0,qi=1,ni=-1;function si(a,b,c,d){var e=this;this.i=a;this.C=null;this.F=b;this.g={};this.G={};this.ka={};this.h=null;this.W=!1;this.ua=c||function(){};this.N=d||null;this.j={};this.s=new of;this.m={};this.H=null;this.J=new Le;this.K="";this.Z=!1;this.l=ti(this,this.J);this.A=!1;this.I=new mf(function(){return ui(e)});this.u=!1;this.V="UNKNOWN";this.ha=this.la=!1;this.Aa=new Le;this.o=!1;this.aa=!0}
316
- function ti(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.s.ga(c,"sourceopen",function(){URL.revokeObjectURL(a.K);b.resolve()});a.s.D(c,"startstreaming",function(){a.aa=!0});a.s.D(c,"endstreaming",function(){a.aa=!1});a.s.ga(a.i,"playing",function(){a.Z=!0});a.K=vi(c);a.i.src=a.K;return c}c=new MediaSource;a.s.ga(c,"sourceopen",function(){URL.revokeObjectURL(a.K);b.resolve()});a.s.ga(a.i,"playing",function(){a.Z=!0});a.K=vi(c);a.i.src=a.K;return c}
315
+ ji.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function li(a,b,c){var d=mi,e=ni;switch(b.mimeType){case "video/webm":d=oi;break;case "video/mp4":d=pi}switch(c){case "DASH":e=qi;break;case "HLS":e=ri}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}N("shaka.lcevc.Dec",ji);ji.prototype.release=ji.prototype.release;var mi=0,oi=1,pi=2,ri=0,qi=1,ni=-1;function si(a,b,c,d){var e=this;this.i=a;this.C=null;this.F=b;this.g={};this.G={};this.ka={};this.h=null;this.W=!1;this.ua=c||function(){};this.N=d||null;this.j={};this.s=new of;this.m={};this.H=null;this.J=new Le;this.K="";this.Z=!1;this.l=ti(this,this.J);this.A=!1;this.I=new mf(function(){return ui(e)});this.u=!1;this.V="UNKNOWN";this.da=this.la=!1;this.Aa=new Le;this.o=!1;this.aa=!0}
316
+ function ti(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.s.ha(c,"sourceopen",function(){URL.revokeObjectURL(a.K);b.resolve()});a.s.D(c,"startstreaming",function(){a.aa=!0});a.s.D(c,"endstreaming",function(){a.aa=!1});a.s.ha(a.i,"playing",function(){a.Z=!0});a.K=vi(c);a.i.src=a.K;return c}c=new MediaSource;a.s.ha(c,"sourceopen",function(){URL.revokeObjectURL(a.K);b.resolve()});a.s.ha(a.i,"playing",function(){a.Z=!0});a.K=vi(c);a.i.src=a.K;return c}
317
317
  q=si.prototype;q.destroy=function(){return this.I.destroy()};
318
318
  function ui(a){var b,c,d,e,f,g,h,k;return K(function(l){if(1==l.g){b=[];for(c in a.j)for(d=a.j[c],e=d[0],a.j[c]=d.slice(0,1),e&&b.push(e.p.catch(Vc)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new O(2,7,7003,void 0));a.h&&b.push(a.h.destroy());a.F&&b.push(a.F.destroy());for(k in a.m)b.push(a.m[k].destroy());return C(l,Promise.all(b),2)}a.s&&(a.s.release(),a.s=null);a.i&&(a.i.removeAttribute("src"),a.i.load(),a.i=null);a.C=null;a.l=null;a.h=null;a.F=null;a.g={};a.m={};a.H=null;
319
- a.j={};a.N=null;E(l)})}q.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l;return K(function(m){if(1==m.g)return f=Cc,C(m,e.J,2);e.u=b;e.V=c;e.la=d;e.ha=!e.u&&"HLS"==e.V&&!e.la;g=t(a.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=a.get(k),wi(e,k,l,l.codecs),e.o?(e.j[f.P]=[],e.j[f.da]=[]):e.j[k]=[];E(m)})};
319
+ a.j={};a.N=null;E(l)})}q.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l;return K(function(m){if(1==m.g)return f=Cc,C(m,e.J,2);e.u=b;e.V=c;e.la=d;e.da=!e.u&&"HLS"==e.V&&!e.la;g=t(a.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=a.get(k),wi(e,k,l,l.codecs),e.o?(e.j[f.P]=[],e.j[f.ea]=[]):e.j[k]=[];E(m)})};
320
320
  function wi(a,b,c,d){var e=Ec(c.mimeType,d);if(b==Bc)xi(a,e,a.u,c.external);else{var f=a.C.forceTransmux;if(!bb(e)||!a.u&&Fc.includes(e))f=!0;var g=Gc(c.mimeType,d);if(f){f=zc("audio",(d||"").split(","));d=zc("video",(d||"").split(","));if(f&&d){a.o=!0;wi(a,"audio",c,f);wi(a,"video",c,d);return}if(d=$b(g))e=d(),a.m[b]=e,e=e.convertCodecs(b,g)}g=e+a.C.sourceBufferExtraFeatures;nf(a.I);try{var h=a.l.addSourceBuffer(g)}catch(k){throw new O(2,3,3015,k,"The mediaSource_ status was "+a.l.readyState+" expected 'open'");
321
321
  }a.u&&(h.mode=yi);a.s.D(h,"error",function(){a.j[b][0].p.reject(new O(2,3,3014,a.i.error?a.i.error.code:0))});a.s.D(h,"updateend",function(){return zi(a,b)});a.g[b]=h;a.G[b]=e;a.ka[b]=!!c.drmInfos.length}}q.configure=function(a){this.C=a};
322
322
  function xi(a,b,c,d){a.h||(a.h=new Mc(a.F));var e=a.h;d=d||a.W;a=a.V;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,Oc[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):Ta('Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):Ta('Text parsers should have a "setManifestType" method!'),e.u=d)}function Ai(a){return a.A?!1:a.l?"ended"==a.l.readyState:!0}
323
323
  function Bi(a,b){a.A||!Object.keys(a.g).length?a=null:b==Bc?a=a.h.g:(a=Ci(a,b),a=!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null);return a}function Di(a,b){return a.A?null:b==Bc?a.h.h:yh(Ci(a,b))}function Ei(a,b,c){if(a.A)return 0;if(b==Bc)return a=a.h,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Ci(a,b);return Ah(a,c)}
324
- q.fb=function(){var a={total:this.A?[]:Bh(this.i.buffered),audio:this.A?[]:Bh(Ci(this,"audio")),video:this.A?[]:Bh(Ci(this,"video")),text:[]};if(this.h){var b=this.h.g,c=this.h.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Ci(a,b){try{return a.g[b].buffered}catch(c){return null}}
324
+ q.gb=function(){var a={total:this.A?[]:Bh(this.i.buffered),audio:this.A?[]:Bh(Ci(this,"audio")),video:this.A?[]:Bh(Ci(this,"video")),text:[]};if(this.h){var b=this.h.g,c=this.h.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Ci(a,b){try{return a.g[b].buffered}catch(c){return null}}
325
325
  function Fi(a,b,c,d,e,f){var g=null,h=mb(c);if(Fc.includes(e))f=Ih(h),f.length&&d&&((b=f.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&b.data&&(g=Math.round(b.data)/1E3),a.ua([{cueTime:d.startTime,data:h,frames:f,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(e.includes("/mp4")&&d&&0==d.timestampOffset&&d.g&&d.g.timescale){var k=d.g.timescale;if(!isNaN(k)){var l=0,m=!1;(new Kf).box("moof",Pf).box("traf",Pf).O("tfdt",function(n){l=Lh(n.reader,n.version).baseMediaDecodeTime/
326
326
  k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!ii(h)||(h=(new ci).parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length&&a.ua(h,f,d?d.endTime:null));return g}
327
- function Gi(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,r,p,u,v,y,z,x,A,B;return K(function(D){switch(D.g){case 1:m=Cc;if(b!=m.ia){D.B(2);break}if(!a.u){D.B(3);break}return C(D,a.Aa,4);case 4:n=D.h,a.h.s=n;case 3:return C(D,Pc(a.h,c,d?d.startTime:null,d?d.endTime:null,d?d.Y()[0]:null),5);case 5:return D.return();case 2:if(l||!a.o){D.B(6);break}return C(D,Gi(a,m.P,c,d,e,f,g,h,k,!0),7);case 7:return C(D,Gi(a,m.da,c,d,e,f,g,h,k,!0),8);case 8:return D.return();
328
- case 6:if(!a.g[b])return D.return();r=a.g[b].timestampOffset;p=a.G[b];a.m[b]&&(p=a.m[b].getOriginalMimeType());d&&(u=Fi(a,b,c,d,p,r),null!=u&&(v=d.startTime-u,y=Math.abs(r-v),(.001<=y||g||h)&&(!k||0<v||!r)&&(r=v,a.ha&&(Hi(a,b,function(){return Ii(a,b)}),Hi(a,b,function(){return Ji(a,b,r)}))),z=b==m.da||!(m.da in a.g),a.u&&z&&a.Aa.resolve(r)));f&&b==m.da&&(a.h||xi(a,"application/cea-608",a.u,!1),a.H||(x=p.split(";",1)[0],a.H=new sb(x)),d?(A=a.H.i(c),A.length&&Tc(a.h,A,d.startTime,d.endTime,r)):a.H.init(c));
327
+ function Gi(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,r,p,u,v,y,z,x,A,B;return K(function(D){switch(D.g){case 1:m=Cc;if(b!=m.ia){D.B(2);break}if(!a.u){D.B(3);break}return C(D,a.Aa,4);case 4:n=D.h,a.h.s=n;case 3:return C(D,Pc(a.h,c,d?d.startTime:null,d?d.endTime:null,d?d.Y()[0]:null),5);case 5:return D.return();case 2:if(l||!a.o){D.B(6);break}return C(D,Gi(a,m.P,c,d,e,f,g,h,k,!0),7);case 7:return C(D,Gi(a,m.ea,c,d,e,f,g,h,k,!0),8);case 8:return D.return();
328
+ case 6:if(!a.g[b])return D.return();r=a.g[b].timestampOffset;p=a.G[b];a.m[b]&&(p=a.m[b].getOriginalMimeType());d&&(u=Fi(a,b,c,d,p,r),null!=u&&(v=d.startTime-u,y=Math.abs(r-v),(.001<=y||g||h)&&(!k||0<v||!r)&&(r=v,a.da&&(Hi(a,b,function(){return Ii(a,b)}),Hi(a,b,function(){return Ji(a,b,r)}))),z=b==m.ea||!(m.ea in a.g),a.u&&z&&a.Aa.resolve(r)));f&&b==m.ea&&(a.h||xi(a,"application/cea-608",a.u,!1),a.H||(x=p.split(";",1)[0],a.H=new sb(x)),d?(A=a.H.i(c),A.length&&Tc(a.h,A,d.startTime,d.endTime,r)):a.H.init(c));
329
329
  if(!a.m[b]){D.B(9);break}return C(D,a.m[b].transmux(c,e,d,a.l.duration,b),10);case 10:c=D.h;case 9:return c=Ki(a,c,d?d.startTime:null,b),d&&a.u&&b!=m.ia&&(g||h)&&(B=d.startTime,Hi(a,b,function(){return Ii(a,b)}),Hi(a,b,function(){return Ji(a,b,B)})),C(D,Hi(a,b,function(){var F=c;if("video"==b&&a.N){var J=a.N;J.g&&J.g.appendBuffer(F,"video",J.o,-r)}a.g[b].appendBuffer(F)}),11);case 11:E(D)}})}function Li(a,b){var c=Di(a,"video")||0;Rc(a.h,b,c)}function Mi(a){a.h&&Rc(a.h,"",0)}
330
330
  q.remove=function(a,b,c){var d=this,e;return K(function(f){return 1==f.g?(e=Cc,a==e.ia?C(f,d.h.remove(b,c),0):C(f,Hi(d,a,function(){return Ni(d,a,b,c)}),4)):d.o?C(f,Hi(d,e.P,function(){return Ni(d,e.P,b,c)}),0):f.B(0)})};function Oi(a,b){var c;return K(function(d){return 1==d.g?(c=Cc,b==c.ia?a.h?C(d,a.h.remove(0,Infinity),0):d.return():C(d,Hi(a,b,function(){return Ni(a,b,0,a.l.duration)}),4)):a.o?C(d,Hi(a,c.P,function(){return Ni(a,c.P,0,a.l.duration)}),0):d.B(0)})}
331
331
  q.flush=function(a){var b=this,c;return K(function(d){return 1==d.g?(c=Cc,a==c.ia?d.return():C(d,Hi(b,a,function(){b.i.currentTime-=.001;zi(b,a)}),2)):b.o?C(d,Hi(b,c.P,function(){var e=c.P;b.i.currentTime-=.001;zi(b,e)}),0):d.B(0)})};
@@ -337,26 +337,26 @@ function Si(a,b){var c,d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:nf(a.
337
337
  }})}function Ti(a,b){a.j[b].shift();Ui(a,b)}function Ui(a,b){var c=a.j[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new O(2,3,3017,b)):c.p.reject(new O(2,3,3015,d,a.i.error||"No error in the media element")),Ti(a,b)}}function Ki(a,b,c,d){var e=a.ka[d];a.C.insertFakeEncryptionInInit&&null==c&&e&&(pd()||nd()||od("SOPOpenBrowser"))&&"mp4"==a.G[d].split(";")[0].split("/")[1]&&(b=qh(b));return b}
338
338
  function Vi(a,b,c,d){return Hi(a,b,function(){b!==Bc&&(fb()&&(a.m[b]&&(a.m[b].destroy(),delete a.m[b]),d&&(a.m[b]=d),a.g[b].changeType(c+a.C.sourceBufferExtraFeatures),a.G[b]=c),zi(a,b))})}
339
339
  function Wi(a,b){var c,d,e,f,g,h,k,l,m,n,r,p,u,v,y,z,x,A,B,D,F,J,G;return K(function(H){switch(H.g){case 1:c=Cc;a.A=!0;a.o=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.Z&&(a.i.autoplay=!1);ta(H,2);a.s.xb();g=[];for(h in a.m)g.push(a.m[h].destroy());for(k in a.j)for(l=a.j[k],m=l[0],a.j[k]=l.slice(0,1),m&&g.push(m.p.catch(Vc)),n=t(l.slice(1)),r=n.next();!r.done;r=n.next())p=r.value,p.p.reject(new O(2,7,7003,void 0));for(u in a.g){v=a.g[u];try{a.l.removeSourceBuffer(v)}catch(I){}}return C(H,Promise.all(g),
340
- 4);case 4:return a.m={},a.g={},y=a.l.duration,a.J=new Le,a.l=ti(a,a.J),C(H,a.J,5);case 5:a.l.duration=y;z=new Le;x=a.l.sourceBuffers;A=b.size;B=0;a.s.D(x,"addsourcebuffer",function(){B++;B===A&&z.resolve()});D=t(b.keys());for(F=D.next();!F.done;F=D.next())J=F.value,G=b.get(J),wi(a,J,G,G.codecs),a.o?(a.j[c.P]=[],a.j[c.da]=[]):a.j[J]=[];a.i.currentTime=d;return C(H,z,2);case 2:xa(H),a.A=!1,nf(a.I),a.s.ga(a.i,"canplay",function(){nf(a.I);a.i.autoplay=e;f||a.i.play()}),ya(H,0)}})}
340
+ 4);case 4:return a.m={},a.g={},y=a.l.duration,a.J=new Le,a.l=ti(a,a.J),C(H,a.J,5);case 5:a.l.duration=y;z=new Le;x=a.l.sourceBuffers;A=b.size;B=0;a.s.D(x,"addsourcebuffer",function(){B++;B===A&&z.resolve()});D=t(b.keys());for(F=D.next();!F.done;F=D.next())J=F.value,G=b.get(J),wi(a,J,G,G.codecs),a.o?(a.j[c.P]=[],a.j[c.ea]=[]):a.j[J]=[];a.i.currentTime=d;return C(H,z,2);case 2:xa(H),a.A=!1,nf(a.I),a.s.ha(a.i,"canplay",function(){nf(a.I);a.i.autoplay=e;f||a.i.play()}),ya(H,0)}})}
341
341
  function Xi(a,b){return Si(a,function(){return Wi(a,b)})}
342
342
  function Qi(a,b,c,d){var e,f,g,h,k,l,m,n,r,p,u;return K(function(v){if(1==v.g){if(b==Bc)return v.return(!1);e=Jc(Lc(a.G[b]))[0];f=Kc(a.G[b]);h=Ec(c.mimeType,c.codecs);k=a.C.forceTransmux;if(!bb(h)||!a.u&&Fc.includes(h))k=!0;l=Gc(c.mimeType,c.codecs);k&&(m=$b(l))&&(g=m(),h=g.convertCodecs(b,l));n=Lc(h);r=Jc(n)[0];p=Kc(h);if(e===r&&f===p)return v.return(!1);u=!0;if(a.o||n.split(",").length&&g&&!a.m[b])u=!1;if(u&&"smooth"===a.C.codecSwitchingStrategy&&fb())return C(v,Vi(a,b,h,g),3);g&&g.destroy();return C(v,
343
343
  Xi(a,d),3)}return v.return(!0)})}function Yi(a,b,c){if(b==Bc)var d=!1;else{d=Jc(Lc(a.G[b]))[0];var e=Kc(a.G[b]),f=Ec(c.mimeType,c.codecs),g=a.C.forceTransmux;if(!bb(f)||!a.u&&Fc.includes(f))g=!0;c=Gc(c.mimeType,c.codecs);g&&(g=$b(c))&&(g=g(),f=g.convertCodecs(b,c),g.destroy());b=Jc(Lc(f))[0];f=Kc(f);d=d!==b||e!==f}return d?"smooth"!==a.C.codecSwitchingStrategy||!fb()||a.o:!1}var vi=window.URL.createObjectURL,yi="sequence";function Zi(a,b,c){this.i=a;this.m=b;this.s=this.j=Infinity;this.g=1;this.h=this.l=null;this.o=0;this.C=!0;this.F=0;this.u=void 0===c?!0:c;this.G=0;this.A=!1}q=Zi.prototype;q.getDuration=function(){return this.j};q.Kg=function(){return this.g};q.$f=function(a){this.i=a};q.Ja=function(a){this.j=a};q.Og=function(){return this.i};q.Yf=function(a){this.o=a};q.ec=function(a){this.C=a};q.Ld=function(a){this.s=a};q.Zf=function(a){this.m=a};q.Dg=function(){return this.m};
344
344
  q.Pf=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.Gd(a[0].start+b);this.g=a.reduce(function(d,e){return Math.max(d,e.end-e.start)},this.g);this.h=Math.max(this.h,c);null!=this.i&&this.u&&!this.A&&(this.i=(Date.now()+this.o)/1E3-this.h-this.g)}};
345
345
  q.Qc=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.o)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.Gd(b);this.h=Math.max(this.h,c);null!=this.i&&this.u&&!this.A&&(this.i=d-this.h-this.g)}};q.Bd=function(){this.A=!0};q.Gd=function(a){this.l=null==this.l?a:Math.min(this.l,a)};q.Ne=function(a){this.g=Math.max(this.g,a)};
346
- q.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};q.S=function(){return Infinity==this.j&&!this.C};q.Jb=function(){return Infinity!=this.j&&!this.C};q.hb=function(){return Math.max(this.F,this.ub()-this.s)};q.bg=function(a){this.F=a};q.ub=function(){return this.S()||this.Jb()?Math.min(Math.max(0,(Date.now()+this.o)/1E3-this.g-this.i)+this.G,this.j):this.h?Math.min(this.h,this.j):this.j};
347
- q.Jc=function(a){var b=Math.max(this.l,this.F);return Infinity==this.s?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.ub()-this.s+a,this.gb()))};q.Xb=function(){return this.Jc(0)};q.gb=function(){return Math.max(0,this.ub()-(this.S()||this.Jb()?this.m:0))};q.eg=function(){return null==this.i||null!=this.h&&this.u?!1:!0};q.Xf=function(a){this.G=a};N("shaka.media.PresentationTimeline",Zi);Zi.prototype.setAvailabilityTimeOffset=Zi.prototype.Xf;Zi.prototype.usingPresentationStartTime=Zi.prototype.eg;
348
- Zi.prototype.getSeekRangeEnd=Zi.prototype.gb;Zi.prototype.getSeekRangeStart=Zi.prototype.Xb;Zi.prototype.getSafeSeekRangeStart=Zi.prototype.Jc;Zi.prototype.getSegmentAvailabilityEnd=Zi.prototype.ub;Zi.prototype.setUserSeekStart=Zi.prototype.bg;Zi.prototype.getSegmentAvailabilityStart=Zi.prototype.hb;Zi.prototype.isInProgress=Zi.prototype.Jb;Zi.prototype.isLive=Zi.prototype.S;Zi.prototype.offset=Zi.prototype.offset;Zi.prototype.notifyMaxSegmentDuration=Zi.prototype.Ne;
346
+ q.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};q.S=function(){return Infinity==this.j&&!this.C};q.Jb=function(){return Infinity!=this.j&&!this.C};q.Ya=function(){return Math.max(this.F,this.ub()-this.s)};q.bg=function(a){this.F=a};q.ub=function(){return this.S()||this.Jb()?Math.min(Math.max(0,(Date.now()+this.o)/1E3-this.g-this.i)+this.G,this.j):this.h?Math.min(this.h,this.j):this.j};
347
+ q.Jc=function(a){var b=Math.max(this.l,this.F);return Infinity==this.s?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.ub()-this.s+a,this.hb()))};q.Xb=function(){return this.Jc(0)};q.hb=function(){return Math.max(0,this.ub()-(this.S()||this.Jb()?this.m:0))};q.eg=function(){return null==this.i||null!=this.h&&this.u?!1:!0};q.Xf=function(a){this.G=a};N("shaka.media.PresentationTimeline",Zi);Zi.prototype.setAvailabilityTimeOffset=Zi.prototype.Xf;Zi.prototype.usingPresentationStartTime=Zi.prototype.eg;
348
+ Zi.prototype.getSeekRangeEnd=Zi.prototype.hb;Zi.prototype.getSeekRangeStart=Zi.prototype.Xb;Zi.prototype.getSafeSeekRangeStart=Zi.prototype.Jc;Zi.prototype.getSegmentAvailabilityEnd=Zi.prototype.ub;Zi.prototype.setUserSeekStart=Zi.prototype.bg;Zi.prototype.getSegmentAvailabilityStart=Zi.prototype.Ya;Zi.prototype.isInProgress=Zi.prototype.Jb;Zi.prototype.isLive=Zi.prototype.S;Zi.prototype.offset=Zi.prototype.offset;Zi.prototype.notifyMaxSegmentDuration=Zi.prototype.Ne;
349
349
  Zi.prototype.notifyMinSegmentStartTime=Zi.prototype.Gd;Zi.prototype.lockStartTime=Zi.prototype.Bd;Zi.prototype.notifySegments=Zi.prototype.Qc;Zi.prototype.notifyTimeRange=Zi.prototype.Pf;Zi.prototype.getDelay=Zi.prototype.Dg;Zi.prototype.setDelay=Zi.prototype.Zf;Zi.prototype.setSegmentAvailabilityDuration=Zi.prototype.Ld;Zi.prototype.setStatic=Zi.prototype.ec;Zi.prototype.setClockOffset=Zi.prototype.Yf;Zi.prototype.getPresentationStartTime=Zi.prototype.Og;Zi.prototype.setDuration=Zi.prototype.Ja;
350
350
  Zi.prototype.setPresentationStartTime=Zi.prototype.$f;Zi.prototype.getMaxSegmentDuration=Zi.prototype.Kg;Zi.prototype.getDuration=Zi.prototype.getDuration;function $i(a,b,c){this.j=c;this.l=a;this.s=aj(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.u=b;this.i=function(){}}$i.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function bj(a,b){a.i=b}function cj(a){this.g=a}function aj(a){if(a.g.paused||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Bh(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function dj(a,b,c,d,e){var f=this;this.u=e;this.g=a;this.A=b;this.s=c;this.l=new of;this.j=!1;this.F=a.readyState;this.C=this.i=0;this.h=d;this.o=!1;this.l.D(a,"waiting",function(){return ej(f)});this.m=(new id(function(){ej(f)})).Ta(this.s.gapJumpTimerTime)}dj.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.A=this.u=null};dj.prototype.Qe=function(){this.o=!0;ej(this)};
351
351
  function ej(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.F&&(a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=aj(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.u&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.j(new Q("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Ch(c,b,a.s.gapDetectionThreshold),null==
352
- d||0==d&&!a.o||(e=c.start(d),e>=a.A.gb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.u(new Q("gapjumped")))))}}};function fj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=gj.value().get(b),c.ga(a,b,d))}var gj=new vf(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function hj(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new of;this.i=new ij(a);fj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){jj(e,e.j())})}hj.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function kj(a){return a.o?a.g.currentTime:a.j()}
353
- function lj(a,b){0<a.g.readyState?mj(a.i,b):fj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){jj(a,a.j())})}function jj(a,b){.001>Math.abs(a.g.currentTime-b)?nj(a):(a.h.ga(a.g,"seeking",function(){nj(a)}),mj(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function nj(a){a.o=!0;a.h.D(a.g,"seeking",function(){return a.m()});a.s(a.g.currentTime)}
354
- function ij(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new id(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}ij.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function mj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Ta(.1)};function oj(a){this.g=a;this.j=!1;this.h=null;this.i=new of}q=oj.prototype;q.Wd=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.ga(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;fj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};q.Xd=function(a){this.h=this.j?this.h:a};q.hd=function(){return(this.j?this.g.currentTime:this.h)||0};q.mf=function(){return 0};
352
+ d||0==d&&!a.o||(e=c.start(d),e>=a.A.hb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.u(new Q("gapjumped")))))}}};function fj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=gj.value().get(b),c.ha(a,b,d))}var gj=new vf(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function hj(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new of;this.i=new ij(a);fj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){jj(e,e.j())})}hj.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function kj(a){return a.o?a.g.currentTime:a.j()}
353
+ function lj(a,b){0<a.g.readyState?mj(a.i,b):fj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){jj(a,a.j())})}function jj(a,b){.001>Math.abs(a.g.currentTime-b)?nj(a):(a.h.ha(a.g,"seeking",function(){nj(a)}),mj(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function nj(a){a.o=!0;a.h.D(a.g,"seeking",function(){return a.m()});a.s(a.g.currentTime)}
354
+ function ij(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new id(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}ij.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function mj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Ta(.1)};function oj(a){this.g=a;this.j=!1;this.h=null;this.i=new of}q=oj.prototype;q.Wd=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.ha(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;fj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};q.Xd=function(a){this.h=this.j?this.h:a};q.hd=function(){return(this.j?this.g.currentTime:this.h)||0};q.mf=function(){return 0};
355
355
  q.lf=function(){return 0};q.Of=function(){};
356
356
  function pj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.A=b.minBufferTime||0;this.l=c;this.u=e;this.s=null;this.o=qj(a,c,f);this.j=new dj(a,b.presentationTimeline,c,this.o,f);this.h=new hj(a,function(){a:{var h=g.j;h.j=!0;h.o=!1;var k=kj(g.h);h=rj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;lj(g.h,h);h=void 0;break a}g.u();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?
357
- g.g.Xb():g.g.gb():0>h&&(h=g.g.gb()+h);return sj(g,tj(g,h))});this.m=new id(function(){if(0!=g.i.readyState&&!g.i.paused){var h=kj(g.h),k=g.g.Xb(),l=g.g.gb();3>l-k&&(k=l-3);h<k&&(h=rj(g,h),g.i.currentTime=h)}})}q=pj.prototype;q.Wd=function(){this.m.Ta(.25)};q.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.u=function(){}};q.Xd=function(a){lj(this.h,a)};
357
+ g.g.Xb():g.g.hb():0>h&&(h=g.g.hb()+h);return sj(g,tj(g,h))});this.m=new id(function(){if(0!=g.i.readyState&&!g.i.paused){var h=kj(g.h),k=g.g.Xb(),l=g.g.hb();3>l-k&&(k=l-3);h<k&&(h=rj(g,h),g.i.currentTime=h)}})}q=pj.prototype;q.Wd=function(){this.m.Ta(.25)};q.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.u=function(){}};q.Xd=function(a){lj(this.h,a)};
358
358
  q.hd=function(){var a=kj(this.h);return 0<this.i.readyState&&!this.i.paused?tj(this,a):a};q.mf=function(){return this.o?this.o.o:0};q.lf=function(){return this.j.C};q.Of=function(){this.j.Qe()};function sj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
359
- function rj(a,b){var c=Math.max(a.A,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Xb(),f=a.g.gb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Jc(c),k=a.g.Jc(d);c=a.g.Jc(c+d);return b>=g?sj(a,b):b>f?f:b<e?zh(a.i.buffered,k)?k:c:b>=h||zh(a.i.buffered,b)?b:c}function tj(a,b){var c=a.g.Xb();if(b<c)return c;a=a.g.gb();return b>a?a:b}
359
+ function rj(a,b){var c=Math.max(a.A,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Xb(),f=a.g.hb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Jc(c),k=a.g.Jc(d);c=a.g.Jc(c+d);return b>=g?sj(a,b):b>f?f:b<e?zh(a.i.buffered,k)?k:c:b>=h||zh(a.i.buffered,b)?b:c}function tj(a,b){var c=a.g.Xb();if(b<c)return c;a=a.g.hb();return b>a?a:b}
360
360
  function qj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new $i(new cj(a),b.stallThreshold,c);bj(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function uj(a){this.g=a;this.l=null;this.j=0;this.o=!1}q=uj.prototype;q.Gb=function(){return this.g.length};q.release=function(){this.o||(this.g=[],this.l&&this.l.stop(),this.l=null)};q.jh=function(){this.o=!0};function vj(a,b){a=t(a.g);for(var c=a.next();!c.done;c=a.next())b(c.value)}q.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.j}return this.g.length&&a<this.g[0].startTime?this.j:null};
361
361
  q.get=function(a){if(0==this.g.length)return null;a-=this.j;return 0>a||a>=this.g.length?null:this.g[a]};q.offset=function(a){if(!this.o)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};q.Ed=function(a){if(!this.o&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,w(a))}};
362
362
  q.Pc=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.Ed(a);this.Wa(b)};q.Wa=function(a){if(!this.o){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.j+=b-this.g.length}};
@@ -382,22 +382,22 @@ function gk(a,b,c,d,e,f){var g=a.h.get(b.type);g||b.type!=Bc?g&&(g.Mb&&(b.trickM
382
382
  function kk(a,b){var c,d;return K(function(e){if(1==e.g){if(!b.Ha)return e.return();c=b.stream;d=b.Ha;return c.segmentIndex?e.B(2):C(e,c.createSegmentIndex(),2)}if(b.Ha!=d||b.stream!=c)return e.return();var f=a.g.ud();var g=Di(a.g.T,b.type),h=b.stream.segmentIndex.find(b.wa?b.wa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ra?k.ra-k.Ka:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.g)&&(h+=(k.ra?k.ra-k.Ka:null)||0),k=a.g.getBandwidthEstimate(),
383
383
  f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal)||b.Ha.h.g>h?!0:!1):f=!1;f&&b.Ha.abort();E(e)})}
384
384
  q.Wc=function(){if(this.g)for(var a=this.g.ud(),b=t(this.h.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.h.get(d);var e=null;c.X&&(e=c.X.current());if(!e||e.startTime>a||e.endTime<a)c.X=null;e=this.g.T;e.A?e=!1:d==Bc?(e=e.h,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Ci(e,d),e=zh(e,a));e||((null!=Di(this.g.T,d)||c.xa)&&lk(this,c),c.Ha&&(c.Ha.abort(),c.Ha=null),d===Bc&&(d=this.g.T,d.H&&d.H.h()),c.Wc=!0)}};
385
- function lk(a,b){b.Cc||b.mb||(b.xa?(b.mb=!0,b.nd=0):null==Bi(a.g.T,b.type)?null==b.ab&&dk(a,b,0):(Xj(b),jk(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
386
- function ak(a){var b,c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){b=Cc;if(!a.j)throw new O(2,5,5006);c=new Map;d=new Set;a.j.audio&&(c.set(b.P,a.j.audio),d.add(a.j.audio));a.j.video&&(c.set(b.da,a.j.video),d.add(a.j.video));a.o&&(c.set(b.ia,a.o),d.add(a.o));e=a.g.T;return C(m,e.init(c,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}nf(a.l);a.updateDuration();f=t(c.keys());for(g=f.next();!g.done;g=f.next())h=g.value,k=c.get(h),a.h.has(h)||(l=ck(a,k),a.h.set(h,l),dk(a,l,
387
- 0));E(m)})}function ck(a,b){return{stream:b,type:b.type,X:null,pa:Zj(a,b),wa:null,$b:null,Ie:null,Ge:null,Fe:null,Mb:null,endOfStream:!1,xa:!1,ab:null,mb:!1,nd:0,Nd:!1,Cc:!1,Wc:!0,Me:!1,Ve:!1,Mc:!1,Ha:null}}function Zj(a,b){return"video"!==b.type&&"audio"!==b.type?null:0<a.i.segmentPrefetchLimit?new Mj(a.i.segmentPrefetchLimit,b,function(c,d,e){return mk(a,c,d,e)}):null}q.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.T.Ja(a):this.g.T.Ja(Math.pow(2,32))};
388
- function nk(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:nf(a.l);if(b.xa||null==b.ab||b.Cc)return h.return();b.ab=null;if(!b.mb){h.B(2);break}return C(h,jk(a,b,b.Nd,b.nd),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.B(4);break}c=b.stream;return C(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.xa||b.ab||dk(a,b,0),h.return();case 4:sa(h,6);d=ok(a,b);null!=d&&(dk(a,b,d),b.Mc=!1);va(h,7);break;case 6:return e=
385
+ function lk(a,b){b.Cc||b.mb||(b.xa?(b.mb=!0,b.nd=0):null==Bi(a.g.T,b.type)?null==b.bb&&dk(a,b,0):(Xj(b),jk(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
386
+ function ak(a){var b,c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){b=Cc;if(!a.j)throw new O(2,5,5006);c=new Map;d=new Set;a.j.audio&&(c.set(b.P,a.j.audio),d.add(a.j.audio));a.j.video&&(c.set(b.ea,a.j.video),d.add(a.j.video));a.o&&(c.set(b.ia,a.o),d.add(a.o));e=a.g.T;return C(m,e.init(c,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}nf(a.l);a.updateDuration();f=t(c.keys());for(g=f.next();!g.done;g=f.next())h=g.value,k=c.get(h),a.h.has(h)||(l=ck(a,k),a.h.set(h,l),dk(a,l,
387
+ 0));E(m)})}function ck(a,b){return{stream:b,type:b.type,X:null,pa:Zj(a,b),wa:null,$b:null,Ie:null,Ge:null,Fe:null,Mb:null,endOfStream:!1,xa:!1,bb:null,mb:!1,nd:0,Nd:!1,Cc:!1,Wc:!0,Me:!1,Ve:!1,Mc:!1,Ha:null}}function Zj(a,b){return"video"!==b.type&&"audio"!==b.type?null:0<a.i.segmentPrefetchLimit?new Mj(a.i.segmentPrefetchLimit,b,function(c,d,e){return mk(a,c,d,e)}):null}q.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.T.Ja(a):this.g.T.Ja(Math.pow(2,32))};
388
+ function nk(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:nf(a.l);if(b.xa||null==b.bb||b.Cc)return h.return();b.bb=null;if(!b.mb){h.B(2);break}return C(h,jk(a,b,b.Nd,b.nd),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.B(4);break}c=b.stream;return C(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.xa||b.bb||dk(a,b,0),h.return();case 4:sa(h,6);d=ok(a,b);null!=d&&(dk(a,b,d),b.Mc=!1);va(h,7);break;case 6:return e=
389
389
  wa(h),C(h,pk(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.h.values());if(!a.A||!f.every(function(k){return k.endOfStream})){h.B(0);break}return C(h,a.g.T.endOfStream(),10);case 10:nf(a.l),g=a.g.T.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ja(g),E(h)}})}
390
390
  function ok(a,b){if(qk(b))return Li(a.g.T,b.stream.originalId||""),null;b.type==Bc&&Mi(a.g.T);if(!a.g.T.aa&&b.type!=Bc)return a.i.updateIntervalSeconds/2;var c=a.g.ud(),d=b.wa?b.wa.endTime:c,e=Ei(a.g.T,b.type,c),f=Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal,a.i.bufferingGoal)*a.u,g=a.m.presentationTimeline.getDuration()-d,h=Di(a.g.T,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(a=a.h.get(Bc))&&qk(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.i.updateIntervalSeconds/
391
391
  2;e=rk(a,b,c,h);if(!e)return a.i.updateIntervalSeconds;f=Infinity;g=Array.from(a.h.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,qk(h)||h.X&&!h.X.current()||(f=Math.min(f,h.wa?h.wa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.i.updateIntervalSeconds;b.pa&&b.X&&(d=e.g,!d||b.wa&&vh(d,b.$b)||Qj(b.pa,d),Nj(b.pa,e));sk(a,b,c,e).catch(function(){});return null}
392
392
  function rk(a,b,c,d){if(b.X)return b.X.current();if(b.wa||d)return c=b.wa?b.wa.endTime:d,b.Me=!0,b.X=b.stream.segmentIndex.Eb(c),b.X&&b.X.next().value;a=a.i.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.X=b.stream.segmentIndex.Eb(d),e=b.X&&b.X.next().value);e||(b.X=b.stream.segmentIndex.Eb(c),e=b.X&&b.X.next().value);return e}
393
393
  function sk(a,b,c,d){var e,f,g,h,k,l,m,n,r,p,u,v,y,z,x,A;return K(function(B){switch(B.g){case 1:e=Cc;f=b.stream;g=b.X;b.xa=!0;sa(B,2);if(2==d.Hb())throw new O(1,1,1011);return C(B,tk(a,b,d),4);case 4:nf(a.l);if(a.s)return B.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.i.lowLatencyMode&&k&&h&&("HLS"!=a.m.type||d.s))return n=new Uint8Array(0),p=r=!1,v=function(D){var F,J,G,H;return K(function(I){switch(I.g){case 1:if(r)return I.return();p=!0;nf(a.l);if(a.s)return I.return();
394
394
  sa(I,2);n=uk(n,D);F=!1;J=0;(new Kf).box("mdat",function(L){J=L.size+L.start;F=!0}).parse(n,!1,!0);if(!F){I.B(4);break}G=n.subarray(0,J);n=n.subarray(J);return C(I,vk(a,b,c,f,d,G,!0),5);case 5:b.pa&&b.X&&Nj(b.pa,d,!0);case 4:va(I,0);break;case 2:u=H=wa(I),E(I)}})},C(B,wk(a,b,d,v),9);l=wk(a,b,d);return C(B,l,7);case 7:m=B.h;nf(a.l);if(a.s)return B.return();nf(a.l);return b.mb?(b.xa=!1,dk(a,b,0),B.return()):C(B,vk(a,b,c,f,d,m),6);case 9:y=B.h;if(u)throw u;if(p){B.B(10);break}r=!0;nf(a.l);return a.s?
395
- B.return():b.mb?(b.xa=!1,dk(a,b,0),B.return()):C(B,vk(a,b,c,f,d,y),10);case 10:b.pa&&b.X&&Nj(b.pa,d,!0);case 6:nf(a.l);if(a.s)return B.return();b.wa=d;g.next();b.xa=!1;b.Ve=!1;z=a.g.T.fb();x=z[b.type];Ya(JSON.stringify(x));b.mb||a.g.Qe(d.startTime,d.endTime,b.type);dk(a,b,0);va(B,0);break;case 2:A=wa(B);nf(a.l,A);if(a.s)return B.return();b.xa=!1;if(7001==A.code)b.xa=!1,Xj(b),dk(a,b,0),B.B(0);else if(b.type==e.ia&&a.i.ignoreTextStreamFailures)a.h.delete(e.ia),B.B(0);else if(3017==A.code)xk(a,b,A),
395
+ B.return():b.mb?(b.xa=!1,dk(a,b,0),B.return()):C(B,vk(a,b,c,f,d,y),10);case 10:b.pa&&b.X&&Nj(b.pa,d,!0);case 6:nf(a.l);if(a.s)return B.return();b.wa=d;g.next();b.xa=!1;b.Ve=!1;z=a.g.T.gb();x=z[b.type];Ya(JSON.stringify(x));b.mb||a.g.Qe(d.startTime,d.endTime,b.type);dk(a,b,0);va(B,0);break;case 2:A=wa(B);nf(a.l,A);if(a.s)return B.return();b.xa=!1;if(7001==A.code)b.xa=!1,Xj(b),dk(a,b,0),B.B(0);else if(b.type==e.ia&&a.i.ignoreTextStreamFailures)a.h.delete(e.ia),B.B(0);else if(3017==A.code)xk(a,b,A),
396
396
  B.B(0);else return b.Mc=!0,A.severity=2,C(B,pk(a,b,A),0)}})}function yk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return d=b,d.cryptoKey?h.B(2):C(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=mb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;return h.return(window.crypto.subtle.decrypt({name:"AES-CBC",iv:e},d.cryptoKey,a))})}function uk(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
397
397
  function xk(a,b,c){if(!Array.from(a.h.values()).some(function(e){return e!=b&&e.Ve})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.Mc=!0;a.s=!0;a.g.onError(c);return}b.Ve=!0}dk(a,b,4)}
398
- function tk(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,u,v;return K(function(y){if(1==y.g){d=Cc;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=Jc(b.stream.codecs)[0];k=Kc(b.stream.mimeType);l=c.timestampOffset;if(l==b.Ie&&f==b.Ge&&g==b.Fe&&h==b.He&&k==b.If)return y.B(2);if(m=b.He&&b.If&&Yi(a.g.T,b.type,b.stream))n=null,b.type===d.da?n=a.h.get(d.P):b.type===d.P&&(n=a.h.get(d.da)),n&&(n.$b=null,lk(a,n),Yj(n).catch(function(){}));r=function(){var z,x,A,B;return K(function(D){if(1==D.g)return z=
399
- new Map,a.j.audio&&z.set(d.P,a.j.audio),a.j.video&&z.set(d.da,a.j.video),sa(D,2),b.Ge=f,b.Fe=g,b.He=h,b.If=k,b.Ie=l,x=a.m.sequenceMode||"HLS"==a.m.type,C(D,Pi(a.g.T,b.type,l,f,g,x,b.stream,z),4);if(2!=D.g)return m&&(A=null,b.type===d.da?A=a.h.get(d.P):b.type===d.P&&(A=a.h.get(d.da)),A&&(A.mb=!1,A.xa=!1,lk(a,A))),va(D,0);B=wa(D);b.Ge=null;b.Fe=null;b.He=null;b.Ie=null;throw B;})};return C(y,r(),2)}vh(c.g,b.$b)||(b.$b=c.g,c.m&&c.g&&(p=wk(a,b,c.g),u=function(){var z,x,A,B,D,F;return K(function(J){switch(J.g){case 1:return sa(J,
400
- 2),C(J,p,4);case 4:return z=J.h,nf(a.l),x=null,A=new Map,B=new Kf,B.box("moov",Pf).box("trak",Pf).box("mdia",Pf).O("mdhd",function(G){x=Mh(G.reader,G.version).timescale}).box("hdlr",function(G){G=G.reader;G.skip(8);G=G.kb(4);var H=String.fromCharCode(G[0]);H+=String.fromCharCode(G[1]);H+=String.fromCharCode(G[2]);H+=String.fromCharCode(G[3]);switch(H){case "soun":A.set(d.P,x);break;case "vide":A.set(d.da,x)}x=null}).parse(z),A.has(b.type)?c.g.timescale=A.get(b.type):null!=x&&(c.g.timescale=x),D=b.stream.closedCaptions&&
398
+ function tk(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,u,v;return K(function(y){if(1==y.g){d=Cc;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=Jc(b.stream.codecs)[0];k=Kc(b.stream.mimeType);l=c.timestampOffset;if(l==b.Ie&&f==b.Ge&&g==b.Fe&&h==b.He&&k==b.If)return y.B(2);if(m=b.He&&b.If&&Yi(a.g.T,b.type,b.stream))n=null,b.type===d.ea?n=a.h.get(d.P):b.type===d.P&&(n=a.h.get(d.ea)),n&&(n.$b=null,lk(a,n),Yj(n).catch(function(){}));r=function(){var z,x,A,B;return K(function(D){if(1==D.g)return z=
399
+ new Map,a.j.audio&&z.set(d.P,a.j.audio),a.j.video&&z.set(d.ea,a.j.video),sa(D,2),b.Ge=f,b.Fe=g,b.He=h,b.If=k,b.Ie=l,x=a.m.sequenceMode||"HLS"==a.m.type,C(D,Pi(a.g.T,b.type,l,f,g,x,b.stream,z),4);if(2!=D.g)return m&&(A=null,b.type===d.ea?A=a.h.get(d.P):b.type===d.P&&(A=a.h.get(d.ea)),A&&(A.mb=!1,A.xa=!1,lk(a,A))),va(D,0);B=wa(D);b.Ge=null;b.Fe=null;b.He=null;b.Ie=null;throw B;})};return C(y,r(),2)}vh(c.g,b.$b)||(b.$b=c.g,c.m&&c.g&&(p=wk(a,b,c.g),u=function(){var z,x,A,B,D,F;return K(function(J){switch(J.g){case 1:return sa(J,
400
+ 2),C(J,p,4);case 4:return z=J.h,nf(a.l),x=null,A=new Map,B=new Kf,B.box("moov",Pf).box("trak",Pf).box("mdia",Pf).O("mdhd",function(G){x=Mh(G.reader,G.version).timescale}).box("hdlr",function(G){G=G.reader;G.skip(8);G=G.kb(4);var H=String.fromCharCode(G[0]);H+=String.fromCharCode(G[1]);H+=String.fromCharCode(G[2]);H+=String.fromCharCode(G[3]);switch(H){case "soun":A.set(d.P,x);break;case "vide":A.set(d.ea,x)}x=null}).parse(z),A.has(b.type)?c.g.timescale=A.get(b.type):null!=x&&(c.g.timescale=x),D=b.stream.closedCaptions&&
401
401
  0<b.stream.closedCaptions.size,C(J,a.g.pf(b.type,z),5);case 5:return C(J,Gi(a.g.T,b.type,z,null,b.stream,D),6);case 6:va(J,0);break;case 2:throw F=wa(J),b.$b=null,F;}})},a.g.lh(c.startTime,c.g),e.push(u())));a.m.sequenceMode&&(v=b.wa?b.wa.l:null,c.l!=v||b.Me)&&(b.Me=!1,e.push(Ri(a.g.T,b.type,c.startTime)));return C(y,Promise.all(e),0)})}
402
402
  function vk(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,r;return K(function(p){switch(p.g){case 1:h=d.closedCaptions&&0<d.closedCaptions.size;l=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.i.dispatchAllEmsgBoxes;m=a.i.parsePrftBox&&!a.C;if(l||m)k=new Kf;l&&k.O("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var y=u.reader.Tc();var z=u.reader.Tc();var x=u.reader.L();var A=u.reader.L();var B=u.reader.L();var D=u.reader.L();var F=e.startTime+A/x}else x=u.reader.L(),F=u.reader.dc()/
403
403
  x+e.timestampOffset,A=F-e.startTime,B=u.reader.L(),D=u.reader.L(),y=u.reader.Tc(),z=u.reader.Tc();u=u.reader.kb(u.reader.getLength()-u.reader.oa());if(v&&v.includes(y)||a.i.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==y?a.g.mh():(v=(new Map).set("detail",{startTime:F,endTime:F+B/x,schemeIdUri:y,value:z,timescale:x,presentationTimeDelta:A,eventDuration:B,id:D,messageData:u}),v=new Q("emsg",v),v.cancelable=!0,a.g.onEvent(v),v.defaultPrevented||"https://aomedia.org/emsg/ID3"!=y&&"https://developer.apple.com/streaming/emsg-id3"!=
@@ -406,10 +406,10 @@ a.C=!0}});(l||m)&&k.parse(f);return C(p,zk(a,b,c),2);case 2:return nf(a.l),n=b.W
406
406
  function qk(a){return a&&a.type==Bc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
407
407
  function wk(a,b,c,d){var e,f,g,h,k;return K(function(l){switch(l.g){case 1:if(c instanceof uh&&(e=c.g))return l.return(e);f=null;if(b.pa){var m=b.pa;if(m.g.has(c)){var n=m.g.get(c);d&&(n.h=d);m.g.delete(c);f=n.g}else f=null}f||(f=mk(a,c,b.stream,d));g=0;b.X&&(g=b.X.g);b.Ha=f;return C(l,f.promise,2);case 2:h=l.h;b.Ha=null;k=h.data;if(!c.aes128Key){l.B(3);break}return C(l,yk(k,c.aes128Key,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
408
408
  function mk(a,b,c,d){var e=b instanceof R?b:void 0,f=e?1:0;b=Uj(b.Y(),b.Ka,b.ra,a.i.retryParameters,d);return a.g.Lb.request(kf,b,{type:f,stream:c,segment:e})}
409
- function jk(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.mb=!1,b.Nd=!1,b.nd=0,b.Cc=!0,b.wa=null,b.$b=null,b.X=null,b.pa&&Rj(b.pa),d?(e=a.g.ud(),f=a.g.T.getDuration(),C(g,a.g.T.remove(b.type,e+d,f),3)):C(g,Oi(a.g.T,b.type),4);if(3!=g.g)return nf(a.l),c?C(g,a.g.T.flush(b.type),3):g.B(3);nf(a.l);b.Cc=!1;b.endOfStream=!1;b.xa||b.ab||dk(a,b,0);E(g)})}
410
- function dk(a,b,c){var d=b.type;if(d!=Bc||a.h.has(d))b.ab=(new hd(function(){var e;return K(function(f){if(1==f.g)return sa(f,2),C(f,nk(a,b),4);if(2!=f.g)return va(f,0);e=wa(f);if(a.g)a.g.onError(e);E(f)})})).U(c)}function Xj(a){null!=a.ab&&(a.ab.stop(),a.ab=null)}function Yj(a){return K(function(b){return a.Ha?C(b,a.Ha.abort(),0):b.B(0)})}
411
- function pk(a,b,c){var d;return K(function(e){if(1==e.g)return C(e,Ke(a.G),2);nf(a.l);d=0===a.i.maxDisabledTime&&1011==c.code?1:a.i.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.de(b.stream,d),c.handled&&(c.severity=1));a.g.onError(c);c.handled||a.i.failureCallback(c);E(e)})};function Ak(a,b,c){var d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:var n=(new fc(a)).Ba.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Bk[d])return m.return(e);f=0;g=df([a],c);sa(m,2);g.method="HEAD";return C(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];va(m,3);break;case 2:k=wa(m);if(!k||1002!=k.code){m.B(3);break}g.method="GET";return C(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?e.toLowerCase().split(";").shift():
412
- "")}})}
409
+ function jk(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.mb=!1,b.Nd=!1,b.nd=0,b.Cc=!0,b.wa=null,b.$b=null,b.X=null,b.pa&&Rj(b.pa),d?(e=a.g.ud(),f=a.g.T.getDuration(),C(g,a.g.T.remove(b.type,e+d,f),3)):C(g,Oi(a.g.T,b.type),4);if(3!=g.g)return nf(a.l),c?C(g,a.g.T.flush(b.type),3):g.B(3);nf(a.l);b.Cc=!1;b.endOfStream=!1;b.xa||b.bb||dk(a,b,0);E(g)})}
410
+ function dk(a,b,c){var d=b.type;if(d!=Bc||a.h.has(d))b.bb=(new hd(function(){var e;return K(function(f){if(1==f.g)return sa(f,2),C(f,nk(a,b),4);if(2!=f.g)return va(f,0);e=wa(f);if(a.g)a.g.onError(e);E(f)})})).U(c)}function Xj(a){null!=a.bb&&(a.bb.stop(),a.bb=null)}function Yj(a){return K(function(b){return a.Ha?C(b,a.Ha.abort(),0):b.B(0)})}
411
+ function pk(a,b,c){var d;return K(function(e){if(1==e.g)return C(e,Ke(a.G),2);nf(a.l);d=0===a.i.maxDisabledTime&&1011==c.code?1:a.i.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.de(b.stream,d),c.handled&&(c.severity=1));a.g.onError(c);c.handled||a.i.failureCallback(c);E(e)})};function Ak(a,b,c){var d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:var n=(new fc(a)).Ba.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Bk[d])return m.return(e);f=0;g=df([a],c);sa(m,2);g.method="HEAD";return C(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];va(m,3);break;case 2:k=wa(m);if(!k||1002!=k.code&&1001!=k.code){m.B(3);break}g.method="GET";return C(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
412
+ e.toLowerCase().split(";").shift():"")}})}
413
413
  var Bk={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"};function Ck(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Ck(g,a)}).join("");var c=[],d=700<=a.fontWeight,e="italic"==a.fontStyle,f=a.textDecoration.includes("underline");d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=Dk(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=Dk(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=t(h);h=k.next().value;k=k.next().value;
414
414
  return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
415
415
  function Dk(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7<a.length&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
@@ -443,13 +443,13 @@ Lk.prototype.isTextVisible=Lk.prototype.isTextVisible;Lk.prototype.remove=Lk.pro
443
443
  break;case "right":g.push("align:right");break;case Eb:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}N("shaka.text.WebVttGenerator",function(){});function Vk(a,b){this.h=a;this.g=b;this.j="";this.o=void 0;this.i=!1;this.m=!0;this.l=!1}Vk.prototype.configure=function(a){this.g=a};
444
444
  function Wk(a,b,c){try{if(!a.g.enabled)return b;var d=Xk(a);a:{switch(c.toLowerCase()){case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":var e=Yk;break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":e=Zk;break a}e=void 0}d.ot=e;d.su=!0;var f=$k(d);return al(b,f)}catch(g){return Ua("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}
445
445
  function Xk(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.o,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}function bl(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,Xk(a));c.pr=a.h.td();var e=c.ot===cl||c.ot===Yk;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=dl(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=$k(c);f&&(b.uris=b.uris.map(function(g){return al(g,f)}))}}}
446
- function el(a){if(0===a.type)return fl;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?Yk:cl;if("audio"==b)return gl;if("text"==b)return"application/mp4"===a.mimeType?kl:ll}}function ml(a,b){b=a.h.fb()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
446
+ function el(a){if(0===a.type)return fl;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?Yk:cl;if("audio"==b)return gl;if("text"==b)return"application/mp4"===a.mimeType?kl:ll}}function ml(a,b){b=a.h.gb()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
447
447
  function nl(a,b){var c=a.h.vb();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case cl:return a.videoBandwidth||NaN;case gl:return a.audioBandwidth||NaN;default:return a.bandwidth}}
448
448
  function $k(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
449
449
  l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function dl(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=$k(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
450
450
  function al(a,b){if(!b||a.includes("offline:"))return a;a=new fc(a);a.g.set("CMCD",b);return a.toString()}var Zk="m",gl="a",cl="v",Yk="av",fl="i",ll="c",kl="tt";N("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",hg:"s",OTHER:"o"});function ol(){}
451
451
  function pl(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=We(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=We(l)),k=pl(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ra("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Ta("Unexpected number of arguments for "+k),a[h]=b[h]):(Ra("Invalid config, unrecognized key "+
452
- k),g=!1)}return g}function ql(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function rl(a,b){return a&&b}N("shaka.util.ConfigUtils",ol);ol.convertToConfigObject=ql;ol.mergeConfigObjects=pl;function sl(){this.g=null;this.h=[]}function tl(a,b){return K(function(c){if(1==c.g)return a.g?C(c,new Promise(function(d){return a.h.push(d)}),2):c.B(2);a.g=b;E(c)})}sl.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function ul(){}function vl(a){a=Df(a);return(new fc(a)).eb}function wl(a,b,c){function d(h){qb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(mb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new O(2,6,6015);var e;"string"==typeof b?e=Ff(b,!0):e=b;a=Df(a);a=Ff(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function xl(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Df(a).split("skd://").pop();return wl(a,c,b)}
452
+ k),g=!1)}return g}function ql(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function rl(a,b){return a&&b}N("shaka.util.ConfigUtils",ol);ol.convertToConfigObject=ql;ol.mergeConfigObjects=pl;function sl(){this.g=null;this.h=[]}function tl(a,b){return K(function(c){if(1==c.g)return a.g?C(c,new Promise(function(d){return a.h.push(d)}),2):c.B(2);a.g=b;E(c)})}sl.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function ul(){}function vl(a){a=Df(a);return(new fc(a)).fb}function wl(a,b,c){function d(h){qb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(mb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new O(2,6,6015);var e;"string"==typeof b?e=Ff(b,!0):e=b;a=Df(a);a=Ff(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function xl(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Df(a).split("skd://").pop();return wl(a,c,b)}
453
453
  function yl(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}N("shaka.util.FairPlayUtils",ul);ul.commonFairPlayResponse=function(a,b){if(2===a){try{var c=Af(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=nb(Xf(c)))}};ul.expressplayFairPlayRequest=function(a,b){yl(a,b)};
454
454
  ul.conaxFairPlayRequest=function(a,b){yl(a,b)};ul.ezdrmFairPlayRequest=function(a,b){yl(a,b)};ul.verimatrixFairPlayRequest=function(a,b){2===a&&(a=mb(b.body),a=Wf(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Ef("spc="+a))};ul.expressplayInitDataTransform=function(a,b,c){return xl(a,b,c)};
455
455
  ul.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Df(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=pb(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return wl(a,d,b)};ul.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Df(a).split(";").pop();return wl(a,c,b)};ul.verimatrixInitDataTransform=function(a,b,c){return xl(a,b,c)};ul.initDataTransform=wl;
@@ -466,7 +466,7 @@ sourceBufferExtraFeatures:"",forceTransmux:!1,insertFakeEncryptionInInit:!0},off
466
466
  maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:!1}};e.trackSelectionCallback=function(h){return K(function(k){return k.return(Bl(h,g.preferredAudioLanguage,g.preferredVideoHdrLevel))})};
467
467
  return g}function Cl(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return pl(a,b,c||Al(),d,"")}
468
468
  function Bl(a,b,c){var d=c;"AUTO"==d&&(d=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=fd(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return Zc(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&480>=h.height});g.length&&(g.sort(function(h,k){return k.height-
469
- h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Bc&&"image"!=c.type||b.push(c);return b}N("shaka.util.PlayerConfiguration",zl);zl.mergeConfigObjects=Cl;zl.createDefault=Al;function Dl(){this.g=null;this.h=[]}function El(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function Fl(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Gl(){this.i=this.h=null;this.g=[]}function Hl(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function Il(){this.u=this.A=this.G=this.C=this.s=this.j=this.F=this.m=this.i=this.K=this.N=this.H=this.I=this.J=this.l=this.o=NaN;this.g=new Dl;this.h=new Gl};function V(a,b){Ve.call(this);var c=this;this.l=Jl;this.jd=this.g=null;this.Z=!1;this.qd=new of;this.qb=new of;this.m=new of;this.C=this.G=this.o=this.H=null;this.rd=0;this.W=new sl;this.ka=this.aa=this.i=this.xd=this.F=this.j=this.la=this.J=this.Jf=this.V=this.ua=this.K=this.I=this.bb=null;this.Bc=!1;this.ye=this.s=null;this.Ee=1E9;this.zc=[];this.N=NaN;this.h=Kl(this);this.De={width:Infinity,height:Infinity};this.u=null;this.Aa=new we(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount,
469
+ h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Bc&&"image"!=c.type||b.push(c);return b}N("shaka.util.PlayerConfiguration",zl);zl.mergeConfigObjects=Cl;zl.createDefault=Al;function Dl(){this.g=null;this.h=[]}function El(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function Fl(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Gl(){this.i=this.h=null;this.g=[]}function Hl(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function Il(){this.u=this.A=this.G=this.C=this.s=this.j=this.F=this.m=this.i=this.K=this.N=this.H=this.I=this.J=this.l=this.o=NaN;this.g=new Dl;this.h=new Gl};function V(a,b){Ve.call(this);var c=this;this.l=Jl;this.jd=this.g=null;this.Z=!1;this.qd=new of;this.qb=new of;this.m=new of;this.C=this.G=this.o=this.H=null;this.rd=0;this.W=new sl;this.ka=this.aa=this.i=this.xd=this.F=this.j=this.la=this.J=this.Jf=this.V=this.ua=this.K=this.I=this.cb=null;this.Bc=!1;this.ye=this.s=null;this.Ee=1E9;this.zc=[];this.N=NaN;this.h=Kl(this);this.De={width:Infinity,height:Infinity};this.u=null;this.Aa=new we(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount,
470
470
  this.h.preferredVideoHdrLevel,this.h.preferredVideoLayout,this.h.preferredAudioLabel,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);this.Va=this.h.preferredTextLanguage;this.ic=this.h.preferredTextRole;this.yc=this.h.preferForcedSubs;this.rb=[];b&&b(this);this.V=Ll(this);this.H=Ml(this);this.H.af(this.h.streaming.forceHTTPS);this.A=null;Nl&&(this.A=Nl());this.qd.D(window,"online",function(){Ol(c);c.We()});this.od=new id(function(){return Pl(c)});a&&(le("Player",
471
471
  "Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Ac(a,!0))}oa(V,Ve);function Ql(a){null!=a.J&&(ki(a.J),a.J.release(),a.J=null)}
472
472
  function Rl(a,b){if(b.lcevc.enabled){var c=a.vb();c&&c[0]&&"video/mp2t"==c[0].videoMimeType&&(md()||navigator.userAgent.match(/Edge\//))&&(b.mediaSource.forceTransmux||Ta("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled."));Ql(a);null==a.J&&(a.J=new ji(a.g,a.Jf,b.lcevc),a.G&&(a.G.N=a.J))}else Ql(a)}function Sl(a,b){return new Q(a,b)}q=V.prototype;
@@ -474,7 +474,7 @@ q.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l
474
474
  function Ul(a,b){a.dispatchEvent(Sl("onstatechange",(new Map).set("state",b)))}
475
475
  q.Ac=function(a,b){b=void 0===b?!0:b;var c=this,d,e;return K(function(f){switch(f.g){case 1:if(c.l==Tl)throw new O(2,7,7E3);if(!c.g||c.g==a){f.B(2);break}return C(f,c.detach(),2);case 2:return C(f,Vl(c,"attach"),4);case 4:if(f.h)return f.return();sa(f,5,6);Ul(c,"attach");d=function(){var g=Wl(c);g&&Xl(c,g)};c.qb.D(a,"error",d);c.g=a;if(!b||!jd()||c.G){f.B(6);break}return C(f,Yl(c),6);case 6:xa(f);c.W.release();ya(f,0);break;case 5:return e=wa(f),C(f,c.detach(),10);case 10:throw e;}})};
476
476
  q.ng=function(a){this.Jf=a};q.detach=function(a){a=void 0===a?!1:a;var b=this;return K(function(c){if(1==c.g){if(b.l==Tl)throw new O(2,7,7E3);return C(c,b.hc(!1,a),2)}if(3!=c.g)return C(c,Vl(b,"detach"),3);if(c.h)return c.return();try{b.g&&(b.qb.xb(),b.g=null),Ul(b,"detach"),b.A&&!a&&b.A.release()}finally{b.W.release()}E(c)})};function Vl(a,b){var c;return K(function(d){return 1==d.g?(c=++a.rd,C(d,tl(a.W,b),2)):c!=a.rd?(a.W.release(),d.return(!0)):d.return(!1)})}
477
- q.hc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n;return K(function(r){switch(r.g){case 1:return c.l!=Tl&&(c.l=Jl),C(r,Vl(c,"unload"),2);case 2:if(r.h)return r.return();ta(r,3);c.Bc=!1;Ul(c,"unload");a&&!jd()&&(a=!1);Ql(c);d=c.rb.map(function(p){return p()});c.rb=[];return C(r,Promise.all(d),5);case 5:c.dispatchEvent(Sl("unloading"));c.ua&&(c.ua.release(),c.ua=null);c.g&&c.m.xb();c.od.stop();c.bb&&(c.bb.release(),c.bb=null);if(!c.F){r.B(6);break}return C(r,c.F.stop(),
477
+ q.hc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n;return K(function(r){switch(r.g){case 1:return c.l!=Tl&&(c.l=Jl),C(r,Vl(c,"unload"),2);case 2:if(r.h)return r.return();ta(r,3);c.Bc=!1;Ul(c,"unload");a&&!jd()&&(a=!1);Ql(c);d=c.rb.map(function(p){return p()});c.rb=[];return C(r,Promise.all(d),5);case 5:c.dispatchEvent(Sl("unloading"));c.ua&&(c.ua.release(),c.ua=null);c.g&&c.m.xb();c.od.stop();c.cb&&(c.cb.release(),c.cb=null);if(!c.F){r.B(6);break}return C(r,c.F.stop(),
478
478
  7);case 7:c.F=null,c.xd=null;case 6:if(!c.s){r.B(8);break}return C(r,c.s.stop(),8);case 8:if(!c.j){r.B(10);break}return C(r,c.j.destroy(),11);case 11:c.j=null;case 10:c.I&&(c.I.release(),c.I=null);c.C&&(c.C.release(),c.C=null);if(!c.G){r.B(12);break}return C(r,c.G.destroy(),13);case 13:c.G=null;case 12:if(c.A&&!b)c.A.onAssetUnload();c.g&&Kk(c.g);if(!c.g||!c.g.src){r.B(14);break}return C(r,new Promise(function(p){return(new id(p)).U(.1)}),15);case 15:c.g.removeAttribute("src"),c.g.load();case 14:if(!c.o){r.B(16);
479
479
  break}return C(r,c.o.destroy(),17);case 17:c.o=null;case 16:c.aa=null;c.K=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(k=m.next();!k.done;k=m.next())n=k.value,n.segmentIndex&&n.segmentIndex.release()}c.i=null;c.u=new Il;c.Ce=null;c.zc=[];c.N=NaN;Zl(c);case 3:xa(r);c.W.release();ya(r,4);break;case 4:if(a&&jd()&&!c.G)return C(r,Yl(c),0);
480
480
  r.B(0)}})};q.Lh=function(a){this.ka=a};
@@ -483,7 +483,7 @@ d.ka=b;d.Bc=!1;d.dispatchEvent(Sl("loading"));h=Date.now()/1E3;d.u=new Il;d.aa=a
483
483
  cm(d,c),0)})},"parseManifestInner_"),13);case 13:return C(m,g(function(){return K(function(n){return C(n,dm(d),0)})},"initializeDrmInner_"),14);case 14:return C(m,g(function(){return K(function(n){return C(n,em(d,h),0)})},"loadInner_"),10);case 16:return C(m,g(function(){return K(function(n){return C(n,fm(d,h,c),0)})},"srcEqualsInner_"),10);case 10:d.dispatchEvent(Sl("loaded"));va(m,0);break;case 5:l=wa(m);if(7E3==l.code){m.B(18);break}return C(m,d.hc(!1),18);case 18:throw l;}})};
484
484
  function $l(a){var b,c;return K(function(d){if(1==d.g)return b=a.h.manifest.retryParameters,C(d,Ak(a.aa,a.H,b),2);c=d.h;"application/x-mpegurl"==c&&td()&&(c="application/vnd.apple.mpegurl");return d.return(c)})}function am(a,b){if(!jd())return!0;if(b){if(""==(a.g||ld()).canPlayType(b))return!1;if(!(jd()&&b in ph))return!0;if("application/x-mpegurl"===b||"application/vnd.apple.mpegurl"===b){if(a.h.streaming.preferNativeHls)return!0;if(td())return a.h.streaming.useNativeHlsOnSafari}}return!1}
485
485
  function Yl(a){var b,c,d,e,f;return K(function(g){if(1==g.g)return Ul(a,"media-source"),b=a.h.textDisplayFactory,c=b(),a.Ce=b,d=gm(a.g,c,function(h,k,l){hm(a,h,k,l)},a.J),d.configure(a.h.mediaSource),e=a.h.manifest,f=e.segmentRelativeVttTiming,d.W=f,C(g,d.J,2);a.G=d;E(g)})}
486
- function cm(a,b){var c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g)return c=a.H,Ul(a,"manifest-parser"),a.xd=oh(a.aa,b||null),a.F=a.xd(),d=We(a.h.manifest),a.g&&"AUDIO"===a.g.nodeName&&(d.disableVideo=!0),a.F.configure(d),a.ua=new Gj(function(){return a.Nb()}),a.ua.addEventListener("regionadd",function(n){n=n.region;im(a,"timelineregionadded",n);if(a.A)a.A.onDashTimedMetadata(n)}),a.la=null,a.h.streaming.observeQualityChanges&&(a.la=new Cj(function(){return a.fb()}),a.la.addEventListener("qualitychange",
486
+ function cm(a,b){var c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g)return c=a.H,Ul(a,"manifest-parser"),a.xd=oh(a.aa,b||null),a.F=a.xd(),d=We(a.h.manifest),a.g&&"AUDIO"===a.g.nodeName&&(d.disableVideo=!0),a.F.configure(d),a.ua=new Gj(function(){return a.Nb()}),a.ua.addEventListener("regionadd",function(n){n=n.region;im(a,"timelineregionadded",n);if(a.A)a.A.onDashTimedMetadata(n)}),a.la=null,a.h.streaming.observeQualityChanges&&(a.la=new Cj(function(){return a.gb()}),a.la.addEventListener("qualitychange",
487
487
  function(n){var r=n.quality;n=n.position;r=(new Map).set("mediaQuality",{bandwidth:r.bandwidth,audioSamplingRate:r.audioSamplingRate,codecs:r.codecs,contentType:r.contentType,frameRate:r.frameRate,height:r.height,mimeType:r.mimeType,channelsCount:r.channelsCount,pixelAspectRatio:r.pixelAspectRatio,width:r.width}).set("position",n);a.dispatchEvent(Sl("mediaqualitychanged",r))})),e={networkingEngine:c,filter:function(n){return jm(a,n)},makeTextStreamsForClosedCaptions:function(n){return km(a,n)},onTimelineRegionAdded:function(n){var r=
488
488
  a.ua;a:{var p=t(r.g);for(var u=p.next();!u.done;u=p.next())if(u=u.value,u.schemeIdUri==n.schemeIdUri&&u.id==n.id&&u.startTime==n.startTime&&u.endTime==n.endTime){p=u;break a}p=null}null==p&&(r.g.add(n),n=new Q("regionadd",new Map([["region",n]])),r.dispatchEvent(n))},onEvent:function(n){return a.dispatchEvent(n)},onError:function(n){return Xl(a,n)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",
489
489
  !0)},updateDuration:function(){a.j&&a.j.updateDuration()},newDrmInfo:function(n){var r=a.o?a.o.g:null;r&&a.o.s&&lm(a,r.keySystem,n)},onManifestUpdated:function(){var n=(new Map).set("isLive",a.S());a.dispatchEvent(Sl("manifestupdated",n));if(a.A)a.A.onManifestUpdated(a.S())},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()}},f=Date.now()/1E3,Ul(a,"manifest"),g=a,C(m,a.F.start(a.aa,e),2);g.i=m.h;h=Sl("manifestparsed");a.dispatchEvent(h);if(0==a.i.variants.length)throw new O(2,4,4036);
@@ -491,26 +491,26 @@ mm(a.i);k=Date.now()/1E3;l=k-f;a.u.F=l;E(m)})}function dm(a){var b,c;return K(fu
491
491
  function em(a,b){var c,d,e,f,g,h,k,l,m,n,r,p,u,v,y,z,x,A,B;return K(function(D){switch(D.g){case 1:Ul(a,"load");c=a.g;a.I=new zj({vd:function(){return c.playbackRate},Gc:function(){return c.defaultPlaybackRate},cf:function(F){c.playbackRate=F},Nf:function(F){c.currentTime+=F}});d=function(){return qm(a)};e=function(){return rm(a)};a.m.D(c,"playing",d);a.m.D(c,"pause",d);a.m.D(c,"ended",d);a.m.D(c,"ratechange",e);Rl(a,a.h);f=a.h.abrFactory;a.s&&a.ye==f||(a.ye=f,a.s=f(),"function"!=typeof a.s.setMediaElement&&
492
492
  (le("AbrManager","Please use an AbrManager with setMediaElement function."),a.s.setMediaElement=function(){}),a.s.configure(a.h.abr));a.Aa=new we(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount,a.h.preferredVideoHdrLevel,a.h.preferredVideoLayout,a.h.preferredAudioLabel,a.h.mediaSource.codecSwitchingStrategy,a.h.manifest.dash.enableAudioGroups);a.Va=a.h.preferredTextLanguage;a.ic=a.h.preferredTextRole;a.yc=a.h.preferForcedSubs;sm(a.i.presentationTimeline,a.h.playRangeStart,
493
493
  a.h.playRangeEnd);a.s.init(function(F,J,G){a.j&&F!=a.j.j&&tm(a,F,!0,void 0===J?!1:J,void 0===G?0:G)});a.s.setMediaElement(c);Ad(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes);a.j=um(a);a.j.configure(a.h.streaming);a.l=vm;c.textTracks&&a.m.D(c.textTracks,"addtrack",function(F){if(F.track)switch(F=F.track,F.kind){case "chapters":wm(a,F)}});a.dispatchEvent(Sl("streaming"));g=null;(h=a.j.j)||(g=xm(a,!0));k=[];l=h||g;m=t([l.video,l.audio]);for(n=m.next();!n.done;n=
494
- m.next())(r=n.value)&&!r.segmentIndex&&k.push(r.createSegmentIndex());if(!(0<k.length)){D.B(2);break}return C(D,Promise.all(k),2);case 2:if(a.F&&a.F.onInitialVariantChosen)a.F.onInitialVariantChosen(l);sm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.C=ym(a,a.ka);a.bb=zm(a,b);p=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Am(a,c,p);if(h){D.B(4);break}tm(a,g,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){D.B(4);break}u=a.C;v=u.Xd;return C(D,Bm(g,a.C.hd()),6);case 6:v.call(u,
494
+ m.next())(r=n.value)&&!r.segmentIndex&&k.push(r.createSegmentIndex());if(!(0<k.length)){D.B(2);break}return C(D,Promise.all(k),2);case 2:if(a.F&&a.F.onInitialVariantChosen)a.F.onInitialVariantChosen(l);sm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.C=ym(a,a.ka);a.cb=zm(a,b);p=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Am(a,c,p);if(h){D.B(4);break}tm(a,g,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){D.B(4);break}u=a.C;v=u.Xd;return C(D,Bm(g,a.C.hd()),6);case 6:v.call(u,
495
495
  D.h);case 4:return a.C.Wd(),y=a.Yb().find(function(F){return F.active}),y||((z=ce(a.i.textStreams,a.Va,a.ic,a.yc)[0]||null)&&Hl(a.u.h,z,!0),g&&(z?(g.audio&&Cm(a,g.audio,z)&&(a.Z=!0),a.Z&&a.G.F.setTextVisibility(!0),Dm(a)):a.Z=!1),z&&(a.h.streaming.alwaysStreamText||a.Be())&&ik(a.j,z)),C(D,a.j.start(),7);case 7:a.h.abr.enabled&&(a.s.enable(),Em(a));Fm(a);Gm(a);a.i.variants.some(function(F){return F.primary});(x=a.S())&&(a.h.streaming.liveSync||a.i.serviceDescription)?(A=function(){return Hm(a)},a.m.D(c,
496
- "timeupdate",A)):x||(B=function(){return Im(a)},a.m.D(c,"timeupdate",B),Im(a));if(a.A)a.A.onManifestUpdated(x);a.Bc=!0;a.m.ga(c,"loadedmetadata",function(){a.u.m=Date.now()/1E3-b});E(D)}})}
496
+ "timeupdate",A)):x||(B=function(){return Im(a)},a.m.D(c,"timeupdate",B),Im(a));if(a.A)a.A.onManifestUpdated(x);a.Bc=!0;a.m.ha(c,"loadedmetadata",function(){a.u.m=Date.now()/1E3-b});E(D)}})}
497
497
  function bm(a,b){var c,d,e,f;return K(function(g){return 1==g.g?(c=Cc,d=Date.now()/1E3,e=!0,a.o=nm(a,{Lb:a.H,onError:function(h){Xl(a,h)},Id:function(h){om(a,h)},onExpirationUpdated:function(h,k){pm(a,h,k)},onEvent:function(h){a.dispatchEvent(h);"drmsessionupdate"==h.type&&e&&(e=!1,a.u.j=Date.now()/1E3-d)}}),a.o.configure(a.h.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:{id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,
498
- mimeType:b?Kc(b):"",codecs:b?Lc(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.da,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.o.Z=!0,C(g,Fg(a.o,[f],[]),2)):C(g,a.o.Ac(a.g),0)})}
498
+ mimeType:b?Kc(b):"",codecs:b?Lc(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.ea,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.o.Z=!0,C(g,Fg(a.o,[f],[]),2)):C(g,a.o.Ac(a.g),0)})}
499
499
  function fm(a,b,c){var d,e,f,g,h,k,l,m,n,r;return K(function(p){if(1==p.g)return Ul(a,"src-equals"),d=a.g,a.C=new oj(d),e=!1,a.rb.push(function(){e=!0}),null!=a.ka&&a.C.Xd(a.ka),a.I=new zj({vd:function(){return d.playbackRate},Gc:function(){return d.defaultPlaybackRate},cf:function(u){d.playbackRate=u},Nf:function(u){d.currentTime+=u}}),f=a.h.streaming.rebufferingGoal,Am(a,d,f),g=function(){return qm(a)},h=function(){return rm(a)},a.m.D(d,"playing",g),a.m.D(d,"pause",g),a.m.D(d,"ended",g),a.m.D(d,
500
- "ratechange",h),"none"!=d.preload&&a.m.ga(d,"loadedmetadata",function(){a.u.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.D(d.audioTracks,"addtrack",function(){return Fm(a)}),a.m.D(d.audioTracks,"removetrack",function(){return Fm(a)}),a.m.D(d.audioTracks,"change",function(){return Fm(a)})),d.textTracks&&(a.m.D(d.textTracks,"addtrack",function(u){if(u.track)switch(u=u.track,u.kind){case "metadata":Jm(a,u);break;case "chapters":wm(a,u);break;default:Fm(a)}}),a.m.D(d.textTracks,"removetrack",function(){return Fm(a)}),
501
- a.m.D(d.textTracks,"change",function(){return Fm(a)})),d.src=Wk(a.V,a.aa,c),(pd()||od("Web0S"))&&d.load(),a.l=Km,a.dispatchEvent(Sl("streaming")),k=new Le,fj(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.C.Wd();k.resolve()}),fj(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var u;return K(function(v){if(1==v.g)return Lm(a),u=Mm(a),u.find(function(y){return"disabled"!=y.mode})?(0<u.length&&(a.Z=!0),v.B(2)):C(v,new Promise(function(y){a.m.ga(d.textTracks,"change",y);(new id(y)).U(1)}),2);if(e)return v.return();
502
- Nm(a);E(v)})}),d.error?k.reject(Wl(a)):"none"==d.preload&&(Ta('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),k.resolve()),a.m.ga(d,"error",function(){k.reject(Wl(a))}),C(p,k,2);(l=a.S())&&a.h.streaming.liveSync?(m=function(){return Hm(a)},a.m.D(d,"timeupdate",m)):l||(n=function(){return Im(a)},a.m.D(d,"timeupdate",
500
+ "ratechange",h),"none"!=d.preload&&a.m.ha(d,"loadedmetadata",function(){a.u.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.D(d.audioTracks,"addtrack",function(){return Fm(a)}),a.m.D(d.audioTracks,"removetrack",function(){return Fm(a)}),a.m.D(d.audioTracks,"change",function(){return Fm(a)})),d.textTracks&&(a.m.D(d.textTracks,"addtrack",function(u){if(u.track)switch(u=u.track,u.kind){case "metadata":Jm(a,u);break;case "chapters":wm(a,u);break;default:Fm(a)}}),a.m.D(d.textTracks,"removetrack",function(){return Fm(a)}),
501
+ a.m.D(d.textTracks,"change",function(){return Fm(a)})),d.src=Wk(a.V,a.aa,c),(pd()||od("Web0S"))&&d.load(),a.l=Km,a.dispatchEvent(Sl("streaming")),k=new Le,fj(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.C.Wd();k.resolve()}),fj(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var u;return K(function(v){if(1==v.g)return Lm(a),u=Mm(a),u.find(function(y){return"disabled"!=y.mode})?(0<u.length&&(a.Z=!0),v.B(2)):C(v,new Promise(function(y){a.m.ha(d.textTracks,"change",y);(new id(y)).U(1)}),2);if(e)return v.return();
502
+ Nm(a);E(v)})}),d.error?k.reject(Wl(a)):"none"==d.preload&&(Ta('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),k.resolve()),a.m.ha(d,"error",function(){k.reject(Wl(a))}),C(p,k,2);(l=a.S())&&a.h.streaming.liveSync?(m=function(){return Hm(a)},a.m.D(d,"timeupdate",m)):l||(n=function(){return Im(a)},a.m.D(d,"timeupdate",
503
503
  n),Im(a));a.A&&(a.A.onManifestUpdated(l),l&&(r=a.Nb().end,a.m.D(d,"progress",function(){var u=a.Nb().end;r!=u&&(a.A.onManifestUpdated(a.S()),r=u)})));a.Bc=!0;E(p)})}function Lm(a){var b=a.h.preferredAudioLanguage;""!=b&&a.Uf(b,a.h.preferredVariantRole)}function Nm(a){var b=a.h.preferredTextLanguage;""!=b&&a.Vf(b,a.h.preferredTextRole,a.h.preferForcedSubs)}
504
504
  function Jm(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Om(a,e.startTime,e.endTime,e.type,e.value),a.A)a.A.onCueMetadataChange(e.value)});var c=(new id(function(){var d=Pm(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).fc().U(.5);a.rb.push(function(){c.stop()})}}
505
505
  function hm(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=t(e.frames),k=h.next();!k.done;k=h.next())Om(a,f,g,"org.id3",k.value);if(a.A)a.A.onHlsTimedMetadata(e,f)}}function Om(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Sl("metadata",b))}
506
506
  function wm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new id(function(){b.mode="hidden"})).fc().U(.5);a.rb.push(function(){c.stop()})}}function mm(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}q.th=function(){for(var a=this.W;a.g;)a.release()};function nm(a,b){return new yg(b,a.h.drm.updateExpirationTime)}
507
507
  function Ml(a){return new $e(function(b,c,d){a.s&&a.s.segmentDownloaded(b,c,d)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(Sl("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(Sl("downloadfailed",b))},function(b,c,d){var e=a.V;d=void 0===d?{}:d;if(e.g.enabled)if("HEAD"===c.method)bl(e,c);else switch(b){case 0:try{if(e.g.enabled){if(d.type){a:{switch(d.type){case 4:var f=
508
508
  "d";break a;case 3:case 2:f="h";break a;case 5:f="s";break a}f=void 0}e.o=f}bl(e,c,{ot:Zk,su:!e.i})}}catch(m){Ua("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",m)}break;case kf:b=d;try{if(e.g.enabled){var g=b.segment;f=0;g&&(f=g.endTime-g.startTime);var h={d:1E3*f,st:e.h.S()?"l":"v"};h.ot=el(b);var k=h.ot===cl||h.ot===gl||h.ot===Yk||h.ot===kl,l=b.stream;l&&(k&&(h.bl=ml(e,l.type)),l.bandwidth&&(h.br=l.bandwidth/1E3));k&&h.ot!==kl&&(h.tb=nl(e,h.ot)/1E3);bl(e,c,h)}}catch(m){Ua("CMCD_SEGMENT_ERROR",
509
- "Could not generate segment CMCD data.",m)}break;case 2:case 5:case 6:bl(e,c,{ot:"k"});break;case 4:bl(e,c,{ot:"o"})}},function(b,c,d,e){a.F&&a.F.banLocation&&a.F.banLocation(e)})}function ym(a,b){return new pj(a.g,a.i,a.h.streaming,b,function(){a.bb&&Bj(a.bb,!0);a.j&&a.j.Wc();a.K&&Qm(a)},function(c){return a.dispatchEvent(c)})}
509
+ "Could not generate segment CMCD data.",m)}break;case 2:case 5:case 6:bl(e,c,{ot:"k"});break;case 4:bl(e,c,{ot:"o"})}},function(b,c,d,e){a.F&&a.F.banLocation&&a.F.banLocation(e)})}function ym(a,b){return new pj(a.g,a.i,a.h.streaming,b,function(){a.cb&&Bj(a.cb,!0);a.j&&a.j.Wc();a.K&&Qm(a)},function(c){return a.dispatchEvent(c)})}
510
510
  function zm(a,b){b=new Hj(a.ua,a.S()||0<b);b.addEventListener("enter",function(d){im(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){im(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(im(a,"timelineregionenter",e),im(a,"timelineregionexit",e))});var c=new Aj(a.g);c.g.add(b);a.la&&c.g.add(a.la);return c}
511
511
  function Am(a,b,c){a.K=new Ee;a.K.g=Ge;He(a.K,c,Math.min(.5,c/2));Zl(a);a.m.D(b,"waiting",function(){return Qm(a)});a.m.D(b,"stalled",function(){return Qm(a)});a.m.D(b,"canplaythrough",function(){return Qm(a)});a.m.D(b,"progress",function(){return Qm(a)})}
512
512
  function Qm(a){switch(a.l){case Km:if(a.g.ended)var b=!0;else{var c=yh(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case vm:a:if(a.g.ended||Ai(a.G))b=!0;else{if(a.i.presentationTimeline.S()){c=a.i.presentationTimeline.ub();var d=yh(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Ah(a.g.buffered,a.g.currentTime);c=a.K;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Fe:Ge;c.g=d;b!=d&&Zl(a)}function gm(a,b,c,d){return new si(a,b,c,d)}
513
- function Ll(a){return new Vk({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},fb:function(){return a.fb()},getCurrentTime:function(){return a.g?a.g.currentTime:0},td:function(){return a.td()},Fb:function(){return a.Fb()},vb:function(){return a.vb()},S:function(){return a.S()}},a.h.cmcd)}
513
+ function Ll(a){return new Vk({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},gb:function(){return a.gb()},getCurrentTime:function(){return a.g?a.g.currentTime:0},td:function(){return a.td()},Fb:function(){return a.Fb()},vb:function(){return a.vb()},S:function(){return a.S()}},a.h.cmcd)}
514
514
  function um(a){return new Vj(a.i,{ud:function(){return a.C?a.C.hd():0},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},T:a.G,Lb:a.H,onError:function(b){return Xl(a,b)},onEvent:function(b){return a.dispatchEvent(b)},mh:function(){a.F&&a.F.update&&a.F.update()},Qe:function(b,c,d){a.C&&a.C.Of();Qm(a);b=(new Map).set("start",b).set("end",c).set("contentType",d);a.dispatchEvent(Sl("segmentappended",b))},lh:function(b,c){(c=c.Le)&&a.la&&Ej(a.la,c,b)},pf:function(b,c){var d=a.o;if(d.h.parseInbandPsshEnabled&&
515
515
  !d.I&&["audio","video"].includes(b)){c=new ag(mb(c));var e=0,f=t(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=t(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;Og(d,"cenc",e);d=d.l}}else d=Promise.resolve();return d},nh:function(b,c,d){hm(a,b,c,d)},de:function(b,c){return a.de(b,c)}})}
516
516
  q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=ql(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(le("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(le("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
@@ -519,7 +519,7 @@ function Rm(a){if(a.F){var b=We(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.di
519
519
  e.destroy());d.h&&(d.h.j=c);a.Ce=b;a.j&&(b=a.j,(c=b.h.get(Bc))&&gk(b,c.stream,!0,0,!0))}a.s&&(a.s.configure(a.h.abr),a.h.abr.enabled?a.s.enable():a.s.disable(),Em(a));a.K&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),He(a.K,b,Math.min(.5,b/2)));a.i&&sm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.A&&a.A.configure(a.h.ads);a.V&&a.V.configure(a.h.cmcd)}q.getConfiguration=function(){var a=Kl(this);Cl(a,this.h,Kl(this));return a};
520
520
  q.Ag=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.Nb().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};q.xh=function(){for(var a in this.h)delete this.h[a];Cl(this.h,Kl(this),Kl(this));Rm(this)};q.Hg=function(){return this.l};q.ve=function(){return this.i?this.i.type:null};q.Lg=function(){return this.g};
521
521
  q.Fb=function(){return this.H};q.ue=function(){return this.aa};q.Bf=function(){return this.A?this.A:null};q.S=function(){return this.i?this.i.presentationTimeline.S():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Jb=function(){return this.i?this.i.presentationTimeline.Jb():!1};q.$g=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
522
- q.Nb=function(){if(this.i){if(!this.Bc&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Xb(),end:a.gb()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.Xg=function(){this.S()&&(this.g.currentTime=this.Nb().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.o?this.o.g:null};q.Ic=function(){return this.o?this.o.Ic():Infinity};
522
+ q.Nb=function(){if(this.i){if(!this.Bc&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Xb(),end:a.hb()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.Xg=function(){this.S()&&(this.g.currentTime=this.Nb().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.o?this.o.g:null};q.Ic=function(){return this.o?this.o.Ic():Infinity};
523
523
  q.te=function(){return this.o?this.o.te():[]};q.sd=function(){return this.o?this.o.sd():{}};q.ze=function(){return this.K?this.K.g==Ge:!1};q.td=function(){return this.g?this.I?this.I.h:1:0};q.hf=function(a){0==a?Ta("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.I.set(a),this.l==vm&&(this.s.playbackRateChanged(a),fk(this.j,1<Math.abs(a))))};q.qf=function(){var a=this.I.Gc();this.l==Km&&this.I.set(a);this.l==vm&&(this.I.set(a),this.s.playbackRateChanged(a),fk(this.j,!1))};
524
524
  q.vb=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,ae(e)){var f=Td(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return $d(g)}):[]};
525
525
  q.Yb=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=Ud(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Mm(this).map(function(f){return Yd(f)}):[]};q.Gg=function(){var a=this.zc;this.i&&(a=this.i.imageStreams);return a.map(function(b){return Vd(b)})};
@@ -538,7 +538,7 @@ q.Bg=function(a){if(!this.g||!this.g.src||!this.g.textTracks)return[];var b=Zc(a
538
538
  function Mm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Pm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Zm(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
539
539
  q.Gh=function(a){a=!!a;if(this.Z!=a){this.Z=a;if(this.l==vm)this.G.F.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=ce(this.i.textStreams,this.Va,this.ic,this.yc),0<a.length&&(ik(this.j,a[0]),Vm(this))):ek(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Mm(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Dm(this)}};
540
540
  q.Ng=function(){if(!this.S())return null;if(this.C)var a=this.C.hd();else{if(null==this.ka)return new Date;a=this.ka}if(this.i)return new Date(1E3*(this.i.presentationTimeline.i+a));if(this.g&&this.g.getStartDate){var b=this.g.getStartDate();return isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)}return null};
541
- q.Df=function(){if(!this.S())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.i);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.fb=function(){if(this.l==vm)return this.G.fb();var a={total:[],audio:[],video:[],text:[]};this.l==Km&&(a.total=Bh(this.g.buffered));return a};
541
+ q.Df=function(){if(!this.S())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.i);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.gb=function(){if(this.l==vm)return this.G.gb();var a={total:[],audio:[],video:[],text:[]};this.l==Km&&(a.total=Bh(this.g.buffered));return a};
542
542
  q.getStats=function(){if(this.l!=vm&&this.l!=Km)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};qm(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.u;b=
543
543
  Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.C&&(this.u.K=this.C.lf(),this.u.N=this.C.mf());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.u;var d=Number(c.totalVideoFrames);b.J=Number(c.droppedVideoFrames);b.I=d;this.u.H=Number(c.corruptedVideoFrames)}this.o?(c=this.o,c=c.H?c.H:NaN):c=NaN;this.u.s=c;if(this.l==vm){if(c=this.j.j)this.u.A=(this.I?this.I.h:1)*c.bandwidth;c&&c.video&&(b=this.u,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.S()&&(c=this.Df().valueOf()+
544
544
  1E3*a.currentTime,this.u.C=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.u.G=this.i.presentationTimeline.g);c=this.s.getBandwidthEstimate();this.u.u=c}this.l==Km&&(c=this.u,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var e=this.u;a=e.o;c=e.l;b=e.A;d=e.I;var f=e.J,g=e.H,h=e.N,k=e.K,l=e.u,m=e.i,n=e.m,r=e.F,p=e.j,u=El(e.g,"playing"),v=El(e.g,"paused"),y=El(e.g,"buffering"),z=e.s,x=e.C,A=e.G,B=Fl(e.g),D=[];e=t(e.h.g);for(var F=e.next();!F.done;F=e.next())F=F.value,D.push({timestamp:F.timestamp,
@@ -549,11 +549,11 @@ primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channel
549
549
  q.lg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,r,p,u,v,y,z,x;return K(function(A){switch(A.g){case 1:if(c.l!=vm&&c.l!=Km)throw new O(1,7,7004);if(b){A.B(2);break}return C(A,$m(c,a),3);case 3:b=A.h;case 2:if("text/vtt"!=b)throw new O(1,2,2017,a);d=Cc;e=c.g.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new O(1,4,4045);return C(A,bn(c,a,c.H,c.h.streaming.retryParameters),4);case 4:f=A.h;g=Oc[b];if(!g)throw new O(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
550
550
  vttOffset:0};l=mb(f);m=h.parseMedia(l,k,a);n=[];r={};p=t(m);for(u=p.next();!u.done;r={mc:r.mc},u=p.next())v=u.value,r.mc=wc([a],[v.payload])[0],y=new R(v.startTime,v.endTime,function(B){return function(){return[B.mc]}}(r),0,null,null,0,0,Infinity),r.mc.includes("#xywh")&&(z=r.mc.split("#xywh=")[1].split(","),4===z.length&&y.ag({height:parseInt(z[3],10),positionX:parseInt(z[0],10),positionY:parseInt(z[1],10),width:parseInt(z[2],10)})),n.push(y);x={id:c.Ee++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
551
551
  segmentIndex:new uj(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.xc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1};c.l==Km?c.zc.push(x):c.i.imageStreams.push(x);Fm(c);return A.return(Vd(x))}})};
552
- q.jg=function(a,b,c){var d=this,e,f,g,h;return K(function(k){switch(k.g){case 1:if(d.l!=vm&&d.l!=Km)throw new O(1,7,7004);if(c){k.B(2);break}return C(k,$m(d,a),3);case 3:c=k.h;case 2:return e=[],d.A&&(e=d.A.getCuePoints()),C(k,an(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Cf();h=g.find(function(l){return l.language==b});if(!h){k.B(5);break}return C(k,new Promise(function(l,m){d.m.ga(f,"load",l);d.m.ga(f,"error",function(){m(new O(1,2,2015))})}),6);case 6:return Fm(d),k.return(h);case 5:throw new O(1,
552
+ q.jg=function(a,b,c){var d=this,e,f,g,h;return K(function(k){switch(k.g){case 1:if(d.l!=vm&&d.l!=Km)throw new O(1,7,7004);if(c){k.B(2);break}return C(k,$m(d,a),3);case 3:c=k.h;case 2:return e=[],d.A&&(e=d.A.getCuePoints()),C(k,an(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Cf();h=g.find(function(l){return l.language==b});if(!h){k.B(5);break}return C(k,new Promise(function(l,m){d.m.ha(f,"load",l);d.m.ha(f,"error",function(){m(new O(1,2,2015))})}),6);case 6:return Fm(d),k.return(h);case 5:throw new O(1,
553
553
  2,2012);}})};function $m(a,b){var c;return K(function(d){switch(d.g){case 1:return sa(d,2),C(d,Ak(b,a.H,a.h.streaming.retryParameters),4);case 4:c=d.h;va(d,3);break;case 2:wa(d);case 3:if(c)return d.return(c);throw new O(1,2,2011,b);}})}
554
554
  function an(a,b,c,d,e,f,g){var h,k,l,m;return K(function(n){if(1==n.g)return"text/vtt"!=e||g.length?C(n,bn(a,b,a.H,a.h.streaming.retryParameters),3):n.B(2);2!=n.g&&(h=n.h,k=cn(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=vi(l),e="text/vtt");m=document.createElement("track");var r=a.V,p=b;try{if(r.g.enabled){var u=Xk(r);u.ot=ll;u.su=!0;var v=$k(u);var y=al(p,v)}else y=p}catch(z){Ua("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",z),y=p}m.src=y;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
555
555
  a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n.return(m)})}function bn(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){e=kf;f=df([b],d);f.method="GET";var k=a.V;try{k.g.enabled&&bl(k,f,{ot:ll,su:!0})}catch(l){Ua("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return C(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
556
- function cn(a,b,c,d){var e=Oc[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=mb(b),b=c.parseMedia(b,a,null),Uk(b,d);throw new O(2,2,2014,c);}q.bf=function(a,b){this.De.width=a;this.De.height=b};q.We=function(a){if(this.l==vm){var b=this.j;a=void 0===a?.1:a;if(b.l.g)b=!1;else if(b.s)b=!1;else{for(var c=t(b.h.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Mc||d.xa||d.ab||(d.Mc=!1,dk(b,d,a));b=!0}}else b=!1;return b};
556
+ function cn(a,b,c,d){var e=Oc[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=mb(b),b=c.parseMedia(b,a,null),Uk(b,d);throw new O(2,2,2014,c);}q.bf=function(a,b){this.De.width=a;this.De.height=b};q.We=function(a){if(this.l==vm){var b=this.j;a=void 0===a?.1:a;if(b.l.g)b=!1;else if(b.s)b=!1;else{for(var c=t(b.h.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Mc||d.xa||d.bb||(d.Mc=!1,dk(b,d,a));b=!0}}else b=!1;return b};
557
557
  q.Ig=function(){Ta("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};q.Jg=function(){return this.xd};
558
558
  function Kl(a){var b=Al();b.streaming.failureCallback=function(c){if(a.S()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.We(d))}};b.textDisplayFactory=function(){return a.jd?new Lk(a.g,a.jd):HTMLMediaElement.prototype.addTextTrack?new Fk(a.g,"Shaka Player TextTrack"):new Ik};return b}q.cg=function(a){this.jd=a};
559
559
  function km(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new yj,l=e.closedCaptions.get(g);h={id:a.Ee++,originalId:g,groupId:null,
@@ -572,7 +572,7 @@ function Pl(a){function b(g){var h="";g.video&&(h+="video:"+g.video.id);g.audio&
572
572
  function Tm(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=void 0===e?!0:e;var f=xm(a);f&&tm(a,f,e,b,c,d)}function tm(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&hk(a.j,b,d,e,!0);else{var h=a.u.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));hk(a.j,b,d,e,f,c);d=null;g&&(d=Td(g));b=Td(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.J&&li(a.J,b,a.ve()),c=Sl("adaptation",c),fn(a,c)):gn(a,d,b)}}
573
573
  function Wm(a,b){var c=Array.from(a.g.audioTracks).find(function(d){return d.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=$d(c);b=$d(b);gn(a,c,b)}function Cm(a,b,c){if(0==a.h.autoShowText)return!1;if(1==a.h.autoShowText)return!0;var d=Zc(a.h.preferredTextLanguage);c=Zc(c.language);if(2==a.h.autoShowText)return Yc(c,d);if(3==a.h.autoShowText)return a=Zc(b.language),Yc(c,d)&&!Yc(a,c);Ta("Invalid autoShowText setting!");return!1}function Fm(a){var b=Sl("trackschanged");fn(a,b)}
574
574
  function gn(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.J&&li(a.J,c,a.ve());c=Sl("variantchanged",b);fn(a,c)}function Vm(a){var b=Sl("textchanged");fn(a,b)}function Dm(a){var b=Sl("texttrackvisibility");fn(a,b)}function Em(a){a.h.abr.enabled||Ol(a);var b=(new Map).set("newStatus",a.h.abr.enabled);fn(a,Sl("abrstatuschanged",b))}function Ol(a,b){b=void 0===b?!0:b;if(a.l==vm){a.od.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&Gm(a)}}
575
- q.de=function(a,b){if(!this.h.abr.enabled||this.l===Tl||!navigator.onLine)return!1;if(this.i.variants.some(function(f){return(f=f[a.type])&&f.id!==a.id?"audio"==a.type?a.language===f.language:!0:!1})){for(var c=t(this.i.variants),d=c.next();!d.done;d=c.next()){d=d.value;var e=d[a.type];e&&e.id===a.id&&(d.disabledUntilTime=Date.now()/1E3+b)}this.od.Ta(1);b=this.fb().video.reduce(function(f,g){return f+g.end-g.start},0);Tm(this,!0,b,!0,!1);return!0}return!1};
575
+ q.de=function(a,b){if(!this.h.abr.enabled||this.l===Tl||!navigator.onLine)return!1;if(this.i.variants.some(function(f){return(f=f[a.type])&&f.id!==a.id?"audio"==a.type?a.language===f.language:!0:!1})){for(var c=t(this.i.variants),d=c.next();!d.done;d=c.next()){d=d.value;var e=d[a.type];e&&e.id===a.id&&(d.disabledUntilTime=Date.now()/1E3+b)}this.od.Ta(1);b=this.gb().video.reduce(function(f,g){return f+g.end-g.start},0);Tm(this,!0,b,!0,!1);return!0}return!1};
576
576
  function Xl(a,b){if(a.l!=Tl){2===b.severity&&Ol(a,!1);var c=Sl("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function im(a,b,c){c=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement});a.dispatchEvent(Sl(b,c))}
577
577
  function Wl(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new O(2,3,3016,b,c,a.g.error.message)}
578
578
  function om(a,b){if(a.j){var c=Sl("keystatuschanged");a.dispatchEvent(c);var d=Object.keys(b);c=1==d.length&&"00"==d[0];var e=!1;if(d.length){d=t(a.i.variants);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=t(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[c?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&
@@ -581,7 +581,7 @@ function en(a,b){a=a.o?a.o.sd():{};var c=Object.keys(a);c=c.length&&"00"==c[0];v
581
581
  missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new O(2,4,4012,a);}function fn(a,b){K(function(c){if(1==c.g)return C(c,Promise.resolve(),2);a.l!=Tl&&a.dispatchEvent(b);E(c)})}function Ym(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Zc(c.language)):b.add("und");return b}
582
582
  function Xm(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Zc(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=t(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
583
583
  h.push({language:l,role:m,label:n})}});return h}N("shaka.Player",V);V.prototype.setVideoContainer=V.prototype.cg;V.prototype.getManifestParserFactory=V.prototype.Jg;V.prototype.getManifest=V.prototype.Ig;V.prototype.retryStreaming=V.prototype.We;V.prototype.setMaxHardwareResolution=V.prototype.bf;V.prototype.addChaptersTrack=V.prototype.jg;V.prototype.addThumbnailsTrack=V.prototype.lg;V.prototype.addTextTrackAsync=V.prototype.kg;V.prototype.getStats=V.prototype.getStats;
584
- V.prototype.getBufferedInfo=V.prototype.fb;V.prototype.getPresentationStartTimeAsDate=V.prototype.Df;V.prototype.getPlayheadTimeAsDate=V.prototype.Ng;V.prototype.setTextTrackVisibility=V.prototype.Gh;V.prototype.getChapters=V.prototype.Bg;V.prototype.getChaptersTracks=V.prototype.Cf;V.prototype.isTextTrackVisible=V.prototype.Be;V.prototype.selectVariantsByLabel=V.prototype.Bh;V.prototype.selectTextLanguage=V.prototype.Vf;V.prototype.selectAudioLanguage=V.prototype.Uf;
584
+ V.prototype.getBufferedInfo=V.prototype.gb;V.prototype.getPresentationStartTimeAsDate=V.prototype.Df;V.prototype.getPlayheadTimeAsDate=V.prototype.Ng;V.prototype.setTextTrackVisibility=V.prototype.Gh;V.prototype.getChapters=V.prototype.Bg;V.prototype.getChaptersTracks=V.prototype.Cf;V.prototype.isTextTrackVisible=V.prototype.Be;V.prototype.selectVariantsByLabel=V.prototype.Bh;V.prototype.selectTextLanguage=V.prototype.Vf;V.prototype.selectAudioLanguage=V.prototype.Uf;
585
585
  V.prototype.getTextLanguages=V.prototype.Pg;V.prototype.getAudioLanguages=V.prototype.yg;V.prototype.getTextLanguagesAndRoles=V.prototype.Qg;V.prototype.getAudioLanguagesAndRoles=V.prototype.zg;V.prototype.selectVariantTrack=V.prototype.Ze;V.prototype.selectTextTrack=V.prototype.Wf;V.prototype.getThumbnails=V.prototype.Ef;V.prototype.getAllThumbnails=V.prototype.xg;V.prototype.getImageTracks=V.prototype.Gg;V.prototype.getTextTracks=V.prototype.Yb;V.prototype.getVariantTracks=V.prototype.vb;
586
586
  V.prototype.cancelTrickPlay=V.prototype.qf;V.prototype.trickPlay=V.prototype.hf;V.prototype.getPlaybackRate=V.prototype.td;V.prototype.isBuffering=V.prototype.ze;V.prototype.getKeyStatuses=V.prototype.sd;V.prototype.getActiveSessionsMetadata=V.prototype.te;V.prototype.getExpiration=V.prototype.Ic;V.prototype.drmInfo=V.prototype.drmInfo;V.prototype.keySystem=V.prototype.keySystem;V.prototype.goToLive=V.prototype.Xg;V.prototype.seekRange=V.prototype.Nb;V.prototype.isAudioOnly=V.prototype.$g;
587
587
  V.prototype.isInProgress=V.prototype.Jb;V.prototype.isLive=V.prototype.S;V.prototype.getAdManager=V.prototype.Bf;V.prototype.getAssetUri=V.prototype.ue;V.prototype.getNetworkingEngine=V.prototype.Fb;V.prototype.getMediaElement=V.prototype.Lg;V.prototype.getManifestType=V.prototype.ve;V.prototype.getLoadMode=V.prototype.Hg;V.prototype.resetConfiguration=V.prototype.xh;V.prototype.getBufferFullness=V.prototype.Ag;V.prototype.getConfiguration=V.prototype.getConfiguration;V.prototype.configure=V.prototype.configure;
@@ -589,25 +589,25 @@ V.prototype.releaseAllMutexes=V.prototype.th;V.prototype.load=V.prototype.load;V
589
589
  V.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return K(function(h){if(1==h.g)return b={},a?C(h,gh(),3):h.B(2);2!=h.g&&(b=h.h);var k={};if(jd())for(var l in ph)k[l]=!0;l=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var m=l.next();!m.done;m=l.next())m=m.value,k[m]=jd()?!!ph[m]:kd(m);c=k;l='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(w(Fc));
590
590
  k={};l=t(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=jd()?Nc(m)?!0:bb(m)||($b(m)?!0:!1):kd(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=jn;for(g in f)e[g]=f[g]();return h.return(e)})};
591
591
  V.isBrowserSupported=function(){window.Promise||Ta("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||od("Trident/"))return!1;var a=vd();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:jd()?!0:kd("application/x-mpegurl")};V.setAdManagerFactory=function(a){Nl=a};
592
- V.registerSupportPlugin=function(a,b){jn[a]=b};V.prototype.destroy=V.prototype.destroy;var Tl=0,Jl=1,vm=2,Km=3;V.LoadMode={DESTROYED:Tl,NOT_LOADED:Jl,MEDIA_SOURCE:vm,SRC_EQUALS:Km};V.version="v4.6.6";var kn=["4","6"];me=new function(a){this.g=a;this.i=ne;this.h=oe}(new ke(Number(kn[0]),Number(kn[1])));var hn=["output-restricted","internal-error"],jn={},Nl=null;function ln(){this.h=[];this.j=this.i=this.g=0};function mn(a,b,c){var d=this;this.g=a;this.h=b;this.m=c;this.i=!1;this.l=this.h.getVolume();this.j=new of;this.j.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=mn.prototype;q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};q.isPaused=function(){return this.i};
592
+ V.registerSupportPlugin=function(a,b){jn[a]=b};V.prototype.destroy=V.prototype.destroy;var Tl=0,Jl=1,vm=2,Km=3;V.LoadMode={DESTROYED:Tl,NOT_LOADED:Jl,MEDIA_SOURCE:vm,SRC_EQUALS:Km};V.version="v4.6.7";var kn=["4","6"];me=new function(a){this.g=a;this.i=ne;this.h=oe}(new ke(Number(kn[0]),Number(kn[1])));var hn=["output-restricted","internal-error"],jn={},Nl=null;function ln(){this.h=[];this.j=this.i=this.g=0};function mn(a,b,c){var d=this;this.g=a;this.h=b;this.m=c;this.i=!1;this.j=this.h.getVolume();this.l=new of;this.l.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.l.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=mn.prototype;q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};q.isPaused=function(){return this.i};
593
593
  q.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.h.getAdSkippableState()};q.skip=function(){return this.h.skip()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.resume()};q.getVolume=function(){return this.h.getVolume()};q.setVolume=function(a){return this.h.setVolume(a)};q.isMuted=function(){return 0==this.h.getVolume()};
594
- q.isLinear=function(){return this.g.isLinear()};q.resize=function(a,b){var c=!1,d=this.m;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};
594
+ q.isLinear=function(){return this.g.isLinear()};q.resize=function(a,b){var c=!1,d=this.m;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.j=this.getVolume(),this.setVolume(0)):this.setVolume(this.j)};q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};
595
595
  q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};q.getAdId=function(){return this.g.getAdId()};q.getCreativeAdId=function(){return this.g.getCreativeAdId()};
596
596
  q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return this.g.getMediaUrl()};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.g=null};N("shaka.ads.ClientSideAd",mn);mn.prototype.release=mn.prototype.release;mn.prototype.getPodIndex=mn.prototype.getPodIndex;mn.prototype.getTimeOffset=mn.prototype.getTimeOffset;
597
597
  mn.prototype.getMediaUrl=mn.prototype.getMediaUrl;mn.prototype.getAdvertiserName=mn.prototype.getAdvertiserName;mn.prototype.getCreativeAdId=mn.prototype.getCreativeAdId;mn.prototype.getAdId=mn.prototype.getAdId;mn.prototype.getVastMediaWidth=mn.prototype.getVastMediaWidth;mn.prototype.getVastMediaHeight=mn.prototype.getVastMediaHeight;mn.prototype.getVastMediaBitrate=mn.prototype.getVastMediaBitrate;mn.prototype.getDescription=mn.prototype.getDescription;mn.prototype.getTitle=mn.prototype.getTitle;
598
598
  mn.prototype.getPositionInSequence=mn.prototype.getPositionInSequence;mn.prototype.getSequenceLength=mn.prototype.getSequenceLength;mn.prototype.setMuted=mn.prototype.setMuted;mn.prototype.resize=mn.prototype.resize;mn.prototype.isLinear=mn.prototype.isLinear;mn.prototype.isMuted=mn.prototype.isMuted;mn.prototype.setVolume=mn.prototype.setVolume;mn.prototype.getVolume=mn.prototype.getVolume;mn.prototype.play=mn.prototype.play;mn.prototype.pause=mn.prototype.pause;mn.prototype.skip=mn.prototype.skip;
599
- mn.prototype.canSkipNow=mn.prototype.canSkipNow;mn.prototype.getTimeUntilSkippable=mn.prototype.getTimeUntilSkippable;mn.prototype.isSkippable=mn.prototype.isSkippable;mn.prototype.isPaused=mn.prototype.isPaused;mn.prototype.getRemainingTime=mn.prototype.getRemainingTime;mn.prototype.getMinSuggestedDuration=mn.prototype.getMinSuggestedDuration;mn.prototype.getDuration=mn.prototype.getDuration;function nn(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.A=!1;this.s=this.C=null;this.F=NaN;this.m=e;this.j=null;this.h=new of;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.6.6");this.g=null;this.u=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,
600
- function(g){on(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){pn(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.ga(this.i,"play",function(){f.A=!0})}nn.prototype.configure=function(a){this.C=a};nn.prototype.stop=function(){this.g&&this.g.stop();this.o&&Kk(this.o)};nn.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};
599
+ mn.prototype.canSkipNow=mn.prototype.canSkipNow;mn.prototype.getTimeUntilSkippable=mn.prototype.getTimeUntilSkippable;mn.prototype.isSkippable=mn.prototype.isSkippable;mn.prototype.isPaused=mn.prototype.isPaused;mn.prototype.getRemainingTime=mn.prototype.getRemainingTime;mn.prototype.getMinSuggestedDuration=mn.prototype.getMinSuggestedDuration;mn.prototype.getDuration=mn.prototype.getDuration;function nn(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.A=!1;this.s=this.C=null;this.F=NaN;this.m=e;this.j=null;this.h=new of;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.6.7");this.g=null;this.u=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,
600
+ function(g){on(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){pn(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.ha(this.i,"play",function(){f.A=!0})}nn.prototype.configure=function(a){this.C=a};nn.prototype.stop=function(){this.g&&this.g.stop();this.o&&Kk(this.o)};nn.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};
601
601
  function pn(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new Q("ad-error",b));qn(a,null);a.m(new Q("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
602
602
  function on(a,b){a.m(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));if(a.C.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.u);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(a.i,"volumechange",function(){a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume)})}else a.g=b.getAdsManager(a.i,a.u);a.m(new Q("ima-ad-manager-loaded",(new Map).set("imaAdManager",
603
603
  a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.m(new Q("ad-cue-points-changed",(new Map).set("cuepoints",b)))}rn(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,sn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.D(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,sn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,
604
- a.i.offsetHeight,sn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)):a.h.D(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,sn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A?a.g.start():a.h.ga(a.i,"play",function(){a.A=!0;a.g.start()})}catch(f){qn(a,null)}}function sn(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
604
+ a.i.offsetHeight,sn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)):a.h.D(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,sn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A?a.g.start():a.h.ha(a.i,"play",function(){a.A=!0;a.g.start()})}catch(f){qn(a,null)}}function sn(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
605
605
  function rn(a){function b(c,d){c=(new Map).set("originalEvent",c);a.m(new Q(d,c))}a.h.D(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){pn(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){tn(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.STARTED,function(c){tn(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.D(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
606
606
  function(c){b(c,"ad-third-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){qn(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){qn(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
607
607
  a.h.D(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.D(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.D(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.D(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});
608
608
  a.h.D(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.D(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.D(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.D(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.D(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.D(a.g,
609
609
  google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.D(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.D(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
610
- function tn(a,b){var c=b.getAd();c?(a.j=new mn(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.m(new Q("ad-started",b)),a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause(),a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))):Ta("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
610
+ function tn(a,b){var c=b.getAd();c?(a.j=new mn(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.m(new Q("ad-started",b)),a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause(),a.i.muted?(b=a.j,b.j=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):Ta("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
611
611
  function qn(a,b){a.m(new Q("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.i.ended||a.i.play())};function un(a,b,c,d,e){this.h=a;this.g=e;this.i=b;this.j=c;this.l=d}q=un.prototype;q.getDuration=function(){return this.h.durationInSeconds};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.h.skipOffset?!0:!1};
612
612
  q.getTimeUntilSkippable=function(){if(!this.h.skipOffset)return this.getRemainingTime();var a=this.getRemainingTime()-this.h.skipOffset;return Math.max(a,0)};q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.g.currentTime+=this.getRemainingTime()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};
613
613
  q.isLinear=function(){return this.l};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};q.getSequenceLength=function(){return this.j?this.j:1};q.getPositionInSequence=function(){return this.i?this.i:1};q.getTitle=function(){return this.h.adTitle};q.getDescription=function(){return""};q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return 0};q.getVastMediaWidth=function(){return 0};q.getAdId=function(){return this.h.adId};q.getCreativeAdId=function(){return this.h.creativeId};
@@ -646,8 +646,8 @@ function In(a,b){a.i(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-
646
646
  q.release=function(){this.h&&(this.h.release(),this.h=null);this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);Ve.prototype.release.call(this)};q.onAssetUnload=function(){this.h&&this.h.stop();this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new Q("ad-stopped"));this.j=new ln};q.requestClientSideAds=function(a){if(!this.h)throw new O(1,10,10001);var b=this.h;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.F=Date.now()/1E3;b.l.requestAds(a)};
647
647
  q.updateClientSideAdsRenderingSettings=function(a){if(!this.h)throw new O(1,10,10001);var b=this.h;b.u=a;b.g&&b.g.updateAdsRenderingSettings(b.u)};q.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new vn(a,b,c,function(e){return Jn(d,e)})};q.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new O(1,10,10005);var d=this.i;c=void 0===c?"":c;d.l?a=Promise.reject(new O(1,10,10004)):(d.l=new Le,yn(d,a,b),d.G=c||"",d.W=Date.now()/1E3,a=d.l);return a};
648
648
  q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new O(2,10,10002);this.g&&this.g.release();this.g=new Hn(a,b,this.m,function(d){return Jn(c,d)});this.g.configure(this.l)};
649
- q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new O(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ta('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.6.6";c=this.g;c.j?a=Promise.reject(new O(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
650
- (c.G=!0),c.j=new Le,c.g.requestStream(a),c.A=b||"",c.F=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(1,10,10003);(a.mpt||a.mpv)&&Ta('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.6.6";this.g.g.replaceAdTagParameters(a)};
649
+ q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new O(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ta('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.6.7";c=this.g;c.j?a=Promise.reject(new O(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
650
+ (c.G=!0),c.j=new Le,c.g.requestStream(a),c.A=b||"",c.F=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(1,10,10003);(a.mpt||a.mpv)&&Ta('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.6.7";this.g.g.replaceAdTagParameters(a)};
651
651
  q.getServerSideCuePoints=function(){le("AdManager","Please use getCuePoints function.");return this.getCuePoints()};q.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};q.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)};
652
652
  q.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};
653
653
  function Jn(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.j.h.push(b.loadTime);break;case "ad-started":a.j.g++;break;case "ad-complete":a.j.i++;break;case "ad-skipped":a.j.j++}a.dispatchEvent(b)}N("shaka.ads.AdManager",Y);Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.onManifestUpdated=Y.prototype.onManifestUpdated;Y.prototype.getStats=Y.prototype.getStats;
@@ -708,28 +708,28 @@ var bp=0,dp=1,fp=2,hp=3,cp=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[9
708
708
  [35,"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),ip=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
709
709
  [39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]),Zo=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function kp(a,b){this.h=lp;this.o=new Wo(a,b);this.i=new Wo(a,b);this.g=this.j=new Wo(a,b);this.l=0;this.m=null}function mp(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==np&&a.h!==op&&(e=Yo(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,$o(c,0,15),c=a.j,c.g=0<c.h?c.h:0,$o(c,0,15),d.g=15);a.h=np;d.h=b;return e}function pp(a){a.h=qp;a.g=a.j;a.g.h=0}function rp(a){Ua("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=op}
710
710
  var lp=0,qp=1,np=3,op=4,sp="black green blue cyan red yellow magenta black".split(" "),tp="white green blue cyan red yellow magenta white_italics".split(" ");function up(){this.l=!1;this.A=this.F=0;this.C=vp;this.i=[];this.g=this.h=this.j=0;this.u=this.o=!1;this.s="white";this.m="black";wp(this)}function wp(a){a.i=[];for(var b=0;16>b;b++)a.i.push(xp())}function xp(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function yp(a,b){zp(a)&&(a.i[a.h][a.g]=new Vo(b,a.u,a.o,a.m,a.s),a.g++)}function zp(a){var b=a.g<a.A&&0<=a.g;return a.h<a.F&&0<=a.h&&b}up.prototype.isVisible=function(){return this.l};
711
- function Ap(a,b,c){var d=new Bb(a.j,b,"");d.textAlign=a.C===Bp?"left":a.C===Cp?"right":Eb;if(c=So(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Bp=0,Cp=1,vp=2;function Dp(){this.i=[];this.h=null;this.g=0}function Ep(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new Fp(a.h)),a.h=null,a.g=0))}function Fp(a){this.g=0;this.h=a}Fp.prototype.fa=function(){return this.g<this.h.length};Fp.prototype.oa=function(){return this.g};function Gp(a){if(!a.fa())throw new O(2,2,3E3);return a.h[a.g++]}Fp.prototype.skip=function(a){if(this.g+a>this.h.length)throw new O(2,2,3E3);this.g+=a};function Hp(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
711
+ function Ap(a,b,c){var d=new Bb(a.j,b,"");d.textAlign=a.C===Bp?"left":a.C===Cp?"right":Eb;if(c=So(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Bp=0,Cp=1,vp=2;function Dp(){this.i=[];this.h=null;this.g=0}function Ep(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new Fp(a.h)),a.h=null,a.g=0))}function Fp(a){this.g=0;this.h=a}Fp.prototype.ga=function(){return this.g<this.h.length};Fp.prototype.oa=function(){return this.g};function Gp(a){if(!a.ga())throw new O(2,2,3E3);return a.h[a.g++]}Fp.prototype.skip=function(a){if(this.g+a>this.h.length)throw new O(2,2,3E3);this.g+=a};function Hp(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
712
712
  function Ip(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=Gp(b).value;b=null;c=t(Jp(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Ap(e,d,a.i)),wp(e);return b}if(137===c)for(b=Gp(b).value,b=t(Jp(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=Gp(b).value;b=null;c=t(Jp(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Ap(e,d,a.i)),e.l=!1;return b}if(139===c){c=Gp(b).value;
713
713
  b=null;c=t(Jp(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Ap(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Gp(b).value,Kp(a,b,d);if(143===c)return d=Kp(a,255,d),Lp(a),d;if(144===c)b.skip(1),d=Gp(b).value,a.g&&(a.g.o=0<(d&128),a.g.u=0<(d&64));else if(145===c)d=Gp(b).value,c=Gp(b).value,b.skip(1),a.g&&(b=Mp((c&48)>>4,(c&12)>>2,c&3),a.g.s=Mp((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=Gp(b).value,b=Gp(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
714
714
  b.skip(1),d=Gp(b).value,b.skip(1),a.g&&(a.g.C=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new up;f.j=d;a.h[c]=f}d=Gp(b).value;Gp(b);Gp(b);f=Gp(b).value;var g=Gp(b).value;b=Gp(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.u=!1,b.o=!1,b.s="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.F=(f&15)+1;b.A=(g&63)+1;a.g=a.h[c]}}}return null}function Jp(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
715
715
  function Kp(a,b,c){var d=null;b=t(Jp(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Ap(f,c,a.i));a.h[e]=null}return d}function Lp(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Mp(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Np[a<<2|b<<1|c]}
716
716
  var Op=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),Np="black blue green cyan red magenta yellow white".split(" ");function Pp(){this.h=[];this.g=[];this.i=new Dp;this.l=0;this.m=new Map([["CC1",new kp(0,0)],["CC2",new kp(0,1)],["CC3",new kp(1,0)],["CC4",new kp(1,1)]]);this.s=this.o=0;this.j=new Map;this.A=!0;this.u=new Set;Qp(this)}Pp.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;Qp(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())Lp(b.value)};
717
717
  function Qp(a){a.o=0;a.s=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=lp,c.g=c.j,c.m=null,Xo(c.i),Xo(c.j),Xo(c.o);a.A=!0}
718
- Pp.prototype.extract=function(a,b){if(this.A){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.A=!1}a=new Gf(a,0);if(!(8>a.getLength())&&181===a.ca()&&49===a.ya()&&1195456820===a.L()&&3===a.ca()&&(c=a.ca(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.ca(),f=(e&4)>>2,g=a.ca(),h=a.ca();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,Ma:g,cb:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
718
+ Pp.prototype.extract=function(a,b){if(this.A){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.A=!1}a=new Gf(a,0);if(!(8>a.getLength())&&181===a.ca()&&49===a.ya()&&1195456820===a.L()&&3===a.ca()&&(c=a.ca(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.ca(),f=(e&4)>>2,g=a.ca(),h=a.ca();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,Ma:g,eb:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
719
719
  Pp.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=t(this.h),d=c.next();!d.done;d=c.next())(d=Rp(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())Ep(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=Sp(this,d.value),b.push.apply(b,w(d));this.i.i=[];this.h=[];this.g=[];return b};
720
- function Rp(a,b){var c=b.type;if(16===(b.Ma&112)){var d=b.Ma>>3&1;0===c?a.o=d:a.s=d}d="CC"+(c<<1|(c?a.s:a.o)+1);c=a.m.get(d);if(255===b.Ma&&255===b.cb||!b.Ma&&!b.cb||!Tp(b.Ma)||!Tp(b.cb))return 45<=++a.l&&Qp(a),null;a.l=0;b.Ma&=127;b.cb&=127;if(!b.Ma&&!b.cb)return null;a.u.add(d);a=null;if(16===(b.Ma&112))a:{d=b.Ma;a=b.cb;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];var e=(a&30)>>1;d="white";var f=!1;7>e?d=tp[e]:
720
+ function Rp(a,b){var c=b.type;if(16===(b.Ma&112)){var d=b.Ma>>3&1;0===c?a.o=d:a.s=d}d="CC"+(c<<1|(c?a.s:a.o)+1);c=a.m.get(d);if(255===b.Ma&&255===b.eb||!b.Ma&&!b.eb||!Tp(b.Ma)||!Tp(b.eb))return 45<=++a.l&&Qp(a),null;a.l=0;b.Ma&=127;b.eb&=127;if(!b.Ma&&!b.eb)return null;a.u.add(d);a=null;if(16===(b.Ma&112))a:{d=b.Ma;a=b.eb;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];var e=(a&30)>>1;d="white";var f=!1;7>e?d=tp[e]:
721
721
  7===e&&(f=!0);a=1===(a&1);c.h!==op&&(e=c.g,c.h===np&&b!==e.g&&(c=1+b-e.h,jp(e,c,1+e.g-e.h,e.h),$o(e,0,c-1),$o(e,b+1,15-b)),e.g=b,e.m=a,e.j=f,e.l=d,e.o="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",ap(c.g,bp,32),d=!1,b=tp[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=sp[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))ap(c.g,dp,a);else if(18===
722
- (d&246)&&32===(a&224))ap(c.g,d&1?hp:fp,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.cb){case 32:pp(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=mp(c,2,a);break;case 38:d=mp(c,3,a);break;case 39:d=mp(c,4,a);break;case 40:ap(c.g,bp,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:Xo(c.o);rp(c);break;case 43:rp(c);break;case 44:b=c.i;d=null;c.h!==op&&(d=Yo(b,c.l,a));$o(b,0,15);break;case 45:b=c.g;c.h!==np?d=null:(d=Yo(b,c.l,a),f=b.g-b.h+1,jp(b,f-1,f,b.h),$o(b,0,
723
- f-1),$o(b,b.g,15-b.g),c.l=a);break;case 46:$o(c.j,0,15);break;case 47:b=null,c.h!==op&&(b=Yo(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,pp(c),c.l=a,d=b}a=d;break a}a=null}else d=b.cb,ap(c.g,bp,b.Ma),ap(c.g,bp,d);return a}
724
- function Sp(a,b){var c=[];try{for(;b.fa();){var d=Gp(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Gp(b).value&63);if(0!=e){a.u.add("svc"+e);a.j.has(e)||a.j.set(e,new Hp(e));for(var g=a.j.get(e),h=b.oa();b.oa()-h<f;){e=b;var k=Gp(e),l=k.value,m=k.pts;if(16===l){var n=Gp(e);l=l<<16|n.value}if(0<=l&&31>=l){var r=m;if(g.g){var p=g.g;e=null;switch(l){case 8:!zp(p)||0>=p.g&&0>=p.h||(0>=p.g?(p.g=p.A-1,p.h--):p.g--,p.i[p.h][p.g]=null);break;case 13:p.isVisible()&&(e=Ap(p,r,g.i));if(p.h+1>=p.F){r=p;for(var u=
722
+ (d&246)&&32===(a&224))ap(c.g,d&1?hp:fp,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.eb){case 32:pp(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=mp(c,2,a);break;case 38:d=mp(c,3,a);break;case 39:d=mp(c,4,a);break;case 40:ap(c.g,bp,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:Xo(c.o);rp(c);break;case 43:rp(c);break;case 44:b=c.i;d=null;c.h!==op&&(d=Yo(b,c.l,a));$o(b,0,15);break;case 45:b=c.g;c.h!==np?d=null:(d=Yo(b,c.l,a),f=b.g-b.h+1,jp(b,f-1,f,b.h),$o(b,0,
723
+ f-1),$o(b,b.g,15-b.g),c.l=a);break;case 46:$o(c.j,0,15);break;case 47:b=null,c.h!==op&&(b=Yo(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,pp(c),c.l=a,d=b}a=d;break a}a=null}else d=b.eb,ap(c.g,bp,b.Ma),ap(c.g,bp,d);return a}
724
+ function Sp(a,b){var c=[];try{for(;b.ga();){var d=Gp(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Gp(b).value&63);if(0!=e){a.u.add("svc"+e);a.j.has(e)||a.j.set(e,new Hp(e));for(var g=a.j.get(e),h=b.oa();b.oa()-h<f;){e=b;var k=Gp(e),l=k.value,m=k.pts;if(16===l){var n=Gp(e);l=l<<16|n.value}if(0<=l&&31>=l){var r=m;if(g.g){var p=g.g;e=null;switch(l){case 8:!zp(p)||0>=p.g&&0>=p.h||(0>=p.g?(p.g=p.A-1,p.h--):p.g--,p.i[p.h][p.g]=null);break;case 13:p.isVisible()&&(e=Ap(p,r,g.i));if(p.h+1>=p.F){r=p;for(var u=
725
725
  0,v=1;16>v;v++,u++)r.i[u]=r.i[v];for(v=0;1>v;v++,u++)r.i[u]=xp()}else p.h++;p.g=0;break;case 14:p.isVisible()&&(e=Ap(p,r,g.i));p.i[p.h]=xp();p.g=0;break;case 12:p.isVisible()&&(e=Ap(p,r,g.i)),wp(p),r=p,r.h=0,r.g=0}var y=e}else y=null}else if(128<=l&&159>=l)y=Ip(g,e,l,m);else{if(4096<=l&&4127>=l)r=l&255,8<=r&&15>=r?e.skip(1):16<=r&&23>=r?e.skip(2):24<=r&&31>=r&&e.skip(3);else if(4224<=l&&4255>=l)r=l&255,128<=r&&135>=r?e.skip(4):136<=r&&143>=r&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?yp(g.g,
726
726
  "\u266a"):yp(g.g,String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&yp(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Op.has(e)){var z=Op.get(e);yp(g.g,z)}else yp(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?yp(g.g,"_"):yp(g.g,"[CC]"));y=null}(e=y)&&c.push(e)}}}}catch(x){if(x instanceof O&&3E3===x.code)Ua("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw x;}return c}function Tp(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}
727
727
  Pp.prototype.getStreams=function(){return Array.from(this.u)};N("shaka.cea.CeaDecoder",Pp);ub=function(){return new Pp};function Up(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(w(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function Vp(){this.j=new Map;this.i=this.h=0;this.g=Wp}
728
728
  Vp.prototype.init=function(a){function b(f){f=f.name;f in Xp&&(c.g=Xp[f])}var c=this,d=[],e=[];(new Kf).box("moov",Pf).box("mvex",Pf).O("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.L();g=g.L();c.h=f;c.i=g}).box("trak",Pf).O("tkhd",function(f){f=Oh(f.reader,f.version);d.push(f.trackId)}).box("mdia",Pf).O("mdhd",function(f){f=Mh(f.reader,f.version);e.push(f.timescale)}).box("minf",Pf).box("stbl",Pf).O("stsd",Rf).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvh1",b).box("dvhe",
729
- b).box("encv",Sf).box("sinf",Pf).box("frma",function(f){f=Rh(f.reader).ea;f in Xp&&(c.g=Xp[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new O(2,2,2010);this.g==Wp&&Ta("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
729
+ b).box("encv",Sf).box("sinf",Pf).box("frma",function(f){f=Rh(f.reader).fa;f in Xp&&(c.g=Xp[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new O(2,2,2010);this.g==Wp&&Ta("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
730
730
  Vp.prototype.parse=function(a){var b=this;if(this.g==Wp)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new Kf).box("moof",function(l){f=l.start;g=[];Pf(l)}).box("traf",Pf).O("trun",function(l){l=Nh(l.reader,l.version,l.flags);g.push(l)}).O("tfhd",function(l){l=Kh(l.reader,l.flags);d=l.xf||b.h;e=l.wg||b.i;l=l.trackId;b.j.has(l)&&(k=b.j.get(l))}).O("tfdt",function(l){h=Lh(l.reader,l.version).baseMediaDecodeTime}).box("mdat",function(l){if(null===h)throw Ta("Unable to find base media decode time for CEA captions!"),
731
731
  new O(2,2,2010);Yp(b,l.reader,h,k,d,e,f-l.start-8,g,c)}).parse(a,!1);return c};
732
- function Yp(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.Tf});n=[].concat.apply([],w(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].vg);b.fa();){g=b.L();var r=b.ca(),p=null;p=!1;h=1;switch(a.g){case Zp:p=r&31;p=6==p;break;case $p:h=2;b.skip(1);p=r>>1&63;p=39==p||40==p;break;default:return}if(p)for(r=0,l<n.length&&(r=n[l].Kd||0),r=(c+r)/d,h=t(Up(b.kb(g-h))),p=h.next();!p.done;p=h.next())k.push({packet:p.value,pts:r});else try{b.skip(g-h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?
732
+ function Yp(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.Tf});n=[].concat.apply([],w(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].vg);b.ga();){g=b.L();var r=b.ca(),p=null;p=!1;h=1;switch(a.g){case Zp:p=r&31;p=6==p;break;case $p:h=2;b.skip(1);p=r>>1&63;p=39==p||40==p;break;default:return}if(p)for(r=0,l<n.length&&(r=n[l].Kd||0),r=(c+r)/d,h=t(Up(b.kb(g-h))),p=h.next();!p.done;p=h.next())k.push({packet:p.value,pts:r});else try{b.skip(g-h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?
733
733
  c+(n[l].Xe||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}N("shaka.cea.Mp4CeaParser",Vp);var Wp=0,Zp=1,$p=2,Xp={avc1:Zp,avc3:Zp,hev1:$p,hvc1:$p,dvh1:$p,dvhe:$p};tb["video/mp4"]=function(){return new Vp};function aq(){}aq.prototype.init=function(){};aq.prototype.parse=function(a){var b=[];a=mb(a);if(!ii(a))return b;a=(new ci).parse(a);var c=a.Fc(),d=a.wd();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=t(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&null!=d.time)for(var e=t(Up(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};N("shaka.cea.TsCeaParser",aq);tb["video/mp2t"]=function(){return new aq};function bq(a,b,c){var d=cq(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(k){return k.keyId}));h.delete(null);if(1<h.size)throw new O(2,4,4010);if(!b){f=d.filter(function(k){return"urn:mpeg:dash:sea:2012"==k.Vc});if(1<f.length)throw new O(2,4,4050);f.length&&(g=dq(f[0]));f=d.filter(function(k){return"urn:mpeg:dash:mp4protection:2011"==k.Vc?(e=k.init||e,!1):"urn:mpeg:dash:sea:2012"!=k.Vc});f.length&&(a=eq(e,f,c,h),0==a.length&&(a=[xc("",e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),
734
734
  c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(xc(c,e));if(h=Array.from(h)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=h;return{wf:h,Hi:e,drmInfos:a,Yd:g,Af:!0}}
735
735
  function fq(a,b,c,d){var e=bq(a,c,d);if(b.Af){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.Af=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new O(2,4,4008);return e.wf||b.wf}
@@ -745,47 +745,47 @@ var jq=1,kq=(new Map).set("com.widevine.alpha",function(a){var b=eg(a.node,"http
745
745
  b.textContent:(a=eg(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function mq(a,b,c,d,e,f){var g={RepresentationID:b,Number:c,SubNumber:d,Bandwidth:e,Time:f};return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if("$$"==h)return"$";var n=g[k];if(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&Ta("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=n.toString();
746
746
  break;case "o":h=n.toString(8);break;case "x":h=n.toString(16);break;case "X":h=n.toString(16).toUpperCase();break;default:h=n.toString()}l=window.parseInt(l,10)||1;return Array(Math.max(0,l-h.length)+1).join("0")+h})}
747
747
  function nq(a,b){var c=oq(a,b,"timescale"),d=1;c&&(d=qg(c)||1);var e=oq(a,b,"duration");c=qg(e||"");"image"==a.M.contentType&&(c=sg(e||""));c&&(c/=d);var f=oq(a,b,"startNumber");e=Number(oq(a,b,"presentationTimeOffset"))||0;var g=rg(f||"");if(null==f||null==g)g=1;var h=pq(a,b,"SegmentTimeline");b=null;if(h){b=d;a=a.$.duration||Infinity;f=g;h=dg(h,"S");for(var k=[],l=-e,m=0;m<h.length;++m){var n=h[m],r=h[m+1],p=lg(n,"t",rg),u=lg(n,"d",rg),v=lg(n,"r",pg);n=lg(n,"k",pg)||0;null!=p&&(p-=e);if(!u)break;
748
- p=null!=p?p:l;v=v||0;if(0>v)if(r){r=lg(r,"t",rg);if(null==r)break;else if(p>=r)break;v=Math.ceil((r-p)/u)-1}else{if(Infinity==a)break;else if(p/b>=a)break;v=Math.ceil((a*b-p)/u)-1}0<k.length&&p!=l&&(k[k.length-1].end=p/b);for(r=0;r<=v;++r)l=p+u,k.push({start:p/b,end:l/b,kf:p,Ya:n,Ah:k.length+f}),p=l}b=k}return{timescale:d,ta:c,Zc:g,lb:e/d||0,jf:e,timeline:b}}function qq(a,b){return[b(a.M),b(a.ma),b(a.qa)].filter(Wc)}
748
+ p=null!=p?p:l;v=v||0;if(0>v)if(r){r=lg(r,"t",rg);if(null==r)break;else if(p>=r)break;v=Math.ceil((r-p)/u)-1}else{if(Infinity==a)break;else if(p/b>=a)break;v=Math.ceil((a*b-p)/u)-1}0<k.length&&p!=l&&(k[k.length-1].end=p/b);for(r=0;r<=v;++r)l=p+u,k.push({start:p/b,end:l/b,kf:p,Za:n,Ah:k.length+f}),p=l}b=k}return{timescale:d,ta:c,Zc:g,lb:e/d||0,jf:e,timeline:b}}function qq(a,b){return[b(a.M),b(a.ma),b(a.qa)].filter(Wc)}
749
749
  function oq(a,b,c){b=qq(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.getAttribute(c));d=b.next());return a}function pq(a,b,c){b=qq(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=cg(d.value,c));d=b.next());return a}
750
750
  function rq(a,b,c,d,e,f){for(var g=hg(a,"http://www.w3.org/1999/xlink","href"),h=hg(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return Ne(new O(2,4,4028));if("onLoad"!=h)return Ne(new O(2,4,4027));var m=wc([d],[g]);return e.request(0,df(m,b)).na(function(n){n=xg(n.data,a.tagName);if(!n)return Ne(new O(2,4,4001,g));
751
751
  for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var r=n.childNodes[0];n.removeChild(r);a.appendChild(r)}n=t(Array.from(n.attributes));for(r=n.next();!r.done;r=n.next())a.setAttributeNode(r.value.cloneNode(!1));return sq(a,b,c,m[0],e,f+1)})}
752
752
  function sq(a,b,c,d,e,f){f=void 0===f?0:f;if(hg(a,"http://www.w3.org/1999/xlink","href")){var g=rq(a,b,c,d,e,f);c&&(g=g.na(void 0,function(){return sq(a,b,c,d,e,f)}));return g}g=[];for(var h=t(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==hg(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(sq(k,b,c,d,e,f)));return Re(g).na(function(){return a})};function tq(a,b,c,d,e,f,g){var h,k=(new Kf).O("sidx",function(l){h=uq(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new O(2,3,3004);}
753
- function uq(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.L();if(0==k)throw new O(2,3,3005);if(0==g.version){var l=g.reader.L();var m=g.reader.L()}else l=g.reader.dc(),m=g.reader.dc();g.reader.skip(2);var n=g.reader.ya();a=a+g.size+m;for(m=0;m<n;m++){var r=g.reader.L(),p=(r&2147483648)>>>31;r&=2147483647;var u=g.reader.L();g.reader.skip(4);if(1==p)throw new O(2,3,3006);h.push(new R(l/k+c,(l+u)/k+c,function(){return f},a,a+r-1,b,c,d,e));l+=u;a+=r}g.parser.stop();return h};function vq(a){this.h=qb(a);this.g=new Gf(this.h,0)}vq.prototype.fa=function(){return this.g.fa()};
753
+ function uq(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.L();if(0==k)throw new O(2,3,3005);if(0==g.version){var l=g.reader.L();var m=g.reader.L()}else l=g.reader.dc(),m=g.reader.dc();g.reader.skip(2);var n=g.reader.ya();a=a+g.size+m;for(m=0;m<n;m++){var r=g.reader.L(),p=(r&2147483648)>>>31;r&=2147483647;var u=g.reader.L();g.reader.skip(4);if(1==p)throw new O(2,3,3006);h.push(new R(l/k+c,(l+u)/k+c,function(){return f},a,a+r-1,b,c,d,e));l+=u;a+=r}g.parser.stop();return h};function vq(a){this.h=qb(a);this.g=new Gf(this.h,0)}vq.prototype.ga=function(){return this.g.ga()};
754
754
  function wq(a){var b=xq(a);if(7<b.length)throw new O(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=xq(a);a:{d=t(yq);for(var e=d.next();!e.done;e=d.next())if(kb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.oa();else{if(8==b.length&&b[1]&224)throw new O(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.oa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.oa();d=qb(a.h,a.g.oa(),b);a.g.skip(b);return new zq(c,
755
755
  d)}function xq(a){var b=a.g.oa(),c=a.g.ca();if(0==c)throw new O(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return mb(a.h,b,c)}var yq=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function zq(a,b){this.id=a;this.g=b}
756
- function Aq(a){if(8<a.g.byteLength)throw new O(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new O(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function Bq(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new vq(a.g);for(var n=null,r=null;a.fa();){var p=wq(a);if(187==p.id){var u=Cq(p);u&&(p=c*u.Kh,u=b+u.sh,null!=n&&m.push(new R(n+g,p+g,l,r,u-1,f,g,h,k)),n=p,r=u)}}null!=n&&m.push(new R(n+g,d+g,l,r,null,f,g,h,k));return m}
757
- function Cq(a){var b=new vq(a.g);a=wq(b);if(179!=a.id)throw new O(2,3,3013);a=Aq(a);b=wq(b);if(183!=b.id)throw new O(2,3,3012);b=new vq(b.g);for(var c=0;b.fa();){var d=wq(b);if(241==d.id){c=Aq(d);break}}return{Kh:a,sh:c}};function Dq(a,b,c){b=pq(a,b,"Initialization");if(!b)return null;var d=a.M.Xa(),e=b.getAttribute("sourceURL");e&&(d=wc(d,[e]));e=0;var f=null;if(b=lg(b,"range",og))e=b.start,f=b.end;return new uh(function(){return d},e,f,Eq(a),null,null,c)}
756
+ function Aq(a){if(8<a.g.byteLength)throw new O(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new O(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function Bq(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new vq(a.g);for(var n=null,r=null;a.ga();){var p=wq(a);if(187==p.id){var u=Cq(p);u&&(p=c*u.Kh,u=b+u.sh,null!=n&&m.push(new R(n+g,p+g,l,r,u-1,f,g,h,k)),n=p,r=u)}}null!=n&&m.push(new R(n+g,d+g,l,r,null,f,g,h,k));return m}
757
+ function Cq(a){var b=new vq(a.g);a=wq(b);if(179!=a.id)throw new O(2,3,3013);a=Aq(a);b=wq(b);if(183!=b.id)throw new O(2,3,3012);b=new vq(b.g);for(var c=0;b.ga();){var d=wq(b);if(241==d.id){c=Aq(d);break}}return{Kh:a,sh:c}};function Dq(a,b,c){b=pq(a,b,"Initialization");if(!b)return null;var d=a.M.Xa(),e=b.getAttribute("sourceURL");e&&(d=wc(d,[e]));e=0;var f=null;if(b=lg(b,"range",og))e=b.start,f=b.end;return new uh(function(){return d},e,f,Eq(a),null,null,c)}
758
758
  function Fq(a,b,c){var d=Number(oq(a,Gq,"presentationTimeOffset"))||0,e=oq(a,Gq,"timescale"),f=1;e&&(f=qg(e)||1);var g=d/f||0,h=Dq(a,Gq,c);Hq(a,h);var k=Xe(a);return{Wb:function(){var l=pq(k,Gq,"RepresentationIndex");var m=k.M.Xa();l&&(l=l.getAttribute("sourceURL"))&&(m=wc(m,[l]));l=Iq(k);return Jq(k,b,h,m,l.start,l.end,g)}}}
759
759
  function Jq(a,b,c,d,e,f,g){var h,k,l,m,n,r,p,u,v,y,z,x,A,B,D;return K(function(F){if(1==F.g)return h=a.presentationTimeline,k=!a.sb||!a.$.Ae,l=a.$.start,m=a.$.duration,n=a.M.mimeType.split("/")[1],r=b,p=null,u=[r(d,e,f,!1),"webm"==n?r(c.Y(),c.Ka,c.ra,!0):null],r=null,C(F,Promise.all(u),2);v=F.h;y=v[0];z=v[1]||null;x=null;A=l-g;B=l;D=m?l+m:Infinity;if("mp4"==n)var J=tq(y,e,d,c,A,B,D);else{J=new vq(z);if(440786851!=wq(J).id)throw new O(2,3,3008);var G=wq(J);if(408125543!=G.id)throw new O(2,3,3009);
760
- J=G.g.byteOffset;G=new vq(G.g);for(var H=null;G.fa();){var I=wq(G);if(357149030==I.id){H=I;break}}if(!H)throw new O(2,3,3010);H=new vq(H.g);I=1E6;for(G=null;H.fa();){var L=wq(H);if(2807729==L.id)I=Aq(L);else if(17545==L.id)if(4==L.g.byteLength)G=L.g.getFloat32(0);else if(8==L.g.byteLength)G=L.g.getFloat64(0);else throw new O(2,3,3003);}if(null==G)throw new O(2,3,3011);H=I/1E9;G*=H;I=wq(new vq(y));if(475249515!=I.id)throw new O(2,3,3007);J=Bq(I,J,H,G,d,c,A,B,D)}x=J;h.Qc(x);p=new uj(x);k&&p.Ub(B,D,
760
+ J=G.g.byteOffset;G=new vq(G.g);for(var H=null;G.ga();){var I=wq(G);if(357149030==I.id){H=I;break}}if(!H)throw new O(2,3,3010);H=new vq(H.g);I=1E6;for(G=null;H.ga();){var L=wq(H);if(2807729==L.id)I=Aq(L);else if(17545==L.id)if(4==L.g.byteLength)G=L.g.getFloat32(0);else if(8==L.g.byteLength)G=L.g.getFloat64(0);else throw new O(2,3,3003);}if(null==G)throw new O(2,3,3011);H=I/1E9;G*=H;I=wq(new vq(y));if(475249515!=I.id)throw new O(2,3,3007);J=Bq(I,J,H,G,d,c,A,B,D)}x=J;h.Qc(x);p=new uj(x);k&&p.Ub(B,D,
761
761
  !0);return F.return(p)})}function Gq(a){return a.Xc}function Iq(a){var b=pq(a,Gq,"RepresentationIndex");a=oq(a,Gq,"indexRange");a=og(a||"");b&&(a=lg(b,"range",og,a));return a}function Hq(a,b){Kq(a,b);if(!Iq(a))throw new O(2,4,4002);}function Kq(a,b){var c=a.M.mimeType.split("/")[1];if(a.M.contentType!=Bc&&"mp4"!=c&&"webm"!=c)throw new O(2,4,4006);if("webm"==c&&!b)throw new O(2,4,4005);}
762
- function Eq(a){var b=a.M;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Hd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Lq(a,b,c){var d=Dq(a,Mq,c),e=Nq(a);if(!e.ta&&!e.timeline&&1<e.ac.length)throw new O(2,4,4002);if(!e.ta&&!a.$.duration&&!e.timeline&&1==e.ac.length)throw new O(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new O(2,4,4002);var f=null,g=null;a.qa.id&&a.M.id&&(g=b[a.qa.id+","+a.M.id])&&(f=g.segmentIndex);var h=Oq(a.$.start,a.$.duration,a.M.Xa,e,d,c);b=!f;f?f.Pc(h,a.presentationTimeline.hb()):f=new uj(h);a.presentationTimeline.Qc(h);a.sb&&a.$.Ae||f.Ub(a.$.start,a.$.duration?a.$.start+a.$.duration:
762
+ function Eq(a){var b=a.M;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Hd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Lq(a,b,c){var d=Dq(a,Mq,c),e=Nq(a);if(!e.ta&&!e.timeline&&1<e.ac.length)throw new O(2,4,4002);if(!e.ta&&!a.$.duration&&!e.timeline&&1==e.ac.length)throw new O(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new O(2,4,4002);var f=null,g=null;a.qa.id&&a.M.id&&(g=b[a.qa.id+","+a.M.id])&&(f=g.segmentIndex);var h=Oq(a.$.start,a.$.duration,a.M.Xa,e,d,c);b=!f;f?f.Pc(h,a.presentationTimeline.Ya()):f=new uj(h);a.presentationTimeline.Qc(h);a.sb&&a.$.Ae||f.Ub(a.$.start,a.$.duration?a.$.start+a.$.duration:
763
763
  Infinity,b);g&&(g.segmentIndex=f);return{Wb:function(){f&&0!=f.Gb()||f.Ed(h);return Promise.resolve(f)}}}function Mq(a){return a.yb}function Nq(a){var b=Pq(a);a=nq(a,Mq);var c=a.Zc;0==c&&(c=1);var d=0;a.ta?d=a.ta*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ta:a.ta,startTime:d,Zc:c,lb:a.lb,timeline:a.timeline,ac:b}}
764
764
  function Oq(a,b,c,d,e,f){var g=d.ac.length;d.timeline&&d.timeline.length!=d.ac.length&&(g=Math.min(d.timeline.length,d.ac.length));for(var h=a-d.lb,k=b?a+b:Infinity,l=[],m=d.startTime,n={},r=0;r<g;n={uc:n.uc,rc:n.rc},r++){n.rc=d.ac[r];var p=void 0;p=null!=d.ta?m+d.ta:d.timeline?d.timeline[r].end:m+b;n.uc=null;l.push(new R(a+m,a+p,function(u){return function(){null==u.uc&&(u.uc=wc(c(),[u.rc.kh]));return u.uc}}(n),n.rc.start,n.rc.end,e,h,a,k,[],"",null,null,wh,f));m=p}return l}
765
765
  function Pq(a){return[a.M.yb,a.ma.yb,a.qa.yb].filter(Wc).map(function(b){return dg(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Gf&&(a.Gf=!0);var c=b.getAttribute("media");b=lg(b,"mediaRange",og,{start:0,end:null});return{kh:c,start:b.start,end:b.end}})};function Qq(a,b,c,d,e,f,g){var h=Rq(a,g),k=Sq(a);Tq(k);var l=Xe(a);if(k.Nc)return Kq(a,h),{Wb:function(){var u=mq(k.Nc,l.M.id,null,null,l.bandwidth||null,null);u=wc(l.M.Xa(),[u]);return Jq(l,b,h,u,0,null,k.lb)}};if(k.ta)return d||"image"===a.ma.contentType||(a.presentationTimeline.Ne(k.ta),a.presentationTimeline.Gd(a.$.start)),{Wb:function(){return Uq(l,k,e,h,f,g)}};var m=null;d=d=null;a.qa.id&&a.M.id&&(d=a.qa.id+","+a.M.id,d=c[d])&&(m=d.segmentIndex);var n=a.$.start,r=a.$.duration?n+a.$.duration:
766
- Infinity,p=!(a.sb&&a.$.Ae);m?(c=m,Vq(c,k,n,r,p,h),c.Wa(a.presentationTimeline.hb())):m=new Wq(k,a.M.id,a.bandwidth,a.M.Xa,n,r,h,p,g,a.M.Ye);k.timeline&&"image"!==a.ma.contentType&&a.presentationTimeline.Pf(k.timeline,n);d&&a.sb&&(d.segmentIndex=m);return{Wb:function(){m instanceof Wq&&0==m.Gb()&&Vq(m,k,n,r,p,h);return Promise.resolve(m)}}}function Xq(a){return a.Yc}
766
+ Infinity,p=!(a.sb&&a.$.Ae);m?(c=m,Vq(c,k,n,r,p,h),c.Wa(a.presentationTimeline.Ya())):m=new Wq(k,a.M.id,a.bandwidth,a.M.Xa,n,r,h,p,g,a.M.Ye);k.timeline&&"image"!==a.ma.contentType&&a.presentationTimeline.Pf(k.timeline,n);d&&a.sb&&(d.segmentIndex=m);return{Wb:function(){m instanceof Wq&&0==m.Gb()&&Vq(m,k,n,r,p,h);return Promise.resolve(m)}}}function Xq(a){return a.Yc}
767
767
  function Sq(a){var b=nq(a,Xq),c=oq(a,Xq,"media");a=oq(a,Xq,"index");return{ta:b.ta,timescale:b.timescale,Zc:b.Zc,lb:b.lb,jf:b.jf,timeline:b.timeline,bc:c,Nc:a}}function Tq(a){var b=a.Nc?1:0;b+=a.timeline?1:0;b+=a.ta?1:0;if(0==b)throw new O(2,4,4002);1!=b&&(a.Nc&&(a.timeline=null),a.ta=null);if(!a.Nc&&!a.bc)throw new O(2,4,4002);}
768
- function Uq(a,b,c,d,e,f){function g(I){var L=(I-u)*p,M=L+b.lb,P=L+m;L=P+p;var S=Math.min(L,k());P=new R(P,S,function(){var W=M*v;"BigInt"in window&&W>Number.MAX_SAFE_INTEGER&&(W=BigInt(M)*BigInt(v));W=mq(y,x,I,null,z,W);return wc(A(),[W])},0,null,d,B,m,k(),[],"",null,null,wh,f);P.j=L;return P}function h(){var I=[Math.max(l.hb(),m),Math.min(l.ub(),k())].map(function(L){return L-m});return[Math.ceil(I[0]/p),Math.ceil(I[1]/p)-1].map(function(L){return L+u})}function k(){var I=null!=n&&e[n]||r;return I?
769
- m+I:Infinity}var l=a.presentationTimeline,m=a.$.start,n=a.qa.id,r=a.$.duration,p=b.ta,u=b.Zc,v=b.timescale,y=b.bc,z=a.bandwidth||null,x=a.M.id,A=a.M.Xa,B=m-b.lb,D=h();a=a.sb?Math.max(D[0],D[1]-c+1):D[0];D=D[1];c=[];for(var F=a;F<=D;++F){var J=g(F);c.push(J)}var G=new uj(c);c=l.ub()<k();F=l.S();if(c||F){var H=Math.max(a,D+1);G.Md(p,function(){var I=l.hb();G.Wa(I);var L=t(h());L.next();L=L.next().value;for(var M=[];H<=L;){var P=g(H);M.push(P);H++}return I>k()&&!M.length?null:M})}return Promise.resolve(G)}
768
+ function Uq(a,b,c,d,e,f){function g(I){var L=(I-u)*p,M=L+b.lb,P=L+m;L=P+p;var S=Math.min(L,k());P=new R(P,S,function(){var W=M*v;"BigInt"in window&&W>Number.MAX_SAFE_INTEGER&&(W=BigInt(M)*BigInt(v));W=mq(y,x,I,null,z,W);return wc(A(),[W])},0,null,d,B,m,k(),[],"",null,null,wh,f);P.j=L;return P}function h(){var I=[Math.max(l.Ya(),m),Math.min(l.ub(),k())].map(function(L){return L-m});return[Math.ceil(I[0]/p),Math.ceil(I[1]/p)-1].map(function(L){return L+u})}function k(){var I=null!=n&&e[n]||r;return I?
769
+ m+I:Infinity}var l=a.presentationTimeline,m=a.$.start,n=a.qa.id,r=a.$.duration,p=b.ta,u=b.Zc,v=b.timescale,y=b.bc,z=a.bandwidth||null,x=a.M.id,A=a.M.Xa,B=m-b.lb,D=h();a=a.sb?Math.max(D[0],D[1]-c+1):D[0];D=D[1];c=[];for(var F=a;F<=D;++F){var J=g(F);c.push(J)}var G=new uj(c);c=l.ub()<k();F=l.S();if(c||F){var H=Math.max(a,D+1);G.Md(p,function(){var I=l.Ya();G.Wa(I);var L=t(h());L.next();L=L.next().value;for(var M=[];H<=L;){var P=g(H);M.push(P);H++}return I>k()&&!M.length?null:M})}return Promise.resolve(G)}
770
770
  function Rq(a,b){var c=oq(a,Xq,"initialization");if(!c)return null;var d=a.M.id,e=a.bandwidth||null,f=a.M.Xa;return new uh(function(){var g=mq(c,d,null,null,e,null);return wc(f(),[g])},0,null,Eq(a),null,null,b)}function Wq(a,b,c,d,e,f,g,h,k,l){uj.call(this,[]);this.h=a;this.F=b;this.A=c;this.C=d;this.i=e;this.m=f;this.s=g;this.u=k;this.G=l;h&&Yq(this)}oa(Wq,uj);q=Wq.prototype;q.Gb=function(){return this.h?this.h.timeline.length:0};q.release=function(){uj.prototype.release.call(this);this.h=null};
771
771
  q.Wa=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.i<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.j+=b,0===this.Gb()&&this.release())}};function Vq(a,b,c,d,e,f){a.s=f;if(a.h){c=a.h.timeline;a.h.bc=b.bc;var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end});0<b.length&&a.h.timeline.push.apply(a.h.timeline,w(b));a.m!==d&&(a.m=d)}else a.h=b,a.i=c,a.m=d;e&&Yq(a)}
772
772
  function Yq(a){if(!a.o){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.m)b.pop();else break;a.Wa(a.i);0!==b.length&&Infinity!==a.m&&(b[b.length-1].end=a.m-a.i)}}
773
773
  q.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.i)return this.j;if(!this.h)return null;var b=this.h.timeline;if(a<this.i||a>this.m)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.i;e=e.end+this.i;d<c&&(e=b[d+1].start+this.i);if(a>=f&&a<e)return d+this.j}return null};
774
- q.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.Gb()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.bc,e=this.h.timeline[a],f=e.Ah,g=this.h.jf+e.kf;c=this.i-this.h.lb;for(var h=[],k=(e.end-e.start)/e.Ya,l={},m=0;m<e.Ya;l={vc:l.vc,Ud:l.Ud},m++){var n=e.start+k*m,r=n+k;l.Ud=m+1;l.vc=null;n=new R(this.i+n,this.i+r,function(p){return function(){if(!b.h)return[];null==p.vc&&(p.vc=Zq(b.h.bc,b.F,f,b.A,g,p.Ud,b.C));return p.vc}}(l),0,null,this.s,c,this.i,this.m,[],"",null,null,wh,this.u);
775
- 0==this.G?0<m&&n.Cd():0!=m%this.G&&n.Cd();h.push(n)}c=new R(this.i+e.start,this.i+e.end,function(){return 0<e.Ya?[]:Zq(d,b.F,f,b.A,g,null,b.C)},0,null,this.s,c,this.i,this.m,h,"",null,null,wh,this.u,0<e.Ya);this.g[a]=c}return c};function Zq(a,b,c,d,e,f,g){a=mq(a,b,c,f,d||null,e);return wc(g(),[a]).map(function(h){return h.toString()})};function $q(a){this.o=null;this.u=a;this.G=new Ye;this.j=[];this.h=null;this.m=[];this.A=null;this.F=[];this.C=300;this.l=new Map;this.i=new Map;this.g=null;this.s="UNKNOWN"}$q.prototype.configure=function(a){this.o=a};$q.prototype.destroy=function(){this.u=this.o=null;this.j=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};$q.prototype.setManifestType=function(a){this.s=a};
774
+ q.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.Gb()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.bc,e=this.h.timeline[a],f=e.Ah,g=this.h.jf+e.kf;c=this.i-this.h.lb;for(var h=[],k=(e.end-e.start)/e.Za,l={},m=0;m<e.Za;l={vc:l.vc,Ud:l.Ud},m++){var n=e.start+k*m,r=n+k;l.Ud=m+1;l.vc=null;n=new R(this.i+n,this.i+r,function(p){return function(){if(!b.h)return[];null==p.vc&&(p.vc=Zq(b.h.bc,b.F,f,b.A,g,p.Ud,b.C));return p.vc}}(l),0,null,this.s,c,this.i,this.m,[],"",null,null,wh,this.u);
775
+ 0==this.G?0<m&&n.Cd():0!=m%this.G&&n.Cd();h.push(n)}c=new R(this.i+e.start,this.i+e.end,function(){return 0<e.Za?[]:Zq(d,b.F,f,b.A,g,null,b.C)},0,null,this.s,c,this.i,this.m,h,"",null,null,wh,this.u,0<e.Za);this.g[a]=c}return c};function Zq(a,b,c,d,e,f,g){a=mq(a,b,c,f,d||null,e);return wc(g(),[a]).map(function(h){return h.toString()})};function $q(a){this.o=null;this.u=a;this.G=new Ye;this.j=[];this.h=null;this.m=[];this.A=null;this.F=[];this.C=300;this.l=new Map;this.i=new Map;this.g=null;this.s="UNKNOWN"}$q.prototype.configure=function(a){this.o=a};$q.prototype.destroy=function(){this.u=this.o=null;this.j=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};$q.prototype.setManifestType=function(a){this.s=a};
776
776
  function ar(a,b){var c,d,e,f,g,h,k;return K(function(l){if(1==l.g)return c=wc(a.j,[br(a,b)]),d=df(c,a.o.retryParameters),e=a.u.networkingEngine.request(8,d),Ze(a.G,e),sa(l,2),C(l,e.promise,4);if(2!=l.g)return f=l.h,g=Af(f.data),h=JSON.parse(g),1==h.VERSION&&cr(a,h,f.uri),va(l,0);if((k=wa(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new id(function(){ar(a,b)});a.g.U(a.C);E(l)})}
777
777
  function br(a,b){if(!a.m.length)return b;b=new fc(b);var c=a.A||a.m[0],d=Math.round(a.u.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));uc(e)&&jc(b,e);return b.toString()}function cr(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new id(function(){ar(a,d)});if(c=b.TTL)a.C=c;a.g.U(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
778
778
  function dr(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}
779
779
  function er(a,b){b=a.l.get(b)||new Map;for(var c=[],d={},e=t(a.m),f=e.next();!f.done;d={Ab:d.Ab},f=e.next())if(d.Ab=f.value,f=b.get(d.Ab))c.push({Te:d.Ab,location:f});else if(f=a.F.find(function(h){return function(k){return k.ai==h.Ab}}(d))){var g=b.get(f["BASE-ID"]);g&&(f["URI-REPLACEMENT"].gg?(g=new fc(g),hc(g,f["URI-REPLACEMENT"].gg),c.push({Te:d.Ab,location:g.toString()})):c.push({Te:d.Ab,location:g}))}d=Date.now();e=t(a.i.keys());for(f=e.next();!f.done;f=e.next())f=f.value,g=a.i.get(f),d>g&&
780
- a.i.delete(f);c=c.filter(function(h){for(var k=t(a.i.keys()),l=k.next();!l.done;l=k.next())if(l.value.includes((new fc(h.location)).eb))return!1;return!0});c.length&&(a.A=c[0].Te);c=c.map(function(h){return h.location});if(!c.length&&a.h)for(d=t(a.h.split(",")),f=d.next();!f.done;f=d.next())if(e=b.get(f.value))a.A=a.h,c.push(e);if(!c.length)for(b=t(b.values()),d=b.next();!d.done;d=b.next())c.push(d.value);return wc(a.j,c)};function fr(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.m=new Set}q=fr.prototype;q.release=function(){for(var a=t(this.h.concat(this.g,this.l,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.l=[];this.i=[];this.j=[]};q.Ug=function(){return this.j};q.we=function(){return this.l.slice()};q.Fg=function(){return this.i};
780
+ a.i.delete(f);c=c.filter(function(h){for(var k=t(a.i.keys()),l=k.next();!l.done;l=k.next())if(l.value.includes((new fc(h.location)).fb))return!1;return!0});c.length&&(a.A=c[0].Te);c=c.map(function(h){return h.location});if(!c.length&&a.h)for(d=t(a.h.split(",")),f=d.next();!f.done;f=d.next())if(e=b.get(f.value))a.A=a.h,c.push(e);if(!c.length)for(b=t(b.values()),d=b.next();!d.done;d=b.next())c.push(d.value);return wc(a.j,c)};function fr(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.m=new Set}q=fr.prototype;q.release=function(){for(var a=t(this.h.concat(this.g,this.l,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.l=[];this.i=[];this.j=[]};q.Ug=function(){return this.j};q.we=function(){return this.l.slice()};q.Fg=function(){return this.i};
781
781
  q.tf=function(a,b){var c,d,e,f,g=this,h,k,l,m,n,r,p,u,v,y,z,x,A,B,D,F,J,G,H,I,L,M,P,S,W,X,ia,Ia,Sa,xb;return K(function(db){if(1==db.g){h=Cc;gr(a);if(!b&&1==a.length)return k=a[0],g.h=k.audioStreams,g.g=k.videoStreams,g.l=k.textStreams,g.i=k.imageStreams,db.B(2);l=-1;for(m=0;m<a.length;m++)n=a[m],g.m.has(n.id)||(g.m.add(n.id),-1==l&&(l=m));if(-1==l)return db.return();for(var Tb=[],ua=[],eb=[],$a=[],yb=t(a),ab=yb.next();!ab.done;ab=yb.next())ab=ab.value,Tb.push(ab.audioStreams),ua.push(ab.videoStreams),
782
782
  eb.push(ab.textStreams),$a.push(ab.imageStreams);c=Tb;d=ua;e=eb;f=$a;r=c;p=d;u=e;v=f;y=t(u);for(z=y.next();!z.done;z=y.next())x=z.value,x.push(hr(h.ia));A=t(v);for(B=A.next();!B.done;B=A.next())D=B.value,D.push(hr(h.xc));return C(db,Promise.all([ir(g.h,r,l,jr,kr),ir(g.g,p,l,jr,kr),ir(g.l,u,l,jr,kr),ir(g.i,v,l,jr,kr)]),2)}F=0;J=[];if(g.g.length&&g.h.length)for(P=t(g.h),S=P.next();!S.done;S=P.next())for(W=S.value,X=t(g.g),ia=X.next();!ia.done;ia=X.next())Ia=ia.value,Sa=lh(W.drmInfos,Ia.drmInfos),W.drmInfos.length&&
783
- Ia.drmInfos.length&&!Sa.length||(xb=F++,J.push({id:xb,language:W.language,disabledUntilTime:0,primary:W.primary,audio:W,video:Ia,bandwidth:(W.bandwidth||0)+(Ia.bandwidth||0),drmInfos:Sa,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(G=g.g.length?g.g:g.h,H=t(G),I=H.next();!I.done;I=H.next())L=I.value,M=F++,J.push({id:M,language:L.language,disabledUntilTime:0,primary:L.primary,audio:L.type==h.P?L:null,video:L.type==h.da?L:null,bandwidth:L.bandwidth||0,drmInfos:L.drmInfos,
783
+ Ia.drmInfos.length&&!Sa.length||(xb=F++,J.push({id:xb,language:W.language,disabledUntilTime:0,primary:W.primary,audio:W,video:Ia,bandwidth:(W.bandwidth||0)+(Ia.bandwidth||0),drmInfos:Sa,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(G=g.g.length?g.g:g.h,H=t(G),I=H.next();!I.done;I=H.next())L=I.value,M=F++,J.push({id:M,language:L.language,disabledUntilTime:0,primary:L.primary,audio:L.type==h.P?L:null,video:L.type==h.ea?L:null,bandwidth:L.bandwidth||0,drmInfos:L.drmInfos,
784
784
  allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});g.j=J;E(db)})};
785
785
  function gr(a){a=t(a);for(var b=a.next();!b.done;b=a.next())b=b.value,b.videoStreams=lr(b.videoStreams,function(c,d){return c.id!==d.id&&c.fastSwitching==d.fastSwitching&&c.width===d.width&&c.frameRate===d.frameRate&&c.codecs===d.codecs&&c.mimeType===d.mimeType&&c.label===d.label&&zb(c.roles,d.roles)&&yf(c.closedCaptions,d.closedCaptions)&&c.bandwidth===d.bandwidth}),b.audioStreams=lr(b.audioStreams,function(c,d){return c.id!==d.id&&c.fastSwitching==d.fastSwitching&&c.channelsCount===d.channelsCount&&
786
786
  c.language===d.language&&c.bandwidth===d.bandwidth&&c.label===d.label&&c.codecs===d.codecs&&c.mimeType===d.mimeType&&zb(c.roles,d.roles)&&c.audioSamplingRate===d.audioSamplingRate&&c.primary===d.primary}),b.textStreams=lr(b.textStreams,function(c,d){return c.id!==d.id&&c.language===d.language&&c.label===d.label&&c.codecs===d.codecs&&c.mimeType===d.mimeType&&c.bandwidth===d.bandwidth&&zb(c.roles,d.roles)}),b.imageStreams=lr(b.imageStreams,function(c,d){return c.id!==d.id&&c.width===d.width&&c.codecs===
787
787
  d.codecs&&c.mimeType===d.mimeType})}function lr(a,b){var c=[],d={};a=t(a);for(var e=a.next();!e.done;d={fd:d.fd},e=a.next())d.fd=e.value,c.some(function(f){return function(g){return b(f.fd,g)}}(d))||c.push(d.fd);return c}
788
- function mr(a){var b,c,d,e,f,g,h,k,l,m,n,r,p,u,v,y,z,x,A,B,D,F,J,G,H,I,L;return K(function(M){switch(M.g){case 1:b=Cc;if(1==a.length)return M.return(a[0]);c=a.map(function(P){return P.filter(function(S){return S.type==b.P})});d=a.map(function(P){return P.filter(function(S){return S.type==b.da})});e=a.map(function(P){return P.filter(function(S){return S.type==b.ia})});f=a.map(function(P){return P.filter(function(S){return S.type==b.xc})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,k.push(nr(b.ia));
788
+ function mr(a){var b,c,d,e,f,g,h,k,l,m,n,r,p,u,v,y,z,x,A,B,D,F,J,G,H,I,L;return K(function(M){switch(M.g){case 1:b=Cc;if(1==a.length)return M.return(a[0]);c=a.map(function(P){return P.filter(function(S){return S.type==b.P})});d=a.map(function(P){return P.filter(function(S){return S.type==b.ea})});e=a.map(function(P){return P.filter(function(S){return S.type==b.ia})});f=a.map(function(P){return P.filter(function(S){return S.type==b.xc})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,k.push(nr(b.ia));
789
789
  l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(nr(b.xc));return C(M,ir([],c,0,or,pr),2);case 2:return r=M.h,C(M,ir([],d,0,or,pr),3);case 3:return p=M.h,C(M,ir([],e,0,or,pr),4);case 4:return u=M.h,C(M,ir([],f,0,or,pr),5);case 5:v=M.h;y=0;if(p.length&&r.length)for(D=t(r),F=D.next();!F.done;F=D.next())for(J=F.value,G=t(p),H=G.next();!H.done;H=G.next())I=H.value,L=y++,I.variantIds.push(L),J.variantIds.push(L);else for(z=p.concat(r),x=t(z),A=x.next();!A.done;A=x.next())B=A.value,B.variantIds=
790
790
  [y++];return M.return(p.concat(r).concat(u).concat(v))}})}
791
791
  function ir(a,b,c,d,e){var f,g,h,k,l,m,n,r,p,u,v,y,z,x,A,B,D,F,J,G,H;return K(function(I){switch(I.g){case 1:f=Cc;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=t(a);l=k.next();case 2:if(l.done){I.B(4);break}m=l.value;return C(I,qr(m,b,c,e,g),5);case 5:n=I.h;if(!n)throw new O(2,4,4037);l=k.next();I.B(2);break;case 4:r=t(g);for(p=r.next();!p.done;p=r.next())for(u=p.value,v=t(u),y=v.next();!y.done;y=v.next())z=y.value,(x=rr(z,b,d,e,g))&&a.push(x);A=t(g);for(p=A.next();!p.done;p=
@@ -798,7 +798,7 @@ function kr(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSche
798
798
  (a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=jr(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),kr(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&kr(a.trickModeVideo,b)}
799
799
  function pr(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(w(a.keyIds),w(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,w(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=t(b.closedCaptions),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;a.closedCaptions.set(c,d)}}
800
800
  function sr(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=b,f={audio:vr,video:vr,text:wr,image:xr}[e.type],g={audio:yr,video:zr,text:Ar,image:Br}[e.type],h=null;d=t(d.value);for(var k=d.next();!k.done;k=d.next())k=k.value,!f(e,k)||h&&!g(e,h,k)||(h=k);e=h;if(!e)return;c.push(e)}b.matchedStreams=c}
801
- function vr(a,b){function c(d){if(!Cr.has(d)){var e=Ic(d);Cr.set(d,e)}return Cr.get(d)}return b.mimeType!=a.mimeType||c(b.codecs)!=c(a.codecs)||a.drmInfos&&!jh(a.drmInfos,b.drmInfos)?!1:!0}function wr(a,b){return a.language?b.language?0==cd(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function xr(a){return a.tilesLayout?!0:!1}
801
+ function vr(a,b){function c(d){if(!Cr.has(d)){var e=Ic(d);Cr.set(d,e)}return Cr.get(d)}return b.mimeType!=a.mimeType||c(b.codecs)!=c(a.codecs)||a.drmInfos&&!jh(a.drmInfos,b.drmInfos)?!1:!0}function wr(a,b){return a.language?b.language?a.forced!==b.forced||0==cd(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function xr(a){return a.tilesLayout?!0:!1}
802
802
  function yr(a,b,c){if(a.id==c.id)return!0;var d=cd(a.language,b.language),e=cd(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;
803
803
  d=Dr(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Er)return!0;if(d==Fr)return!1;d=Dr(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Er?!0:d==Fr?!1:a.bandwidth&&Gr(a.bandwidth,b.bandwidth,c.bandwidth)==Er?!0:!1}
804
804
  function zr(a,b,c){if(a.id==c.id)return!0;var d=Dr(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Er)return!0;if(d==Fr)return!1;if(a.frameRate){d=Dr(a.frameRate,b.frameRate,c.frameRate);if(d==Er)return!0;if(d==Fr)return!1}return a.bandwidth&&Gr(a.bandwidth,b.bandwidth,c.bandwidth)==Er?!0:!1}
@@ -814,14 +814,14 @@ function Kr(a){var b,c,d,e,f;return K(function(g){if(1==g.g)return b=df(a.o,a.g.
814
814
  function Nr(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=xg(b,"MPD");if(!d)throw new O(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k.return(Or(a,d,c));f=a.g.dash.xlinkFailGracefully;g=sq(d,a.g.retryParameters,f,c,a.i.networkingEngine);Ze(a.C,g);return C(k,g.promise,2)}h=k.h;return k.return(Or(a,h,c))})}
815
815
  function Or(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,u,v,y,z,x,A,B,D,F,J,G,H,I,L,M,P,S,W,X,ia,Ia,Sa,xb,db,Tb,ua,eb,$a,yb,ab,kh,xd,te,ue;return K(function(ib){switch(ib.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=dg(b,"Location").map(jg).filter(Wc);0<f.length&&(g=wc(e,f),e=a.o=g);h=Promise.resolve();if((k=cg(b,"ContentSteering"))&&a.i)if(l=k.getAttribute("defaultServiceLocation"),a.h)a.h.j=e,a.h.h=l;else if(a.h=new $q(a.i),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.j=e,a.h.h=l,m=jg(k))(n=
816
816
  lg(k,"queryBeforeStart",tg,!1))?h=ar(a.h,m):ar(a.h,m);r=dg(b,"BaseURL");u=!1;if(a.h)for(a.h.l.clear(),v=t(r),y=v.next();!y.done;y=v.next())z=y.value,x=z.getAttribute("serviceLocation"),A=jg(z),x&&A&&(dr(a.h,"BaseURL",x,A),u=!0);u&&a.h||(B=r.map(jg),p=wc(e,B));D=function(){return a.h&&u?er(a.h,"BaseURL"):p?p:[]};F=0;r&&r.length&&(F=lg(r[0],"availabilityTimeOffset",sg)||0);J=a.g.dash.ignoreMinBufferTime;G=0;J||(G=lg(b,"minBufferTime",ng)||0);a.F=lg(b,"minimumUpdatePeriod",ng,-1);H=lg(b,"availabilityStartTime",
817
- mg);I=lg(b,"timeShiftBufferDepth",ng);L=a.g.dash.ignoreSuggestedPresentationDelay;M=null;L||(M=lg(b,"suggestedPresentationDelay",ng));P=a.g.dash.ignoreMaxSegmentDuration;S=null;P||(S=lg(b,"maxSegmentDuration",ng));W=b.getAttribute("type")||"static";if(a.j)for(X=a.j.presentationTimeline,ia=t(Object.values(a.m)),Ia=ia.next();!Ia.done;Ia=ia.next())Sa=Ia.value,Sa.segmentIndex&&Sa.segmentIndex.Wa(X.hb());else xb=a.g.defaultPresentationDelay||1.5*G,db=null!=M?M:xb,X=new Zi(H,db,a.g.dash.autoCorrectDrift);
817
+ mg);I=lg(b,"timeShiftBufferDepth",ng);L=a.g.dash.ignoreSuggestedPresentationDelay;M=null;L||(M=lg(b,"suggestedPresentationDelay",ng));P=a.g.dash.ignoreMaxSegmentDuration;S=null;P||(S=lg(b,"maxSegmentDuration",ng));W=b.getAttribute("type")||"static";if(a.j)for(X=a.j.presentationTimeline,ia=t(Object.values(a.m)),Ia=ia.next();!Ia.done;Ia=ia.next())Sa=Ia.value,Sa.segmentIndex&&Sa.segmentIndex.Wa(X.Ya());else xb=a.g.defaultPresentationDelay||1.5*G,db=null!=M?M:xb,X=new Zi(H,db,a.g.dash.autoCorrectDrift);
818
818
  X.ec("static"==W);(Tb=X.S())&&!isNaN(a.g.availabilityWindowOverride)&&(I=a.g.availabilityWindowOverride);null==I&&(I=Infinity);X.Ld(I);ua=b.getAttribute("profiles")||"";eb={sb:"static"!=W,presentationTimeline:X,qa:null,$:null,ma:null,M:null,bandwidth:0,Gf:!1,Tb:F,profiles:ua.split(",")};$a=Pr(a,eb,D,b);yb=$a.duration;ab=$a.periods;"static"!=W&&$a.yf||X.Ja(yb||Infinity);a.A&&!a.s&&(kh=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.s=a.i.isLowLatencyMode());a.s?X.Xf(a.A):a.A&&Ta("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
819
819
  X.Ne(S||1);return C(ib,a.l.tf(ab,eb.sb),2);case 2:return C(ib,h,3);case 3:a.s&&(G=0);if(a.j){a.j.variants=a.l.j;xd=a.l.we();0<xd.length&&(a.j.textStreams=xd);a.j.imageStreams=a.l.i;a.i.filter(a.j);ib.B(4);break}a.j={presentationTimeline:X,variants:a.l.j,textStreams:a.l.we(),imageStreams:a.l.i,offlineSessionIds:[],minBufferTime:G||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Qr(b)};if(!X.eg()){ib.B(5);break}te=dg(b,"UTCTiming");return C(ib,
820
820
  Rr(a,D,te),6);case 6:ue=ib.h;if(!a.i)return ib.return();X.Yf(ue);case 5:X.Bd();case 4:a.i.makeTextStreamsForClosedCaptions(a.j),E(ib)}})}
821
821
  function Qr(a){a=cg(a,"ServiceDescription");if(!a)return null;var b=cg(a,"Latency"),c=cg(a,"PlaybackRate");if(b&&b.getAttribute("max")||c){a=b&&b.getAttribute("max")?parseInt(b.getAttribute("max"),10)/1E3:null;var d=c?parseFloat(c.getAttribute("max")):null;b=b&&b.getAttribute("min")?parseInt(b.getAttribute("min"),10)/1E3:null;c=c?parseFloat(c.getAttribute("min")):null;return{maxLatency:a,maxPlaybackRate:d,minLatency:b,minPlaybackRate:c}}return null}
822
822
  function Pr(a,b,c,d){var e=lg(d,"mediaPresentationDuration",ng),f=[],g=0;d=dg(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=lg(k,"start",ng,g),n=k.id,r=lg(k,"duration",ng),p=null;if(l){var u=lg(l,"start",ng);null!=u&&(p=u-m)}else null!=e&&(p=e-m);null==p&&(p=r);if(!(null!==a.u&&null!==n&&null!==m&&m<a.u)||a.J.includes(n)||h+1==d.length){null!==m&&(null===a.u||m>a.u)&&(a.u=m);g=Sr(a,b,c,{start:m,duration:p,node:k,Ae:null==p||!l});f.push(g);b.qa.id&&p&&(a.K[b.qa.id]=p);if(null==p){g=
823
823
  null;break}g=m+p}}a.J=f.map(function(v){return v.id});return null!=e?{periods:f,duration:e,yf:!1}:{periods:f,duration:g,yf:!0}}
824
- function Sr(a,b,c,d){b.qa=Tr(a,d.node,null,c);b.$=d;b.qa.Tb=b.Tb;b.qa.id||(b.qa.id="__shaka_period_"+d.start);var e=dg(d.node,"EventStream");c=b.presentationTimeline.hb();e=t(e);for(var f=e.next();!f.done;f=e.next())Ur(a,d.start,d.duration,f.value,c);c=dg(d.node,"AdaptationSet").map(function(m){return Vr(a,b,m)}).filter(Wc);if(b.sb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.wh);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new O(2,4,4018);
824
+ function Sr(a,b,c,d){b.qa=Tr(a,d.node,null,c);b.$=d;b.qa.Tb=b.Tb;b.qa.id||(b.qa.id="__shaka_period_"+d.start);var e=dg(d.node,"EventStream");c=b.presentationTimeline.Ya();e=t(e);for(var f=e.next();!f.done;f=e.next())Ur(a,d.start,d.duration,f.value,c);c=dg(d.node,"AdaptationSet").map(function(m){return Vr(a,b,m)}).filter(Wc);if(b.sb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.wh);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new O(2,4,4018);
825
825
  }d=c.filter(function(m){return!m.gf});c=c.filter(function(m){return m.gf});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.gf.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={gd:h.gd},l=k.next())h.gd=l.value,h.gd.trickModeVideo=e.streams.find(function(m){return function(n){return Ic(m.gd.codecs)==Ic(n.codecs)}}(h))}}}c=Wr(a.g.disableAudio,d,"audio");e=Wr(a.g.disableVideo,d,"video");f=Wr(a.g.disableText,
826
826
  d,Bc);d=Wr(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new O(2,4,4004);return{id:b.qa.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function Wr(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,w(e.streams));return d},[])}
827
827
  function Vr(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ma=Tr(a,c,b.qa,null);var e=!1,f=dg(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Wc),h=void 0,k=b.ma.contentType==Bc;k&&(h="subtitle");f=t(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
@@ -850,7 +850,7 @@ case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return
850
850
  3);break;case 5:wa(n);case 3:g=f.next();n.B(2);break;case 4:return Ta("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
851
851
  function Ur(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=lg(d,"timescale",rg)||1;d=t(dg(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=lg(k,"presentationTime",rg)||0,m=lg(k,"duration",rg)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.i.onTimelineRegionAdded(k))}}
852
852
  function $r(a,b,c,d,e){var f,g,h,k;return K(function(l){if(1==l.g)return f=kf,g=e?0:1,h=Uj(b,c,d,a.g.retryParameters),C(l,Mr(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function Yr(a,b){b=Ec(a,b);return Nc(b)?Bc:a.split("/")[0]}function Mr(a,b,c,d){b=a.i.networkingEngine.request(c,b,d);Ze(a.C,b);return b.promise}N("shaka.dash.DashParser",Ir);ph["application/dash+xml"]=function(){return new Ir};ph["video/vnd.mpeg.dash.mpd"]=function(){return new Ir};function ds(){}N("shaka.dependencies",ds);ds.has=function(a){return es.has(a)};ds.add=function(a,b){if(!fs[a])throw Error(a+" is not supported");a==gs?le("mux.js","mux.js is no longer used in Shaka Player."):es.set(a,function(){return b})};var gs="muxjs",fs={Ji:gs,ISOBoxer:"ISOBoxer"};ds.Allowed=fs;var es=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function hs(a,b,c){this.type=a;this.g=b;this.segments=c||null}function is(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}is.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.g?this.g.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};
853
- function ls(a){var b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}is.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Z(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function ms(a,b){a=a.getAttribute(b);if(!a)throw new O(2,4,4023,b);return a.value}function ns(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.Ya=c}
853
+ function js(a){var b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}is.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Z(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function ms(a,b){a=a.getAttribute(b);if(!a)throw new O(2,4,4023,b);return a.value}function ns(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.Za=c}
854
854
  function os(a,b){this.name=a;this.value=b};function ps(a,b){return a.filter(function(c){return c.name==b})}function qs(a,b){return a.filter(function(c){return ms(c,"TYPE")==b})}function rs(a,b){a=ps(a,b);return a.length?a[0]:null}function ss(a,b,c){c=void 0===c?0:c;return(a=rs(a,b))?Number(a.value):c}function ts(a,b,c){return b?us(a,[b],c):[]}
855
855
  function us(a,b,c){if(!b.length)return[];b=wc(a,b);a=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=a,f=e.push;var g=d.value;if((d=c)&&d.size){g=String(g).replace(/%7B/g,"{").replace(/%7D/g,"}");var h=g.match(/{\$\w*}/g);if(h){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=k.value;var l=k.slice(2,k.length-1),m=d.get(l);if(m)g=g.replace(k,m);else throw new O(2,4,4039,l);}}d=g}else d=g;f.call(e,d)}return a};function vs(a){this.h=a||"";this.g=0}function ws(a){xs(a,/[ \t]+/gm)}function xs(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function ys(a){return a.g==a.h.length?null:(a=xs(a,/[^ \t\n]*/gm))?a[0]:null};function zs(){this.g=0}
856
856
  function As(a,b){b=Af(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(c[0]))throw new O(2,4,4015);b=0;for(var d=!0,e=t(c),f=e.next();!f.done;f=e.next())if(f=f.value,/^#(?!EXT)/m.test(f)||d)d=!1;else if(f=Bs(a,f),--a.g,Cs.includes(f.name)){b=1;break}else"EXT-X-STREAM-INF"==f.name&&(d=!0);e=[];d=!0;for(f=0;f<c.length;f++){var g=c[f],h=c[f+1];if(/^#(?!EXT)/m.test(g)||d)d=!1;else{g=Bs(a,g);if(Ds.includes(g.name)){if(1!=b)throw new O(2,4,4017);g=
@@ -859,27 +859,27 @@ g.name&&(g.g.push(new os("URI",h)),d=!0)}}return new hs(b,e)}function Bs(a,b){a=
859
859
  var Cs="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF".split(" "),Ds="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Es(){}function Fs(a){try{var b=Gs(a);return Pe({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Ne(c)}}
860
860
  function Gs(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new O(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new O(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Xf(a):e=Ef(a);return{data:e,contentType:c}}N("shaka.net.DataUriPlugin",Es);Es.parse=Fs;af("data",Fs);function Hs(a){var b=Kc(a),c=b.split("/")[0];a=Lc(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map}}
861
861
  function Is(a,b){function c(v){return d(v.name)}function d(v){v=v.toLowerCase();switch(v){case "avc1":case "avc3":e.push(v+".42E01E");g=!0;break;case "hev1":case "hvc1":e.push(v+".1.6.L93.90");g=!0;break;case "dvh1":case "dvhe":e.push(v+".05.04");g=!0;break;case "vp09":e.push(v+".00.10.08");g=!0;break;case "av01":e.push(v+".0.01M.08");g=!0;break;case "mp4a":e.push("mp4a.40.2");f=!0;break;case "ac-3":case "ec-3":case "opus":case "flac":e.push(v),f=!0}}var e=[],f=!1,g=!1,h=null,k=null,l=null,m=null,
862
- n=null;(new Kf).box("moov",Pf).box("trak",Pf).O("tkhd",function(v){v=Oh(v.reader,v.version);k=String(v.height);l=String(v.width)}).box("mdia",Pf).O("mdhd",function(v){h=Mh(v.reader,v.version).language}).box("minf",Pf).box("stbl",Pf).O("stsd",Rf).box("mp4a",function(v){var y=v.reader;y.skip(6);y.skip(2);y.skip(8);var z=y.ya();y.skip(2);y.skip(2);y.skip(2);y=y.ya()+y.ya()/65536;m=z;n=y;v.reader.fa()?Pf(v):c(v)}).box("esds",function(v){v=Ph(v.reader);e.push(v.ea);f=!0}).box("ac-3",c).box("ec-3",c).box("opus",
863
- c).box("Opus",c).box("fLaC",c).box("avc1",function(v){v=Qh(v.reader,v.name);e.push(v.ea);g=!0}).box("avc3",function(v){v=Qh(v.reader,v.name);e.push(v.ea);g=!0}).box("hev1",c).box("hvc1",c).box("dvh1",c).box("dvhe",c).box("vp09",c).box("av01",c).box("enca",Sf).box("encv",Sf).box("sinf",Pf).box("frma",function(v){v=Rh(v.reader).ea;d(v)}).parse(a||b,!0);if(!e.length)return null;var r=f&&!g,p=new Map;if(g){var u=new sb("video/mp4");a&&u.init(a);u.i(b);a=t(u.j());for(b=a.next();!b.done;b=a.next())b=b.value,
864
- p.set(b,b);u.h()}return{type:r?"audio":"video",mimeType:r?"audio/mp4":"video/mp4",codecs:Js(e).join(", "),language:h,height:k,width:l,channelCount:m,sampleRate:n,closedCaptions:p}}function Js(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Jc(d)[0];b.has(e)||(c.push(d),b.add(e))}return c};function Ks(){var a=this;this.g=this.h=null;this.u=1;this.o=new Map;this.H=new Map;this.J=new Map;this.J.set("video",new Map);this.J.set("audio",new Map);this.J.set(Bc,new Map);this.J.set("image",new Map);this.Va=new Set;this.i=new Map;this.l=null;this.Z="";this.la=new zs;this.I=-1;this.V=Infinity;this.aa=this.rb=!1;this.s=new id(function(){Ls(a)});this.Aa=Ms;this.C=null;this.ua=0;this.m=Infinity;this.ka=this.ha=this.K=0;this.N=new Ye;this.F=new Map;this.G=new Map;this.W=new Map;this.qb=this.A=!1;
865
- this.bb=new Na(5);this.j=null}q=Ks.prototype;q.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};q.start=function(a,b){var c=this,d;return K(function(e){return 1==e.g?(c.h=b,c.A=b.isLowLatencyMode(),C(e,Ns(c,[a]),2)):3!=e.g?(d=e.h,c.Z=d.uri,C(e,Os(c,d.data,a),3)):e.return(c.C)})};
862
+ n=null;(new Kf).box("moov",Pf).box("trak",Pf).O("tkhd",function(v){v=Oh(v.reader,v.version);k=String(v.height);l=String(v.width)}).box("mdia",Pf).O("mdhd",function(v){h=Mh(v.reader,v.version).language}).box("minf",Pf).box("stbl",Pf).O("stsd",Rf).box("mp4a",function(v){var y=v.reader;y.skip(6);y.skip(2);y.skip(8);var z=y.ya();y.skip(2);y.skip(2);y.skip(2);y=y.ya()+y.ya()/65536;m=z;n=y;v.reader.ga()?Pf(v):c(v)}).box("esds",function(v){v=Ph(v.reader);e.push(v.fa);f=!0}).box("ac-3",c).box("ec-3",c).box("opus",
863
+ c).box("Opus",c).box("fLaC",c).box("avc1",function(v){v=Qh(v.reader,v.name);e.push(v.fa);g=!0}).box("avc3",function(v){v=Qh(v.reader,v.name);e.push(v.fa);g=!0}).box("hev1",c).box("hvc1",c).box("dvh1",c).box("dvhe",c).box("vp09",c).box("av01",c).box("enca",Sf).box("encv",Sf).box("sinf",Pf).box("frma",function(v){v=Rh(v.reader).fa;d(v)}).parse(a||b,!0);if(!e.length)return null;var r=f&&!g,p=new Map;if(g){var u=new sb("video/mp4");a&&u.init(a);u.i(b);a=t(u.j());for(b=a.next();!b.done;b=a.next())b=b.value,
864
+ p.set(b,b);u.h()}return{type:r?"audio":"video",mimeType:r?"audio/mp4":"video/mp4",codecs:Js(e).join(", "),language:h,height:k,width:l,channelCount:m,sampleRate:n,closedCaptions:p}}function Js(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Jc(d)[0];b.has(e)||(c.push(d),b.add(e))}return c};function Ks(){var a=this;this.g=this.h=null;this.u=1;this.o=new Map;this.H=new Map;this.J=new Map;this.J.set("video",new Map);this.J.set("audio",new Map);this.J.set(Bc,new Map);this.J.set("image",new Map);this.Va=new Set;this.i=new Map;this.l=null;this.Z="";this.ua=new zs;this.I=-1;this.V=Infinity;this.aa=this.rb=!1;this.s=new id(function(){Ls(a)});this.da=Ms;this.C=null;this.Aa=0;this.m=Infinity;this.la=this.ka=this.K=0;this.N=new Ye;this.F=new Map;this.G=new Map;this.W=new Map;this.qb=this.A=!1;
865
+ this.cb=new Na(5);this.j=null}q=Ks.prototype;q.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};q.start=function(a,b){var c=this,d;return K(function(e){return 1==e.g?(c.h=b,c.A=b.isLowLatencyMode(),C(e,Ns(c,[a]),2)):3!=e.g?(d=e.h,c.Z=d.uri,C(e,Os(c,d.data,a),3)):e.return(c.C)})};
866
866
  q.stop=function(){this.s&&(this.s.stop(),this.s=null);var a=[];this.N&&(a.push(this.N.destroy()),this.N=null);this.g=this.h=null;this.Va.clear();this.C=null;this.i.clear();this.H.clear();this.G.clear();this.o.clear();this.W.clear();this.j&&this.j.destroy();return Promise.all(a)};
867
867
  q.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){if(!Ps(a))return m.return();b=[];c=Array.from(a.i.values());a.m=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(Qs(a,g));return C(m,Promise.all(b),2)}Rs(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.Lc});d.length&&!h&&(k=Ss,Ts(a,k.ig),l=d.map(function(n){return n.ib}),a.l.Ja(Math.min.apply(Math,w(l))),a.h.updateDuration());
868
868
  h&&Us(a);E(m)})};function Vs(a,b){return Ps(a)?a.J.get(b.type):b.Dd}
869
- function Qs(a,b){var c,d,e,f,g,h,k,l,m,n,r,p,u,v,y,z,x,A,B,D,F,J,G,H,I,L,M,P,S,W;return K(function(X){if(1==X.g){c=[];d=t(b.Y());for(e=d.next();!e.done;e=d.next())f=e.value,g=new fc(f),h=g.g,b.ld&&(0<=b.Ra&&h.add("_HLS_msn",String(b.Ra)),0<=b.Sa&&h.add("_HLS_part",String(b.Sa))),b.md&&h.add("_HLS_skip","YES"),uc(h)&&jc(g,h),c.push(g.toString());return C(X,Ns(a,c,!0),2)}k=X.h;if(!b.stream.segmentIndex)return X.return();l=As(a.la,k.data);if(1!=l.type)throw new O(2,4,4017);m=k.uri;m==k.originalUri||
870
- b.Y().includes(m)||b.Rf.push(m);n=ps(l.g,"EXT-X-DEFINE");r=Ws(a,n,m);p=b.stream;u=Vs(a,b);v=Xs(l,p.mimeType);y=v.keyIds;z=v.drmInfos;x=function(ia,Ia){return ia.size===Ia.size&&[].concat(w(ia)).every(function(Sa){return Ia.has(Sa)})};x(p.keyIds,y)||(p.keyIds=y,p.drmInfos=z,a.h.newDrmInfo(p));A=Ys(a,l,p,u,r,b.Y);B=A.segments;D=A.bandwidth;p.bandwidth=D;p.segmentIndex.Pc(B,a.l.hb());B.length&&(F=ss(l.g,"EXT-X-MEDIA-SEQUENCE",0),G=(J=rs(l.g,"EXT-X-SKIP"))?Number(Z(J,"SKIPPED-SEGMENTS")):0,H=Zs(F,B),
869
+ function Qs(a,b){var c,d,e,f,g,h,k,l,m,n,r,p,u,v,y,z,x,A,B,D,F,J,G,H,I,L,M,P,S,W;return K(function(X){if(1==X.g){c=[];d=t(b.Y());for(e=d.next();!e.done;e=d.next())f=e.value,g=new fc(f),h=g.g,b.ld&&(0<=b.Ra&&h.add("_HLS_msn",String(b.Ra)),0<=b.Sa&&h.add("_HLS_part",String(b.Sa))),b.md&&h.add("_HLS_skip","YES"),uc(h)&&jc(g,h),c.push(g.toString());return C(X,Ns(a,c,!0),2)}k=X.h;if(!b.stream.segmentIndex)return X.return();l=As(a.ua,k.data);if(1!=l.type)throw new O(2,4,4017);m=k.uri;m==k.originalUri||
870
+ b.Y().includes(m)||b.Rf.push(m);n=ps(l.g,"EXT-X-DEFINE");r=Ws(a,n,m);p=b.stream;u=Vs(a,b);v=Xs(l,p.mimeType);y=v.keyIds;z=v.drmInfos;x=function(ia,Ia){return ia.size===Ia.size&&[].concat(w(ia)).every(function(Sa){return Ia.has(Sa)})};x(p.keyIds,y)||(p.keyIds=y,p.drmInfos=z,a.h.newDrmInfo(p));A=Ys(a,l,p,u,r,b.Y);B=A.segments;D=A.bandwidth;p.bandwidth=D;p.segmentIndex.Pc(B,a.l.Ya());B.length&&(F=ss(l.g,"EXT-X-MEDIA-SEQUENCE",0),G=(J=rs(l.g,"EXT-X-SKIP"))?Number(Z(J,"SKIPPED-SEGMENTS")):0,H=Zs(F,B),
871
871
  I=H.Ra,L=H.Sa,b.Ra=I+G,b.Sa=L,M=u.get(F),p.segmentIndex.Wa(M));P=B[0];b.Kb=P.startTime;S=B[B.length-1];b.ib=S.endTime;if(W=rs(l.g,"EXT-X-ENDLIST"))b.Lc=!0;$s(a,l);E(X)})}q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};q.banLocation=function(a){this.j&&this.j.i.set(a,Date.now()+6E4)};
872
872
  function at(a,b){for(var c=-1==a.I,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=Vs(a,e);if(f=f.g[0]||null){g=t(g);for(var h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.I=Math.max(a.I,k));e.ee=k;break}}}}if(!(0>a.I))for(b=t(b),e=b.next();!e.done;e=b.next())if(c=e.value,d=c.stream.segmentIndex)if(d.g.splice(0,a.I-c.ee),d=d.g[0]||null)d=-d.startTime,c.stream.segmentIndex.offset(d),bt(a,c,d)}
873
873
  function ct(a,b){if(Infinity==a.V){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.i&&(a.V=Math.min(a.V,d.i))}}b=a.V;if(Infinity!=b)for(d=t(a.i.values()),c=d.next();!c.done;c=d.next()){c=c.value;var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.i)Ra("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.Y(),"Expect AV sync issues!");else for(bt(a,c,f.i-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.df(b)}}}
874
874
  function bt(a,b,c){b.Kb+=c;b.ib+=c;a=Vs(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.Y()}
875
- function Os(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,u,v,y,z,x,A,B,D,F,J,G,H,I,L,M,P,S,W,X;return K(function(ia){switch(ia.g){case 1:d=As(a.la,b);e=ps(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];if(1==d.type)return v=function(){return[c]},C(ia,dt(a,d,v),6);et(a,e);k=ps(d.g,"EXT-X-MEDIA");l=ps(d.g,"EXT-X-STREAM-INF");m=ps(d.g,"EXT-X-IMAGE-STREAM-INF");n=ps(d.g,"EXT-X-I-FRAME-STREAM-INF");r=ps(d.g,"EXT-X-SESSION-KEY");p=ps(d.g,"EXT-X-SESSION-DATA");u=ps(d.g,"EXT-X-CONTENT-STEERING");ft(a,p);return C(ia,gt(a,u),4);case 4:return ht(a,
875
+ function Os(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,u,v,y,z,x,A,B,D,F,J,G,H,I,L,M,P,S,W,X;return K(function(ia){switch(ia.g){case 1:d=As(a.ua,b);e=ps(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];if(1==d.type)return v=function(){return[c]},C(ia,dt(a,d,v),6);et(a,e);k=ps(d.g,"EXT-X-MEDIA");l=ps(d.g,"EXT-X-STREAM-INF");m=ps(d.g,"EXT-X-IMAGE-STREAM-INF");n=ps(d.g,"EXT-X-I-FRAME-STREAM-INF");r=ps(d.g,"EXT-X-SESSION-KEY");p=ps(d.g,"EXT-X-SESSION-DATA");u=ps(d.g,"EXT-X-CONTENT-STEERING");ft(a,p);return C(ia,gt(a,u),4);case 4:return ht(a,
876
876
  l),it(a,k),f=jt(a,l,r,k),g=kt(a,k),C(ia,lt(a,m,n),5);case 5:h=ia.h;ia.B(3);break;case 6:return y=ia.h,z=y.type,x=y.mimeType,A=y.codecs,B=y.language,D=y.height,F=y.width,J=y.channelCount,G=y.sampleRate,H=y.closedCaptions,C(ia,mt(a,a.u++,d,v,c,A,z,B,!0,"Media Playlist",J,H,null,!1,G,!1,x),7);case 7:I=ia.h,a.i.set(c,I),"video"==z&&nt(I.stream,F,D,null,null,null),f.push({id:0,language:Zc(B||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==z?I.stream:null,video:"video"==z?I.stream:null,bandwidth:I.stream.bandwidth||
877
877
  0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new O(2,7,7001);a.l=new Zi(null,0);a.l.ec(!0);1==d.type&&(Ps(a)&&(ot(a,d),L=a.m,a.s.U(L)),M=Array.from(a.i.values()),pt(a,M),Us(a));a.C={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null};if(a.aa||!a.g.hls.disableCodecGuessing){ia.B(8);
878
878
  break}P=[];S=t(a.C.variants);for(W=S.next();!W.done;W=S.next())X=W.value,X.audio&&""===X.audio.codecs&&P.push(X.audio.createSegmentIndex()),X.video&&""===X.video.codecs&&P.push(X.video.createSegmentIndex());return C(ia,Promise.all(P),8);case 8:a.h.makeTextStreamsForClosedCaptions(a.C),E(ia)}})}
879
879
  function dt(a,b,c){var d,e,f,g,h,k,l,m,n,r,p,u,v,y,z,x,A,B;return K(function(D){switch(D.g){case 1:d=Hs(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return D.return(d);e=Math.trunc((b.segments.length-1)/2);f=b.segments[e];g=ts(c(),b.segments[0].h);h=g[0];k=new fc(h);l=k.Ba.split(".").pop();if(m=qt[l])return D.return(Hs(m));n=kf;r=null;p=rt(a,b,f.g,c);a.W.clear();if(!p){D.B(2);break}u=df(p.Y(),a.g.retryParameters);return C(D,st(a,u,n,{type:0}),3);case 3:v=D.h,r=v.data;case 2:return y=df(g,
880
- a.g.retryParameters),C(D,st(a,y,n,{type:1}),4);case 4:z=D.h;(x=z.headers["content-type"])&&(x=x.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==x){var F=z.data;var J=mb(F);J=(new ci).parse(J);var G=J.Fc();J=J.xe();var H=[],I=!1,L=!1;switch(G.audio){case "aac":H.push("mp4a.40.2");I=!0;break;case "mp3":H.push("mp4a.40.34");I=!0;break;case "ac3":H.push("ac-3");I=!0;break;case "ec3":H.push("ec-3"),I=!0}switch(G.video){case "avc":J.ea?H.push(J.ea):H.push("avc1.42E01E");L=!0;break;case "hvc":J.ea?
881
- H.push(J.ea):H.push("hvc1.1.6.L93.90"),L=!0}if(H.length){G=I&&!L;I=new Map;if(L){L=new sb("video/mp2t");L.i(F);F=t(L.j());for(var M=F.next();!M.done;M=F.next())M=M.value,I.set(M,M);L.h()}J={type:G?"audio":"video",mimeType:"video/mp2t",codecs:H.join(", "),language:null,height:J.height,width:J.width,channelCount:null,sampleRate:null,closedCaptions:I}}else J=null;if(A=J)return D.return(A)}else if("mp4"==l||"cmfv"==l||"m4s"==l||"video/mp4"==x||"audio/mp4"==x||"video/iso.segment"==x)if(B=Is(r,z.data))return D.return(B);
882
- return D.return(d)}})}function Us(a){if(Ps(a)){if(a.Aa==tt){for(var b,c=b=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.ib),c=Math.min(c,e.Kb));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.m);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.Ld(b)}}else a.l.Ja(ut(a));a.l.Bd()}
880
+ a.g.retryParameters),C(D,st(a,y,n,{type:1}),4);case 4:z=D.h;(x=z.headers["content-type"])&&(x=x.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==x){var F=z.data;var J=mb(F);J=(new ci).parse(J);var G=J.Fc();J=J.xe();var H=[],I=!1,L=!1;switch(G.audio){case "aac":H.push("mp4a.40.2");I=!0;break;case "mp3":H.push("mp4a.40.34");I=!0;break;case "ac3":H.push("ac-3");I=!0;break;case "ec3":H.push("ec-3"),I=!0}switch(G.video){case "avc":J.fa?H.push(J.fa):H.push("avc1.42E01E");L=!0;break;case "hvc":J.fa?
881
+ H.push(J.fa):H.push("hvc1.1.6.L93.90"),L=!0}if(H.length){G=I&&!L;I=new Map;if(L){L=new sb("video/mp2t");L.i(F);F=t(L.j());for(var M=F.next();!M.done;M=F.next())M=M.value,I.set(M,M);L.h()}J={type:G?"audio":"video",mimeType:"video/mp2t",codecs:H.join(", "),language:null,height:J.height,width:J.width,channelCount:null,sampleRate:null,closedCaptions:I}}else J=null;if(A=J)return D.return(A)}else if("mp4"==l||"cmfv"==l||"m4s"==l||"video/mp4"==x||"audio/mp4"==x||"video/iso.segment"==x)if(B=Is(r,z.data))return D.return(B);
882
+ return D.return(d)}})}function Us(a){if(Ps(a)){if(a.da==tt){for(var b,c=b=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.ib),c=Math.min(c,e.Kb));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.m);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.Ld(b)}}else a.l.Ja(ut(a));a.l.Bd()}
883
883
  function et(a,b){var c=(new fc(a.Z)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"QUERYPARAM");d&&f&&(a.o.has(d)||a.o.set(d,f));e&&(d=c.get(e)[0])&&!a.o.has(d)&&a.o.set(e,d)}}
884
884
  function Ws(a,b,c){c=(new fc(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Z(f,"NAME"),h=Z(f,"VALUE");e=Z(f,"QUERYPARAM");f=Z(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.o.get(f))&&d.set(f,e)}return d}
885
885
  function ht(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"AUDIO");c=Z(d,"VIDEO");var f=Z(d,"SUBTITLES");d=vt(a,d);if(f){var g=zc(Bc,d);a.G.set(f,g);wb(d,g)}e&&(f=zc("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.G.set(e,f));c&&(e=zc("video",d),e||(e=a.g.hls.defaultVideoCodec),a.G.set(c,e))}}
@@ -888,8 +888,8 @@ function gt(a,b){var c,d,e,f,g,h;return K(function(k){if(!a.h||!a.g)return k.ret
888
888
  function kt(a,b){var c=qs(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return wt(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=ms(d.value,"GROUP-ID");if(d=a.G.get(e))if(e=a.H.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=xt(Bc,d)||yt(Bc)}}return b.filter(function(g){return g})}
889
889
  function lt(a,b,c){var d,e;return K(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return K(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);sa(m,2);return C(m,zt(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=wa(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=ms(g,"URI"),k=Z(g,"CODECS")||"";if(a.i.has(h))var l=a.i.get(h);else{var m=Z(g,"LANGUAGE"),n=Z(g,"NAME"),
890
890
  r=Z(g,"CHARACTERISTICS"),p=At(a,a.u++,[h],k,"image",m,!1,n,null,null,r,!1,null,!1),u=Z(g,"RESOLUTION"),v=t(u?u.split("x"):[null,null]),y=v.next().value,z=v.next().value;p.stream.width=Number(y)||void 0;p.stream.height=Number(z)||void 0;var x=Z(g,"BANDWIDTH");x&&(p.stream.bandwidth=Number(x));a.i.set(h,p);l=p}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(A){if(a.g.hls.ignoreImageStreamFailures)return null;throw A;}})),C(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}
891
- function Bt(a,b,c){b=b.filter(function(h){var k=Z(h,"URI")||"";return"SUBTITLES"!=Z(h,"TYPE")&&""!=k});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=ls(e);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)wt(a,d[g],c)}
892
- function jt(a,b,c,d){var e=[],f=new Set;if(0<c.length){c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=ms(g,"METHOD");if("NONE"!=h&&"AES-128"!=h&&(h=Z(g,"KEYFORMAT")||"identity",g=(h=Ct[h])?h(g,""):null)){if(g.keyIds){h=t(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}}c={};b=t(b);for(g=b.next();!g.done;g=b.next())g=g.value,h=ls(g),c[h]?c[h].push(g):c[h]=[g];b=[];for(var l in c){k=c[l];var m=k[0];g=Z(m,"FRAME-RATE");h=Number(Z(m,"AVERAGE-BANDWIDTH"))||Number(ms(m,
891
+ function Bt(a,b,c){b=b.filter(function(h){var k=Z(h,"URI")||"";return"SUBTITLES"!=Z(h,"TYPE")&&""!=k});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=js(e);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)wt(a,d[g],c)}
892
+ function jt(a,b,c,d){var e=[],f=new Set;if(0<c.length){c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=ms(g,"METHOD");if("NONE"!=h&&"AES-128"!=h&&(h=Z(g,"KEYFORMAT")||"identity",g=(h=Ct[h])?h(g,""):null)){if(g.keyIds){h=t(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}}c={};b=t(b);for(g=b.next();!g.done;g=b.next())g=g.value,h=js(g),c[h]?c[h].push(g):c[h]=[g];b=[];for(var l in c){k=c[l];var m=k[0];g=Z(m,"FRAME-RATE");h=Number(Z(m,"AVERAGE-BANDWIDTH"))||Number(ms(m,
893
893
  "BANDWIDTH"));var n=Z(m,"RESOLUTION"),r=t(n?n.split("x"):[null,null]);n=r.next().value;r=r.next().value;var p=Z(m,"VIDEO-RANGE");(m=Z(m,"REQ-VIDEO-LAYOUT"))&&m.includes(",")&&(m=m.split(",").filter(function(u){return"CH-STEREO"==u||"CH-MONO"==u})[0]);m=m||"CH-MONO";k=Dt(a,k,d);b.push.apply(b,w(Et(a,k.audio,k.video,h,n,r,g,p,m,e,f)))}return b.filter(function(u){return null!=u})}
894
894
  function Dt(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=[],g=!1,h=!1,k=t(b),l=k.next();!l.done;l=k.next()){var m=l.value;l=Z(m,"AUDIO");var n=Z(m,"VIDEO"),r=l||n;r&&(f.includes(r)||f.push(r),(m=Z(m,"PATHWAY-ID"))&&e.set(r,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(k=c.filter(function(v){return f.includes(ms(v,"GROUP-ID"))}),Bt(a,k,e));k=(e=f.sort().join(","))&&a.H.has(e)?a.H.get(e):[];g?d.audio.push.apply(d.audio,w(k)):h&&d.video.push.apply(d.video,w(k));l=!1;var p=b.map(function(v){return ms(v,
895
895
  "URI")});h=d.audio.find(function(v){return v&&v.Y().find(function(y){return p.includes(y)})});g=vt(a,b[0]);n=zc("video",g);(r=zc("audio",g))&&!n?(h="audio",l=0<d.audio.length):!d.audio.length&&!d.video.length&&r&&n?(h="video",g=[[n,r].join()]):d.audio.length&&h?(h="audio",l=!0):h=d.video.length&&!d.audio.length?"audio":"video";if(!l){var u=m=r=n=l=null;!k.length&&(c=c.find(function(v){var y=Z(v,"URI")||"",z=Z(v,"TYPE");v=ms(v,"GROUP-ID");return"SUBTITLES"!=z&&""==y&&f.includes(v)}))&&(l=Z(c,"LANGUAGE"),
@@ -904,8 +904,8 @@ m=n.next().value;n=n.next().value;(m=c.get(m))&&dr(a.j,l,m,n)}}c=Z(h,"LANGUAGE")
904
904
  function zt(a,b){var c,d,e,f,g,h,k,l,m,n;return K(function(r){if(1==r.g){c=ms(b,"URI");d=Z(b,"CODECS","jpeg")||"";if(a.i.has(c))return r.return(a.i.get(c));e=Z(b,"LANGUAGE");f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");h=At(a,a.u++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Z(b,"RESOLUTION"))?C(r,h.stream.createSegmentIndex(),3):r.B(2)}2!=r.g&&(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
905
905
  Number(m.split("x")[1]));if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return r.return(h)})}
906
906
  function It(a,b,c,d,e,f,g,h,k){for(var l=a.u++,m=[],n=t(b),r=n.next();!r.done;r=n.next()){var p=r.value;r=ms(p,"URI");p=Z(p,"PATHWAY-ID");a.j&&p&&dr(a.j,l,p,r);m.push(r)}n=m.sort().join(",");if(a.i.has(n))return a.i.get(n);a:{b=Z(b[0],"CLOSED-CAPTIONS");if("video"==d){if(b&&"NONE"!=b){b=a.F.get(b);break a}if(!b&&a.F.size)for(b=t(a.F.keys()).next();!b.done;){b=a.F.get(b.value);break a}}b=null}c=yc(d,c);d=At(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.i.set(n,d);return d}
907
- function At(a,b,c,d,e,f,g,h,k,l,m,n,r,p){function u(D){var F,J,G,H,I,L,M,P,S,W,X,ia,Ia,Sa,xb,db,Tb;return K(function(ua){switch(ua.g){case 1:return F=x.Y(),C(ua,Ns(a,x.Y(),!0),2);case 2:J=ua.h;if(D.aborted)return ua.return();G=J.uri;G==J.originalUri||F.includes(G)||z.push(G);H=As(a.la,J.data);I=void 0;if(a.aa||!a.g.hls.disableCodecGuessing){ua.B(3);break}return C(ua,dt(a,H,v),4);case 4:L=ua.h,I=L.mimeType,d=L.codecs;case 3:return M=Ps(a),C(ua,mt(a,0,H,v,G,d,e,f,g,h,k,l,m,n,r,p,I),5);case 5:P=ua.h;
908
- if(D.aborted)return ua.return();S=P.stream;Ps(a)&&!M&&ot(a,H);x.Kb=P.Kb;x.ib=P.ib;x.md=P.md;x.ld=P.ld;x.Lc=P.Lc;x.Dd=P.Dd;x.Ra=P.Ra;x.Sa=P.Sa;x.Je=!0;y.segmentIndex=S.segmentIndex;y.encrypted=S.encrypted;y.drmInfos=S.drmInfos;y.keyIds=S.keyIds;y.mimeType=S.mimeType;y.bandwidth=S.bandwidth;y.codecs=S.codecs||y.codecs;y.drmInfos.length&&a.h.newDrmInfo(y);W=Cc;if(e==W.da||e==W.P)for(X=t(a.i.values()),ia=X.next();!ia.done;ia=X.next())Ia=ia.value,Ia.Je||Ia.type!=e||(Ia.stream.mimeType=S.mimeType);e==W.ia&&
907
+ function At(a,b,c,d,e,f,g,h,k,l,m,n,r,p){function u(D){var F,J,G,H,I,L,M,P,S,W,X,ia,Ia,Sa,xb,db,Tb;return K(function(ua){switch(ua.g){case 1:return F=x.Y(),C(ua,Ns(a,x.Y(),!0),2);case 2:J=ua.h;if(D.aborted)return ua.return();G=J.uri;G==J.originalUri||F.includes(G)||z.push(G);H=As(a.ua,J.data);I=void 0;if(a.aa||!a.g.hls.disableCodecGuessing){ua.B(3);break}return C(ua,dt(a,H,v),4);case 4:L=ua.h,I=L.mimeType,d=L.codecs;case 3:return M=Ps(a),C(ua,mt(a,0,H,v,G,d,e,f,g,h,k,l,m,n,r,p,I),5);case 5:P=ua.h;
908
+ if(D.aborted)return ua.return();S=P.stream;Ps(a)&&!M&&ot(a,H);x.Kb=P.Kb;x.ib=P.ib;x.md=P.md;x.ld=P.ld;x.Lc=P.Lc;x.Dd=P.Dd;x.Ra=P.Ra;x.Sa=P.Sa;x.Je=!0;y.segmentIndex=S.segmentIndex;y.encrypted=S.encrypted;y.drmInfos=S.drmInfos;y.keyIds=S.keyIds;y.mimeType=S.mimeType;y.bandwidth=S.bandwidth;y.codecs=S.codecs||y.codecs;y.drmInfos.length&&a.h.newDrmInfo(y);W=Cc;if(e==W.ea||e==W.P)for(X=t(a.i.values()),ia=X.next();!ia.done;ia=X.next())Ia=ia.value,Ia.Je||Ia.type!=e||(Ia.stream.mimeType=S.mimeType);e==W.ia&&
909
909
  (Sa=S.segmentIndex.get(0))&&Sa.g&&(y.mimeType="application/mp4");Jt(a)&&(a.rb?pt(a,[x]):(a.rb=!0,xb=Array.from(a.i.values()),db=xb.filter(function(eb){return eb.stream.segmentIndex}),pt(a,db),Us(a),Tb=a.m,0<Tb&&a.s.U(Tb)));E(ua)}})}function v(){return a.j&&1<c.length?er(a.j,b):z.concat(us([a.Z],c,a.o))}var y=Kt(a,d,e,f,g,h,k,l,m,n,r,p),z=[],x={stream:y,type:e,Rf:z,Y:v,Kb:0,ib:0,Dd:new Map,md:!1,ld:!1,Lc:!1,ee:-1,Ra:-1,Sa:-1,Je:!1},A=null,B=new AbortController;y.createSegmentIndex=function(){if(A)return A;
910
910
  B=new AbortController;return A=new Promise(function(D){D(u(B.signal))})};y.closeSegmentIndex=function(){A&&!y.segmentIndex&&B.abort();y.segmentIndex&&(y.segmentIndex.release(),y.segmentIndex=null);A=null};return x}function ut(a){var b=Infinity;a=t(a.i.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.ib));return b}
911
911
  function Rs(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&vj(d.segmentIndex,function(e){c.push(e)});a.l.Qc(c)}function pt(a,b){if(!Ps(a))for(var c=ut(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Ub(0,c);Rs(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?at(a,b):ct(a,b)}
@@ -918,24 +918,24 @@ segmentIndex:null,mimeType:r,codecs:b,kind:c==Bc?"subtitle":void 0,encrypted:!1,
918
918
  function Xs(a,b){var c=[];if(a.segments){a=t(a.segments);for(var d=a.next();!d.done;d=a.next())d=ps(d.value.g,"EXT-X-KEY"),c.push.apply(c,w(d))}d=a=!1;var e=[],f=new Set;c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=ms(g,"METHOD");if("NONE"!=h)if(a=!0,"AES-128"==h)d=!0;else if(h=Z(g,"KEYFORMAT")||"identity",g=(h=Ct[h])?h(g,b):null){if(g.keyIds){h=t(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}return{drmInfos:e,keyIds:f,encrypted:a,mg:d}}
919
919
  function Nt(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Ta("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new O(2,4,4042);var f=0,g=Z(b,"IV","");if(g){var h=Yf(g.substr(2));if(16!=h.byteLength)throw new O(2,4,4048);}else f=ss(c.g,"EXT-X-MEDIA-SEQUENCE",0);var k={method:"AES-128",iv:h,firstMediaSequenceNumber:f,fetchKey:function(){var l,m,n,r,p;return K(function(u){if(1==u.g)return l=ts(d(),ms(b,"URI"),e),m=df([l],a.g.retryParameters),
920
920
  C(u,st(a,m,6),2);if(3!=u.g){n=u.h;if(!n.data||16!=n.data.byteLength)throw new O(2,4,4049);r={name:"AES-CBC"};p=k;return C(u,window.crypto.subtle.importKey("raw",n.data,r,!0,["decrypt"]),3)}p.cryptoKey=u.h;k.fetchKey=void 0;E(u)})}};return k}
921
- function $s(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=rs(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=rs(b.g,"EXT-X-TARGETDURATION");if(!d)throw new O(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=rs(b.g,"EXT-X-PART-INF"))a.K=Number(ms(e,"PART-TARGET"));b=rs(b.g,"EXT-X-SERVER-CONTROL");a.A&&a.K?(a.m=a.qb?5*a.K<=c?Math.min(a.K,a.m):Math.min(c,a.m):Math.min(a.K,a.m),a.ka=b?Number(ms(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
922
- b.getAttribute("HOLD-BACK"):null,a.ha=c?Number(c.value):0);a.ua=Math.max(d,a.ua)}function ot(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.ka)b=a.ka;else if(a.ha)b=a.ha;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.ua*c}a.l.$f(0);a.l.Zf(b);a.l.ec(!1)}
921
+ function $s(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=rs(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=rs(b.g,"EXT-X-TARGETDURATION");if(!d)throw new O(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=rs(b.g,"EXT-X-PART-INF"))a.K=Number(ms(e,"PART-TARGET"));b=rs(b.g,"EXT-X-SERVER-CONTROL");a.A&&a.K?(a.m=a.qb?5*a.K<=c?Math.min(a.K,a.m):Math.min(c,a.m):Math.min(a.K,a.m),a.la=b?Number(ms(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
922
+ b.getAttribute("HOLD-BACK"):null,a.ka=c?Number(c.value):0);a.Aa=Math.max(d,a.Aa)}function ot(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.la)b=a.la;else if(a.ka)b=a.ka;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.Aa*c}a.l.$f(0);a.l.Zf(b);a.l.ec(!1)}
923
923
  function rt(a,b,c,d,e){var f=rs(c,"EXT-X-MAP");if(!f)return null;var g=ms(f,"URI"),h=ts(d(),g,e);g=[h.toString(),Z(f,"BYTERANGE","")].join("-");if(!a.W.has(g)){var k=void 0,l=null;c=t(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?"AES-128"==ms(m,"METHOD")&&m.id<f.id&&(k=Nt(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=Ot(h,f,l,k);a.W.set(g,b)}return a.W.get(g)}
924
924
  function Ot(a,b,c,d){var e=0,f=null;b=Z(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new uh(function(){return a},e,f,null,null,null,d)}
925
- function Pt(a,b,c,d,e,f,g,h,k){var l=d.g,m=rs(l,"EXTINF"),n=0,r=0,p=null;d.Ya.length&&!a.A&&Ta("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var u=null;if(!a.g.hls.ignoreManifestProgramDateTime){var v=rs(l,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(u=mg(v.value))}var y=wh;rs(l,"EXT-X-GAP")&&(y=2);if(!m){if(0==d.Ya.length)throw new O(2,4,4024,"EXTINF");
926
- if(!a.A)return null}var z=[];v=!1;var x=null,A=!1,B=!1;if(a.A&&d.Ya.length){n=("video/mp4"==g.mimeType||"audio/mp4"==g.mimeType)&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var D=u,F={},J=0;J<d.Ya.length;F={tc:F.tc,dd:F.dd},J++){var G=d.Ya[J],H=0==J?c:z[z.length-1],I=0==J?e:H.endTime,L=Number(Z(G,"DURATION"))||a.K;if(L){var M=I+L,P=0,S=null;"EXT-X-PRELOAD-HINT"==G.name?(P=(P=Z(G,"BYTERANGE-START"))?Number(P):0,(H=Z(G,"BYTERANGE-LENGTH"))?S=P+Number(H)-1:P&&(S=Number.MAX_SAFE_INTEGER)):
925
+ function Pt(a,b,c,d,e,f,g,h,k){var l=d.g,m=rs(l,"EXTINF"),n=0,r=0,p=null;d.Za.length&&!a.A&&Ta("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var u=null;if(!a.g.hls.ignoreManifestProgramDateTime){var v=rs(l,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(u=mg(v.value))}var y=wh;rs(l,"EXT-X-GAP")&&(y=2);if(!m){if(0==d.Za.length)throw new O(2,4,4024,"EXTINF");
926
+ if(!a.A)return null}var z=[];v=!1;var x=null,A=!1,B=!1;if(a.A&&d.Za.length){n=("video/mp4"==g.mimeType||"audio/mp4"==g.mimeType)&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var D=u,F={},J=0;J<d.Za.length;F={tc:F.tc,dd:F.dd},J++){var G=d.Za[J],H=0==J?c:z[z.length-1],I=0==J?e:H.endTime,L=Number(Z(G,"DURATION"))||a.K;if(L){var M=I+L,P=0,S=null;"EXT-X-PRELOAD-HINT"==G.name?(P=(P=Z(G,"BYTERANGE-START"))?Number(P):0,(H=Z(G,"BYTERANGE-LENGTH"))?S=P+Number(H)-1:P&&(S=Number.MAX_SAFE_INTEGER)):
927
927
  (P=Z(G,"BYTERANGE"),S=t(Qt(H,P)),P=S.next().value,S=S.next().value);F.dd=Z(G,"URI");if(F.dd){H=wh;"YES"==Z(G,"GAP")&&(H=2,A=!0);F.tc=null;var W=function(ia){return function(){null==ia.tc&&(ia.tc=ts(h(),ia.dd,f));return ia.tc}}(F);n&&0<=P&&null!=S&&(x=W,v=!0);I=new R(I,M,W,P,S,b,0,0,Infinity,[],"",null,D,H,k);"EXT-X-PRELOAD-HINT"==G.name&&(I.Ke(),B=!0);"YES"!=Z(G,"INDEPENDENT")&&0<J&&I.Cd();z.push(I);D&&(D+=L)}}}}if(m){m=Number(m.value.split(",")[0]);if(0==m)return null;n=e+m}else if(z.length)n=z[z.length-
928
928
  1].endTime;else return null;v&&(A||0!=z[0].Ka?(v=!1,x=null):z=[]);(m=rs(l,"EXT-X-BYTERANGE"))?(p=t(Qt(c,m.value)),r=p.next().value,p=p.next().value):z.length&&(r=z[0].Ka,p=z[z.length-1].ra);c="";m=null;"image"==g.type&&(c="1x1",g=rs(l,"EXT-X-TILES"))&&(c=ms(g,"LAYOUT"),(g=Z(g,"DURATION"))&&(m=Number(g)));var X=null;b=new R(e,n,function(){if(x)return x();null==X&&(X=ts(h(),d.h,f));return X||[]},r,p,b,0,0,Infinity,z,c,m,u,y,k,0<z.length&&!!d.h);v&&(a.qb=!0,b.Kf(),B&&b.Ke());return b}
929
929
  function Qt(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.ra+1,d=c+b-1);return[c,d]}
930
- function Ys(a,b,c,d,e,f){var g=b.segments,h=void 0,k=ss(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=ss(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=rs(b.g,"EXT-X-SKIP"),n=m?Number(Z(m,"SKIPPED-SEGMENTS")):0,r=l+n,p=0;Ps(a)&&d.has(r)&&(p=d.get(r));var u=[],v=null;m=[];for(var y=0;y<g.length;y++){var z=g[y],x=0==y?p:v.endTime;r=l+n+y;rs(z.g,"EXT-X-DISCONTINUITY")&&k++;var A=t(z.g);for(var B=A.next();!B.done;B=A.next())B=B.value,"EXT-X-KEY"==B.name&&("AES-128"==ms(B,"METHOD")?h=Nt(a,B,b,f,e):h=void 0);d.set(r,x);A=rt(a,
931
- b,z.g,f,e);!a.A&&a.h.isAutoLowLatencyMode()&&(a.h.enableLowLatencyMode(),a.A=a.h.isLowLatencyMode());if(x=Pt(a,A,v,z,x,e,c,f,h))(v=ss(z.g,"EXT-X-BITRATE"))?m.push({bitrate:v,duration:x.endTime-x.startTime}):m.length&&(v=m.pop(),v.duration+=x.endTime-x.startTime,m.push(v)),v=x,x.l=k,a.g.hls.ignoreManifestProgramDateTime&&null!=a.I&&r<a.I||u.push(x)}b=void 0;m.length&&(b=m.reduce(function(D,F){return D+F.duration},0),b=Math.round(m.reduce(function(D,F){return D+F.bitrate*F.duration},0)/b*1E3));if(m=
932
- u.some(function(D){return null!=D.i}))for(c={},d=0;d<u.length;c={lc:c.lc,kc:c.kc,$c:c.$c,nb:c.nb,jc:c.jc},d++)if(c.nb=u[d],null==c.nb.i)for(c.kc=0,c.lc=d,e=function(D){return function(){var F=u[D.lc];if(F){if(null!=F.i)return F.i+D.kc;D.kc-=F.endTime-F.startTime;D.lc+=1}return null}}(c),c.jc=0,c.$c=d,f=function(D){return function(){var F=u[D.$c];if(F){F!=D.nb&&(D.jc+=F.endTime-F.startTime);if(null!=F.i)return F.i+D.jc;--D.$c}return null}}(c);null==c.nb.i;)c.nb.i=f(),null==c.nb.i&&(c.nb.i=e());if(m)for(c=
933
- t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.i,e=t(e.h),f=e.next();!f.done;f=e.next())f=f.value,f.i=d,d+=f.endTime-f.startTime;a=a.V;if(m&&Infinity!=a)for(m=t(u),d=m.next();!d.done;d=m.next())d.value.df(a);return{segments:u,bandwidth:b}}function xt(a,b){if(a==Bc){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"}
934
- function yt(a){return a==Bc?"text/vtt":Rt[a].mp4}
935
- function Mt(a,b,c,d,e,f){var g,h,k,l,m,n,r,p,u,v,y,z,x;return K(function(A){switch(A.g){case 1:g=kf;h=Math.trunc((d.segments.length-1)/2);k=ts(f(),d.segments[h].h,e);l=new fc(k[0]);m=l.Ba.split(".").pop();n=Rt[b];if((r=n[m])||(r=qt[m])||(r=xt(b,c)))return A.return(r);u=1;v=df(k,a.g.retryParameters);sa(A,2);v.method="HEAD";return C(A,st(a,v,g,{type:u}),4);case 4:y=A.h;p=y.headers["content-type"];va(A,3);break;case 2:z=wa(A);if(!z||1002!=z.code){A.B(3);break}v.method="GET";return C(A,st(a,v,g,{type:u}),
936
- 6);case 6:x=A.h,p=x.headers["content-type"];case 3:return p?A.return(p.split(";")[0]):A.return(yt(b))}})}function nt(a,b,c,d,e,f){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0)}function Ns(a,b,c){return st(a,df(b,a.g.retryParameters),0,{type:c?2:3})}
937
- function Ls(a){var b,c,d,e,f,g;K(function(h){switch(h.g){case 1:if(!a.h)return h.return();sa(h,2);b=Date.now();return C(h,a.update(),4);case 4:c=Date.now();Ps(a)&&(d=(c-b)/1E3,a.bb.sample(1,d),e=a.m,f=Math.max(0,e-Oa(a.bb)),a.s.U(f));va(h,3);break;case 2:g=wa(h);if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.s.U(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();E(h)}})}
938
- function Ps(a){return a.Aa!=Ms}function Ts(a,b){a.Aa=b;a.l&&a.l.ec(!Ps(a));Ps(a)||a.s.stop()}function st(a,b,c,d){if(!a.N)throw new O(2,7,7001);b=a.h.networkingEngine.request(c,b,d);Ze(a.N,b);return b.promise}N("shaka.hls.HlsParser",Ks);
930
+ function Ys(a,b,c,d,e,f){var g=b.segments,h=void 0,k=ss(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=ss(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=rs(b.g,"EXT-X-SKIP"),n=m?Number(Z(m,"SKIPPED-SEGMENTS")):0,r=l+n,p=0;Ps(a)&&d.has(r)&&(p=d.get(r));0===p&&a.da==tt&&0<d.size&&!d.has(r)&&(p=a.l.Ya());var u=[],v=null;m=[];for(var y=0;y<g.length;y++){var z=g[y],x=0==y?p:v.endTime;r=l+n+y;rs(z.g,"EXT-X-DISCONTINUITY")&&k++;var A=t(z.g);for(var B=A.next();!B.done;B=A.next())B=B.value,"EXT-X-KEY"==B.name&&("AES-128"==ms(B,
931
+ "METHOD")?h=Nt(a,B,b,f,e):h=void 0);d.set(r,x);A=rt(a,b,z.g,f,e);!a.A&&a.h.isAutoLowLatencyMode()&&(a.h.enableLowLatencyMode(),a.A=a.h.isLowLatencyMode());if(x=Pt(a,A,v,z,x,e,c,f,h))(v=ss(z.g,"EXT-X-BITRATE"))?m.push({bitrate:v,duration:x.endTime-x.startTime}):m.length&&(v=m.pop(),v.duration+=x.endTime-x.startTime,m.push(v)),v=x,x.l=k,a.g.hls.ignoreManifestProgramDateTime&&null!=a.I&&r<a.I||u.push(x)}b=void 0;m.length&&(b=m.reduce(function(D,F){return D+F.duration},0),b=Math.round(m.reduce(function(D,
932
+ F){return D+F.bitrate*F.duration},0)/b*1E3));if(m=u.some(function(D){return null!=D.i}))for(c={},d=0;d<u.length;c={lc:c.lc,kc:c.kc,$c:c.$c,nb:c.nb,jc:c.jc},d++)if(c.nb=u[d],null==c.nb.i)for(c.kc=0,c.lc=d,e=function(D){return function(){var F=u[D.lc];if(F){if(null!=F.i)return F.i+D.kc;D.kc-=F.endTime-F.startTime;D.lc+=1}return null}}(c),c.jc=0,c.$c=d,f=function(D){return function(){var F=u[D.$c];if(F){F!=D.nb&&(D.jc+=F.endTime-F.startTime);if(null!=F.i)return F.i+D.jc;--D.$c}return null}}(c);null==
933
+ c.nb.i;)c.nb.i=f(),null==c.nb.i&&(c.nb.i=e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.i,e=t(e.h),f=e.next();!f.done;f=e.next())f=f.value,f.i=d,d+=f.endTime-f.startTime;a=a.V;if(m&&Infinity!=a)for(m=t(u),d=m.next();!d.done;d=m.next())d.value.df(a);return{segments:u,bandwidth:b}}
934
+ function xt(a,b){if(a==Bc){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"}function yt(a){return a==Bc?"text/vtt":Rt[a].mp4}
935
+ function Mt(a,b,c,d,e,f){var g,h,k,l,m,n,r,p,u,v,y,z,x;return K(function(A){switch(A.g){case 1:g=kf;h=Math.trunc((d.segments.length-1)/2);k=ts(f(),d.segments[h].h,e);l=new fc(k[0]);m=l.Ba.split(".").pop();n=Rt[b];if((r=n[m])||(r=qt[m])||(r=xt(b,c)))return A.return(r);u=1;v=df(k,a.g.retryParameters);sa(A,2);v.method="HEAD";return C(A,st(a,v,g,{type:u}),4);case 4:y=A.h;p=y.headers["content-type"];va(A,3);break;case 2:z=wa(A);if(!z||1002!=z.code&&1001!=z.code){A.B(3);break}v.method="GET";return C(A,
936
+ st(a,v,g,{type:u}),6);case 6:x=A.h,p=x.headers["content-type"];case 3:return p?A.return(p.split(";")[0]):A.return(yt(b))}})}function nt(a,b,c,d,e,f){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0)}function Ns(a,b,c){return st(a,df(b,a.g.retryParameters),0,{type:c?2:3})}
937
+ function Ls(a){var b,c,d,e,f,g;K(function(h){switch(h.g){case 1:if(!a.h)return h.return();sa(h,2);b=Date.now();return C(h,a.update(),4);case 4:c=Date.now();Ps(a)&&(d=(c-b)/1E3,a.cb.sample(1,d),e=a.m,f=Math.max(0,e-Oa(a.cb)),a.s.U(f));va(h,3);break;case 2:g=wa(h);if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.s.U(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();E(h)}})}
938
+ function Ps(a){return a.da!=Ms}function Ts(a,b){a.da=b;a.l&&a.l.ec(!Ps(a));Ps(a)||a.s.stop()}function st(a,b,c,d){if(!a.N)throw new O(2,7,7001);b=a.h.networkingEngine.request(c,b,d);Ze(a.N,b);return b.promise}N("shaka.hls.HlsParser",Ks);
939
939
  var qt={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},Rt={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
940
940
  vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Ct={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new O(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new O(2,4,4041);return xc("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=ms(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
941
941
  b=ms(a,"URI");b=Gs(b);b=mb(b.data);b=xc("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=ms(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=ms(a,"URI");a=Gs(a);a=mb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=bg(a,b,new Set,0);return xc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])},identity:function(a){a=
@@ -954,7 +954,7 @@ case "audio":if(a.codecs.includes("mp3"))a=$t(".mp3",mu(a));else if(a.codecs.inc
954
954
  function mu(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(w(eu(a.stream.audioSamplingRate||44100,2)),[0,0]))}
955
955
  function lu(a){var b=$t;var c=a.codecs.substring(0,a.codecs.indexOf("."));for(var d=0,e=0;e<c.length;e+=1)d|=c.charCodeAt(e)<<8*(c.length-e-1);c=new Uint8Array([].concat(w(eu(d,4))));c=$t("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=$t("schm",d);e=$t;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=t(a.stream.drmInfos);for(var g=a.next();!g.done;g=a.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=t(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=ku(h.value)}a=new Uint8Array([0,
956
956
  0,0,0,0,0,1,8]);f=$t("tenc",a,f);return b("sinf",c,d,e("schi",f))}
957
- function su(a){var b=[];a=t(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=$t;var g=new Uint8Array([0,0,0,0].concat(w(eu(c.data?c.data.Za:0,4))));g=$t("mfhd",g);var h;var k=c.data?c.data.Ia:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.Da<<4|m.Ga<<2|m.Ea}k=$t("sdtp",l);var n=k.length+92;l=$t;h=new Uint8Array([0,0,0,58].concat(w(eu(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=$t("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
957
+ function su(a){var b=[];a=t(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=$t;var g=new Uint8Array([0,0,0,0].concat(w(eu(c.data?c.data.$a:0,4))));g=$t("mfhd",g);var h;var k=c.data?c.data.Ia:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.Da<<4|m.Ga<<2|m.Ea}k=$t("sdtp",l);var n=k.length+92;l=$t;h=new Uint8Array([0,0,0,58].concat(w(eu(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=$t("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
958
958
  0;var r=Math.floor(m%(du+1));m=new Uint8Array([1,0,0,0].concat(w(eu(Math.floor(m/(du+1)),4)),w(eu(r,4))));m=$t("tfdt",m);var p=n;n=c.data?c.data.Ia:[];r=n.length;var u=12+16*r,v=new Uint8Array(u);p+=8+u;v.set(["video"===c.type?1:0,0,15,1].concat(w(eu(r,4)),w(eu(p,4))),0);for(p=0;p<r;p++){var y=n[p];u=eu(y.duration,4);var z=eu(y.size,4),x=y.flags;y=eu(y.Na,4);v.set([].concat(w(u),w(z),[x.Oa<<2|x.Da,x.Ga<<6|x.Ea<<4|x.Pa,x.Ca&61440,x.Ca&15],w(y)),12+16*p)}n=$t("trun",v);k=l("traf",h,m,n,k);f=f("moof",
959
959
  g,k);e.call(d,b,[f,tu(c)])}return $f.apply(Uf,w(b))}function tu(a){a=(a.data?a.data.Ia:[]).map(function(b){return b.data});a=$f.apply(Uf,w(a));return $t("mdat",a)}function eu(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function ku(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[2*c]+a[2*c+1]),16);return b}
960
960
  function $t(a){var b=Fa.apply(1,arguments),c=uu[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],uu[a]=c);for(var d=8,e=b.length-1;0<=e;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}
@@ -1056,7 +1056,7 @@ function hw(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=null,
1056
1056
  c.configure(d.manifest),iw(a),C(l,c.start(b,g),2);if(3!=l.g)return h=l.h,iw(a),k=Ew(h),C(l,Promise.all(tf(k,function(m){return m.createSegmentIndex()})),3);iw(a);if(e)throw e;return l.return(h)})}function jw(a,b,c,d){var e;return K(function(f){return 1==f.g?(e=new yg({Lb:a.g,onError:c,Id:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),C(f,Dg(e,b.variants,d.offline.usePersistentLicense),2)):3!=f.g?C(f,Qg(e),3):f.return(e)})}
1057
1057
  function uw(a,b,c,d){var e=new Map,f=Ew(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=Fw(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),ff:Array.from(e.values())}}
1058
1058
  function Fw(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,
1059
- spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;Gw(d,c.presentationTimeline.hb(),function(l){var m=Uu(l),n=void 0;if(!f.has(m)){var r=l.endTime-l.startTime;r=bw(b,d.id)*r;r=Xu(a.g,r);f.set(m,new Tu(l,r,k,!1))}l.g&&(n=Uu(l.g),f.has(n)||(r=.5*bw(b,d.id),r=Xu(a.g,r),f.set(n,new Tu(l.g,r,k,!0))));g.segments.push({pendingInitSegmentRefId:n,initSegmentKey:n?0:null,startTime:l.startTime,
1059
+ spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;Gw(d,c.presentationTimeline.Ya(),function(l){var m=Uu(l),n=void 0;if(!f.has(m)){var r=l.endTime-l.startTime;r=bw(b,d.id)*r;r=Xu(a.g,r);f.set(m,new Tu(l,r,k,!1))}l.g&&(n=Uu(l.g),f.has(n)||(r=.5*bw(b,d.id),r=Xu(a.g,r),f.set(n,new Tu(l.g,r,k,!0))));g.segments.push({pendingInitSegmentRefId:n,initSegmentKey:n?0:null,startTime:l.startTime,
1060
1060
  endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function Gw(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function iw(a){if(a.l.g)throw new O(2,9,7001);}function gw(){if(!dw())throw new O(2,9,9E3);}
1061
1061
  function vw(a,b){return K(function(c){if(1==c.g)return a.i.push(b),ta(c,2),C(c,b,4);if(2!=c.g)return c.return(c.h);xa(c);wb(a.i,b);return ya(c,0)})}function fw(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){wb(a.i,c)})}function Bw(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
1062
1062
  function Aw(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=uv(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:zw(d,!1),videoCapabilities:zw(d,!0)}});return C(h,Tv(b,a,f),2)}return 3!=h.g?(g=h.h,C(h,e.remove(g),3)):C(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
@@ -1078,171 +1078,171 @@ function gx(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=func
1078
1078
  function hx(){var a=MediaSource.isTypeSupported;od("Web0S")||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}Hw.MediaSource=ax;ax.install=bx;Iw(bx);function ix(){}function jx(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?kx():void 0!=window.orientation&&lx())}function kx(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
1079
1079
  function lx(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new mx;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new Q("change");b.dispatchEvent(c)})}Hw.Orientation=ix;ix.install=jx;function mx(){Ve.call(this);this.type="";this.angle=0}oa(mx,Ve);
1080
1080
  mx.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
1081
- mx.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Iw(jx);function nx(){}var ox,px,qx,rx,sx,tx;function ux(a,b){try{var c=new vx(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function wx(a){var b=this.mediaKeys;b&&b!=a&&xx(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?xx(a,this):Promise.resolve()}
1082
- function yx(a){a=mb(a.initData);if(qb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Bf(a.subarray(4),!0);a=Ef(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=nb(a);this.dispatchEvent(b)}Hw.PatchedMediaKeysApple=nx;
1083
- nx.uninstall=function(){ox&&(ox=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",px),HTMLMediaElement.prototype.setMediaKeys=qx,window.MediaKeys=rx,window.MediaKeySystemAccess=sx,navigator.requestMediaKeySystemAccess=tx,px=tx=qx=sx=rx=null,window.shakaMediaKeysPolyfill=!1)};
1084
- nx.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)ox=!0,px=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),qx=HTMLMediaElement.prototype.setMediaKeys,rx=window.MediaKeys,sx=window.MediaKeySystemAccess,tx=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=wx;window.MediaKeys=zx;window.MediaKeySystemAccess=vx;navigator.requestMediaKeySystemAccess=
1085
- ux;window.shakaMediaKeysPolyfill=!0}};
1086
- function vx(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
1081
+ mx.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Iw(jx);function nx(){}var ox,px,qx,rx,sx,tx;
1082
+ function ux(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)ox=!0,px=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),qx=HTMLMediaElement.prototype.setMediaKeys,rx=window.MediaKeys,sx=window.MediaKeySystemAccess,tx=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=vx;window.MediaKeys=wx;window.MediaKeySystemAccess=xx;navigator.requestMediaKeySystemAccess=
1083
+ yx;window.shakaMediaKeysPolyfill=!0}}function yx(a,b){try{var c=new xx(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function vx(a){var b=this.mediaKeys;b&&b!=a&&zx(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?zx(a,this):Promise.resolve()}
1084
+ function Ax(a){a=mb(a.initData);if(qb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Bf(a.subarray(4),!0);a=Ef(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=nb(a);this.dispatchEvent(b)}Hw.PatchedMediaKeysApple=nx;
1085
+ nx.uninstall=function(){ox&&(ox=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",px),HTMLMediaElement.prototype.setMediaKeys=qx,window.MediaKeys=rx,window.MediaKeySystemAccess=sx,navigator.requestMediaKeySystemAccess=tx,px=tx=qx=sx=rx=null,window.shakaMediaKeysPolyfill=!1)};nx.install=ux;
1086
+ function xx(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
1087
1087
  g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(c.videoCapabilities),g=c.next();!g.done;g=c.next())f=g.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
1088
- vx.prototype.createMediaKeys=function(){var a=new zx(this.keySystem);return Promise.resolve(a)};vx.prototype.getConfiguration=function(){return this.g};function zx(a){this.h=new WebKitMediaKeys(a);this.g=new of}zx.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Ax(this.h,a)};zx.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
1089
- function xx(a,b){a.g.xb();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",yx);try{return fj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}zx.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Ax(a){Ve.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new of;this.sessionId="";this.expiration=NaN;this.closed=new Le;this.keyStatuses=new Bx}oa(Ax,Ve);q=Ax.prototype;
1090
- q.generateRequest=function(a,b){var c=this;this.h=new Le;try{var d=this.l.createSession("video/mp4",mb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Hb()?"license-request":"license-renewal").set("message",nb(e.message));e=new Q("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(Cx(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
1091
- function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Cx(c,"output-not-allowed");break;default:Cx(c,"internal-error")}});Cx(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
1092
- q.update=function(a){this.g=new Le;try{this.i.update(mb(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.xb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Cx(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new Q("keystatuseschange");a.dispatchEvent(b)}
1093
- function Bx(){this.size=0;this.g=void 0}q=Bx.prototype;q.Hb=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,mh.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=mh.value();return this.g&&kb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};function Dx(){}function Ex(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Fx,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Gx,window.MediaKeys=Hx,window.MediaKeySystemAccess=Ix,window.shakaMediaKeysPolyfill=!0)}function Fx(){return Promise.reject(Error("The key system specified is not supported."))}
1094
- function Gx(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Hw.PatchedMediaKeysNop=Dx;Dx.install=Ex;function Hx(){throw new TypeError("Illegal constructor.");}Hx.prototype.createSession=function(){};Hx.prototype.setServerCertificate=function(){};Hx.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Ix(){this.keySystem="";throw new TypeError("Illegal constructor.");}Ix.prototype.getConfiguration=function(){};
1095
- Ix.prototype.createMediaKeys=function(){};Iw(Ex,-10);function Jx(){}
1096
- function Kx(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Lx="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Mx;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Nx;window.MediaKeys=Ox;window.MediaKeySystemAccess=Px;window.shakaMediaKeysPolyfill=!0}}
1097
- function Qx(a){var b=Lx;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Mx(a,b){try{var c=new Px(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Nx(a){var b=this.mediaKeys;b&&b!=a&&Rx(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Rx(a,this);return Promise.resolve()}Hw.PatchedMediaKeysWebkit=Jx;Jx.install=Kx;
1098
- function Px(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=t(f.audioCapabilities),
1088
+ xx.prototype.createMediaKeys=function(){var a=new wx(this.keySystem);return Promise.resolve(a)};xx.prototype.getConfiguration=function(){return this.g};function wx(a){this.h=new WebKitMediaKeys(a);this.g=new of}wx.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Bx(this.h,a)};wx.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
1089
+ function zx(a,b){a.g.xb();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",Ax);try{return fj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}wx.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Bx(a){Ve.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new of;this.sessionId="";this.expiration=NaN;this.closed=new Le;this.keyStatuses=new Cx}oa(Bx,Ve);q=Bx.prototype;
1090
+ q.generateRequest=function(a,b){var c=this;this.h=new Le;try{var d=this.l.createSession("video/mp4",mb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Hb()?"license-request":"license-renewal").set("message",nb(e.message));e=new Q("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(Dx(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
1091
+ function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Dx(c,"output-not-allowed");break;default:Dx(c,"internal-error")}});Dx(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
1092
+ q.update=function(a){this.g=new Le;try{this.i.update(mb(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.xb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Dx(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new Q("keystatuseschange");a.dispatchEvent(b)}
1093
+ function Cx(){this.size=0;this.g=void 0}q=Cx.prototype;q.Hb=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,mh.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=mh.value();return this.g&&kb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||Iw(ux);function Ex(){}function Fx(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Gx,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Hx,window.MediaKeys=Ix,window.MediaKeySystemAccess=Jx,window.shakaMediaKeysPolyfill=!0)}function Gx(){return Promise.reject(Error("The key system specified is not supported."))}
1094
+ function Hx(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Hw.PatchedMediaKeysNop=Ex;Ex.install=Fx;function Ix(){throw new TypeError("Illegal constructor.");}Ix.prototype.createSession=function(){};Ix.prototype.setServerCertificate=function(){};Ix.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Jx(){this.keySystem="";throw new TypeError("Illegal constructor.");}Jx.prototype.getConfiguration=function(){};
1095
+ Jx.prototype.createMediaKeys=function(){};Iw(Fx,-10);function Kx(){}
1096
+ function Lx(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Mx="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Nx;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Ox;window.MediaKeys=Px;window.MediaKeySystemAccess=Qx;window.shakaMediaKeysPolyfill=!0}}
1097
+ function Rx(a){var b=Mx;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Nx(a,b){try{var c=new Qx(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Ox(a){var b=this.mediaKeys;b&&b!=a&&Sx(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Sx(a,this);return Promise.resolve()}Hw.PatchedMediaKeysWebkit=Kx;Kx.install=Lx;
1098
+ function Qx(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=t(f.audioCapabilities),
1099
1099
  l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=t(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
1100
- d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}Px.prototype.createMediaKeys=function(){var a=new Ox(this.g);return Promise.resolve(a)};Px.prototype.getConfiguration=function(){return this.h};function Ox(a){this.l=a;this.h=null;this.g=new of;this.i=[];this.j=new Map}
1101
- function Rx(a,b){a.h=b;a.g.xb();var c=Lx;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=nb(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=Sx(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Hb()?"licenserequest":"licenserenewal").set("message",d.message),d=new Q("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){if(d=Sx(a,d.sessionId))Tx(d,"usable"),
1102
- d.g&&d.g.resolve(),d.g=null}),a.g.D(b,c+"keyerror",function(d){var e=Sx(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(45==d.systemCode&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Tx(e,"output-restricted"):1==f?Tx(e,"expired"):Tx(e,"internal-error"))}}))}
1103
- Ox.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new Ux(b,this.l,a);this.i.push(a);return a};Ox.prototype.setServerCertificate=function(){return Promise.resolve(!1)};Ox.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
1104
- function Sx(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function Ux(a,b,c){Ve.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Le;this.keyStatuses=new Vx}oa(Ux,Ve);
1105
- function Wx(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=mb(Ef("LOAD_SESSION|"+c));else{var e=Ef("PERSISTENT|");d=$f(e,b)}else d=mb(b)}catch(g){return Promise.reject(g)}a.h=new Le;var f=Qx("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new id(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).U(.01)}return a.h}
1106
- function Xx(a,b,c){if(a.g)a.g.then(function(){return Xx(a,b,c)}).catch(function(){return Xx(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Af(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=Xf(e.keys[0].k);e=Xf(e.keys[0].kid)}else d=mb(c),e=null;var f=Qx("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
1107
- function Tx(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new Q("keystatuseschange");a.dispatchEvent(b)}q=Ux.prototype;q.generateRequest=function(a,b){return Wx(this,b,null)};q.load=function(a){return"persistent-license"==this.l?Wx(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Le;Xx(this,b,a);return b};
1108
- q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=Qx("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function Vx(){this.size=0;this.g=void 0}q=Vx.prototype;q.Hb=function(){return this.g};
1109
- q.forEach=function(a){this.g&&a(this.g,mh.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=mh.value();return this.g&&kb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var Lx="";Iw(Kx);function Yx(){}function Zx(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=$x,Object.defineProperty(a,"disablePictureInPicture",{get:ay,set:by,enumerable:!0,configurable:!0}),document.exitPictureInPicture=cy,document.addEventListener("webkitpresentationmodechanged",dy,!0))}}
1110
- function dy(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
1111
- function $x(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function cy(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
1112
- function ay(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function by(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Hw.PiPWebkit=Yx;Yx.install=Zx;Iw(Zx);function ey(){}function fy(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=gy))}function gy(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Hw.RandomUUID=ey;ey.install=fy;Iw(fy);function hy(){}function iy(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=jy)}function jy(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Hw.StorageEstimate=hy;hy.install=iy;Iw(iy);function ky(){}function ly(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:my})}function my(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Hw.Symbol=ky;ky.install=ly;Iw(ly);function ny(){}function oy(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}Hw.VideoPlayPromise=ny;ny.install=oy;Iw(oy);function py(){}function qy(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||sd())&&(a.getVideoPlaybackQuality=ry)}}function ry(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Hw.VideoPlaybackQuality=py;py.install=qy;Iw(qy);function sy(){}function ty(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=uy;else if(6==b)a=vy;else{try{var c=!!uy(1,2,"")}catch(d){c=!1}c&&(a=uy)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function uy(a,b,c){return new window.TextTrackCue(a,b,c)}function vy(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Hw.VTTCue=sy;sy.install=ty;Iw(ty);function wy(){}wy.prototype.parseInit=function(){};wy.prototype.setSequenceMode=function(){};wy.prototype.setManifestType=function(){};wy.prototype.parseMedia=function(a,b){var c=null,d=[];a=Af(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=xy.exec(e))){var f=yy.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Bb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
1113
- N("shaka.text.LrcTextParser",wy);wy.prototype.parseMedia=wy.prototype.parseMedia;wy.prototype.setManifestType=wy.prototype.setManifestType;wy.prototype.setSequenceMode=wy.prototype.setSequenceMode;wy.prototype.parseInit=wy.prototype.parseInit;var xy=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,yy=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Oc["application/x-subtitle-lrc"]=function(){return new wy};function zy(){}zy.prototype.parseInit=function(){};zy.prototype.setSequenceMode=function(){};zy.prototype.setManifestType=function(){};
1114
- zy.prototype.parseMedia=function(a,b,c){var d=Af(a);a=[];if(""==d)return a;var e=vg(d,"tt");if(!e)throw new O(2,2,2005,"Failed to parse TTML.");d=e.getElementsByTagName("body")[0];if(!d)return[];var f=ig(e,Ay,"frameRate"),g=ig(e,Ay,"subFrameRate"),h=ig(e,Ay,"frameRateMultiplier"),k=ig(e,Ay,"tickRate"),l=ig(e,Ay,"cellResolution"),m=e.getAttribute("xml:space")||"default",n=ig(e,By,"extent");if("default"!=m&&"preserve"!=m)throw new O(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new Cy(f,
1115
- g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{Bb:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?gg(g):[];h=Array.from(e.getElementsByTagName("style"));e=Array.from(e.getElementsByTagName("region"));k=[];for(var r=t(e),p=r.next();!p.done;p=r.next()){var u=p.value;p=new Cb;var v=u.getAttribute("xml:id");if(v){p.id=v;var y=null;n&&(y=Dy.exec(n)||Ey.exec(n));v=y?Number(y[1]):null;y=y?Number(y[2]):null;var z,x;if(z=Fy(u,h,"extent"))z=(x=Dy.exec(z))||Ey.exec(z),
1116
- null!=z&&(p.width=Number(z[1]),p.height=Number(z[2]),x||(null!=v&&(p.width=100*p.width/v),null!=y&&(p.height=100*p.height/y)),p.widthUnits=x||null!=v?Vb:0,p.heightUnits=x||null!=y?Vb:0);if(u=Fy(u,h,"origin"))z=(x=Dy.exec(u))||Ey.exec(u),null!=z&&(p.viewportAnchorX=Number(z[1]),p.viewportAnchorY=Number(z[2]),x||(null!=y&&(p.viewportAnchorY=100*p.viewportAnchorY/y),null!=v&&(p.viewportAnchorX=100*p.viewportAnchorX/v)),p.viewportAnchorUnits=x||null!=v?Vb:0)}else p=null;p&&k.push(p)}if(dg(d,"p").length)throw new O(2,
1117
- 2,2001,"<p> can only be inside <div> in TTML");n=t(dg(d,"div"));for(r=n.next();!r.done;r=n.next())if(dg(r.value,"span").length)throw new O(2,2,2001,"<span> can only be inside <p> in TTML");if(b=Gy(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
1118
- function Gy(a,b,c,d,e,f,g,h,k,l,m,n){var r=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var p=document.createElement("span");p.textContent=a.textContent}else p=a;for(var u=null,v=t(Hy),y=v.next();!y.done&&!(u=Iy(p,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=null;var z=ig(p,Hy,"backgroundImage");n&&z&&!z.startsWith("#")&&(y=new fc(n),z=new fc(z),(y=y.resolve(z).toString())&&(v=y));if("p"==a.nodeName||u||v)m=!0;a=m;y="default"==(p.getAttribute("xml:space")||
1119
- (h?"default":"preserve"));z=Array.from(p.childNodes).every(function(D){return D.nodeType==Node.TEXT_NODE});h=[];if(!z)for(var x=t(p.childNodes),A=x.next();!A.done;A=x.next())(A=Gy(A.value,b,c,d,e,f,g,y,k,p,m,n))&&h.push(A);d=null!=l;n=/\S/.test(p.textContent);A=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(A||n||"br"==p.tagName||0!=h.length||d&&!y))return null;x=Jy(p,c);n=x.start;for(x=x.end;r&&r.nodeType==Node.ELEMENT_NODE&&"tt"!=r.tagName;)x=Ky(r,c,n,x),n=x.start,x=
1120
- x.end,r=r.parentNode;null==n&&(n=0);n+=b.periodStart;x=null==x?Infinity:x+b.periodStart;n=Math.max(n,b.segmentStart);x=Math.min(x,b.segmentEnd);if(!A&&0<h.length)for(n=Infinity,x=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),x=Math.max(x,c.endTime);if("br"==p.tagName)return e=new Bb(n,x,""),e.lineBreak=!0,e;b="";z&&(b=p.textContent,y&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new Bb(n,x,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Iy(p,"region",f,"")[0];
1121
- if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var B=k.getAttribute("xml:id");b.region=g.filter(function(D){return D.id==B})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&(g=Iy(l,"region",f,"")[0]);Ly(b,p,g,u,v,e,a,0==h.length);return b}
1122
- function Ly(a,b,c,d,e,f,g,h){g=g||h;"rtl"==My(b,c,f,"direction",g)&&(a.direction="rtl");h=My(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Fb);(h=My(b,c,f,"textAlign",!0))?(a.positionAlign=Ny[h],a.lineAlign=Oy[h],a.textAlign=Ob[h.toUpperCase()]):a.textAlign=Eb;if(h=My(b,c,f,"displayAlign",!0))a.displayAlign=Pb[h.toUpperCase()];if(h=My(b,c,f,"color",g))a.color=h;if(h=My(b,c,f,"backgroundColor",
1123
- g))a.backgroundColor=h;if(h=My(b,c,f,"border",g))a.border=h;if(h=My(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h}(h=My(b,c,f,"fontWeight",g))&&
1124
- "bold"==h&&(a.fontWeight=700);h=My(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=My(b,c,f,"lineHeight",g))&&h.match(Py)&&(a.lineHeight=h);(h=My(b,c,f,"fontSize",g))&&(h.match(Py)||h.match(Qy))&&(a.fontSize=h);if(h=My(b,c,f,"fontStyle",g))a.fontStyle=Ub[h.toUpperCase()];d?(e=d.getAttribute("imageType")||d.getAttribute("imagetype"),h=d.getAttribute("encoding"),d=d.textContent.trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=e);if(d=My(b,
1125
- c,f,"textOutline",g))d=d.split(" "),d[0].match(Py)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(Py)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=My(b,c,f,"letterSpacing",g))&&d.match(Py)&&(a.letterSpacing=d);(d=My(b,c,f,"linePadding",g))&&d.match(Py)&&(a.linePadding=d);if(d=My(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=Fy(c,f,"textDecoration"))&&Ry(a,d);(d=Sy(b,f,"textDecoration"))&&Ry(a,d);if(d=My(b,c,f,"textCombine",g))a.textCombineUpright=d;switch(My(b,c,f,
1100
+ d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}Qx.prototype.createMediaKeys=function(){var a=new Px(this.g);return Promise.resolve(a)};Qx.prototype.getConfiguration=function(){return this.h};function Px(a){this.l=a;this.h=null;this.g=new of;this.i=[];this.j=new Map}
1101
+ function Sx(a,b){a.h=b;a.g.xb();var c=Mx;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=nb(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=Tx(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Hb()?"licenserequest":"licenserenewal").set("message",d.message),d=new Q("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){if(d=Tx(a,d.sessionId))Ux(d,"usable"),
1102
+ d.g&&d.g.resolve(),d.g=null}),a.g.D(b,c+"keyerror",function(d){var e=Tx(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(45==d.systemCode&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Ux(e,"output-restricted"):1==f?Ux(e,"expired"):Ux(e,"internal-error"))}}))}
1103
+ Px.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new Vx(b,this.l,a);this.i.push(a);return a};Px.prototype.setServerCertificate=function(){return Promise.resolve(!1)};Px.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
1104
+ function Tx(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function Vx(a,b,c){Ve.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Le;this.keyStatuses=new Wx}oa(Vx,Ve);
1105
+ function Xx(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=mb(Ef("LOAD_SESSION|"+c));else{var e=Ef("PERSISTENT|");d=$f(e,b)}else d=mb(b)}catch(g){return Promise.reject(g)}a.h=new Le;var f=Rx("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new id(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).U(.01)}return a.h}
1106
+ function Yx(a,b,c){if(a.g)a.g.then(function(){return Yx(a,b,c)}).catch(function(){return Yx(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Af(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=Xf(e.keys[0].k);e=Xf(e.keys[0].kid)}else d=mb(c),e=null;var f=Rx("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
1107
+ function Ux(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new Q("keystatuseschange");a.dispatchEvent(b)}q=Vx.prototype;q.generateRequest=function(a,b){return Xx(this,b,null)};q.load=function(a){return"persistent-license"==this.l?Xx(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Le;Yx(this,b,a);return b};
1108
+ q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=Rx("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function Wx(){this.size=0;this.g=void 0}q=Wx.prototype;q.Hb=function(){return this.g};
1109
+ q.forEach=function(a){this.g&&a(this.g,mh.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=mh.value();return this.g&&kb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var Mx="";Iw(Lx);function Zx(){}function $x(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=ay,Object.defineProperty(a,"disablePictureInPicture",{get:by,set:cy,enumerable:!0,configurable:!0}),document.exitPictureInPicture=dy,document.addEventListener("webkitpresentationmodechanged",ey,!0))}}
1110
+ function ey(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
1111
+ function ay(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function dy(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
1112
+ function by(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function cy(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Hw.PiPWebkit=Zx;Zx.install=$x;Iw($x);function fy(){}function gy(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=hy))}function hy(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Hw.RandomUUID=fy;fy.install=gy;Iw(gy);function iy(){}function jy(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=ky)}function ky(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Hw.StorageEstimate=iy;iy.install=jy;Iw(jy);function ly(){}function my(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:ny})}function ny(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Hw.Symbol=ly;ly.install=my;Iw(my);function oy(){}function py(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}Hw.VideoPlayPromise=oy;oy.install=py;Iw(py);function qy(){}function ry(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||sd())&&(a.getVideoPlaybackQuality=sy)}}function sy(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Hw.VideoPlaybackQuality=qy;qy.install=ry;Iw(ry);function ty(){}function uy(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=vy;else if(6==b)a=wy;else{try{var c=!!vy(1,2,"")}catch(d){c=!1}c&&(a=vy)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function vy(a,b,c){return new window.TextTrackCue(a,b,c)}function wy(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Hw.VTTCue=ty;ty.install=uy;Iw(uy);function xy(){}xy.prototype.parseInit=function(){};xy.prototype.setSequenceMode=function(){};xy.prototype.setManifestType=function(){};xy.prototype.parseMedia=function(a,b){var c=null,d=[];a=Af(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=yy.exec(e))){var f=zy.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Bb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
1113
+ N("shaka.text.LrcTextParser",xy);xy.prototype.parseMedia=xy.prototype.parseMedia;xy.prototype.setManifestType=xy.prototype.setManifestType;xy.prototype.setSequenceMode=xy.prototype.setSequenceMode;xy.prototype.parseInit=xy.prototype.parseInit;var yy=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,zy=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Oc["application/x-subtitle-lrc"]=function(){return new xy};function Ay(){}Ay.prototype.parseInit=function(){};Ay.prototype.setSequenceMode=function(){};Ay.prototype.setManifestType=function(){};
1114
+ Ay.prototype.parseMedia=function(a,b,c){var d=Af(a);a=[];if(""==d)return a;var e=vg(d,"tt");if(!e)throw new O(2,2,2005,"Failed to parse TTML.");d=e.getElementsByTagName("body")[0];if(!d)return[];var f=ig(e,By,"frameRate"),g=ig(e,By,"subFrameRate"),h=ig(e,By,"frameRateMultiplier"),k=ig(e,By,"tickRate"),l=ig(e,By,"cellResolution"),m=e.getAttribute("xml:space")||"default",n=ig(e,Cy,"extent");if("default"!=m&&"preserve"!=m)throw new O(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new Dy(f,
1115
+ g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{Bb:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?gg(g):[];h=Array.from(e.getElementsByTagName("style"));e=Array.from(e.getElementsByTagName("region"));k=[];for(var r=t(e),p=r.next();!p.done;p=r.next()){var u=p.value;p=new Cb;var v=u.getAttribute("xml:id");if(v){p.id=v;var y=null;n&&(y=Ey.exec(n)||Fy.exec(n));v=y?Number(y[1]):null;y=y?Number(y[2]):null;var z,x;if(z=Gy(u,h,"extent"))z=(x=Ey.exec(z))||Fy.exec(z),
1116
+ null!=z&&(p.width=Number(z[1]),p.height=Number(z[2]),x||(null!=v&&(p.width=100*p.width/v),null!=y&&(p.height=100*p.height/y)),p.widthUnits=x||null!=v?Vb:0,p.heightUnits=x||null!=y?Vb:0);if(u=Gy(u,h,"origin"))z=(x=Ey.exec(u))||Fy.exec(u),null!=z&&(p.viewportAnchorX=Number(z[1]),p.viewportAnchorY=Number(z[2]),x||(null!=y&&(p.viewportAnchorY=100*p.viewportAnchorY/y),null!=v&&(p.viewportAnchorX=100*p.viewportAnchorX/v)),p.viewportAnchorUnits=x||null!=v?Vb:0)}else p=null;p&&k.push(p)}if(dg(d,"p").length)throw new O(2,
1117
+ 2,2001,"<p> can only be inside <div> in TTML");n=t(dg(d,"div"));for(r=n.next();!r.done;r=n.next())if(dg(r.value,"span").length)throw new O(2,2,2001,"<span> can only be inside <p> in TTML");if(b=Hy(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
1118
+ function Hy(a,b,c,d,e,f,g,h,k,l,m,n){var r=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var p=document.createElement("span");p.textContent=a.textContent}else p=a;for(var u=null,v=t(Iy),y=v.next();!y.done&&!(u=Jy(p,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=null;var z=ig(p,Iy,"backgroundImage");n&&z&&!z.startsWith("#")&&(y=new fc(n),z=new fc(z),(y=y.resolve(z).toString())&&(v=y));if("p"==a.nodeName||u||v)m=!0;a=m;y="default"==(p.getAttribute("xml:space")||
1119
+ (h?"default":"preserve"));z=Array.from(p.childNodes).every(function(D){return D.nodeType==Node.TEXT_NODE});h=[];if(!z)for(var x=t(p.childNodes),A=x.next();!A.done;A=x.next())(A=Hy(A.value,b,c,d,e,f,g,y,k,p,m,n))&&h.push(A);d=null!=l;n=/\S/.test(p.textContent);A=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(A||n||"br"==p.tagName||0!=h.length||d&&!y))return null;x=Ky(p,c);n=x.start;for(x=x.end;r&&r.nodeType==Node.ELEMENT_NODE&&"tt"!=r.tagName;)x=Ly(r,c,n,x),n=x.start,x=
1120
+ x.end,r=r.parentNode;null==n&&(n=0);n+=b.periodStart;x=null==x?Infinity:x+b.periodStart;n=Math.max(n,b.segmentStart);x=Math.min(x,b.segmentEnd);if(!A&&0<h.length)for(n=Infinity,x=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),x=Math.max(x,c.endTime);if("br"==p.tagName)return e=new Bb(n,x,""),e.lineBreak=!0,e;b="";z&&(b=p.textContent,y&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new Bb(n,x,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Jy(p,"region",f,"")[0];
1121
+ if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var B=k.getAttribute("xml:id");b.region=g.filter(function(D){return D.id==B})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&(g=Jy(l,"region",f,"")[0]);My(b,p,g,u,v,e,a,0==h.length);return b}
1122
+ function My(a,b,c,d,e,f,g,h){g=g||h;"rtl"==Ny(b,c,f,"direction",g)&&(a.direction="rtl");h=Ny(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Fb);(h=Ny(b,c,f,"textAlign",!0))?(a.positionAlign=Oy[h],a.lineAlign=Py[h],a.textAlign=Ob[h.toUpperCase()]):a.textAlign=Eb;if(h=Ny(b,c,f,"displayAlign",!0))a.displayAlign=Pb[h.toUpperCase()];if(h=Ny(b,c,f,"color",g))a.color=h;if(h=Ny(b,c,f,"backgroundColor",
1123
+ g))a.backgroundColor=h;if(h=Ny(b,c,f,"border",g))a.border=h;if(h=Ny(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h}(h=Ny(b,c,f,"fontWeight",g))&&
1124
+ "bold"==h&&(a.fontWeight=700);h=Ny(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=Ny(b,c,f,"lineHeight",g))&&h.match(Qy)&&(a.lineHeight=h);(h=Ny(b,c,f,"fontSize",g))&&(h.match(Qy)||h.match(Ry))&&(a.fontSize=h);if(h=Ny(b,c,f,"fontStyle",g))a.fontStyle=Ub[h.toUpperCase()];d?(e=d.getAttribute("imageType")||d.getAttribute("imagetype"),h=d.getAttribute("encoding"),d=d.textContent.trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=e);if(d=Ny(b,
1125
+ c,f,"textOutline",g))d=d.split(" "),d[0].match(Qy)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(Qy)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=Ny(b,c,f,"letterSpacing",g))&&d.match(Qy)&&(a.letterSpacing=d);(d=Ny(b,c,f,"linePadding",g))&&d.match(Qy)&&(a.linePadding=d);if(d=Ny(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=Gy(c,f,"textDecoration"))&&Sy(a,d);(d=Ty(b,f,"textDecoration"))&&Sy(a,d);if(d=Ny(b,c,f,"textCombine",g))a.textCombineUpright=d;switch(Ny(b,c,f,
1126
1126
  "ruby",g)){case "container":a.rubyTag="ruby";break;case "text":a.rubyTag="rt"}}
1127
- function Ry(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&wb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&wb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
1128
- a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&wb(a.textDecoration,"overline")}}function My(a,b,c,d,e){e=void 0===e?!0:e;return(a=Sy(a,c,d))?a:e?Fy(b,c,d):null}function Fy(a,b,c){if(!a)return null;var d=ig(a,By,c);return d?d:Ty(a,b,c)}function Sy(a,b,c){var d=ig(a,By,c);return d?d:Ty(a,b,c)}
1129
- function Ty(a,b,c){a=Iy(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=hg(a[e],"urn:ebu:tt:style",c);f||(f=ig(a[e],By,c));f||(f=Sy(a[e],b,c));f&&(d=f)}return d}
1130
- function Iy(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?hg(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function Ky(a,b,c,d){a=Jy(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
1131
- function Jy(a,b){var c=Uy(a.getAttribute("begin"),b),d=Uy(a.getAttribute("end"),b);a=Uy(a.getAttribute("dur"),b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
1132
- function Uy(a,b){var c=null;if(Vy.test(a)){a=Vy.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(Wy.test(a))c=Xy(Wy,a);else if(Yy.test(a))c=Xy(Yy,a);else if(Zy.test(a))a=Zy.exec(a),c=Number(a[1])/b.frameRate;else if($y.test(a))a=$y.exec(a),c=Number(a[1])/b.g;else if(az.test(a))c=Xy(az,a);else if(a)throw new O(2,2,2001,"Could not parse cue time range in TTML");return c}
1133
- function Xy(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}N("shaka.text.TtmlTextParser",zy);zy.prototype.parseMedia=zy.prototype.parseMedia;zy.prototype.setManifestType=zy.prototype.setManifestType;zy.prototype.setSequenceMode=zy.prototype.setSequenceMode;zy.prototype.parseInit=zy.prototype.parseInit;
1134
- function Cy(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
1135
- var Dy=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Qy=/^(\d{1,2}(?:\.\d+)?|100)%$/,Py=/^(\d+px|\d+em|\d*\.?\d+c)$/,Ey=/^(\d+)px (\d+)px$/,Vy=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Wy=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Yy=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Zy=/^(\d*(?:\.\d*)?)f$/,$y=/^(\d*(?:\.\d*)?)t$/,az=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),Oy={left:Ib,center:"center",right:"end",start:Ib,
1136
- end:"end"},Ny={left:"line-left",center:"center",right:"line-right"},Ay=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],By=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Hy=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Oc["application/ttml+xml"]=function(){return new zy};function bz(){this.g=new zy}bz.prototype.parseInit=function(a){var b=!1;(new Kf).box("moov",Pf).box("trak",Pf).box("mdia",Pf).box("minf",Pf).box("stbl",Pf).O("stsd",Rf).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new O(2,2,2007);};bz.prototype.setSequenceMode=function(){};bz.prototype.setManifestType=function(){};
1137
- bz.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Kf).box("mdat",Tf(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new O(2,2,2007);return f};N("shaka.text.Mp4TtmlParser",bz);bz.prototype.parseMedia=bz.prototype.parseMedia;bz.prototype.setManifestType=bz.prototype.setManifestType;bz.prototype.setSequenceMode=bz.prototype.setSequenceMode;bz.prototype.parseInit=bz.prototype.parseInit;Oc['application/mp4; codecs="stpp"']=function(){return new bz};
1138
- Oc['application/mp4; codecs="stpp.ttml"']=function(){return new bz};Oc['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new bz};Oc['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new bz};function cz(){this.h=!1;this.g="UNKNOWN"}cz.prototype.parseInit=function(){};cz.prototype.setSequenceMode=function(a){this.h=a};cz.prototype.setManifestType=function(a){this.g=a};
1139
- cz.prototype.parseMedia=function(a,b){a=Af(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new O(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&this.h){var d=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),e=c[0].match(/MPEGTS:(\d+)/m);if(d&&e){a=dz(new vs(d[1]));if(null==a)throw new O(2,2,2E3);e=Number(e[1]);for(d=b.segmentStart-b.periodStart;95443.7176888889<=d;)d-=95443.7176888889,e+=8589934592;a=b.periodStart+
1127
+ function Sy(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&wb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&wb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
1128
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&wb(a.textDecoration,"overline")}}function Ny(a,b,c,d,e){e=void 0===e?!0:e;return(a=Ty(a,c,d))?a:e?Gy(b,c,d):null}function Gy(a,b,c){if(!a)return null;var d=ig(a,Cy,c);return d?d:Uy(a,b,c)}function Ty(a,b,c){var d=ig(a,Cy,c);return d?d:Uy(a,b,c)}
1129
+ function Uy(a,b,c){a=Jy(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=hg(a[e],"urn:ebu:tt:style",c);f||(f=ig(a[e],Cy,c));f||(f=Ty(a[e],b,c));f&&(d=f)}return d}
1130
+ function Jy(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?hg(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function Ly(a,b,c,d){a=Ky(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
1131
+ function Ky(a,b){var c=Vy(a.getAttribute("begin"),b),d=Vy(a.getAttribute("end"),b);a=Vy(a.getAttribute("dur"),b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
1132
+ function Vy(a,b){var c=null;if(Wy.test(a)){a=Wy.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(Xy.test(a))c=Yy(Xy,a);else if(Zy.test(a))c=Yy(Zy,a);else if($y.test(a))a=$y.exec(a),c=Number(a[1])/b.frameRate;else if(az.test(a))a=az.exec(a),c=Number(a[1])/b.g;else if(bz.test(a))c=Yy(bz,a);else if(a)throw new O(2,2,2001,"Could not parse cue time range in TTML");return c}
1133
+ function Yy(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}N("shaka.text.TtmlTextParser",Ay);Ay.prototype.parseMedia=Ay.prototype.parseMedia;Ay.prototype.setManifestType=Ay.prototype.setManifestType;Ay.prototype.setSequenceMode=Ay.prototype.setSequenceMode;Ay.prototype.parseInit=Ay.prototype.parseInit;
1134
+ function Dy(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
1135
+ var Ey=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Ry=/^(\d{1,2}(?:\.\d+)?|100)%$/,Qy=/^(\d+px|\d+em|\d*\.?\d+c)$/,Fy=/^(\d+)px (\d+)px$/,Wy=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Xy=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Zy=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,$y=/^(\d*(?:\.\d*)?)f$/,az=/^(\d*(?:\.\d*)?)t$/,bz=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),Py={left:Ib,center:"center",right:"end",start:Ib,
1136
+ end:"end"},Oy={left:"line-left",center:"center",right:"line-right"},By=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Cy=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Iy=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Oc["application/ttml+xml"]=function(){return new Ay};function cz(){this.g=new Ay}cz.prototype.parseInit=function(a){var b=!1;(new Kf).box("moov",Pf).box("trak",Pf).box("mdia",Pf).box("minf",Pf).box("stbl",Pf).O("stsd",Rf).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new O(2,2,2007);};cz.prototype.setSequenceMode=function(){};cz.prototype.setManifestType=function(){};
1137
+ cz.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Kf).box("mdat",Tf(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new O(2,2,2007);return f};N("shaka.text.Mp4TtmlParser",cz);cz.prototype.parseMedia=cz.prototype.parseMedia;cz.prototype.setManifestType=cz.prototype.setManifestType;cz.prototype.setSequenceMode=cz.prototype.setSequenceMode;cz.prototype.parseInit=cz.prototype.parseInit;Oc['application/mp4; codecs="stpp"']=function(){return new cz};
1138
+ Oc['application/mp4; codecs="stpp.ttml"']=function(){return new cz};Oc['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new cz};Oc['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new cz};function dz(){this.h=!1;this.g="UNKNOWN"}dz.prototype.parseInit=function(){};dz.prototype.setSequenceMode=function(a){this.h=a};dz.prototype.setManifestType=function(a){this.g=a};
1139
+ dz.prototype.parseMedia=function(a,b){a=Af(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new O(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&this.h){var d=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),e=c[0].match(/MPEGTS:(\d+)/m);if(d&&e){a=ez(new vs(d[1]));if(null==a)throw new O(2,2,2E3);e=Number(e[1]);for(d=b.segmentStart-b.periodStart;95443.7176888889<=d;)d-=95443.7176888889,e+=8589934592;a=b.periodStart+
1140
1140
  e/9E4-a}}else c[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g&&(a=b.segmentStart);b=[];e=t(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new vs(d);var f=new Cb;ys(d);ws(d);for(var g=ys(d);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=
1141
- Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");ws(d);g=ys(d)}b.push(f)}e=new Map;ez(e);d=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=
1141
+ Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");ws(d);g=ys(d)}b.push(f)}e=new Map;fz(e);d=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=
1142
1142
  t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=e.get(g))||(l=new Bb(0,0,""));for(var m=!1,n=0;n<k.length;n++){var r=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(r){var p=r[2].trim().replace(";","");switch(r[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=p;break;case "color":m=!0;l.color=p;break;case "font-family":m=!0;l.fontFamily=p;break;
1143
1143
  case "font-size":m=!0;l.fontSize=p;break;case "font-weight":if(700<=parseInt(p,10)||"bold"==p)m=!0,l.fontWeight=700;break;case "font-style":switch(p){case "normal":m=!0;l.fontStyle=Lb;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(p);break;case "text-combine-upright":m=!0;l.textCombineUpright=p;break;case "text-shadow":m=!0;l.textShadow=p;break;case "white-space":m=!0,l.wrapLine="noWrap"!=p}}}m&&e.set(g,
1144
- l)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else if(h=null,f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new vs(f[0]),k=dz(g),n=xs(g,/[ \t]+--\x3e[ \t]+/g),l=dz(g),null==k||null==n||null==l)Ta("Failed to parse VTT time code. Cue skipped:",h,f),f=null;else{k+=m;l+=m;f=f.slice(1).join("\n").trim();e.has("global")?(m=e.get("global").clone(),m.startTime=k,m.endTime=l,m.payload=""):m=new Bb(k,l,"");ws(g);for(k=ys(g);k;)fz(m,k,b),ws(g),k=ys(g);gz(f,
1145
- m,e);null!=h&&(m.id=h);f=m}f&&d.push(f)}return d};function ez(a){for(var b=t(Object.entries(Rb)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Bb(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(Sb));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Bb(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
1146
- function gz(a,b,c){0===c.size&&ez(c);a:{for(var d=[],e=-1,f="",g=0;g<a.length;g++)if("/"===a[g]&&0<g&&"<"===a[g-1]){var h=a.indexOf(">",g);if(h<=g)break a;if((h=a.substring(g+1,h))&&"c"===h){var k=d.pop();k?k===h?(f+="/"+h+">",g+=h.length+1):k.startsWith("c.")?(g+=h.length+1,f+="/"+k+">"):f+=a[g]:f+=a[g]}else f+=a[g]}else"<"===a[g]?(e=g+1,"c"!=a[e]&&(e=-1)):">"===a[g]&&0<e&&(d.push(a.substr(e,g-e)),e=-1),f+=a[g];a=f}d=a;a=[];f=-1;for(e=0;e<d.length;e++)"<"===d[e]?f=e+1:">"===d[e]&&0<f&&(f=d.substr(f,
1147
- e-f),f.match(hz)&&a.push(f),f=-1);a=t(a);for(e=a.next();!e.done;e=a.next())e=e.value,d=d.replace("<"+e+">",'<div time="'+e+'">'),d+="</div>";a=d;a:{e=a;f=[];g=-1;a="";d=!1;for(h=0;h<e.length;h++)if("/"===e[h]){k=e.indexOf(">",h);if(-1===k){a=e;break a}if((k=e.substring(h+1,k))&&"v"==k){d=!0;var l=null;f.length&&(l=f[f.length-1]);if(l){if(l===k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=e[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=e[h]}else a+=e[h]}else"<"===e[h]?(g=h+1,"v"!=e[g]&&(g=-1)):">"===
1148
- e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),a+=e[h];e=t(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),a=a.replace("<"+f+">","<"+g+">"),a=a.replace("</"+f+">","</"+g+">"),d||(a+="</"+g+">")}if(d=vg("<span>"+a+"</span>","span")){d=d.childNodes;if(1==d.length&&(e=d[0],e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE)){b.payload=iz(a);return}a=t(d);for(d=a.next();!d.done;d=a.next())jz(d.value,b,c)}else b.payload=iz(a)}
1149
- function kz(a,b){return a&&0<a.length?a:b}
1150
- function jz(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Cb;d.position=null;d.size=0;if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var e=t(a.nodeName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(g=c.get(g))&&(d.backgroundColor=kz(g.backgroundColor,d.backgroundColor),d.color=kz(g.color,d.color),d.fontFamily=kz(g.fontFamily,
1151
- d.fontFamily),d.fontSize=kz(g.fontSize,d.fontSize),d.fontWeight=g.fontWeight,d.fontStyle=g.fontStyle,d.opacity=g.opacity,d.rubyTag=g.rubyTag,d.textCombineUpright=g.textCombineUpright,d.textShadow=g.textShadow,d.wrapLine=g.wrapLine);switch(f){case "br":d=Mb(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=700;break;case "i":d.fontStyle="italic";break;case "u":d.textDecoration.push("underline");break;case "font":if(f=a.getAttribute("color"))d.color=f;break;case "div":f=a.getAttribute("time");
1152
- if(!f)break;if(f=dz(new vs(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.childNodes;if(kg(a)||1==e.length&&kg(e[0]))for(e=!0,c=t(a.textContent.split("\n")),a=c.next();!a.done;a=c.next())a=a.value,e||(e=Mb(d.startTime,d.endTime),b.nestedCues.push(e)),0<a.length&&(e=d.clone(),e.payload=iz(a),b.nestedCues.push(e)),e=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())jz(a.value,d,c)}
1153
- function fz(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Eb:a.textAlign=Ob[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==
1154
- b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Db);else if(d=/^region:(.*)$/.exec(b)){if(b=lz(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=Qb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Hb,a.line=Number(c[1]),c[2]&&(a.lineAlign=Qb[c[2].toUpperCase()])}
1155
- function lz(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function dz(a){a=xs(a,hz);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}
1156
- function iz(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}N("shaka.text.VttTextParser",cz);cz.prototype.parseMedia=cz.prototype.parseMedia;cz.prototype.setManifestType=cz.prototype.setManifestType;cz.prototype.setSequenceMode=cz.prototype.setSequenceMode;cz.prototype.parseInit=cz.prototype.parseInit;
1157
- var hz=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;Oc["text/vtt"]=function(){return new cz};Oc['text/vtt; codecs="vtt"']=function(){return new cz};Oc['text/vtt; codecs="wvtt"']=function(){return new cz};function mz(){this.g=null}mz.prototype.parseInit=function(a){var b=this,c=!1;(new Kf).box("moov",Pf).box("trak",Pf).box("mdia",Pf).O("mdhd",function(d){d=Mh(d.reader,d.version);b.g=d.timescale}).box("minf",Pf).box("stbl",Pf).O("stsd",Rf).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new O(2,2,2008);if(!c)throw new O(2,2,2008);};mz.prototype.setSequenceMode=function(){};mz.prototype.setManifestType=function(){};
1158
- mz.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new O(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Kf).box("moof",Pf).box("traf",Pf).O("tfdt",function(A){g=!0;c=Lh(A.reader,A.version).baseMediaDecodeTime}).O("tfhd",function(A){l=Kh(A.reader,A.flags).xf}).O("trun",function(A){h=!0;d=Nh(A.reader,A.version,A.flags).Tf}).box("mdat",Tf(function(A){k=!0;e=A})).parse(a,!1);if(!k&&!g&&!h)throw new O(2,2,2008);a=c;for(var m=new Gf(e,0),n=t(d),r=n.next();!r.done;r=n.next()){r=
1159
- r.value;var p=r.Xe||l,u=r.Kd?c+r.Kd:a;a=u+(p||0);var v=0;do{var y=m.L();v+=y;var z=m.L(),x=null;"vttc"==Of(z)?8<y&&(x=m.kb(y-8)):m.skip(y-8);p&&x&&(y=nz(x,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(y))}while(r.sampleSize&&v<r.sampleSize)}return f.filter(Wc)};function nz(a,b,c){var d,e,f;(new Kf).box("payl",Tf(function(g){d=Af(g)})).box("iden",Tf(function(g){e=Af(g)})).box("sttg",Tf(function(g){f=Af(g)})).parse(a);return d?oz(d,e,f,b,c):null}
1160
- function oz(a,b,c,d,e){d=new Bb(d,e,"");gz(a,d,new Map);b&&(d.id=b);if(c)for(a=new vs(c),b=ys(a);b;)fz(d,b,[]),ws(a),b=ys(a);return d}N("shaka.text.Mp4VttParser",mz);mz.prototype.parseMedia=mz.prototype.parseMedia;mz.prototype.setManifestType=mz.prototype.setManifestType;mz.prototype.setSequenceMode=mz.prototype.setSequenceMode;mz.prototype.parseInit=mz.prototype.parseInit;Oc['application/mp4; codecs="wvtt"']=function(){return new mz};function pz(){}pz.prototype.parseInit=function(){};pz.prototype.setSequenceMode=function(){};pz.prototype.setManifestType=function(){};pz.prototype.parseMedia=function(a){var b=Af(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new vs(c[0]),e=qz(d),f=xs(d,/,/g);d=qz(d);if(null==e||null==f||null==d)throw new O(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Bb(e,d,c.slice(1).join("\n").trim()))}return a};
1161
- function qz(a){a=xs(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}N("shaka.text.SbvTextParser",pz);pz.prototype.parseMedia=pz.prototype.parseMedia;pz.prototype.setManifestType=pz.prototype.setManifestType;pz.prototype.setSequenceMode=pz.prototype.setSequenceMode;pz.prototype.parseInit=pz.prototype.parseInit;Oc["text/x-subviewer"]=function(){return new pz};function rz(){this.g=new cz}rz.prototype.parseInit=function(){};rz.prototype.setSequenceMode=function(){};rz.prototype.setManifestType=function(){};rz.prototype.parseMedia=function(a,b,c){a=Af(a);a=sz(a);a=mb(Ef(a));return this.g.parseMedia(a,b,c)};
1162
- function sz(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}N("shaka.text.SrtTextParser",rz);rz.srt2webvtt=sz;rz.prototype.parseMedia=rz.prototype.parseMedia;
1163
- rz.prototype.setManifestType=rz.prototype.setManifestType;rz.prototype.setSequenceMode=rz.prototype.setSequenceMode;rz.prototype.parseInit=rz.prototype.parseInit;Oc["text/srt"]=function(){return new rz};function tz(){}tz.prototype.parseInit=function(){};tz.prototype.setSequenceMode=function(){};tz.prototype.setManifestType=function(){};
1164
- tz.prototype.parseMedia=function(a){var b="",c="";a=Af(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=uz.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=vz.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(wz);else if("Style"==e){e=f.split(wz);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
1165
- [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={Td:e.Td},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=vz.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(wz);else if("Dialogue"==f){g=g.split(wz);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=xz(f.Start);var k=xz(f.End);g=new Bb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Td=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Td}}(e)))&&yz(g,f);d.push(g)}return d};
1166
- function yz(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=zz(c))a.color=c;if(c=b.BackColour)if(c=zz(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=Jb;a.textAlign="start";break;case 2:a.displayAlign=Jb;a.textAlign=Eb;break;case 3:a.displayAlign=Jb;a.textAlign="end";
1144
+ l)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else if(h=null,f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new vs(f[0]),k=ez(g),n=xs(g,/[ \t]+--\x3e[ \t]+/g),l=ez(g),null==k||null==n||null==l)Ta("Failed to parse VTT time code. Cue skipped:",h,f),f=null;else{k+=m;l+=m;f=f.slice(1).join("\n").trim();e.has("global")?(m=e.get("global").clone(),m.startTime=k,m.endTime=l,m.payload=""):m=new Bb(k,l,"");ws(g);for(k=ys(g);k;)gz(m,k,b),ws(g),k=ys(g);hz(f,
1145
+ m,e);null!=h&&(m.id=h);f=m}f&&d.push(f)}return d};function fz(a){for(var b=t(Object.entries(Rb)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Bb(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(Sb));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Bb(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
1146
+ function hz(a,b,c){0===c.size&&fz(c);a:{for(var d=[],e=-1,f="",g=0;g<a.length;g++)if("/"===a[g]&&0<g&&"<"===a[g-1]){var h=a.indexOf(">",g);if(h<=g)break a;if((h=a.substring(g+1,h))&&"c"===h){var k=d.pop();k?k===h?(f+="/"+h+">",g+=h.length+1):k.startsWith("c.")?(g+=h.length+1,f+="/"+k+">"):f+=a[g]:f+=a[g]}else f+=a[g]}else"<"===a[g]?(e=g+1,"c"!=a[e]&&(e=-1)):">"===a[g]&&0<e&&(d.push(a.substr(e,g-e)),e=-1),f+=a[g];a=f}d=a;a=[];f=-1;for(e=0;e<d.length;e++)"<"===d[e]?f=e+1:">"===d[e]&&0<f&&(f=d.substr(f,
1147
+ e-f),f.match(iz)&&a.push(f),f=-1);a=t(a);for(e=a.next();!e.done;e=a.next())e=e.value,d=d.replace("<"+e+">",'<div time="'+e+'">'),d+="</div>";a=d;a:{e=a;f=[];g=-1;a="";d=!1;for(h=0;h<e.length;h++)if("/"===e[h]){k=e.indexOf(">",h);if(-1===k){a=e;break a}if((k=e.substring(h+1,k))&&"v"==k){d=!0;var l=null;f.length&&(l=f[f.length-1]);if(l){if(l===k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=e[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=e[h]}else a+=e[h]}else"<"===e[h]?(g=h+1,"v"!=e[g]&&(g=-1)):">"===
1148
+ e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),a+=e[h];e=t(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),a=a.replace("<"+f+">","<"+g+">"),a=a.replace("</"+f+">","</"+g+">"),d||(a+="</"+g+">")}if(d=vg("<span>"+a+"</span>","span")){d=d.childNodes;if(1==d.length&&(e=d[0],e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE)){b.payload=jz(a);return}a=t(d);for(d=a.next();!d.done;d=a.next())kz(d.value,b,c)}else b.payload=jz(a)}
1149
+ function lz(a,b){return a&&0<a.length?a:b}
1150
+ function kz(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Cb;d.position=null;d.size=0;if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var e=t(a.nodeName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(g=c.get(g))&&(d.backgroundColor=lz(g.backgroundColor,d.backgroundColor),d.color=lz(g.color,d.color),d.fontFamily=lz(g.fontFamily,
1151
+ d.fontFamily),d.fontSize=lz(g.fontSize,d.fontSize),d.fontWeight=g.fontWeight,d.fontStyle=g.fontStyle,d.opacity=g.opacity,d.rubyTag=g.rubyTag,d.textCombineUpright=g.textCombineUpright,d.textShadow=g.textShadow,d.wrapLine=g.wrapLine);switch(f){case "br":d=Mb(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=700;break;case "i":d.fontStyle="italic";break;case "u":d.textDecoration.push("underline");break;case "font":if(f=a.getAttribute("color"))d.color=f;break;case "div":f=a.getAttribute("time");
1152
+ if(!f)break;if(f=ez(new vs(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.childNodes;if(kg(a)||1==e.length&&kg(e[0]))for(e=!0,c=t(a.textContent.split("\n")),a=c.next();!a.done;a=c.next())a=a.value,e||(e=Mb(d.startTime,d.endTime),b.nestedCues.push(e)),0<a.length&&(e=d.clone(),e.payload=jz(a),b.nestedCues.push(e)),e=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())kz(a.value,d,c)}
1153
+ function gz(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Eb:a.textAlign=Ob[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==
1154
+ b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Db);else if(d=/^region:(.*)$/.exec(b)){if(b=mz(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=Qb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Hb,a.line=Number(c[1]),c[2]&&(a.lineAlign=Qb[c[2].toUpperCase()])}
1155
+ function mz(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function ez(a){a=xs(a,iz);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}
1156
+ function jz(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}N("shaka.text.VttTextParser",dz);dz.prototype.parseMedia=dz.prototype.parseMedia;dz.prototype.setManifestType=dz.prototype.setManifestType;dz.prototype.setSequenceMode=dz.prototype.setSequenceMode;dz.prototype.parseInit=dz.prototype.parseInit;
1157
+ var iz=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;Oc["text/vtt"]=function(){return new dz};Oc['text/vtt; codecs="vtt"']=function(){return new dz};Oc['text/vtt; codecs="wvtt"']=function(){return new dz};function nz(){this.g=null}nz.prototype.parseInit=function(a){var b=this,c=!1;(new Kf).box("moov",Pf).box("trak",Pf).box("mdia",Pf).O("mdhd",function(d){d=Mh(d.reader,d.version);b.g=d.timescale}).box("minf",Pf).box("stbl",Pf).O("stsd",Rf).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new O(2,2,2008);if(!c)throw new O(2,2,2008);};nz.prototype.setSequenceMode=function(){};nz.prototype.setManifestType=function(){};
1158
+ nz.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new O(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Kf).box("moof",Pf).box("traf",Pf).O("tfdt",function(A){g=!0;c=Lh(A.reader,A.version).baseMediaDecodeTime}).O("tfhd",function(A){l=Kh(A.reader,A.flags).xf}).O("trun",function(A){h=!0;d=Nh(A.reader,A.version,A.flags).Tf}).box("mdat",Tf(function(A){k=!0;e=A})).parse(a,!1);if(!k&&!g&&!h)throw new O(2,2,2008);a=c;for(var m=new Gf(e,0),n=t(d),r=n.next();!r.done;r=n.next()){r=
1159
+ r.value;var p=r.Xe||l,u=r.Kd?c+r.Kd:a;a=u+(p||0);var v=0;do{var y=m.L();v+=y;var z=m.L(),x=null;"vttc"==Of(z)?8<y&&(x=m.kb(y-8)):m.skip(y-8);p&&x&&(y=oz(x,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(y))}while(r.sampleSize&&v<r.sampleSize)}return f.filter(Wc)};function oz(a,b,c){var d,e,f;(new Kf).box("payl",Tf(function(g){d=Af(g)})).box("iden",Tf(function(g){e=Af(g)})).box("sttg",Tf(function(g){f=Af(g)})).parse(a);return d?pz(d,e,f,b,c):null}
1160
+ function pz(a,b,c,d,e){d=new Bb(d,e,"");hz(a,d,new Map);b&&(d.id=b);if(c)for(a=new vs(c),b=ys(a);b;)gz(d,b,[]),ws(a),b=ys(a);return d}N("shaka.text.Mp4VttParser",nz);nz.prototype.parseMedia=nz.prototype.parseMedia;nz.prototype.setManifestType=nz.prototype.setManifestType;nz.prototype.setSequenceMode=nz.prototype.setSequenceMode;nz.prototype.parseInit=nz.prototype.parseInit;Oc['application/mp4; codecs="wvtt"']=function(){return new nz};function qz(){}qz.prototype.parseInit=function(){};qz.prototype.setSequenceMode=function(){};qz.prototype.setManifestType=function(){};qz.prototype.parseMedia=function(a){var b=Af(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new vs(c[0]),e=rz(d),f=xs(d,/,/g);d=rz(d);if(null==e||null==f||null==d)throw new O(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Bb(e,d,c.slice(1).join("\n").trim()))}return a};
1161
+ function rz(a){a=xs(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}N("shaka.text.SbvTextParser",qz);qz.prototype.parseMedia=qz.prototype.parseMedia;qz.prototype.setManifestType=qz.prototype.setManifestType;qz.prototype.setSequenceMode=qz.prototype.setSequenceMode;qz.prototype.parseInit=qz.prototype.parseInit;Oc["text/x-subviewer"]=function(){return new qz};function sz(){this.g=new dz}sz.prototype.parseInit=function(){};sz.prototype.setSequenceMode=function(){};sz.prototype.setManifestType=function(){};sz.prototype.parseMedia=function(a,b,c){a=Af(a);a=tz(a);a=mb(Ef(a));return this.g.parseMedia(a,b,c)};
1162
+ function tz(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}N("shaka.text.SrtTextParser",sz);sz.srt2webvtt=tz;sz.prototype.parseMedia=sz.prototype.parseMedia;
1163
+ sz.prototype.setManifestType=sz.prototype.setManifestType;sz.prototype.setSequenceMode=sz.prototype.setSequenceMode;sz.prototype.parseInit=sz.prototype.parseInit;Oc["text/srt"]=function(){return new sz};function uz(){}uz.prototype.parseInit=function(){};uz.prototype.setSequenceMode=function(){};uz.prototype.setManifestType=function(){};
1164
+ uz.prototype.parseMedia=function(a){var b="",c="";a=Af(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=vz.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=wz.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(xz);else if("Style"==e){e=f.split(xz);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
1165
+ [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={Td:e.Td},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=wz.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(xz);else if("Dialogue"==f){g=g.split(xz);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=yz(f.Start);var k=yz(f.End);g=new Bb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Td=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Td}}(e)))&&zz(g,f);d.push(g)}return d};
1166
+ function zz(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Az(c))a.color=c;if(c=b.BackColour)if(c=Az(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=Jb;a.textAlign="start";break;case 2:a.displayAlign=Jb;a.textAlign=Eb;break;case 3:a.displayAlign=Jb;a.textAlign="end";
1167
1167
  break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Eb;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=Eb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
1168
- function zz(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function xz(a){a=Az.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}N("shaka.text.SsaTextParser",tz);tz.prototype.parseMedia=tz.prototype.parseMedia;tz.prototype.setManifestType=tz.prototype.setManifestType;tz.prototype.setSequenceMode=tz.prototype.setSequenceMode;tz.prototype.parseInit=tz.prototype.parseInit;
1169
- var uz=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,vz=/^\s*([^:]+):\s*(.*)/,wz=/\s*,\s*/,Az=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Oc["text/x-ssa"]=function(){return new tz};function Bz(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0<a)?{yd:c,R:a}:null}function Cz(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,ea:"mp4a.40."+e}}
1170
- function Dz(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&255===a[b]&&240===(a[b+1]&246)}return!1}
1171
- function Ez(a,b){switch(a){case "mp4a.40.2":if(1===b)return new Uint8Array([0,200,0,128,35,128]);if(2===b)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,
1172
- 2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function Fz(a){this.i=a;this.h=0;this.g=new Map}q=Fz.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?bb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(Lc(b)||"mp4a.40.2")+'"':b};q.getOriginalMimeType=function(){return this.i};
1173
- q.transmux=function(a,b,c,d){for(var e=mb(a),f=Jh(e),g=f.length;g<e.length&&!Dz(e,g);g++);a=1E3*c.endTime;f=Ih(f);f.length&&c&&(c=f.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(a=c.data);c=Cz(e,g);if(!c)return Promise.reject(new O(2,3,3018));b.audioSamplingRate=c.sampleRate;b.channelsCount=c.channelCount;for(f=[];g<e.length;){var h=Bz(e,g);if(!h)return Promise.reject(new O(2,3,3018));var k=h.yd+h.R;g+k<=e.length&&f.push({data:e.subarray(g+h.yd,g+k),size:h.R,
1174
- duration:1024,Na:0,flags:{Oa:0,Ga:0,Ea:0,Ca:0,Da:2,Pa:0}});g+=k}e=c.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:c.ea,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,La:[],ba:new Uint8Array([]),ja:new Uint8Array([]),data:{Za:this.h,baseMediaDecodeTime:a,Ia:f},stream:b};a=new Xt([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=cu(a),this.g.set(b.id,d));b=su(a);this.h++;b=$f(d,b);return Promise.resolve(b)};N("shaka.transmuxer.AacTransmuxer",Fz);
1175
- Fz.prototype.transmux=Fz.prototype.transmux;Fz.prototype.getOriginalMimeType=Fz.prototype.getOriginalMimeType;Fz.prototype.convertCodecs=Fz.prototype.convertCodecs;Fz.prototype.isSupported=Fz.prototype.isSupported;Fz.prototype.destroy=Fz.prototype.destroy;Yb("audio/aac",function(){return new Fz("audio/aac")},dc);function Gz(a,b){if(b+8>a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
1168
+ function Az(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function yz(a){a=Bz.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}N("shaka.text.SsaTextParser",uz);uz.prototype.parseMedia=uz.prototype.parseMedia;uz.prototype.setManifestType=uz.prototype.setManifestType;uz.prototype.setSequenceMode=uz.prototype.setSequenceMode;uz.prototype.parseInit=uz.prototype.parseInit;
1169
+ var vz=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,wz=/^\s*([^:]+):\s*(.*)/,xz=/\s*,\s*/,Bz=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Oc["text/x-ssa"]=function(){return new uz};function Cz(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0<a)?{yd:c,R:a}:null}function Dz(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,fa:"mp4a.40."+e}}
1170
+ function Ez(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&255===a[b]&&240===(a[b+1]&246)}return!1}
1171
+ function Fz(a,b){switch(a){case "mp4a.40.2":if(1===b)return new Uint8Array([0,200,0,128,35,128]);if(2===b)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,
1172
+ 2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function Gz(a){this.i=a;this.h=0;this.g=new Map}q=Gz.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?bb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(Lc(b)||"mp4a.40.2")+'"':b};q.getOriginalMimeType=function(){return this.i};
1173
+ q.transmux=function(a,b,c,d){for(var e=mb(a),f=Jh(e),g=f.length;g<e.length&&!Ez(e,g);g++);a=1E3*c.endTime;f=Ih(f);f.length&&c&&(c=f.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(a=c.data);c=Dz(e,g);if(!c)return Promise.reject(new O(2,3,3018));b.audioSamplingRate=c.sampleRate;b.channelsCount=c.channelCount;for(f=[];g<e.length;){var h=Cz(e,g);if(!h)return Promise.reject(new O(2,3,3018));var k=h.yd+h.R;g+k<=e.length&&f.push({data:e.subarray(g+h.yd,g+k),size:h.R,
1174
+ duration:1024,Na:0,flags:{Oa:0,Ga:0,Ea:0,Ca:0,Da:2,Pa:0}});g+=k}e=c.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:c.fa,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,La:[],ba:new Uint8Array([]),ja:new Uint8Array([]),data:{$a:this.h,baseMediaDecodeTime:a,Ia:f},stream:b};a=new Xt([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=cu(a),this.g.set(b.id,d));b=su(a);this.h++;b=$f(d,b);return Promise.resolve(b)};N("shaka.transmuxer.AacTransmuxer",Gz);
1175
+ Gz.prototype.transmux=Gz.prototype.transmux;Gz.prototype.getOriginalMimeType=Gz.prototype.getOriginalMimeType;Gz.prototype.convertCodecs=Gz.prototype.convertCodecs;Gz.prototype.isSupported=Gz.prototype.isSupported;Gz.prototype.destroy=Gz.prototype.destroy;Yb("audio/aac",function(){return new Gz("audio/aac")},dc);function Hz(a,b){if(b+8>a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
1176
1176
  1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*d+c];if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;2===f?g+=2:(f&1&&1!==f&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,ba:a,R:e}}
1177
- function Hz(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0<d;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(16>c)return!0}return!1};function Iz(a){this.i=a;this.h=0;this.g=new Map}q=Iz.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?bb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};q.getOriginalMimeType=function(){return this.i};
1178
- q.transmux=function(a,b,c,d){a=mb(a);for(var e=Jh(a),f=e.length;f<a.length&&!Hz(a,f);f++);var g=1E3*c.endTime;e=Ih(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=Gz(a,f);if(!k)return Promise.reject(new O(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ba;h.push({data:a.subarray(f,f+k.R),size:k.R,duration:1536,Na:0,flags:{Oa:0,
1179
- Ga:0,Ea:0,Ca:0,Da:2,Pa:0}});f+=k.R}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,La:[],ba:e,ja:new Uint8Array([]),data:{Za:this.h,baseMediaDecodeTime:a,Ia:h},stream:b};a=new Xt([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=cu(a),this.g.set(b.id,d));b=su(a);this.h++;b=$f(d,b);return Promise.resolve(b)};N("shaka.transmuxer.Ac3Transmuxer",Iz);Iz.prototype.transmux=Iz.prototype.transmux;Iz.prototype.getOriginalMimeType=Iz.prototype.getOriginalMimeType;
1180
- Iz.prototype.convertCodecs=Iz.prototype.convertCodecs;Iz.prototype.isSupported=Iz.prototype.isSupported;Iz.prototype.destroy=Iz.prototype.destroy;Yb("audio/ac3",function(){return new Iz("audio/ac3")},dc);function Jz(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new Th(a.subarray(b+2));Vh(c,2);Vh(c,3);var d=Wh(c,11)+1<<1,e=Wh(c,2);if(3==e){e=Wh(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=Wh(c,2);var g=Wh(c,3),h=Wh(c,1);c=Wh(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,ba:a,R:d}};function Kz(a){this.i=a;this.h=0;this.g=new Map}q=Kz.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?bb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};q.getOriginalMimeType=function(){return this.i};
1181
- q.transmux=function(a,b,c,d){a=mb(a);for(var e=Jh(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Ih(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=Jz(a,f);if(!k)return Promise.reject(new O(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ba;h.push({data:a.subarray(f,f+k.R),size:k.R,duration:1536,
1182
- Na:0,flags:{Oa:0,Ga:0,Ea:0,Ca:0,Da:2,Pa:0}});f+=k.R}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,La:[],ba:e,ja:new Uint8Array([]),data:{Za:this.h,baseMediaDecodeTime:a,Ia:h},stream:b};a=new Xt([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=cu(a),this.g.set(b.id,d));b=su(a);this.h++;b=$f(d,b);return Promise.resolve(b)};N("shaka.transmuxer.Ec3Transmuxer",Kz);Kz.prototype.transmux=Kz.prototype.transmux;
1183
- Kz.prototype.getOriginalMimeType=Kz.prototype.getOriginalMimeType;Kz.prototype.convertCodecs=Kz.prototype.convertCodecs;Kz.prototype.isSupported=Kz.prototype.isSupported;Kz.prototype.destroy=Kz.prototype.destroy;Yb("audio/ec3",function(){return new Kz("audio/ec3")},dc);function Lz(a){if(!a.length)return null;var b=a.find(function(m){return 7==m.type});a=a.find(function(m){return 8==m.type});if(!b||!a)return null;var c=new Th(b.data),d=$h(c);$h(c);$h(c);Yh(c);if(Mz.includes(d)&&(d=T(c),3===d&&Vh(c,1),Yh(c),Yh(c),Vh(c,1),U(c))){d=3!==d?8:12;for(var e=0;e<d;e++)U(c)&&(6>e?ai(c,16):ai(c,64))}Yh(c);d=T(c);if(0===d)T(c);else if(1===d)for(Vh(c,1),Yh(c),Yh(c),d=T(c),e=0;e<d;e++)Yh(c);Yh(c);Vh(c,1);d=T(c);var f=T(c),g=Wh(c,1);0===g&&Vh(c,1);Vh(c,1);var h=e=0,k=0,l=0;U(c)&&
1177
+ function Iz(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0<d;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(16>c)return!0}return!1};function Jz(a){this.i=a;this.h=0;this.g=new Map}q=Jz.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?bb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};q.getOriginalMimeType=function(){return this.i};
1178
+ q.transmux=function(a,b,c,d){a=mb(a);for(var e=Jh(a),f=e.length;f<a.length&&!Iz(a,f);f++);var g=1E3*c.endTime;e=Ih(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=Hz(a,f);if(!k)return Promise.reject(new O(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ba;h.push({data:a.subarray(f,f+k.R),size:k.R,duration:1536,Na:0,flags:{Oa:0,
1179
+ Ga:0,Ea:0,Ca:0,Da:2,Pa:0}});f+=k.R}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,La:[],ba:e,ja:new Uint8Array([]),data:{$a:this.h,baseMediaDecodeTime:a,Ia:h},stream:b};a=new Xt([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=cu(a),this.g.set(b.id,d));b=su(a);this.h++;b=$f(d,b);return Promise.resolve(b)};N("shaka.transmuxer.Ac3Transmuxer",Jz);Jz.prototype.transmux=Jz.prototype.transmux;Jz.prototype.getOriginalMimeType=Jz.prototype.getOriginalMimeType;
1180
+ Jz.prototype.convertCodecs=Jz.prototype.convertCodecs;Jz.prototype.isSupported=Jz.prototype.isSupported;Jz.prototype.destroy=Jz.prototype.destroy;Yb("audio/ac3",function(){return new Jz("audio/ac3")},dc);function Kz(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new Sh(a.subarray(b+2));Vh(c,2);Vh(c,3);var d=Wh(c,11)+1<<1,e=Wh(c,2);if(3==e){e=Wh(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=Wh(c,2);var g=Wh(c,3),h=Wh(c,1);c=Wh(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,ba:a,R:d}};function Lz(a){this.i=a;this.h=0;this.g=new Map}q=Lz.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?bb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};q.getOriginalMimeType=function(){return this.i};
1181
+ q.transmux=function(a,b,c,d){a=mb(a);for(var e=Jh(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Ih(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=Kz(a,f);if(!k)return Promise.reject(new O(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ba;h.push({data:a.subarray(f,f+k.R),size:k.R,duration:1536,
1182
+ Na:0,flags:{Oa:0,Ga:0,Ea:0,Ca:0,Da:2,Pa:0}});f+=k.R}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,La:[],ba:e,ja:new Uint8Array([]),data:{$a:this.h,baseMediaDecodeTime:a,Ia:h},stream:b};a=new Xt([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=cu(a),this.g.set(b.id,d));b=su(a);this.h++;b=$f(d,b);return Promise.resolve(b)};N("shaka.transmuxer.Ec3Transmuxer",Lz);Lz.prototype.transmux=Lz.prototype.transmux;
1183
+ Lz.prototype.getOriginalMimeType=Lz.prototype.getOriginalMimeType;Lz.prototype.convertCodecs=Lz.prototype.convertCodecs;Lz.prototype.isSupported=Lz.prototype.isSupported;Lz.prototype.destroy=Lz.prototype.destroy;Yb("audio/ec3",function(){return new Lz("audio/ec3")},dc);function Mz(a){if(!a.length)return null;var b=a.find(function(m){return 7==m.type});a=a.find(function(m){return 8==m.type});if(!b||!a)return null;var c=new Sh(b.data),d=$h(c);$h(c);$h(c);Yh(c);if(Nz.includes(d)&&(d=T(c),3===d&&Vh(c,1),Yh(c),Yh(c),Vh(c,1),U(c))){d=3!==d?8:12;for(var e=0;e<d;e++)U(c)&&(6>e?ai(c,16):ai(c,64))}Yh(c);d=T(c);if(0===d)T(c);else if(1===d)for(Vh(c,1),Yh(c),Yh(c),d=T(c),e=0;e<d;e++)Yh(c);Yh(c);Vh(c,1);d=T(c);var f=T(c),g=Wh(c,1);0===g&&Vh(c,1);Vh(c,1);var h=e=0,k=0,l=0;U(c)&&
1184
1184
  (e=T(c),h=T(c),k=T(c),l=T(c));c=(2-g)*(f+1)*16-2*k-2*l;d=16*(d+1)-2*e-2*h;e=[];b=b.fullData;e.push(b.byteLength>>>8&255);e.push(b.byteLength&255);e=e.concat.apply(e,w(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,w(a));a=new Uint8Array([1,e[3],e[4],e[5],255,225].concat(e,[1],b));return{height:c,width:d,ja:a}}
1185
- function Nz(a){var b=!1,c=[],d=a.find(function(k){return 7==k.type}),e=!1;a=t(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4<h.length&&(h=bi(new Th(h)),2===h||4===h||7===h||9===h)&&(b=!0);break;case 5:b=g=e=!0;break;case 6:g=!0;break;case 7:g=!0;break;case 8:g=!0;break;case 9:e=g=!0;break;case 12:g=!0;break;default:g=!1}e&&g&&(g=f.fullData.byteLength,h=new Uint8Array(4),h[0]=g>>24&255,h[1]=g>>16&255,h[2]=g>>8&255,h[3]=g&255,c.push($f(h,
1186
- f.fullData)))}return c.length?{data:$f.apply(Uf,w(c)),Oc:b}:null}var Mz=[100,110,122,244,44,83,86,118,128,138,139,134];function Oz(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=Pz(b.fullData);a=Qz(c.fullData);var f=Rz(d.fullData);b=Sz(b.fullData,c.fullData,d.fullData,{Oe:e.Oe,ef:e.ef,re:a.re,se:a.se,le:a.le,qe:a.qe,me:a.me,ne:a.ne,oe:a.oe,pe:a.pe,fe:a.fe,ge:a.ge,he:a.he,ie:a.ie,je:a.je,ke:a.ke,be:a.be,Fd:a.Fd,ae:a.ae,$d:a.$d,Zd:a.Zd,Re:f.Re});return{height:a.height,width:a.width,
1187
- ja:b}}function Pz(a){var b=new Th(a,!0);$h(b);$h(b);Wh(b,4);Wh(b,2);Wh(b,6);a=Wh(b,3);b=U(b);return{Oe:a+1,ef:b}}
1188
- function Qz(a){a=new Th(a,!0);$h(a);$h(a);var b=0,c=0,d=0,e=0;Wh(a,4);var f=Wh(a,3);U(a);for(var g=Wh(a,2),h=Wh(a,1),k=Wh(a,5),l=$h(a),m=$h(a),n=$h(a),r=$h(a),p=$h(a),u=$h(a),v=$h(a),y=$h(a),z=$h(a),x=$h(a),A=$h(a),B=[],D=[],F=0;F<f;F++)B.push(U(a)),D.push(U(a));if(0<f)for(F=f;8>F;F++)Wh(a,2);for(F=0;F<f;F++)B[F]&&Wh(a,88),D[F]&&$h(a);T(a);B=T(a);3==B&&Wh(a,1);D=T(a);F=T(a);U(a)&&(b+=T(a),c+=T(a),d+=T(a),e+=T(a));var J=T(a),G=T(a),H=T(a);if(U(a))for(var I=0;I<=f;I++)T(a),T(a),T(a);else T(a),T(a),
1185
+ function Oz(a){var b=!1,c=[],d=a.find(function(k){return 7==k.type}),e=!1;a=t(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4<h.length&&(h=bi(new Sh(h)),2===h||4===h||7===h||9===h)&&(b=!0);break;case 5:b=g=e=!0;break;case 6:g=!0;break;case 7:g=!0;break;case 8:g=!0;break;case 9:e=g=!0;break;case 12:g=!0;break;default:g=!1}e&&g&&(g=f.fullData.byteLength,h=new Uint8Array(4),h[0]=g>>24&255,h[1]=g>>16&255,h[2]=g>>8&255,h[3]=g&255,c.push($f(h,
1186
+ f.fullData)))}return c.length?{data:$f.apply(Uf,w(c)),Oc:b}:null}var Nz=[100,110,122,244,44,83,86,118,128,138,139,134];function Pz(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=Qz(b.fullData);a=Rz(c.fullData);var f=Sz(d.fullData);b=Tz(b.fullData,c.fullData,d.fullData,{Oe:e.Oe,ef:e.ef,re:a.re,se:a.se,le:a.le,qe:a.qe,me:a.me,ne:a.ne,oe:a.oe,pe:a.pe,fe:a.fe,ge:a.ge,he:a.he,ie:a.ie,je:a.je,ke:a.ke,be:a.be,Fd:a.Fd,ae:a.ae,$d:a.$d,Zd:a.Zd,Re:f.Re});return{height:a.height,width:a.width,
1187
+ ja:b}}function Qz(a){var b=new Sh(a,!0);$h(b);$h(b);Wh(b,4);Wh(b,2);Wh(b,6);a=Wh(b,3);b=U(b);return{Oe:a+1,ef:b}}
1188
+ function Rz(a){a=new Sh(a,!0);$h(a);$h(a);var b=0,c=0,d=0,e=0;Wh(a,4);var f=Wh(a,3);U(a);for(var g=Wh(a,2),h=Wh(a,1),k=Wh(a,5),l=$h(a),m=$h(a),n=$h(a),r=$h(a),p=$h(a),u=$h(a),v=$h(a),y=$h(a),z=$h(a),x=$h(a),A=$h(a),B=[],D=[],F=0;F<f;F++)B.push(U(a)),D.push(U(a));if(0<f)for(F=f;8>F;F++)Wh(a,2);for(F=0;F<f;F++)B[F]&&Wh(a,88),D[F]&&$h(a);T(a);B=T(a);3==B&&Wh(a,1);D=T(a);F=T(a);U(a)&&(b+=T(a),c+=T(a),d+=T(a),e+=T(a));var J=T(a),G=T(a),H=T(a);if(U(a))for(var I=0;I<=f;I++)T(a),T(a),T(a);else T(a),T(a),
1189
1189
  T(a);T(a);T(a);T(a);T(a);T(a);T(a);if(U(a)&&U(a))for(I=0;4>I;I++)for(var L=0;L<(3===I?2:6);L++)if(U(a)){var M=Math.min(64,1<<4+(I<<1));1<I&&Zh(a);for(var P=0;P<M;P++)Zh(a)}else T(a);U(a);U(a);U(a)&&($h(a),T(a),T(a),U(a));I=T(a);for(M=L=0;M<I;M++)if(P=!1,0!==M&&(P=U(a)),P){M===I&&T(a);U(a);T(a);for(var S=P=0;S<=L;S++){var W=U(a),X=!1;W||(X=U(a));(W||X)&&P++}L=P}else{S=T(a);P=T(a);L=S+P;for(W=0;W<S;W++)T(a),U(a);for(S=0;S<P;S++)T(a),U(a)}if(U(a))for(I=T(a),L=0;L<I;L++){for(M=0;M<H+4;M++)Wh(a,1);Wh(a,
1190
1190
  1)}H=0;U(a);U(a);if(U(a)){U(a)&&255===$h(a)&&(Wh(a,16),Wh(a,16));U(a)&&U(a);U(a)&&(Wh(a,3),U(a),U(a)&&($h(a),$h(a),$h(a)));U(a)&&(T(a),T(a));U(a);U(a);U(a);if(I=U(a))T(a),T(a),T(a),T(a);if(U(a)&&(Wh(a,32),Wh(a,32),U(a)&&T(a),U(a))){M=!1;I=U(a);L=U(a);if(I||L){if(M=U(a))$h(a),Wh(a,5),U(a),Wh(a,5);Wh(a,4);Wh(a,4);M&&Wh(a,4);Wh(a,5);Wh(a,5);Wh(a,5)}for(P=0;P<=f;P++){W=!0;S=1;U(a)||(W=U(a));X=!1;W?T(a):X=U(a);X||(S=T(a)+1);if(I){for(W=0;W<S;W++)T(a),T(a),M&&(T(a),T(a));U(a)}if(L){for(W=0;W<S;W++)T(a),
1191
- T(a),M&&(T(a),T(a));U(a)}}}U(a)&&(U(a),U(a),U(a),H=T(a),T(a),T(a),T(a),T(a))}return{le:A,re:g,se:h,qe:k,me:l,ne:m,oe:n,pe:r,fe:p,ge:u,he:v,ie:y,je:z,ke:x,Fd:H,be:0,ae:B,$d:J,Zd:G,width:D-(b+c)*(1===B||2===B?2:1),height:F-(d+e)*(1===B?2:1)}}function Rz(a){var b=new Th(a,!0);$h(b);$h(b);T(b);T(b);U(b);U(b);Wh(b,3);U(b);U(b);T(b);T(b);Zh(b);U(b);U(b);U(b)&&T(b);Zh(b);Zh(b);U(b);U(b);U(b);U(b);a=U(b);b=U(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Re:c}}
1192
- function Sz(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.re&3)<<6|(d.se?1:0)<<5|d.qe&31;e[2]=d.me;e[3]=d.ne;e[4]=d.oe;e[5]=d.pe;e[6]=d.fe;e[7]=d.ge;e[8]=d.he;e[9]=d.ie;e[10]=d.je;e[11]=d.ke;e[12]=d.le;e[13]=240|(d.Fd&3840)>>8;e[14]=d.Fd&255;e[15]=252|d.Re&3;e[16]=252|d.ae&3;e[17]=248|d.$d&7;e[18]=248|d.Zd&7;e[19]=0;e[20]=0;e[21]=(d.be&3)<<6|(d.Oe&7)<<3|(d.ef?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
1193
- 255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function Tz(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*Uz[14*(3===c?3-d:3===d?3:4)+e-1];f=Vz[3*(3===c?0:2===c?1:2)+f];c=Wz[c][d];var h=Xz[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,R:k,zh:8*c*h}}return null}
1194
- function Yz(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}var Uz=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],Vz=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],Wz=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Xz=[0,1,1,4];function Zz(a){this.i=a;this.h=0;this.g=new Map}q=Zz.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?bb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};q.getOriginalMimeType=function(){return this.i};
1195
- q.transmux=function(a,b,c,d){a=mb(a);for(c=Jh(a).length;c<a.length;c++){var e=c;if(e+1<a.length&&Yz(a,e)){var f=Tz(a,e),g=4;f&&f.R&&(g=f.R);e+=g;e=e===a.length||e+1<a.length&&Yz(a,e)}else e=!1;if(e)break}var h;for(e=[];c<a.length;){f=Tz(a,c);if(!f)return Promise.reject(new O(2,3,3018));h||(h=f);c+f.R<=a.length&&e.push({data:a.subarray(c,c+f.R),size:f.R,duration:1152,Na:0,flags:{Oa:0,Ga:0,Ea:0,Ca:0,Da:2,Pa:0}});c+=f.R}if(!h)return Promise.reject(new O(2,3,3018));a=9E4*h.zh/h.sampleRate*this.h;d={id:b.id,
1196
- type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:h.sampleRate,duration:d,La:[],ba:new Uint8Array([]),ja:new Uint8Array([]),data:{Za:this.h,baseMediaDecodeTime:a,Ia:e},stream:b};h=new Xt([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=cu(h),this.g.set(b.id,d));b=su(h);this.h++;b=$f(d,b);return Promise.resolve(b)};N("shaka.transmuxer.Mp3Transmuxer",Zz);Zz.prototype.transmux=Zz.prototype.transmux;Zz.prototype.getOriginalMimeType=Zz.prototype.getOriginalMimeType;
1197
- Zz.prototype.convertCodecs=Zz.prototype.convertCodecs;Zz.prototype.isSupported=Zz.prototype.isSupported;Zz.prototype.destroy=Zz.prototype.destroy;Yb("audio/mpeg",function(){return new Zz("audio/mpeg")},dc);function $z(a){this.h=a;this.g=null}q=$z.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=Lc(a).split(","),c=zc("audio",b);b=zc("video",b);return!c||b||"mp3"!=Ic(c)?!1:bb(this.convertCodecs("audio",a))};q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};q.getOriginalMimeType=function(){return this.h};
1198
- q.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new ci;a=mb(a);a=this.g.parse(a);if("mp3"!=a.Fc().audio||"audio"!=e)return Promise.reject(new O(2,3,3018));e=new Uint8Array([]);a=t(a.Db());for(b=a.next();!b.done;b=a.next())if(b=b.value.data)for(c=0;c<b.length;)(d=Tz(b,c))?(c+d.R<=b.length&&(e=$f(e,b.subarray(c,c+d.R))),c+=d.R):c++;return Promise.resolve(e)};N("shaka.transmuxer.MpegTsTransmuxer",$z);$z.prototype.transmux=$z.prototype.transmux;$z.prototype.getOriginalMimeType=$z.prototype.getOriginalMimeType;
1199
- $z.prototype.convertCodecs=$z.prototype.convertCodecs;$z.prototype.isSupported=$z.prototype.isSupported;$z.prototype.destroy=$z.prototype.destroy;Yb("video/mp2t",function(){return new $z("video/mp2t")},cc);/*
1191
+ T(a),M&&(T(a),T(a));U(a)}}}U(a)&&(U(a),U(a),U(a),H=T(a),T(a),T(a),T(a),T(a))}return{le:A,re:g,se:h,qe:k,me:l,ne:m,oe:n,pe:r,fe:p,ge:u,he:v,ie:y,je:z,ke:x,Fd:H,be:0,ae:B,$d:J,Zd:G,width:D-(b+c)*(1===B||2===B?2:1),height:F-(d+e)*(1===B?2:1)}}function Sz(a){var b=new Sh(a,!0);$h(b);$h(b);T(b);T(b);U(b);U(b);Wh(b,3);U(b);U(b);T(b);T(b);Zh(b);U(b);U(b);U(b)&&T(b);Zh(b);Zh(b);U(b);U(b);U(b);U(b);a=U(b);b=U(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Re:c}}
1192
+ function Tz(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.re&3)<<6|(d.se?1:0)<<5|d.qe&31;e[2]=d.me;e[3]=d.ne;e[4]=d.oe;e[5]=d.pe;e[6]=d.fe;e[7]=d.ge;e[8]=d.he;e[9]=d.ie;e[10]=d.je;e[11]=d.ke;e[12]=d.le;e[13]=240|(d.Fd&3840)>>8;e[14]=d.Fd&255;e[15]=252|d.Re&3;e[16]=252|d.ae&3;e[17]=248|d.$d&7;e[18]=248|d.Zd&7;e[19]=0;e[20]=0;e[21]=(d.be&3)<<6|(d.Oe&7)<<3|(d.ef?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
1193
+ 255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function Uz(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*Vz[14*(3===c?3-d:3===d?3:4)+e-1];f=Wz[3*(3===c?0:2===c?1:2)+f];c=Xz[c][d];var h=Yz[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,R:k,zh:8*c*h}}return null}
1194
+ function Zz(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}var Vz=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],Wz=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],Xz=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Yz=[0,1,1,4];function $z(a){this.i=a;this.h=0;this.g=new Map}q=$z.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?bb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};q.getOriginalMimeType=function(){return this.i};
1195
+ q.transmux=function(a,b,c,d){a=mb(a);for(c=Jh(a).length;c<a.length;c++){var e=c;if(e+1<a.length&&Zz(a,e)){var f=Uz(a,e),g=4;f&&f.R&&(g=f.R);e+=g;e=e===a.length||e+1<a.length&&Zz(a,e)}else e=!1;if(e)break}var h;for(e=[];c<a.length;){f=Uz(a,c);if(!f)return Promise.reject(new O(2,3,3018));h||(h=f);c+f.R<=a.length&&e.push({data:a.subarray(c,c+f.R),size:f.R,duration:1152,Na:0,flags:{Oa:0,Ga:0,Ea:0,Ca:0,Da:2,Pa:0}});c+=f.R}if(!h)return Promise.reject(new O(2,3,3018));a=9E4*h.zh/h.sampleRate*this.h;d={id:b.id,
1196
+ type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:h.sampleRate,duration:d,La:[],ba:new Uint8Array([]),ja:new Uint8Array([]),data:{$a:this.h,baseMediaDecodeTime:a,Ia:e},stream:b};h=new Xt([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=cu(h),this.g.set(b.id,d));b=su(h);this.h++;b=$f(d,b);return Promise.resolve(b)};N("shaka.transmuxer.Mp3Transmuxer",$z);$z.prototype.transmux=$z.prototype.transmux;$z.prototype.getOriginalMimeType=$z.prototype.getOriginalMimeType;
1197
+ $z.prototype.convertCodecs=$z.prototype.convertCodecs;$z.prototype.isSupported=$z.prototype.isSupported;$z.prototype.destroy=$z.prototype.destroy;Yb("audio/mpeg",function(){return new $z("audio/mpeg")},dc);function aA(a){this.h=a;this.g=null}q=aA.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=Lc(a).split(","),c=zc("audio",b);b=zc("video",b);return!c||b||"mp3"!=Ic(c)?!1:bb(this.convertCodecs("audio",a))};q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};q.getOriginalMimeType=function(){return this.h};
1198
+ q.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new ci;a=mb(a);a=this.g.parse(a);if("mp3"!=a.Fc().audio||"audio"!=e)return Promise.reject(new O(2,3,3018));e=new Uint8Array([]);a=t(a.Db());for(b=a.next();!b.done;b=a.next())if(b=b.value.data)for(c=0;c<b.length;)(d=Uz(b,c))?(c+d.R<=b.length&&(e=$f(e,b.subarray(c,c+d.R))),c+=d.R):c++;return Promise.resolve(e)};N("shaka.transmuxer.MpegTsTransmuxer",aA);aA.prototype.transmux=aA.prototype.transmux;aA.prototype.getOriginalMimeType=aA.prototype.getOriginalMimeType;
1199
+ aA.prototype.convertCodecs=aA.prototype.convertCodecs;aA.prototype.isSupported=aA.prototype.isSupported;aA.prototype.destroy=aA.prototype.destroy;Yb("video/mp2t",function(){return new aA("video/mp2t")},cc);/*
1200
1200
  @license
1201
1201
  MSS Transmuxer
1202
1202
  Copyright 2015 Dash Industry Forum
1203
1203
  SPDX-License-Identifier: BSD-3-Clause
1204
1204
  */
1205
- function aA(a){this.h=a;(this.g=es.get("ISOBoxer")())&&bA(this)}
1206
- function bA(a){function b(){this._procFullBox();this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8));this._procField("sample_count","uint",32);this._procEntries("entry",this.sample_count,function(c){this._procEntryField(c,"InitializationVector","data",8);this.flags&2&&(this._procEntryField(c,"NumberOfEntries","uint",16),this._procSubEntries(c,"clearAndCryptedData",c.NumberOfEntries,function(d){this._procEntryField(d,"BytesOfClearData",
1205
+ function bA(a){this.h=a;(this.g=es.get("ISOBoxer")())&&cA(this)}
1206
+ function cA(a){function b(){this._procFullBox();this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8));this._procField("sample_count","uint",32);this._procEntries("entry",this.sample_count,function(c){this._procEntryField(c,"InitializationVector","data",8);this.flags&2&&(this._procEntryField(c,"NumberOfEntries","uint",16),this._procSubEntries(c,"clearAndCryptedData",c.NumberOfEntries,function(d){this._procEntryField(d,"BytesOfClearData",
1207
1207
  "uint",16);this._procEntryField(d,"BytesOfEncryptedData","uint",32)}))})}a.g.addBoxProcessor("saio",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32));this._procField("entry_count","uint",32);this._procFieldArray("offset",this.entry_count,"uint",1===this.version?64:32)});a.g.addBoxProcessor("saiz",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter",
1208
- "uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==cA[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}q=aA.prototype;q.destroy=function(){};
1208
+ "uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==dA[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}q=bA.prototype;q.destroy=function(){};
1209
1209
  q.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return bb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return bb(b)||bb(a)};q.convertCodecs=function(a,b){return b.replace("mss/","")};q.getOriginalMimeType=function(){return this.h};
1210
1210
  q.transmux=function(a,b,c){if(!c)return Promise.resolve(mb(a));if(!b.mssPrivateData)return Promise.reject(new O(2,3,3020));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),
1211
1211
  1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var r=e.fetch("saio");if(null===r){r=this.g.createFullBox("saio",h);r.version=0;r.flags=0;r.entry_count=1;r.offset=[0];var p=this.g.createFullBox("saiz",h);p.version=0;p.flags=0;p.sample_count=n.sample_count;p.default_sample_info_size=0;p.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)p.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else p.default_sample_info_size=8}}f.flags&=16777214;f.flags|=131072;k.flags|=
1212
- 1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=dA(u,"traf")+dA(h,"senc")+16);var y=mb(e.write());return Promise.resolve(y)}catch(z){return z instanceof O?Promise.reject(z):Promise.reject(new O(2,3,3022))}};function dA(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}N("shaka.transmuxer.MssTransmuxer",aA);aA.prototype.transmux=aA.prototype.transmux;aA.prototype.getOriginalMimeType=aA.prototype.getOriginalMimeType;
1213
- aA.prototype.convertCodecs=aA.prototype.convertCodecs;aA.prototype.isSupported=aA.prototype.isSupported;aA.prototype.destroy=aA.prototype.destroy;var cA=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);Yb("mss/audio/mp4",function(){return new aA("mss/audio/mp4")},dc);Yb("mss/video/mp4",function(){return new aA("mss/video/mp4")},dc);function eA(a){this.j=a;this.g=0;this.h=new Map;this.i=null}q=eA.prototype;q.destroy=function(){this.h.clear()};q.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=Lc(c).split(",");c=zc("audio",d);d=zc("video",d);if(c&&(c=Ic(c),!fA.includes(c))||d&&(c=Ic(d),!gA.includes(c)))return!1;if(b)return bb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return bb(b)||bb(a)};
1212
+ 1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=eA(u,"traf")+eA(h,"senc")+16);var y=mb(e.write());return Promise.resolve(y)}catch(z){return z instanceof O?Promise.reject(z):Promise.reject(new O(2,3,3022))}};function eA(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}N("shaka.transmuxer.MssTransmuxer",bA);bA.prototype.transmux=bA.prototype.transmux;bA.prototype.getOriginalMimeType=bA.prototype.getOriginalMimeType;
1213
+ bA.prototype.convertCodecs=bA.prototype.convertCodecs;bA.prototype.isSupported=bA.prototype.isSupported;bA.prototype.destroy=bA.prototype.destroy;var dA=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);Yb("mss/audio/mp4",function(){return new bA("mss/audio/mp4")},dc);Yb("mss/video/mp4",function(){return new bA("mss/video/mp4")},dc);function fA(a){this.j=a;this.g=0;this.h=new Map;this.i=null}q=fA.prototype;q.destroy=function(){this.h.clear()};q.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=Lc(c).split(",");c=zc("audio",d);d=zc("video",d);if(c&&(c=Ic(c),!gA.includes(c))||d&&(c=Ic(d),!hA.includes(c)))return!1;if(b)return bb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return bb(b)||bb(a)};
1214
1214
  q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=Lc(b).replace("mp4a.40.34","mp3").split(",").map(this.Cg).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};q.Cg=function(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}return a};q.getOriginalMimeType=function(){return this.j};
1215
- q.transmux=function(a,b,c,d,e){this.i?this.i.clearData():this.i=new ci;a=mb(a);var f=this.i.parse(a);a=[];var g=f.Fc();try{var h=null;if("video"==e){switch(g.video){case "avc":var k=[],l=null,m=[],n=f.Zb();if(!n.length)throw new O(2,3,3023);for(var r=0;r<n.length;r++){var p=n[r],u=p.nalus;m.push.apply(m,w(u));var v=Nz(u);if(v){null==l&&(l=p.dts);var y=void 0;y=r+1<n.length?(n[r+1].dts||0)-(p.dts||0):1<n.length?(p.dts||0)-(n[r-1].dts||0):9E4*(c.endTime-c.startTime);k.push({data:v.data,size:v.data.byteLength,
1216
- duration:y,Na:Math.round((p.pts||0)-(p.dts||0)),flags:{Oa:0,Ga:0,Ea:0,Ca:0,Da:v.Oc?2:1,Pa:v.Oc?0:1}})}}var z=Lz(m);if(!z||null==l)throw new O(2,3,3018);b.height=z.height;b.width=z.width;h={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,La:[],ba:new Uint8Array([]),ja:z.ja,data:{Za:this.g,baseMediaDecodeTime:l,Ia:k},stream:b};break;case "hvc":n=[];p=null;u=[];k=f.Zb();if(!k.length)throw new O(2,3,3023);for(v=0;v<k.length;v++){l=k[v];m=l.nalus;
1215
+ q.transmux=function(a,b,c,d,e){this.i?this.i.clearData():this.i=new ci;a=mb(a);var f=this.i.parse(a);a=[];var g=f.Fc();try{var h=null;if("video"==e){switch(g.video){case "avc":var k=[],l=null,m=[],n=f.Zb();if(!n.length)throw new O(2,3,3023);for(var r=0;r<n.length;r++){var p=n[r],u=p.nalus;m.push.apply(m,w(u));var v=Oz(u);if(v){null==l&&(l=p.dts);var y=void 0;y=r+1<n.length?(n[r+1].dts||0)-(p.dts||0):1<n.length?(p.dts||0)-(n[r-1].dts||0):9E4*(c.endTime-c.startTime);k.push({data:v.data,size:v.data.byteLength,
1216
+ duration:y,Na:Math.round((p.pts||0)-(p.dts||0)),flags:{Oa:0,Ga:0,Ea:0,Ca:0,Da:v.Oc?2:1,Pa:v.Oc?0:1}})}}var z=Mz(m);if(!z||null==l)throw new O(2,3,3018);b.height=z.height;b.width=z.width;h={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,La:[],ba:new Uint8Array([]),ja:z.ja,data:{$a:this.g,baseMediaDecodeTime:l,Ia:k},stream:b};break;case "hvc":n=[];p=null;u=[];k=f.Zb();if(!k.length)throw new O(2,3,3023);for(v=0;v<k.length;v++){l=k[v];m=l.nalus;
1217
1217
  u.push.apply(u,w(m));z=!1;var x=[],A=!1;r=t(m);for(y=r.next();!y.done;y=r.next()){var B=y.value;switch(B.type){case 1:case 0:var D=A=!0;break;case 19:case 20:case 21:z=D=A=!0;break;case 32:D=!0;break;case 33:D=!0;break;case 34:D=!0;break;case 35:A=D=!0;break;case 39:case 40:D=!0;break;default:D=!1}if(A&&D){var F=B.fullData.byteLength,J=new Uint8Array(4);J[0]=F>>24&255;J[1]=F>>16&255;J[2]=F>>8&255;J[3]=F&255;x.push($f(J,B.fullData))}}var G=x.length?{data:$f.apply(Uf,w(x)),Oc:z}:null;G&&(null==p&&null!=
1218
- l.dts&&(p=l.dts),z=void 0,z=v+1<k.length?(k[v+1].dts||0)-(l.dts||0):1<k.length?(l.dts||0)-(k[v-1].dts||0):9E4*(c.endTime-c.startTime),n.push({data:G.data,size:G.data.byteLength,duration:z,Na:Math.round((l.pts||0)-(l.dts||0)),flags:{Oa:0,Ga:0,Ea:0,Ca:0,Da:G.Oc?2:1,Pa:G.Oc?0:1}}))}var H=Oz(u);if(!H||null==p)throw new O(2,3,3018);b.height=H.height;b.width=H.width;h={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,La:[],ba:new Uint8Array([]),ja:H.ja,
1219
- data:{Za:this.g,baseMediaDecodeTime:p,Ia:n},stream:b}}h&&(a.push(h),h=null)}if("audio"==e){switch(g.audio){case "aac":for(var I=[],L,M=null,P=t(f.Db()),S=P.next();!S.done;S=P.next()){var W=S.value,X=W.data;if(X){var ia=0;L=Cz(X,ia);if(!L)throw new O(2,3,3018);b.audioSamplingRate=L.sampleRate;b.channelsCount=L.channelCount;null==M&&null!==W.pts&&(M=W.pts);for(;ia<X.length;){var Ia=Bz(X,ia);if(Ia){var Sa=Ia.yd+Ia.R;ia+Sa<=X.length&&I.push({data:X.subarray(ia+Ia.yd,ia+Sa),size:Ia.R,duration:1024,Na:0,
1220
- flags:{Oa:0,Ga:0,Ea:0,Ca:0,Da:2,Pa:0}});ia+=Sa}else ia++}}}if(!L||null==M){if(!f.Zb().length)throw new O(2,3,3018);M=9E4*c.startTime;var xb=zc("audio",b.codecs.split(","));if(!xb||!b.channelsCount||!b.audioSamplingRate)throw new O(2,3,3018);L={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,ea:xb};var db=Ez(xb,b.channelsCount);if(!db)throw new O(2,3,3018);var Tb=M+9E4*(c.endTime-c.startTime);for(f=M;f<Tb;)I.push({data:db,size:db.byteLength,duration:1024,Na:0,flags:{Oa:0,Ga:0,Ea:0,Ca:0,
1221
- Da:2,Pa:0}}),f+=1024/L.sampleRate*9E4}var ua=L.sampleRate;f=M/9E4*ua;h={id:b.id,type:"audio",codecs:L.ea,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ua,duration:d,La:[],ba:new Uint8Array([]),ja:new Uint8Array([]),data:{Za:this.g,baseMediaDecodeTime:f,Ia:I},stream:b};break;case "ac3":L=[];ua=0;I=new Uint8Array([]);M=null;ia=t(f.Db());for(var eb=ia.next();!eb.done;eb=ia.next()){var $a=eb.value,yb=$a.data;null==M&&null!==$a.pts&&(M=$a.pts);for(f=0;f<yb.length;){var ab=Gz(yb,f);ab?(b.audioSamplingRate=
1222
- ab.sampleRate,b.channelsCount=ab.channelCount,ua=ab.sampleRate,I=ab.ba,L.push({data:yb.subarray(f,f+ab.R),size:ab.R,duration:1536,Na:0,flags:{Oa:0,Ga:0,Ea:0,Ca:0,Da:2,Pa:0}}),f+=ab.R):f++}}if(0==ua||0==I.byteLength||null==M)throw new O(2,3,3018);f=M/9E4*ua;h={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ua,duration:d,La:[],ba:I,ja:new Uint8Array([]),data:{Za:this.g,baseMediaDecodeTime:f,Ia:L},stream:b};break;case "ec3":L=[];ua=0;M=new Uint8Array([]);I=null;
1223
- for(var kh=t(f.Db()),xd=kh.next();!xd.done;xd=kh.next()){var te=xd.value,ue=te.data;null==I&&null!==te.pts&&(I=te.pts);for(f=0;f<ue.length;){var ib=Jz(ue,f);ib?(b.audioSamplingRate=ib.sampleRate,b.channelsCount=ib.channelCount,ua=ib.sampleRate,M=ib.ba,L.push({data:ue.subarray(f,f+ib.R),size:ib.R,duration:1536,Na:0,flags:{Oa:0,Ga:0,Ea:0,Ca:0,Da:2,Pa:0}}),f+=ib.R):f++}}if(0==ua||0==M.byteLength||null==I)throw new O(2,3,3018);f=I/9E4*ua;h={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<
1224
- b.drmInfos.length,timescale:ua,duration:d,La:[],ba:M,ja:new Uint8Array([]),data:{Za:this.g,baseMediaDecodeTime:f,Ia:L},stream:b};break;case "mp3":L=[];var Sh;ua=null;for(var js=t(f.Db()),hl=js.next();!hl.done;hl=js.next()){var il=hl.value,Hf=il.data;if(Hf)for(null==ua&&null!==il.pts&&(ua=il.pts),f=0;f<Hf.length;){var Ce=Tz(Hf,f);Ce?(Sh||(Sh=Ce),f+Ce.R<=Hf.length&&L.push({data:Hf.subarray(f,f+Ce.R),size:Ce.R,duration:1152,Na:0,flags:{Oa:0,Ga:0,Ea:0,Ca:0,Da:2,Pa:0}}),f+=Ce.R):f++}}if(!Sh||null==ua)throw new O(2,
1225
- 3,3018);var ks=Sh.sampleRate;f=ua/9E4*ks;h={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ks,duration:d,La:[],ba:new Uint8Array([]),ja:new Uint8Array([]),data:{Za:this.g,baseMediaDecodeTime:f,Ia:L},stream:b}}h&&a.push(h)}}catch(jl){return jl&&3023==jl.code?Promise.resolve(new Uint8Array([])):Promise.reject(jl)}if(!a.length)return Promise.reject(new O(2,3,3018));a=new Xt(a);this.h.has(b.id)?d=this.h.get(b.id):(d=cu(a),this.h.set(b.id,d));b=su(a);this.g++;b=
1226
- $f(d,b);return Promise.resolve(b)};N("shaka.transmuxer.TsTransmuxer",eA);eA.prototype.transmux=eA.prototype.transmux;eA.prototype.getOriginalMimeType=eA.prototype.getOriginalMimeType;eA.prototype.convertCodecs=eA.prototype.convertCodecs;eA.prototype.isSupported=eA.prototype.isSupported;eA.prototype.destroy=eA.prototype.destroy;var fA=["aac","ac-3","ec-3","mp3"],gA=["avc","hevc"];Yb("video/mp2t",function(){return new eA("video/mp2t")},bc);/*
1218
+ l.dts&&(p=l.dts),z=void 0,z=v+1<k.length?(k[v+1].dts||0)-(l.dts||0):1<k.length?(l.dts||0)-(k[v-1].dts||0):9E4*(c.endTime-c.startTime),n.push({data:G.data,size:G.data.byteLength,duration:z,Na:Math.round((l.pts||0)-(l.dts||0)),flags:{Oa:0,Ga:0,Ea:0,Ca:0,Da:G.Oc?2:1,Pa:G.Oc?0:1}}))}var H=Pz(u);if(!H||null==p)throw new O(2,3,3018);b.height=H.height;b.width=H.width;h={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,La:[],ba:new Uint8Array([]),ja:H.ja,
1219
+ data:{$a:this.g,baseMediaDecodeTime:p,Ia:n},stream:b}}h&&(a.push(h),h=null)}if("audio"==e){switch(g.audio){case "aac":for(var I=[],L,M=null,P=t(f.Db()),S=P.next();!S.done;S=P.next()){var W=S.value,X=W.data;if(X){var ia=0;L=Dz(X,ia);if(!L)throw new O(2,3,3018);b.audioSamplingRate=L.sampleRate;b.channelsCount=L.channelCount;null==M&&null!==W.pts&&(M=W.pts);for(;ia<X.length;){var Ia=Cz(X,ia);if(Ia){var Sa=Ia.yd+Ia.R;ia+Sa<=X.length&&I.push({data:X.subarray(ia+Ia.yd,ia+Sa),size:Ia.R,duration:1024,Na:0,
1220
+ flags:{Oa:0,Ga:0,Ea:0,Ca:0,Da:2,Pa:0}});ia+=Sa}else ia++}}}if(!L||null==M){if(!f.Zb().length)throw new O(2,3,3018);M=9E4*c.startTime;var xb=zc("audio",b.codecs.split(","));if(!xb||!b.channelsCount||!b.audioSamplingRate)throw new O(2,3,3018);L={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,fa:xb};var db=Fz(xb,b.channelsCount);if(!db)throw new O(2,3,3018);var Tb=M+9E4*(c.endTime-c.startTime);for(f=M;f<Tb;)I.push({data:db,size:db.byteLength,duration:1024,Na:0,flags:{Oa:0,Ga:0,Ea:0,Ca:0,
1221
+ Da:2,Pa:0}}),f+=1024/L.sampleRate*9E4}var ua=L.sampleRate;f=M/9E4*ua;h={id:b.id,type:"audio",codecs:L.fa,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ua,duration:d,La:[],ba:new Uint8Array([]),ja:new Uint8Array([]),data:{$a:this.g,baseMediaDecodeTime:f,Ia:I},stream:b};break;case "ac3":L=[];ua=0;I=new Uint8Array([]);M=null;ia=t(f.Db());for(var eb=ia.next();!eb.done;eb=ia.next()){var $a=eb.value,yb=$a.data;null==M&&null!==$a.pts&&(M=$a.pts);for(f=0;f<yb.length;){var ab=Hz(yb,f);ab?(b.audioSamplingRate=
1222
+ ab.sampleRate,b.channelsCount=ab.channelCount,ua=ab.sampleRate,I=ab.ba,L.push({data:yb.subarray(f,f+ab.R),size:ab.R,duration:1536,Na:0,flags:{Oa:0,Ga:0,Ea:0,Ca:0,Da:2,Pa:0}}),f+=ab.R):f++}}if(0==ua||0==I.byteLength||null==M)throw new O(2,3,3018);f=M/9E4*ua;h={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ua,duration:d,La:[],ba:I,ja:new Uint8Array([]),data:{$a:this.g,baseMediaDecodeTime:f,Ia:L},stream:b};break;case "ec3":L=[];ua=0;M=new Uint8Array([]);I=null;
1223
+ for(var kh=t(f.Db()),xd=kh.next();!xd.done;xd=kh.next()){var te=xd.value,ue=te.data;null==I&&null!==te.pts&&(I=te.pts);for(f=0;f<ue.length;){var ib=Kz(ue,f);ib?(b.audioSamplingRate=ib.sampleRate,b.channelsCount=ib.channelCount,ua=ib.sampleRate,M=ib.ba,L.push({data:ue.subarray(f,f+ib.R),size:ib.R,duration:1536,Na:0,flags:{Oa:0,Ga:0,Ea:0,Ca:0,Da:2,Pa:0}}),f+=ib.R):f++}}if(0==ua||0==M.byteLength||null==I)throw new O(2,3,3018);f=I/9E4*ua;h={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<
1224
+ b.drmInfos.length,timescale:ua,duration:d,La:[],ba:M,ja:new Uint8Array([]),data:{$a:this.g,baseMediaDecodeTime:f,Ia:L},stream:b};break;case "mp3":L=[];var Th;ua=null;for(var ks=t(f.Db()),hl=ks.next();!hl.done;hl=ks.next()){var il=hl.value,Hf=il.data;if(Hf)for(null==ua&&null!==il.pts&&(ua=il.pts),f=0;f<Hf.length;){var Ce=Uz(Hf,f);Ce?(Th||(Th=Ce),f+Ce.R<=Hf.length&&L.push({data:Hf.subarray(f,f+Ce.R),size:Ce.R,duration:1152,Na:0,flags:{Oa:0,Ga:0,Ea:0,Ca:0,Da:2,Pa:0}}),f+=Ce.R):f++}}if(!Th||null==ua)throw new O(2,
1225
+ 3,3018);var ls=Th.sampleRate;f=ua/9E4*ls;h={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ls,duration:d,La:[],ba:new Uint8Array([]),ja:new Uint8Array([]),data:{$a:this.g,baseMediaDecodeTime:f,Ia:L},stream:b}}h&&a.push(h)}}catch(jl){return jl&&3023==jl.code?Promise.resolve(new Uint8Array([])):Promise.reject(jl)}if(!a.length)return Promise.reject(new O(2,3,3018));a=new Xt(a);this.h.has(b.id)?d=this.h.get(b.id):(d=cu(a),this.h.set(b.id,d));b=su(a);this.g++;b=
1226
+ $f(d,b);return Promise.resolve(b)};N("shaka.transmuxer.TsTransmuxer",fA);fA.prototype.transmux=fA.prototype.transmux;fA.prototype.getOriginalMimeType=fA.prototype.getOriginalMimeType;fA.prototype.convertCodecs=fA.prototype.convertCodecs;fA.prototype.isSupported=fA.prototype.isSupported;fA.prototype.destroy=fA.prototype.destroy;var gA=["aac","ac-3","ec-3","mp3"],hA=["avc","hevc"];Yb("video/mp2t",function(){return new fA("video/mp2t")},bc);/*
1227
1227
  @license
1228
1228
  EME Encryption Scheme Polyfill
1229
1229
  Copyright 2019 Google LLC
1230
1230
  SPDX-License-Identifier: Apache-2.0
1231
1231
  */
1232
- function hA(){}var iA;function jA(){iA?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(iA=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=kA):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
1233
- function kA(a,b){var c=this,d;return K(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),C(e,iA.call(c,a,b),2);d=e.h;if(lA(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=iA,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=mA;return e.return(mA.call(c,
1232
+ function iA(){}var jA;function kA(){jA?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(jA=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=lA):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
1233
+ function lA(a,b){var c=this,d;return K(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),C(e,jA.call(c,a,b),2);d=e.h;if(mA(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=jA,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=nA;return e.return(nA.call(c,
1234
1234
  a,b))})}
1235
- function mA(a,b){var c=this,d,e,f,g,h,k,l,m,n,r;return K(function(p){if(1==p.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=nA(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=oA(h.videoCapabilities,d),l=oA(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),
1236
- n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return C(p,iA.call(c,a,e),2)}r=p.h;return p.return(new pA(r,d))})}function oA(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}N("EmeEncryptionSchemePolyfill",hA);hA.install=jA;function qA(){}var rA;
1237
- function sA(){rA?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(rA=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=tA):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
1238
- function tA(a){var b=this,c,d,e;return K(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),C(f,rA.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&lA(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=rA,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
1239
- navigator.mediaCapabilities.decodingInfo=uA;if(d){f.B(3);break}e=c;return C(f,vA(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(uA.call(b,a))}})}
1240
- function uA(a){var b=this,c,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=nA(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):C(m,rA.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
1241
- new pA(k.keySystemAccess,c);m.B(3);break}if(!a.keySystemConfiguration){m.B(3);break}l=k;return C(m,vA(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
1242
- function vA(a){var b,c;return K(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return C(d,
1243
- navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}N("McEncryptionSchemePolyfill",qA);qA.install=sA;function pA(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
1244
- pA.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};pA.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
1245
- function nA(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function lA(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}
1246
- function wA(){}function Sw(){jA();sA()}N("EncryptionSchemePolyfills",wA);wA.install=Sw;"undefined"!==typeof module&&module.exports&&(module.exports=wA);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
1235
+ function nA(a,b){var c=this,d,e,f,g,h,k,l,m,n,r;return K(function(p){if(1==p.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=oA(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=pA(h.videoCapabilities,d),l=pA(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),
1236
+ n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return C(p,jA.call(c,a,e),2)}r=p.h;return p.return(new qA(r,d))})}function pA(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}N("EmeEncryptionSchemePolyfill",iA);iA.install=kA;function rA(){}var sA;
1237
+ function tA(){sA?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(sA=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=uA):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
1238
+ function uA(a){var b=this,c,d,e;return K(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),C(f,sA.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&mA(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=sA,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
1239
+ navigator.mediaCapabilities.decodingInfo=vA;if(d){f.B(3);break}e=c;return C(f,wA(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(vA.call(b,a))}})}
1240
+ function vA(a){var b=this,c,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=oA(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):C(m,sA.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
1241
+ new qA(k.keySystemAccess,c);m.B(3);break}if(!a.keySystemConfiguration){m.B(3);break}l=k;return C(m,wA(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
1242
+ function wA(a){var b,c;return K(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return C(d,
1243
+ navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}N("McEncryptionSchemePolyfill",rA);rA.install=tA;function qA(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
1244
+ qA.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};qA.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
1245
+ function oA(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function mA(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}
1246
+ function xA(){}function Sw(){kA();tA()}N("EncryptionSchemePolyfills",xA);xA.install=Sw;"undefined"!==typeof module&&module.exports&&(module.exports=xA);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
1247
1247
 
1248
1248
  //# sourceMappingURL=shaka-player.compiled.map