shaka-player 4.11.12 → 4.11.13

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.
@@ -72,7 +72,7 @@ DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,CONTENT_UNSUPPOR
72
72
  AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,DASH_INVALID_PATCH:4052,HLS_EMPTY_MEDIA_PLAYLIST:4053,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,
73
73
  NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,
74
74
  CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,
75
- CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005,INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED:10006,VAST_INVALID_XML:4001};function Sb(a){this.h=a;this.g=void 0}Sb.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Tb(a,b){return a.length&&b.length&&a!==b?0<Ub(a,b).length:!0}
75
+ CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005,INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED:10006,VAST_INVALID_XML:10007};function Sb(a){this.h=a;this.g=void 0}Sb.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Tb(a,b){return a.length&&b.length&&a!==b?0<Ub(a,b).length:!0}
76
76
  function Ub(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=t((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(x(d.keyIds),x(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
77
77
  f.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||f.persistentStateRequired,videoRobustness:d.videoRobustness||f.videoRobustness,audioRobustness:d.audioRobustness||f.audioRobustness,serverCertificate:d.serverCertificate||f.serverCertificate,serverCertificateUri:d.serverCertificateUri||f.serverCertificateUri,initData:e,keyIds:g});break}}return c}
78
78
  function Vb(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}var Wb=new Sb(function(){return Bb(new Uint8Array([0]))}),Xb=new Map;function Yb(a){this.h=a;this.g=null}Yb.prototype.Z=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};Yb.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Zb(a){this.h=a;this.g=null}Zb.prototype.yc=function(){this.stop();this.h();return this};Zb.prototype.Z=function(a){var b=this;this.stop();this.g=(new Yb(function(){b.h()})).Z(a);return this};Zb.prototype.Oa=function(a){var b=this;this.stop();this.g=(new Yb(function(){b.g.Z(a);b.h()})).Z(a);return this};Zb.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};S("shaka.util.Timer",Zb);Zb.prototype.stop=Zb.prototype.stop;Zb.prototype.tickEvery=Zb.prototype.Oa;
@@ -128,26 +128,26 @@ h.fontSize=$d(g.fontSize,h.fontSize),h.textShadow=$d(g.textShadow,h.textShadow),
128
128
  if(f=Tc(f))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(cd(a)||1==e.length&&cd(e[0]))for(c=fd(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=Pd(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=Lc(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())Xd(a.value,d,c)}function $d(a,b){return a&&0<a.length?a:b}S("shaka.text.Cue",Ed);Ed.parseCuePayload=Td;Ed.equal=Sd;
129
129
  Ed.prototype.clone=Ed.prototype.clone;var Fd="auto";Ed.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Fd};var Gd="center",de={LEFT:"left",RIGHT:"right",CENTER:Gd,START:"start",END:"end"};Ed.textAlign=de;var Ld="after",ee={BEFORE:"before",CENTER:"center",AFTER:Ld};Ed.displayAlign=ee;var Hd="ltr";Ed.direction={HORIZONTAL_LEFT_TO_RIGHT:Hd,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Id="horizontal-tb";Ed.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Id,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};
130
130
  var Jd=0;Ed.lineInterpretation={LINE_NUMBER:Jd,PERCENTAGE:1};var Kd="start",fe={CENTER:"center",START:Kd,END:"end"};Ed.lineAlign=fe;var Yd={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Ed.defaultTextColor=Yd;var Zd={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Ed.defaultTextBackgroundColor=Zd;var Md=400,ae=700;Ed.fontWeight={NORMAL:Md,BOLD:ae};
131
- var Od="normal",be="italic",ge={NORMAL:Od,ITALIC:be,OBLIQUE:"oblique"};Ed.fontStyle=ge;var ce="underline";Ed.textDecoration={UNDERLINE:ce,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var Vd=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function he(){}he.prototype.destroy=function(){};function ie(a,b,c){je[a.toLowerCase().split(";")[0]+"-"+c]={priority:c,ge:b}}function ke(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([le,me,ne,qe]),e=d.next();!e.done;e=d.next())if(e=je[c+"-"+e.value]){var f=e.ge(),g=f.isSupported(a,b);f.destroy();if(g)return e.ge}return null}S("shaka.transmuxer.TransmuxerEngine",he);he.findTransmuxer=ke;he.unregisterTransmuxer=function(a,b){delete je[a.toLowerCase().split(";")[0]+"-"+b]};
132
- he.registerTransmuxer=ie;he.prototype.destroy=he.prototype.destroy;var je={},qe=1,ne=2,me=3,le=4;he.PluginPriority={FALLBACK:qe,PREFERRED_SECONDARY:ne,PREFERRED:me,APPLICATION:le};/*
131
+ var Od="normal",be="italic",ge={NORMAL:Od,ITALIC:be,OBLIQUE:"oblique"};Ed.fontStyle=ge;var ce="underline";Ed.textDecoration={UNDERLINE:ce,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var Vd=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function he(){}he.prototype.destroy=function(){};function ie(a,b,c){je[a.toLowerCase().split(";")[0]+"-"+c]={priority:c,ge:b}}function ke(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([le,me,ne,oe]),e=d.next();!e.done;e=d.next())if(e=je[c+"-"+e.value]){var f=e.ge(),g=f.isSupported(a,b);f.destroy();if(g)return e.ge}return null}S("shaka.transmuxer.TransmuxerEngine",he);he.findTransmuxer=ke;he.unregisterTransmuxer=function(a,b){delete je[a.toLowerCase().split(";")[0]+"-"+b]};
132
+ he.registerTransmuxer=ie;he.prototype.destroy=he.prototype.destroy;var je={},oe=1,ne=2,me=3,le=4;he.PluginPriority={FALLBACK:oe,PREFERRED_SECONDARY:ne,PREFERRED:me,APPLICATION:le};/*
133
133
  @license
134
134
  Copyright 2008 The Closure Library Authors
135
135
  SPDX-License-Identifier: Apache-2.0
136
136
  */
137
- var re=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
137
+ var pe=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
138
138
  @license
139
139
  Copyright 2006 The Closure Library Authors
140
140
  SPDX-License-Identifier: Apache-2.0
141
141
  */
142
- function te(a){var b;a instanceof te?(ue(this,a.Db),this.zc=a.zc,ve(this,a.Fb),we(this,a.Rc),this.Ra=a.Ra,xe(this,a.g.clone()),this.lc=a.lc):a&&(b=String(a).match(re))?(ue(this,b[1]||"",!0),this.zc=ye(b[2]||""),ve(this,b[3]||"",!0),we(this,b[4]),this.Ra=ye(b[5]||"",!0),xe(this,b[6]||"",!0),this.lc=ye(b[7]||"")):this.g=new ze(null)}q=te.prototype;q.Db="";q.zc="";q.Fb="";q.Rc=null;q.Ra="";q.lc="";
142
+ function se(a){var b;a instanceof se?(te(this,a.Db),this.zc=a.zc,ve(this,a.Fb),we(this,a.Rc),this.Ra=a.Ra,xe(this,a.g.clone()),this.lc=a.lc):a&&(b=String(a).match(pe))?(te(this,b[1]||"",!0),this.zc=ye(b[2]||""),ve(this,b[3]||"",!0),we(this,b[4]),this.Ra=ye(b[5]||"",!0),xe(this,b[6]||"",!0),this.lc=ye(b[7]||"")):this.g=new ze(null)}q=se.prototype;q.Db="";q.zc="";q.Fb="";q.Rc=null;q.Ra="";q.lc="";
143
143
  q.toString=function(){var a=[],b=this.Db;b&&a.push(Ae(b,Be,!0),":");if(b=this.Fb){a.push("//");var c=this.zc;c&&a.push(Ae(c,Be,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Rc;null!=b&&a.push(":",String(b))}if(b=this.Ra)this.Fb&&"/"!=b.charAt(0)&&a.push("/"),a.push(Ae(b,"/"==b.charAt(0)?Ce:De,!0));(b=this.g.toString())&&a.push("?",b);(b=this.lc)&&a.push("#",Ae(b,Ee));return a.join("")};
144
- q.resolve=function(a){var b=this.clone();"data"===b.Db&&(b=new te);var c=!!a.Db;c?ue(b,a.Db):c=!!a.zc;c?b.zc=a.zc:c=!!a.Fb;c?ve(b,a.Fb):c=null!=a.Rc;var d=a.Ra;if(c)we(b,a.Rc);else if(c=!!a.Ra){if("/"!=d.charAt(0))if(this.Fb&&!this.Ra)d="/"+d;else{var e=b.Ra.lastIndexOf("/");-1!=e&&(d=b.Ra.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(""):".."==
145
- 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.Ra=d:c=""!==a.g.toString();c?xe(b,a.g.clone()):c=!!a.lc;c&&(b.lc=a.lc);return b};q.clone=function(){return new te(this)};function ue(a,b,c){a.Db=c?ye(b,!0):b;a.Db&&(a.Db=a.Db.replace(/:$/,""))}function ve(a,b,c){a.Fb=c?ye(b,!0):b}function we(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Rc=b}else a.Rc=null}
144
+ q.resolve=function(a){var b=this.clone();"data"===b.Db&&(b=new se);var c=!!a.Db;c?te(b,a.Db):c=!!a.zc;c?b.zc=a.zc:c=!!a.Fb;c?ve(b,a.Fb):c=null!=a.Rc;var d=a.Ra;if(c)we(b,a.Rc);else if(c=!!a.Ra){if("/"!=d.charAt(0))if(this.Fb&&!this.Ra)d="/"+d;else{var e=b.Ra.lastIndexOf("/");-1!=e&&(d=b.Ra.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(""):".."==
145
+ 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.Ra=d:c=""!==a.g.toString();c?xe(b,a.g.clone()):c=!!a.lc;c&&(b.lc=a.lc);return b};q.clone=function(){return new se(this)};function te(a,b,c){a.Db=c?ye(b,!0):b;a.Db&&(a.Db=a.Db.replace(/:$/,""))}function ve(a,b,c){a.Fb=c?ye(b,!0):b}function we(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Rc=b}else a.Rc=null}
146
146
  function xe(a,b,c){b instanceof ze?a.g=b:(c||(b=Ae(b,Fe)),a.g=new ze(b))}function ye(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Ae(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Ge),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Ge(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Be=/[#\/\?@]/g,De=/[#\?:]/g,Ce=/[#\?]/g,Fe=/[#\?@]/g,Ee=/#/g;function ze(a){this.g=a||null}
147
147
  function He(a){if(!a.La&&(a.La={},a.ad=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=ze.prototype;q.La=null;q.ad=null;function Ie(a){He(a);return a.ad}q.add=function(a,b){He(this);this.g=null;var c=this.La.hasOwnProperty(a)?this.La[a]:null;c||(this.La[a]=c=[]);c.push(b);this.ad++;return this};
148
148
  q.set=function(a,b){He(this);this.g=null;this.La.hasOwnProperty(a)?this.La[a]=[b]:this.add(a,b);return this};q.get=function(a){He(this);return this.La[a]||[]};q.toString=function(){if(this.g)return this.g;if(!this.La)return"";var a=[],b;for(b in this.La)for(var c=encodeURIComponent(b),d=this.La[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};
149
149
  q.clone=function(){var a=new ze;a.g=this.g;if(this.La){var b={},c;for(c in this.La)b[c]=this.La[c].concat();a.La=b;a.ad=this.ad}return a};function Je(){}function Ke(a){a=Fc(Ab(a));return btoa(a)}function Le(a,b){b=void 0==b?!0:b;a=Ke(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Me(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 Ne(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}
150
- function Oe(a){var b=Ab(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 Pe(){for(var a=Ja.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(Ab(e),c);c+=e.byteLength}return b}S("shaka.util.Uint8ArrayUtils",Je);Je.concat=Pe;Je.toHex=Oe;Je.fromHex=Ne;Je.fromBase64=Me;Je.toBase64=Le;Je.toStandardBase64=Ke;function Qe(a,b,c){c=void 0===c?"":c;if(0==b.length)return a;if(1==a.length&&1==b.length){var d=new te(a[0]);b=new te(b[0]);b=d.resolve(b);c&&xe(b,c);return[b.toString()]}b=b.map(function(h){return new te(h)});d=[];a=t(a);for(var e=a.next();!e.done;e=a.next()){e=new te(e.value);for(var f=t(b),g=f.next();!g.done;g=f.next())g=e.resolve(g.value),c&&xe(g,c),d.push(g.toString())}return d}
150
+ function Oe(a){var b=Ab(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 Pe(){for(var a=Ja.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(Ab(e),c);c+=e.byteLength}return b}S("shaka.util.Uint8ArrayUtils",Je);Je.concat=Pe;Je.toHex=Oe;Je.fromHex=Ne;Je.fromBase64=Me;Je.toBase64=Le;Je.toStandardBase64=Ke;function Qe(a,b,c){c=void 0===c?"":c;if(0==b.length)return a;if(1==a.length&&1==b.length){var d=new se(a[0]);b=new se(b[0]);b=d.resolve(b);c&&xe(b,c);return[b.toString()]}b=b.map(function(h){return new se(h)});d=[];a=t(a);for(var e=a.next();!e.done;e=a.next()){e=new se(e.value);for(var f=t(b),g=f.next();!g.done;g=f.next())g=e.resolve(g.value),c&&xe(g,c),d.push(g.toString())}return d}
151
151
  function Re(a,b,c,d){a={keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set};d&&(a.keySystemUris=new Set([d]));return a}
152
152
  function Se(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=Le(Ne(h),!1));var l=g;22!=l.length&&(l=Le(Ne(g),!1));g={kty:"oct",kid:k,k:l};c.push(g);d.push(g.kid);e.push(h)});a=JSON.stringify({keys:c});var f=JSON.stringify({kids:d});f=[{initData:Ab(Ic(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
153
153
  audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:f,keyIds:new Set(e)}}function Te(a,b){if(1==b.length)return b[0];a=Ue(a,b);if(null!=a)return a;throw new T(2,4,4025,b);}function Ue(a,b){for(var c=t(Ve[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==We?"":null}
@@ -243,8 +243,8 @@ function th(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSit
243
243
  q.request=function(a,b,c){var d=this,e=new uh;if(this.i){var f=Promise.reject(new T(2,7,7001));f.catch(function(){});return new vh(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Uc(b.retryParameters):Yg();b.uris=Uc(b.uris);f=wh(this,a,b,c);var g=f.Aa(function(){return xh(d,a,b,c,new Xg(b.retryParameters,!1),0,null,e)}),h=g.Aa(function(p){return yh(d,a,p,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
244
244
  var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.Aa(function(p){var r=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=r;p.ji||!d.l||u.fromCache||"HEAD"==b.method||a!=zh||d.l(u.timeMs,u.data.byteLength,Ah(c));d.F&&d.F(a,u,c);return u},function(p){p&&(p.severity=2);throw p;});f=new vh(n.promise,function(){return n.abort()},e);nh(this.o,f);return f};
245
245
  function wh(a,b,c,d){function e(h){f=f.Aa(function(){c.body&&(c.body=Bb(c.body));return h(b,c,d)})}var f=dh(void 0);a.C&&e(a.C);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.Aa(void 0,function(h){if(h instanceof T&&7001==h.code)throw h;throw new T(2,1,1006,h);})}
246
- function xh(a,b,c,d,e,f,g,h){a.A&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.s&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.G&&a.G(b,d,c.uris[f],c.uris[f-1]);var k=new te(c.uris[f]),l=k.Db,m=!1;l||(l=location.protocol,l=l.slice(0,-1),ue(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=rh[l])?l.ge:null;if(!n)return bh(new T(2,1,1E3,k));var p=l.Ei,r=null,u=null,v=!1,w=!1,y;return gh(Zg(e)).Aa(function(){if(a.i)return ch();y=Date.now();var z=0;c.requestStartTime=Date.now();
247
- var B=n(c.uris[f],c,b,function(E,C,G){r&&r.stop();u&&u.Z(D/1E3);a.l&&b==zh&&(z++,c.packetNumber=z,a.l(E,C,Ah(d),c),m=!0,h.g=G)},function(E){a.j&&a.j(E,c,b);w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime},{minBytesForProgressEvents:a.m});if(!p)return B;var A=c.retryParameters.connectionTimeout;A&&(r=new Zb(function(){v=!0;B.abort()}),r.Z(A/1E3));var D=c.retryParameters.stallTimeout;D&&(u=new Zb(function(){v=!0;B.abort()}));return B}).Aa(function(z){r&&r.stop();u&&u.stop();void 0==z.timeMs&&(z.timeMs=
246
+ function xh(a,b,c,d,e,f,g,h){a.A&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.s&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.G&&a.G(b,d,c.uris[f],c.uris[f-1]);var k=new se(c.uris[f]),l=k.Db,m=!1;l||(l=location.protocol,l=l.slice(0,-1),te(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=rh[l])?l.ge:null;if(!n)return bh(new T(2,1,1E3,k));var p=l.Ei,r=null,u=null,v=!1,w=!1,y;return gh(Zg(e)).Aa(function(){if(a.i)return ch();y=Date.now();var z=0;c.requestStartTime=Date.now();
247
+ var B=n(c.uris[f],c,b,function(E,C,G){r&&r.stop();u&&u.Z(D/1E3);a.l&&b==zh&&(z++,c.packetNumber=z,a.l(E,C,Ah(d),c),m=!0,h.g=G)},function(E){w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime;a.j&&a.j(E,c,b)},{minBytesForProgressEvents:a.m});if(!p)return B;var A=c.retryParameters.connectionTimeout;A&&(r=new Zb(function(){v=!0;B.abort()}),r.Z(A/1E3));var D=c.retryParameters.stallTimeout;D&&(u=new Zb(function(){v=!0;B.abort()}));return B}).Aa(function(z){r&&r.stop();u&&u.stop();void 0==z.timeMs&&(z.timeMs=
248
248
  Date.now()-y);var B={response:z,ji:m};!w&&a.j&&a.j(z.headers,c,b);return B},function(z){r&&r.stop();u&&u.stop();if(a.B){var B=null,A=0;z instanceof T&&(B=z,1001==z.code&&(A=z.data[1]));a.B(c,B,A,v)}if(a.i)return ch();v&&(z=new T(1,1,1003,c.uris[f],b));if(z instanceof T){if(7001==z.code)throw z;if(1010==z.code)throw g;if(1==z.severity)return B=(new Map).set("error",z),B=new U("retry",B),a.dispatchEvent(B),f=(f+1)%c.uris.length,xh(a,b,c,d,e,f,z,h)}throw z;})}
249
249
  function yh(a,b,c,d){var e=dh(void 0);a=t(a.h);for(var f=a.next(),g={};!f.done;g={Ug:void 0},f=a.next())g.Ug=f.value,e=e.Aa(function(h){return function(){var k=c.response;k.data&&(k.data=Bb(k.data));return(0,h.Ug)(b,k,d)}}(g));return e.Aa(function(){return c},function(h){var k=2;if(h instanceof T){if(7001==h.code)throw h;k=h.severity}throw new T(k,1,1007,h);})}function Ah(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.o)return!1}return!0}S("shaka.net.NetworkingEngine",oh);
250
250
  oh.prototype.request=oh.prototype.request;oh.prototype.destroy=oh.prototype.destroy;oh.makeRequest=th;oh.defaultRetryParameters=function(){return Yg()};oh.prototype.clearAllResponseFilters=oh.prototype.lg;oh.prototype.unregisterResponseFilter=oh.prototype.dj;oh.prototype.registerResponseFilter=oh.prototype.Ii;oh.prototype.clearAllRequestFilters=oh.prototype.kg;oh.prototype.unregisterRequestFilter=oh.prototype.cj;oh.prototype.registerRequestFilter=oh.prototype.Hi;oh.unregisterScheme=function(a){delete rh[a]};
@@ -322,11 +322,11 @@ function Si(a,b,c,d,e){var f=Ti.value(),g=a.subarray(c.start,c.start+c.size),h=F
322
322
  a=k.getUint32(b);k.setUint32(b,a+1);return e}function Ui(a,b,c){a=Fb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var Ti=new Sb(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Vi(a,b,c,d,e,f,g){this.N=a;this.Ha=b;this.ua=c;this.Nc=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.mimeType=this.codecs=null}Vi.prototype.Zb=function(){return this.Ha};Vi.prototype.Xb=function(){return this.ua};Vi.prototype.oc=function(){return this.g};function Wi(a,b){return a===b?!0:a&&b?a.Zb()==b.Zb()&&a.Xb()==b.Xb()&&Qb(a.N().sort(),b.N().sort())&&yb(a.oc(),b.oc()):a==b}S("shaka.media.InitSegmentReference",Vi);
323
323
  Vi.prototype.getEndByte=Vi.prototype.Xb;Vi.prototype.getStartByte=Vi.prototype.Zb;
324
324
  function Xi(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v){l=void 0===l?[]:l;r=void 0===r?Yi:r;this.startTime=a;this.j=this.endTime=b;this.F=c;this.Ha=d;this.ua=e;this.$=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.B=void 0===n?null:n;this.h=void 0===p?null:p;this.status=r;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===u?null:u;this.A=null;this.i=0;this.s=void 0===v?!1:v;this.G=this.o=!1;a=t(this.g);for(b=a.next();!b.done;b=a.next())b.value.Jg();
325
- this.s&&this.g.length&&this.g[this.g.length-1].Ig();this.C=this.bandwidth=this.mimeType=this.codecs=null}q=Xi.prototype;q.N=function(){return this.F()};q.getStartTime=function(){return this.startTime};q.Mh=function(){return this.endTime};q.Zb=function(){return this.Ha};q.Xb=function(){return this.ua};q.ei=function(){return this.tilesLayout};q.di=function(){return this.B};q.$b=function(){return this.status};q.xi=function(){this.status=aj};q.xf=function(){this.preload=!0};q.isPreload=function(){return this.preload};
325
+ this.s&&this.g.length&&this.g[this.g.length-1].Ig();this.C=this.bandwidth=this.mimeType=this.codecs=null}q=Xi.prototype;q.N=function(){return this.F()};q.getStartTime=function(){return this.startTime};q.Mh=function(){return this.endTime};q.Zb=function(){return this.Ha};q.Xb=function(){return this.ua};q.ei=function(){return this.tilesLayout};q.di=function(){return this.B};q.$b=function(){return this.status};q.xi=function(){this.status=Zi};q.xf=function(){this.preload=!0};q.isPreload=function(){return this.preload};
326
326
  q.Mc=function(){this.l=!1};q.oi=function(){return this.l};q.Jg=function(){this.o=!0};q.ri=function(){return this.o};q.Ig=function(){this.G=!0};q.pi=function(){return this.G};q.Hg=function(){this.m=!0};q.ki=function(){return this.m};q.eh=function(a){this.A=a};q.ci=function(){return this.A};q.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};
327
327
  q.Vf=function(a){null==this.h?Za("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};q.$i=function(a){this.C=a};q.oc=function(){return this.C};function bj(a,b){a.$=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())bj(c.value,b)}S("shaka.media.SegmentReference",Xi);Xi.prototype.getSegmentData=Xi.prototype.oc;Xi.prototype.setSegmentData=Xi.prototype.$i;Xi.prototype.syncAgainst=Xi.prototype.Vf;Xi.prototype.offset=Xi.prototype.offset;
328
328
  Xi.prototype.getThumbnailSprite=Xi.prototype.ci;Xi.prototype.setThumbnailSprite=Xi.prototype.eh;Xi.prototype.hasByterangeOptimization=Xi.prototype.ki;Xi.prototype.markAsByterangeOptimization=Xi.prototype.Hg;Xi.prototype.isLastPartial=Xi.prototype.pi;Xi.prototype.markAsLastPartial=Xi.prototype.Ig;Xi.prototype.isPartial=Xi.prototype.ri;Xi.prototype.markAsPartial=Xi.prototype.Jg;Xi.prototype.isIndependent=Xi.prototype.oi;Xi.prototype.markAsNonIndependent=Xi.prototype.Mc;Xi.prototype.isPreload=Xi.prototype.isPreload;
329
- Xi.prototype.markAsPreload=Xi.prototype.xf;Xi.prototype.markAsUnavailable=Xi.prototype.xi;Xi.prototype.getStatus=Xi.prototype.$b;Xi.prototype.getTileDuration=Xi.prototype.di;Xi.prototype.getTilesLayout=Xi.prototype.ei;Xi.prototype.getEndByte=Xi.prototype.Xb;Xi.prototype.getStartByte=Xi.prototype.Zb;Xi.prototype.getEndTime=Xi.prototype.Mh;Xi.prototype.getStartTime=Xi.prototype.getStartTime;Xi.prototype.getUris=Xi.prototype.N;var Yi=0,aj=1;Xi.Status={ij:Yi,ck:aj,Ej:2};function cj(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function dj(a){return!a||cj(a)?null:a.length?a.end(a.length-1):null}function ej(a,b){return!a||!a.length||cj(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function fj(a,b){if(!a||!a.length||cj(a))return 0;var c=0;a=t(gj(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}
329
+ Xi.prototype.markAsPreload=Xi.prototype.xf;Xi.prototype.markAsUnavailable=Xi.prototype.xi;Xi.prototype.getStatus=Xi.prototype.$b;Xi.prototype.getTileDuration=Xi.prototype.di;Xi.prototype.getTilesLayout=Xi.prototype.ei;Xi.prototype.getEndByte=Xi.prototype.Xb;Xi.prototype.getStartByte=Xi.prototype.Zb;Xi.prototype.getEndTime=Xi.prototype.Mh;Xi.prototype.getStartTime=Xi.prototype.getStartTime;Xi.prototype.getUris=Xi.prototype.N;var Yi=0,Zi=1;Xi.Status={ij:Yi,ck:Zi,Ej:2};function cj(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function dj(a){return!a||cj(a)?null:a.length?a.end(a.length-1):null}function ej(a,b){return!a||!a.length||cj(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function fj(a,b){if(!a||!a.length||cj(a))return 0;var c=0;a=t(gj(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}
330
330
  function hj(a,b,c){if(!a||!a.length||cj(a))return null;a=gj(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function gj(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};/*
331
331
  @license
332
332
  Shaka Player
@@ -359,7 +359,7 @@ function wj(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0
359
359
  */
360
360
  function yj(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=Ab(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function zj(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 Hh(c,0)).P(),a.g=8*d,a.i-=d)}function Aj(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;zj(a)}a.h<<=b;a.g-=b}
361
361
  function Bj(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&&zj(a);c=b-c;return 0<c?d<<c|Bj(a,c):d}function Cj(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;zj(a);return b+Cj(a)}function Dj(a){Aj(a,1+Cj(a))}function V(a){var b=Cj(a);return Bj(a,b+1)-1}function Ej(a){a=V(a);return 1&a?1+a>>>1:-1*(a>>>1)}function Fj(a){return 1===Bj(a,1)}function Gj(a){return Bj(a,8)}
362
- function Oj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=Ej(a),d=(c+d+256)%256),c=0===d?c:d}function Pj(a){Gj(a);V(a);return V(a)}S("shaka.util.ExpGolomb",yj);function Qj(){this.G=null;this.H=!1;this.m=this.I=null;this.j=[];this.g=[];this.A=this.B=null;this.i=[];this.h=[];this.C=null;this.l=[];this.F=this.o=this.s=null}q=Qj.prototype;q.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
362
+ function Hj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=Ej(a),d=(c+d+256)%256),c=0===d?c:d}function Pj(a){Gj(a);V(a);return V(a)}S("shaka.util.ExpGolomb",yj);function Qj(){this.G=null;this.H=!1;this.m=this.I=null;this.j=[];this.g=[];this.A=this.B=null;this.i=[];this.h=[];this.C=null;this.l=[];this.F=this.o=this.s=null}q=Qj.prototype;q.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
363
363
  q.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,Rj(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.G=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.G:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Pd:-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<
364
364
  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(0<m)for(var n=h+5,p=m;2<p;){var r=f[n+1]+2;switch(f[n]){case 5:var u=Fc(f.subarray(n+2,n+r));-1==g.audio&&"Opus"===u?(g.audio=l,g.audioCodec="opus"):-1==g.video&&"AV01"===u&&(g.video=l,g.videoCodec="av1");break;case 106:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 122:-1==g.audio&&(g.audio=l,g.audioCodec="ec3");break;case 124:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 127:"opus"==g.audioCodec&&(u=
365
365
  null,128===f[n+2]&&(u=f[n+3]),null!=u&&(this.F={channelCount:0===(u&15)?2:u&15,Ch:u,sampleRate:48E3}))}n+=r;p-=r}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 17:-1==g.audio&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:-1==g.Pd&&(g.Pd=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="hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");
@@ -373,7 +373,7 @@ q.Wb=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.n
373
373
  q.qc=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=Pe.apply(Je,x(d.value)),f=Sj(this,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=Pe(d.data,e),this.g.push(d))}if(a){c=[];d=t(this.g);for(e=d.next();!e.done;e=d.next())if(e=e.value,e.nalus=this.Df(e,
374
374
  g,void 0),e.nalus.length){c.push(e);var g=e.nalus[e.nalus.length-1]}this.g=c}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.Wb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.qc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};q.cd=function(){return{audio:this.A,video:this.m}};
375
375
  q.Nd=function(){for(var a=[],b=t(this.qc()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};q.hi=function(){rb("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.kf();return{height:a.height,width:a.width}};q.kf=function(){return"hvc"==this.m?Uj(this):Vj(this)};function Wj(a){var b=a.qc();return 1<b.length&&(a=b[0].pts,b=b[1].pts,!isNaN(b-a))?String(1/(b-a)*9E4):null}
376
- function Vj(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.Nd();if(!c.length)return b;c=c.find(function(r){return 7==r.type});if(!c)return b;c=new yj(c.data);var d=Gj(c),e=Gj(c),f=Gj(c);Dj(c);if(Xj.includes(d)){var g=V(c);3===g&&Aj(c,1);Dj(c);Dj(c);Aj(c,1);if(Fj(c)){g=3!==g?8:12;for(var h=0;h<g;h++)Fj(c)&&(6>h?Oj(c,16):Oj(c,64))}}Dj(c);g=V(c);if(0===g)V(c);else if(1===g)for(Aj(c,1),Dj(c),Dj(c),g=V(c),h=0;h<g;h++)Dj(c);Dj(c);Aj(c,1);g=V(c);h=V(c);var k=Bj(c,1);0===k&&Aj(c,1);Aj(c,
376
+ function Vj(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.Nd();if(!c.length)return b;c=c.find(function(r){return 7==r.type});if(!c)return b;c=new yj(c.data);var d=Gj(c),e=Gj(c),f=Gj(c);Dj(c);if(Xj.includes(d)){var g=V(c);3===g&&Aj(c,1);Dj(c);Dj(c);Aj(c,1);if(Fj(c)){g=3!==g?8:12;for(var h=0;h<g;h++)Fj(c)&&(6>h?Hj(c,16):Hj(c,64))}}Dj(c);g=V(c);if(0===g)V(c);else if(1===g)for(Aj(c,1),Dj(c),Dj(c),g=V(c),h=0;h<g;h++)Dj(c);Dj(c);Aj(c,1);g=V(c);h=V(c);var k=Bj(c,1);0===k&&Aj(c,1);Aj(c,
377
377
  1);var l=0,m=0,n=0,p=0;Fj(c)&&(l=V(c),m=V(c),n=V(c),p=V(c));b.height=String((2-k)*(h+1)*16-2*n-2*p);b.width=String(16*(g+1)-2*l-2*m);b.codec="avc1."+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2)+("0"+f.toString(16).toUpperCase()).slice(-2);b.frameRate=Wj(a);return b}
378
378
  function Uj(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.Nd();if(!c.length)return b;c=c.find(function(D){return 33==D.type});if(!c)return b;var d=new yj(c.fullData,!0);Gj(d);Gj(d);Bj(d,4);var e=Bj(d,3);Fj(d);var f=Bj(d,2),g=Bj(d,1),h=Bj(d,5),k=Bj(d,32);c=Gj(d);for(var l=Gj(d),m=Gj(d),n=Gj(d),p=Gj(d),r=Gj(d),u=Gj(d),v=[],w=[],y=0;y<e;y++)v.push(Fj(d)),w.push(Fj(d));if(0<e)for(y=e;8>y;y++)Bj(d,2);for(y=0;y<e;y++)v[y]&&Bj(d,88),w[y]&&Gj(d);V(d);e=V(d);3==e&&Bj(d,1);v=V(d);w=V(d);var z=
379
379
  y=0,B=0,A=0;Fj(d)&&(y+=V(d),z+=V(d),B+=V(d),A+=V(d));b.width=String(v-(y+z)*(1===e||2===e?2:1));b.height=String(w-(B+A)*(1===e?2:1));d=function(D){for(var E=0,C=0;32>C;C++)E|=(D>>C&1)<<31-C;return E>>>0}(k);g=1==g?"H":"L";f="hvc1"+("."+["","A","B","C"][f]+h);f+="."+d.toString(16).toUpperCase();f+="."+g+u;r&&(f+="."+r.toString(16).toUpperCase());p&&(f+="."+p.toString(16).toUpperCase());n&&(f+="."+n.toString(16).toUpperCase());m&&(f+="."+m.toString(16).toUpperCase());l&&(f+="."+l.toString(16).toUpperCase());
@@ -516,7 +516,7 @@ function Am(a,b){if(a.I.projection!=b.projection||a.I.hfov!=b.hfov){if(null!=b.p
516
516
  function Dm(a,b,c,d,e){var f=e in d;var g=f?c.constructor==Object&&0==Object.keys(d).length:c.constructor==Object&&0==Object.keys(c).length;var h=f||g,k=!0,l;for(l in b){var m=e+"."+l,n=f?d[e]:c[l];h||l in c?void 0===b[l]?void 0===n||h?delete a[l]:a[l]=Uc(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=Uc(n)),m=Dm(a[l],b[l],n,d,m),k=k&&m):typeof b[l]!=typeof n||null==b[l]||"function"!=typeof b[l]&&b[l].constructor!=n.constructor?(Za("Invalid config, wrong type for "+m),
517
517
  k=!1):("function"==typeof c[l]&&c[l].length!=b[l].length&&$a("Unexpected number of arguments for "+m),a[l]=b[l]):(Za("Invalid config, unrecognized key "+m),k=!1)}return k}function Em(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 Fm(a,b){return a&&b}
518
518
  function Gm(a,b){function c(g){for(var h=t(Object.keys(g)),k=h.next();!k.done;k=h.next())k=k.value,f(g[k])&&0===Object.keys(g[k]).length?delete g[k]:e(g[k])?delete g[k]:"function"==typeof g[k]?delete g[k]:f(g[k])&&(c(g[k]),0===Object.keys(g[k]).length&&delete g[k])}function d(g,h){return Object.keys(g).reduce(function(k,l){var m=g[l];if(h.hasOwnProperty(l))if(f(m)&&f(h[l])){if(m=d(m,h[l]),0<Object.keys(m).length||!f(m))k[l]=m}else e(m)&&e(h[l])||Number.isNaN(m)&&Number.isNaN(h[l])||m!==h[l]&&(k[l]=
519
- m);else k[l]=m;return k},{})}function e(g){return Array.isArray(g)&&0===g.length}function f(g){return g&&"object"===typeof g&&!Array.isArray(g)}a=d(a,b);c(a);return a}S("shaka.util.ConfigUtils",Cm);Cm.getDifferenceFromConfigObjects=Gm;Cm.convertToConfigObject=Em;Cm.mergeConfigObjects=Dm;function Hm(){}function Im(a){a=Gc(a);return(new te(a)).Fb}function Jm(a,b,c){function d(h){Fb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ab(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new T(2,6,6015);var e;"string"==typeof b?e=Jc(b,!0):e=b;a=Gc(a);a=Jc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function Km(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Gc(a).split("skd://").pop();return Jm(a,c,b)}
519
+ m);else k[l]=m;return k},{})}function e(g){return Array.isArray(g)&&0===g.length}function f(g){return g&&"object"===typeof g&&!Array.isArray(g)}a=d(a,b);c(a);return a}S("shaka.util.ConfigUtils",Cm);Cm.getDifferenceFromConfigObjects=Gm;Cm.convertToConfigObject=Em;Cm.mergeConfigObjects=Dm;function Hm(){}function Im(a){a=Gc(a);return(new se(a)).Fb}function Jm(a,b,c){function d(h){Fb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ab(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new T(2,6,6015);var e;"string"==typeof b?e=Jc(b,!0):e=b;a=Gc(a);a=Jc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function Km(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Gc(a).split("skd://").pop();return Jm(a,c,b)}
520
520
  function Lm(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}S("shaka.util.FairPlayUtils",Hm);Hm.commonFairPlayResponse=function(a,b){if(2===a){try{var c=Dc(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=Bb(Me(c)))}};Hm.expressplayFairPlayRequest=function(a,b){Lm(a,b)};
521
521
  Hm.conaxFairPlayRequest=function(a,b){Lm(a,b)};Hm.ezdrmFairPlayRequest=function(a,b){Lm(a,b)};Hm.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Ab(b.body),a=Le(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Ic("spc="+a))};Hm.expressplayInitDataTransform=function(a,b,c){return Km(a,b,c)};
522
522
  Hm.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Gc(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Eb(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Jm(a,d,b)};Hm.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Gc(a).split(";").pop();return Jm(a,c,b)};Hm.verimatrixInitDataTransform=function(a,b,c){return Km(a,b,c)};Hm.initDataTransform=Jm;
@@ -549,7 +549,7 @@ function cn(a,b,c){var d,e,f,g,h;P(function(k){if(1==k.g)return d=a.g.streaming.
549
549
  q.destroy=function(){var a=this,b,c,d;return P(function(e){switch(e.g){case 1:a.s=!0;if(!a.j||a.ja){e.u(2);break}return F(e,a.j.stop(),2);case 2:if(!a.i||a.ca){e.u(4);break}return F(e,a.i.stop(),4);case 4:a.H&&!a.oa&&a.H.release();if(!a.l||a.ea){e.u(6);break}return F(e,a.l.destroy(),6);case 6:if(0<a.L.size&&!a.sa)for(b=t(a.L.values()),c=b.next();!c.done;c=b.next())d=c.value,Cl(d);H(e)}})};
550
550
  function en(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))}S("shaka.media.PreloadManager",Sm);Sm.prototype.destroy=Sm.prototype.destroy;Sm.prototype.waitForFinish=Sm.prototype.gj;function fn(a,b){lh.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{Bc:null,Ac:gn,rc:function(d,e){return hn(c,"enter",d,e)}},{Bc:jn,Ac:gn,rc:function(d,e){return hn(c,"enter",d,e)}},{Bc:kn,Ac:gn,rc:function(d,e){return hn(c,"enter",d,e)}},{Bc:gn,Ac:jn,rc:function(d,e){return hn(c,"exit",d,e)}},{Bc:gn,Ac:kn,rc:function(d,e){return hn(c,"exit",d,e)}},{Bc:jn,Ac:kn,rc:function(d,e){return hn(c,"skip",d,e)}},{Bc:kn,Ac:jn,rc:function(d,e){return hn(c,"skip",d,e)}}];this.h=new gb;this.h.D(this.i,
551
551
  "regionremove",function(d){c.g.delete(d.region)})}qa(fn,lh);fn.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;lh.prototype.release.call(this)};fn.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?jn:a>d.endTime?kn:gn;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.Bc==e&&h.Ac==f&&h.rc(d,b)}}};
552
- function hn(a,b,c,d){b=new U(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var jn=1,gn=2,kn=3;function ln(a,b,c){var d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:var n=(new te(a)).Ra.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=mn[d])return m.return(e);f=0;g=th([a],c);va(m,2);g.method="HEAD";return F(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];xa(m,3);break;case 2:k=ya(m);if(!k||1002!=k.code&&1001!=k.code){m.u(3);break}g.method="GET";return F(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
552
+ function hn(a,b,c,d){b=new U(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var jn=1,gn=2,kn=3;function ln(a,b,c){var d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:var n=(new se(a)).Ra.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=mn[d])return m.return(e);f=0;g=th([a],c);va(m,2);g.method="HEAD";return F(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];xa(m,3);break;case 2:k=ya(m);if(!k||1002!=k.code&&1001!=k.code){m.u(3);break}g.method="GET";return F(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
553
553
  e.toLowerCase().split(";").shift():"")}})}
554
554
  var mn={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",
555
555
  jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"};function nn(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return nn(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=a.fontWeight>=ae,e=a.fontStyle==be,f=a.textDecoration.includes(ce);d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=on(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=on(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=t(h);h=k.next().value;
@@ -563,10 +563,11 @@ function Hn(a){if(Infinity===a.endTime||a.endTime<a.startTime)return null;var b=
563
563
  b.region.height=a.region.lines,b.region.heightUnits=2,b.region.regionAnchorX=a.region.regionAnchorX,b.region.regionAnchorY=a.region.regionAnchorY,b.region.scroll=a.region.scroll,b.region.viewportAnchorX=a.region.viewportAnchorX,b.region.viewportAnchorY=a.region.viewportAnchorY,b.region.viewportAnchorUnits=Lb,b.region.width=a.region.width,b.region.widthUnits=Lb);Td(b);return b};function In(a,b){this.g=null;for(var c=t(Array.from(a.textTracks)),d=c.next();!d.done;d=c.next())d=d.value,"metadata"!==d.kind&&"chapters"!==d.kind&&(d.mode="disabled",d.label==b&&(this.g=d));this.g||(this.g=a.addTextTrack("subtitles",b));this.g.mode="hidden"}q=In.prototype;q.configure=function(){};q.remove=function(a,b){if(!this.g)return!1;Jn(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
564
564
  q.append=function(a){var b=pn(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];b=t(b);for(var d=b.next(),e={};!d.done;e={Kc:void 0},d=b.next())e.Kc=d.value,!a.some(function(f){return function(g){return g.startTime==f.Kc.startTime&&g.endTime==f.Kc.endTime&&g.text==f.Kc.payload?!0:!1}}(e))&&e.Kc.payload&&(d=Gn(e.Kc))&&c.push(d);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-c.indexOf(f):
565
565
  c.indexOf(f)-c.indexOf(g)});a=t(a);for(b=a.next();!b.done;b=a.next())this.g.addCue(b.value)};q.destroy=function(){this.g&&(Jn(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
566
- function Jn(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}S("shaka.text.SimpleTextDisplayer",In);In.prototype.setTextVisibility=In.prototype.setTextVisibility;In.prototype.isTextVisible=In.prototype.isTextVisible;In.prototype.destroy=In.prototype.destroy;In.prototype.append=In.prototype.append;In.prototype.remove=In.prototype.remove;In.prototype.configure=In.prototype.configure;function Kn(){}q=Kn.prototype;q.configure=function(){};q.remove=function(){};q.append=function(){};q.destroy=function(){};q.isTextVisible=function(){return!1};q.setTextVisibility=function(){};S("shaka.text.StubTextDisplayer",Kn);Kn.prototype.setTextVisibility=Kn.prototype.setTextVisibility;Kn.prototype.isTextVisible=Kn.prototype.isTextVisible;Kn.prototype.destroy=Kn.prototype.destroy;Kn.prototype.append=Kn.prototype.append;Kn.prototype.remove=Kn.prototype.remove;Kn.prototype.configure=Kn.prototype.configure;function Ln(){}function Mn(a){for(;a.firstChild;)a.removeChild(a.firstChild)}S("shaka.util.Dom",Ln);Ln.removeAllChildren=Mn;function Nn(a,b,c){var d=this;this.m=!1;this.h=[];this.A=a;this.s=b;this.l=null;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.s.appendChild(this.g);c&&c.captionsUpdatePeriod||rb("UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config.");this.C=(new Zb(function(){d.A.paused||
567
- On(d)})).Oa(c&&c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new gb;this.j.D(document,"fullscreenchange",function(){On(d,!0)});this.j.D(this.A,"seeking",function(){On(d,!0)});this.j.D(this.A,"resize",function(){var e=d.A,f=e.videoWidth;e=e.videoHeight;f&&e?d.l=f/e:d.l=null});this.o=null;"ResizeObserver"in window&&(this.o=new ResizeObserver(function(){On(d,!0)}),this.o.observe(this.g));this.B=new Map}q=Nn.prototype;q.configure=function(a){this.C&&this.C.Oa(a.captionsUpdatePeriod)};
568
- q.append=function(a){var b=[].concat(x(this.h));a=t(Fn(a));for(var c=a.next(),d={};!c.done;d={Ne:void 0},c=a.next())d.Ne=c.value,b.some(function(e){return function(f){return Sd(f,e.Ne)}}(d))||this.h.push(d.Ne);On(this)};q.destroy=function(){if(!this.g)return Promise.resolve();this.s.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.C&&this.C.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.o&&(this.o.disconnect(),this.o=null);return Promise.resolve()};
569
- q.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});On(this,c>this.h.length);return!0};q.isTextVisible=function(){return this.m};q.setTextVisibility=function(a){this.m=a};function Pn(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
566
+ function Jn(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}S("shaka.text.SimpleTextDisplayer",In);In.prototype.setTextVisibility=In.prototype.setTextVisibility;In.prototype.isTextVisible=In.prototype.isTextVisible;In.prototype.destroy=In.prototype.destroy;In.prototype.append=In.prototype.append;In.prototype.remove=In.prototype.remove;In.prototype.configure=In.prototype.configure;function Kn(){}q=Kn.prototype;q.configure=function(){};q.remove=function(){};q.append=function(){};q.destroy=function(){};q.isTextVisible=function(){return!1};q.setTextVisibility=function(){};S("shaka.text.StubTextDisplayer",Kn);Kn.prototype.setTextVisibility=Kn.prototype.setTextVisibility;Kn.prototype.isTextVisible=Kn.prototype.isTextVisible;Kn.prototype.destroy=Kn.prototype.destroy;Kn.prototype.append=Kn.prototype.append;Kn.prototype.remove=Kn.prototype.remove;Kn.prototype.configure=Kn.prototype.configure;function Ln(){}function Mn(a){for(;a.firstChild;)a.removeChild(a.firstChild)}S("shaka.util.Dom",Ln);Ln.removeAllChildren=Mn;function Nn(a,b,c){var d=this;document.fullscreenEnabled||$a("Using UITextDisplayer in a browser without Fullscreen API support causes subtitles to not be rendered in fullscreen");this.m=!1;this.h=[];this.A=a;this.s=b;this.l=null;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.s.appendChild(this.g);
567
+ c&&c.captionsUpdatePeriod||rb("UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config.");this.C=(new Zb(function(){d.A.paused||On(d)})).Oa(c&&c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new gb;this.j.D(document,"fullscreenchange",function(){On(d,!0)});this.j.D(this.A,"seeking",function(){On(d,!0)});this.j.D(this.A,"resize",function(){var e=d.A,f=e.videoWidth;e=e.videoHeight;f&&e?d.l=f/e:d.l=null});this.o=null;"ResizeObserver"in window&&
568
+ (this.o=new ResizeObserver(function(){On(d,!0)}),this.o.observe(this.g));this.B=new Map}q=Nn.prototype;q.configure=function(a){this.C&&this.C.Oa(a.captionsUpdatePeriod)};q.append=function(a){var b=[].concat(x(this.h));a=t(Fn(a));for(var c=a.next(),d={};!c.done;d={Ne:void 0},c=a.next())d.Ne=c.value,b.some(function(e){return function(f){return Sd(f,e.Ne)}}(d))||this.h.push(d.Ne);On(this)};
569
+ q.destroy=function(){if(!this.g)return Promise.resolve();this.s.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.C&&this.C.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.o&&(this.o.disconnect(),this.o=null);return Promise.resolve()};q.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});On(this,c>this.h.length);return!0};q.isTextVisible=function(){return this.m};
570
+ q.setTextVisibility=function(a){this.m=a;On(this,!0)};function Pn(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
570
571
  function Qn(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.i.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.qh:null;l&&(g.push(l.Oe),l.wc&&g.push(l.wc),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?Pn(a,n)||(f=!0):(Rn(a,k,e),l=a.i.get(k),n=l.qh,f=!0));0<k.nestedCues.length&&n&&Qn(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,r){return p.startTime!=
571
572
  r.startTime?p.startTime-r.startTime:p.endTime-r.endTime});h=t(h);for(d=h.next();!d.done;d=h.next())d=a.i.get(d.value),d.wc?(d.wc.contains(c)&&d.wc.removeChild(c),c.appendChild(d.wc),d.wc.appendChild(d.Oe)):c.appendChild(d.Oe)}}function On(a,b){if(a.g){var c=a.A.currentTime;if(!a.m||(void 0===b?0:b)){b=t(a.B.values());for(var d=b.next();!d.done;d=b.next())Mn(d.value);Mn(a.g);a.i.clear();a.B.clear()}a.m&&Qn(a,a.h,a.g,c,[])}}
572
573
  function Rn(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&Sn(a,f,b,c,d);c=null;if(b.region&&b.region.id){var g=b.region,h=a.l===4/3?2.5:1.9;c=g.id+"_"+g.width+"x"+g.height+(g.heightUnits==Lb?"%":"px")+"-"+g.viewportAnchorX+"x"+g.viewportAnchorY+(g.viewportAnchorUnits==Lb?"%":"px");if(a.B.has(c))c=a.B.get(c);else{e=document.createElement("span");var k=g.heightUnits==Lb?"%":"px",l=g.widthUnits==
@@ -590,7 +591,7 @@ function po(a){if(0===a.type)return qo;if(a=a.stream){var b=a.type;if("video"==b
590
591
  function uo(a,b){b=a.h.zb()[b];if(!b.length)return 0;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):0}function vo(a,b){var c=a.h.pc();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 mo:return a.videoBandwidth||NaN;case go:return a.audioBandwidth||NaN;default:return a.bandwidth}}
591
592
  function jo(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"===
592
593
  l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function oo(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=jo(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
593
- function ko(a,b){if(!b||a.includes("offline:"))return a;a=new te(a);a.g.set("CMCD",b);return a.toString()}var io="m",go="a",mo="v",ho="av",qo="i",so="c",ro="tt",$n="d",ao="ld",bo="h",co="lh";S("shaka.util.CmcdManager.StreamingFormat",{DASH:$n,Aj:ao,HLS:bo,Bj:co,Oj:"s",OTHER:"o"});function wo(a){this.h=a;this.g=null}q=wo.prototype;q.configure=function(a){this.h=a};q.yg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(xo)?1E3*this.g.get(xo):null};q.wg=function(){return this.h.enabled&&this.g&&this.g.has(yo)?1E3*this.g.get(yo):null};q.Zh=function(){return this.h.enabled&&this.g&&this.g.has(zo)?this.g.get(zo):null};q.$h=function(){return this.h.enabled&&this.g&&this.g.has(Ao)?this.g.get(Ao):null};
594
+ function ko(a,b){if(!b||a.includes("offline:"))return a;a=new se(a);a.g.set("CMCD",b);return a.toString()}var io="m",go="a",mo="v",ho="av",qo="i",so="c",ro="tt",$n="d",ao="ld",bo="h",co="lh";S("shaka.util.CmcdManager.StreamingFormat",{DASH:$n,Aj:ao,HLS:bo,Bj:co,Oj:"s",OTHER:"o"});function wo(a){this.h=a;this.g=null}q=wo.prototype;q.configure=function(a){this.h=a};q.yg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(xo)?1E3*this.g.get(xo):null};q.wg=function(){return this.h.enabled&&this.g&&this.g.has(yo)?1E3*this.g.get(yo):null};q.Zh=function(){return this.h.enabled&&this.g&&this.g.has(zo)?this.g.get(zo):null};q.$h=function(){return this.h.enabled&&this.g&&this.g.has(Ao)?this.g.get(Ao):null};
594
595
  q.getBandwidthEstimate=function(a){var b=this.wg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Bo(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",wo);wo.prototype.getBandwidthEstimate=wo.prototype.getBandwidthEstimate;wo.prototype.getRoundTripTime=wo.prototype.$h;wo.prototype.getResponseDelay=wo.prototype.Zh;wo.prototype.getEstimatedThroughput=wo.prototype.wg;
595
596
  wo.prototype.getMaxBitrate=wo.prototype.yg;var yo="etp",xo="mb",zo="rd",Ao="rtt";function Co(){this.g=null;this.h=[]}function Do(a,b){return P(function(c){if(1==c.g)return a.g?F(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;H(c)})}Co.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function W(a,b,c){b=void 0===b?null:b;lh.call(this);var d=this;this.m=Eo;this.h=null;this.fe=b;this.oa=!1;this.re=new gb;this.ld=new gb;this.l=new gb;this.Ua=new gb;this.gb=new gb;this.G=this.I=this.B=this.F=null;this.ze=0;this.aa=new Co;this.la=this.ag=this.ea=this.i=this.cb=this.H=this.j=this.ac=this.L=this.cg=this.fa=this.O=this.bc=this.M=this.he=this.K=this.Hb=null;this.Da=!1;this.za=this.o=null;this.bg=1E9;this.rd=[];this.X=NaN;this.g=Fo(this);this.R=null;this.Be=-1;this.Fa=null;this.ja={width:Infinity,
596
597
  height:Infinity};this.be=new Hi(this.g,this.ja,null);this.ke=[];this.A=null;this.Ea=new Hg(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups,"");this.Gb=this.g.preferredTextLanguage;this.pd=this.g.preferredTextRole;this.od=this.g.preferForcedSubs;
@@ -722,16 +723,16 @@ a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m
722
723
  function Up(a,b,c,d){var e=qf[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Ab(b),b=c.parseMedia(b,a,null,[]),Wn(b,d);throw new T(2,2,2014,c);}q.Zi=function(a,b){this.ja.width=a;this.ja.height=b};q.Kf=function(a){if(this.m==tp){var b=this.j;a=void 0===a?.1:a;if(b.m.g)b=!1;else if(b.A)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.hd||d.Ma||d.wb||(d.hd=!1,cm(b,d,a));b=!0}}else b=!1;return b};
723
724
  q.gf=function(){$a("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.Sh=function(){return this.cb};
724
725
  q.Nh=function(){var a={video:null,audio:null,text:null};if(this.m!=tp)return a;var b=this.j.j,c=this.h.currentTime;b=t([b.video,b.audio,this.j.s]);for(var d=b.next();!d.done;d=b.next())if((d=d.value)&&d.segmentIndex){var e=d.segmentIndex.find(c);e=d.segmentIndex.get(e);e={codecs:e.codecs||d.codecs,mimeType:e.mimeType||d.mimeType,bandwidth:e.bandwidth||d.bandwidth};"video"==d.type?(e.width=d.width,e.height=d.height,a.video=e):"audio"==d.type?a.audio=e:d.type==We&&(a.text=e)}return a};
725
- function Fo(a){var b=Nm();b.streaming.failureCallback=function(c){if(a.U()){var d=null;1001==c.code||1002==c.code?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Kf(d))}};b.textDisplayFactory=function(){if(a.fe){var c=a.getConfiguration();return new Nn(a.h,a.fe,c.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new In(a.h,"Shaka Player TextTrack"):new Kn};return b}q.hh=function(a){this.fe=a};
726
+ function Fo(a){var b=Nm();b.streaming.failureCallback=function(c){if(a.U()){var d=null;1001==c.code||1002==c.code?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Kf(d))}};b.textDisplayFactory=function(){if(!a.fe||uc()&&!document.fullscreenEnabled)return HTMLMediaElement.prototype.addTextTrack?new In(a.h,"Shaka Player TextTrack"):new Kn;var c=a.getConfiguration();return new Nn(a.h,a.fe,c.textDisplayer)};return b}q.hh=function(a){this.fe=a};
726
727
  function dp(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 il,l=e.closedCaptions.get(g);h={id:a.bg++,originalId:g,groupId:null,
727
728
  createSegmentIndex:function(){return Promise.resolve()},segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:We,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([af(h,"")])};b.textStreams.push(h);c.add(g)}}
728
729
  function xp(a,b){var c,d,e,f,g;return P(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return P(function(r){if(1==r.g)return k?F(r,k.createSegmentIndex(),2):r.return(null);n=(m=k.segmentIndex.Jb(l))?m.next().value:null;if(!n)return r.return(null);p=n.startTime;return r.return(p)})},F(h,e(c,b),2);if(3!=h.g)return f=h.h,F(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
729
730
  function Uo(a){var b=a.pf();if(a.A&&a.M&&a.G){var c=a.K;c.j=b;kl(c);a.O&&(c=a.O,b||c.l||(c.l=!0),c.l&&b&&(c.m=!0),c.o=b);np(a);c=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;if(a.g.streaming.liveSync.dynamicTargetLatency.enabled&&b&&a.Be<c){c=a.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var d=a.g.streaming.liveSync.targetLatencyTolerance,e=a.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;a.R&&(a.R=Math.min(a.R+ ++a.Be*e,c-d))}}b=(new Map).set("buffering",b);a.dispatchEvent(No("buffering",
730
731
  b))}function np(a){if(a.A&&a.M){var b=a.A.g,c="playing";a.M.g==Vg?c="buffering":a.h.ended?c="ended":a.h.paused&&(c="paused");var d=c;if(null==b.g)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(No("statechanged",c)))}}
731
- function Bp(a){var b=a.h.playbackRate,c=a.U();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.ug();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.wd(d,!1):1==e&&b!==a.K.nc()&&a.Xc()}if(c&&(c=a.Qb(),Number.isFinite(c.end)&&!(a.h.currentTime<c.start))){d=a.g.streaming.liveSync.targetLatencyTolerance;e=a.g.streaming.liveSync.dynamicTargetLatency.enabled;var f=a.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;if(a.g.streaming.liveSync&&
732
- a.g.streaming.liveSync.enabled){var g=a.g.streaming.liveSync.targetLatency;var h=g+d;var k=Math.max(0,g-d);var l=a.g.streaming.liveSync.maxPlaybackRate;var m=a.g.streaming.liveSync.minPlaybackRate}else a.i&&a.i.serviceDescription&&(g=a.i.serviceDescription.targetLatency,null!=a.i.serviceDescription.targetLatency?h=a.i.serviceDescription.targetLatency+d:null!=a.i.serviceDescription.maxLatency&&(h=a.i.serviceDescription.maxLatency),null!=a.i.serviceDescription.targetLatency?k=Math.max(0,a.i.serviceDescription.targetLatency-
733
- d):null!=a.i.serviceDescription.minLatency&&(k=a.i.serviceDescription.minLatency),l=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSync.maxPlaybackRate,m=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSync.minPlaybackRate);a.R||"number"!==typeof g||(a.R=g);var n=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;e&&a.Fa&&null!==a.R&&"number"===typeof g&&a.Be<n&&Date.now()-a.Fa>1E3*f&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency,a.R=Math.max(a.R-(g-f)/2,f+d),
734
- a.Fa=Date.now());e&&null!==a.R&&(h=a.R+d,k=a.R-d);g=c.end-a.h.currentTime;d=0;a.m==Ep&&(e=a.h.buffered,0<e.length&&(d=e.end(e.length-1),d=Math.max(l,d-c.end)));c=a.g.streaming.liveSync.panicMode;e=1E3*a.g.streaming.liveSync.panicThreshold;f=Date.now()-a.M.h;c&&!m&&(m=a.g.streaming.liveSync.minPlaybackRate);c&&m&&f<=e?b!=m&&a.wd(m,!1):h&&l&&g-d>h?(b!=l&&a.wd(l,!1),a.Fa=null):k&&m&&g-d<k?(b!=m&&a.wd(m,!1),a.Fa=null):b!==a.K.nc()&&(a.Xc(),a.Fa=Date.now())}}
732
+ function Bp(a){var b=a.h.playbackRate,c=a.U();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.ug();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.wd(d,!1):1==e&&b!==a.K.nc()&&a.Xc()}if(c&&(c=a.Qb(),Number.isFinite(c.end)&&!(a.h.currentTime<c.start||a.h.paused))){d=a.g.streaming.liveSync.targetLatencyTolerance;e=a.g.streaming.liveSync.dynamicTargetLatency.enabled;var f=a.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;
733
+ if(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled){var g=a.g.streaming.liveSync.targetLatency;var h=g+d;var k=Math.max(0,g-d);var l=a.g.streaming.liveSync.maxPlaybackRate;var m=a.g.streaming.liveSync.minPlaybackRate}else a.i&&a.i.serviceDescription&&(g=a.i.serviceDescription.targetLatency,null!=a.i.serviceDescription.targetLatency?h=a.i.serviceDescription.targetLatency+d:null!=a.i.serviceDescription.maxLatency&&(h=a.i.serviceDescription.maxLatency),null!=a.i.serviceDescription.targetLatency?
734
+ k=Math.max(0,a.i.serviceDescription.targetLatency-d):null!=a.i.serviceDescription.minLatency&&(k=a.i.serviceDescription.minLatency),l=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSync.maxPlaybackRate,m=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSync.minPlaybackRate);a.R||"number"!==typeof g||(a.R=g);var n=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;e&&a.Fa&&null!==a.R&&"number"===typeof g&&a.Be<n&&Date.now()-a.Fa>1E3*f&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency,
735
+ a.R=Math.max(a.R-(g-f)/2,f+d),a.Fa=Date.now());e&&null!==a.R&&(h=a.R+d,k=a.R-d);g=c.end-a.h.currentTime;d=0;a.m==Ep&&(e=a.h.buffered,0<e.length&&(d=e.end(e.length-1),d=Math.max(l,d-c.end)));c=a.g.streaming.liveSync.panicMode;e=1E3*a.g.streaming.liveSync.panicThreshold;f=Date.now()-a.M.h;c&&!m&&(m=a.g.streaming.liveSync.minPlaybackRate);c&&m&&f<=e?b!=m&&a.wd(m,!1):h&&l&&g-d>h?(b!=l&&a.wd(l,!1),a.Fa=null):k&&m&&g-d<k?(b!=m&&a.wd(m,!1),a.Fa=null):b!==a.K.nc()&&(a.Xc(),a.Fa=Date.now())}}
735
736
  function Cp(a){if(a.h){var b=!1,c=a.h.currentTime/a.h.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.X)?(a.X=c,b=!0):(c=Math.max(a.X,c),a.X!=c&&(a.X=c,b=!0)));if(b){var d;0==a.X?d=No("started"):25==a.X?d=No("firstquartile"):50==a.X?d=No("midpoint"):75==a.X?d=No("thirdquartile"):100==a.X&&(d=No("complete"));d&&a.dispatchEvent(d)}}}function ip(a){try{Mi(a.be,a.i)}catch(c){return So(a,c),!1}var b=ug(a.i.variants);b=a.Ea.create(b);a.o.setVariants(Array.from(b.values()));return!0}
736
737
  function Ko(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;(f=ip(a)?a.o.chooseVariant():null)&&rp(a,f,e,b,c,d)}
737
738
  function rp(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&gm(a.j,b,d,e,!0);else{var h=a.A.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));gm(a.j,b,d,e,f,c);d=null;g&&(d=kg(g));b=kg(b);b.active=!0;c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.L&&bk(a.L,b,a.hf()),c=No("adaptation",c),Vp(a,c)):Wp(a,d,b)}}
@@ -757,7 +758,7 @@ W.prototype.detachAndSavePreload=W.prototype.pg;W.prototype.unloadAndSavePreload
757
758
  W.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return P(function(k){switch(k.g){case 1:b={};if(!a){k.u(2);break}return F(k,Ei(),3);case 3:b=k.h;case 2:var l={};if($b())for(var m in Qi)l[m]=!0;m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,l[n]=$b()?!!Qi[n]:ac(n);c=l;m='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.02.01.01",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(x(bf));
758
759
  l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=pf(n)?!0:$b()?mb(n)||(ke(n)?!0:!1):ac(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return F(k,Bc(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=Xp;for(h in g)f[h]=g[h]();return k.return(f)}})};
759
760
  W.isBrowserSupported=function(){window.Promise||$a("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||gc("Trident/"))return!1;var a=uc();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:$b()?!0:ac("application/x-mpegurl")};W.setAdManagerFactory=function(a){Io=a};
760
- W.registerSupportPlugin=function(a,b){Xp[a]=b};W.prototype.destroy=W.prototype.destroy;var Oo=0,Eo=1,tp=2,Ep=3;W.LoadMode={DESTROYED:Oo,NOT_LOADED:Eo,MEDIA_SOURCE:tp,SRC_EQUALS:Ep};W.version="v4.11.12";var Yp=["4","11"];sb=new function(a){this.g=a;this.i=tb;this.h=ub}(new qb(Number(Yp[0]),Number(Yp[1])));var Xp={},Io=null;function Zp(){this.g=[];this.i=this.l=this.j=this.h=0}function $p(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function aq(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new gb;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=aq.prototype;q.needsSkipUI=function(){return!1};q.isClientRendering=function(){return!0};q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};
761
+ W.registerSupportPlugin=function(a,b){Xp[a]=b};W.prototype.destroy=W.prototype.destroy;var Oo=0,Eo=1,tp=2,Ep=3;W.LoadMode={DESTROYED:Oo,NOT_LOADED:Eo,MEDIA_SOURCE:tp,SRC_EQUALS:Ep};W.version="v4.11.13";var Yp=["4","11"];sb=new function(a){this.g=a;this.i=tb;this.h=ub}(new qb(Number(Yp[0]),Number(Yp[1])));var Xp={},Io=null;function Zp(){this.g=[];this.i=this.l=this.j=this.h=0}function $p(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function aq(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new gb;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=aq.prototype;q.needsSkipUI=function(){return!1};q.isClientRendering=function(){return!0};q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};
761
762
  q.isPaused=function(){return this.i};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){this.j.volume=a;return this.h.setVolume(a)};
762
763
  q.isMuted=function(){return 0==this.h.getVolume()};q.isLinear=function(){return this.g.isLinear()};q.resize=function(a,b){var c=!1,d=this.j;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){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
763
764
  q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};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()};
@@ -770,7 +771,7 @@ function cq(a,b){var c=[],d=0;null!=b&&(d=b);a=t(ed(a,"Ad"));for(var e=a.next();
770
771
  0)-(parseInt(k.attributes.height,10)||0)});g=t(g);for(h=g.next();!h.done;h=g.next())if(h=fd(h.value)){c.push({id:null,startTime:d,endTime:null,uri:h,isSkippable:null!=f,skipOffset:f,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:null==b,post:Infinity==b,timelineRange:!1});break}}}}return c}S("shaka.ads.Utils",bq);bq.ADS_LOADED="ads-loaded";bq.AD_STARTED="ad-started";bq.AD_FIRST_QUARTILE="ad-first-quartile";bq.AD_MIDPOINT="ad-midpoint";bq.AD_THIRD_QUARTILE="ad-third-quartile";
771
772
  bq.AD_COMPLETE="ad-complete";bq.AD_STOPPED="ad-stopped";bq.AD_SKIPPED="ad-skipped";bq.AD_VOLUME_CHANGED="ad-volume-changed";bq.AD_MUTED="ad-muted";bq.AD_PAUSED="ad-paused";bq.AD_RESUMED="ad-resumed";bq.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";bq.CUEPOINTS_CHANGED="ad-cue-points-changed";bq.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";bq.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";bq.AD_CLICKED="ad-clicked";bq.AD_PROGRESS="ad-progress";bq.AD_BUFFERING="ad-buffering";
772
773
  bq.AD_IMPRESSION="ad-impression";bq.AD_DURATION_CHANGED="ad-duration-changed";bq.AD_CLOSED="ad-closed";bq.AD_LOADED="ad-loaded";bq.ALL_ADS_COMPLETED="all-ads-completed";bq.AD_LINEAR_CHANGED="ad-linear-changed";bq.AD_METADATA="ad-metadata";bq.AD_RECOVERABLE_ERROR="ad-recoverable-error";bq.AD_ERROR="ad-error";bq.AD_BREAK_READY="ad-break-ready";bq.AD_INTERACTION="ad-interaction";bq.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";bq.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";
773
- bq.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function dq(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.F=!1;this.A=this.o=null;this.G=NaN;this.l=e;this.j=null;this.h=new gb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.s,this.i);this.C.initialize();this.m=new google.ima.AdsLoader(this.C);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.11.12");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.m,
774
+ bq.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function dq(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.F=!1;this.A=this.o=null;this.G=NaN;this.l=e;this.j=null;this.h=new gb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.s,this.i);this.C.initialize();this.m=new google.ima.AdsLoader(this.C);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.11.13");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.m,
774
775
  google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){eq(f,g)});this.h.D(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){fq(f,g)});this.h.D(this.i,"ended",function(){f.m.contentComplete()});this.h.va(this.i,"play",function(){f.F=!0})}dq.prototype.configure=function(a){this.o=a};dq.prototype.stop=function(){this.g&&this.g.stop();this.s&&Mn(this.s)};
775
776
  dq.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy();this.C.destroy()};function fq(a,b){b.getError();b=(new Map).set("originalEvent",b);a.l(new U("ad-error",b));gq(a,null);a.l(new U("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
776
777
  function eq(a,b){a.l(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));if(a.o.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.B);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.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.B);a.l(new U("ima-ad-manager-loaded",(new Map).set("imaAdManager",
@@ -794,13 +795,13 @@ kq.prototype.getRemainingTime=kq.prototype.getRemainingTime;kq.prototype.getMinS
794
795
  break}v=u.endTime||u.startTime;if(!(1<=n.start-v)){w=u.startTime-f.j;0<w&&10>=w&&(f.o.has(u)||f.o.set(u,f.i.preload(u.uri)));B.u(4);break}if(!f.o.has(u)){B.u(7);break}return F(B,f.o.get(u),8);case 8:(y=B.h)&&y.destroy(),f.o.delete(u);case 7:z=JSON.stringify(u),f.I.has(z)&&f.I.delete(z),f.B.delete(u),l=!0;case 4:r=p.next();B.u(3);break;case 5:l&&pq(f),H(B)}})})).Oa(1)}lq.prototype.configure=function(a){this.L=a;qq(this)};
795
796
  function qq(a){if(a.G&&a.L&&!a.H){var b=a.L.supportsMultipleMediaElements,c=a.g;c.webkitSupportsFullscreen&&c.webkitDisplayingFullscreen&&(b=!1);a.s==b&&(a.s=!b,a.s?(a.l=a.g,a.F&&(a.F.parentElement&&a.G.removeChild(a.F),a.F=null)):(a.F||(b=document.createElement(a.g.tagName),b.autoplay=!0,b.style.position="absolute",b.style.top="0",b.style.left="0",b.style.width="100%",b.style.height="100%",b.style.backgroundColor="rgb(0, 0, 0)",b.setAttribute("playsinline",""),a.F=b),a.l=a.F))}}
796
797
  lq.prototype.stop=function(){this.m&&this.m.Sa();this.I.clear();this.B.clear();this.i.Qe();this.o.clear();this.i.detach();this.H=!1;this.C=this.j=null};lq.prototype.release=function(){this.stop();this.M&&this.M.release();this.m&&this.m.release();this.G&&Mn(this.G);this.K&&(this.K.stop(),this.K=null);this.O&&(this.O.stop(),this.O=null);this.i.destroy()};function rq(a,b){var c;P(function(d){if(1==d.g)return oq(a),F(d,sq(a,b),2);c=d.h;c.length?tq(a,c):$a("Unsupported HLS interstitial",b);H(d)})}
797
- lq.prototype.addAdUrlInterstitial=function(a){var b=this,c,d,e,f,g,h,k,l,m;return P(function(n){switch(n.g){case 1:return c={type:12},F(n,uq(b,a,c),2);case 2:d=n.h;e=Wc(d,"VAST,vmap:VMAP");if(!e)throw new T(2,10,4001);f=[];if("VAST"==e.tagName){f=cq(e,b.j);n.u(3);break}if("vmap:VMAP"!=e.tagName){n.u(3);break}for(var p=[],r=t(ed(e,"vmap:AdBreak")),u=r.next();!u.done;u=r.next()){var v=u.value,w=v.attributes.timeOffset;w&&(u=null,"start"==w?u=0:"end"==w?u=Infinity:u=Tc(w),(v=id(v,"vmap:AdSource"))&&
798
- (v=id(v,"vmap:AdTagURI"))&&(v=fd(v))&&p.push({time:u,uri:v}))}g=t(p);h=g.next();case 5:if(h.done){n.u(3);break}k=h.value;return F(n,uq(b,k.uri,c),8);case 8:l=n.h;m=Wc(l,"VAST");if(!m)throw new T(2,10,4001);f.push.apply(f,x(cq(m,k.time)));h=g.next();n.u(5);break;case 3:tq(b,f),H(n)}})};
798
+ lq.prototype.addAdUrlInterstitial=function(a){var b=this,c,d,e,f,g,h,k,l,m;return P(function(n){switch(n.g){case 1:return c={type:12},F(n,uq(b,a,c),2);case 2:d=n.h;e=Wc(d,"VAST,vmap:VMAP");if(!e)throw new T(2,10,10007);f=[];if("VAST"==e.tagName){f=cq(e,b.j);n.u(3);break}if("vmap:VMAP"!=e.tagName){n.u(3);break}for(var p=[],r=t(ed(e,"vmap:AdBreak")),u=r.next();!u.done;u=r.next()){var v=u.value,w=v.attributes.timeOffset;w&&(u=null,"start"==w?u=0:"end"==w?u=Infinity:u=Tc(w),(v=id(v,"vmap:AdSource"))&&
799
+ (v=id(v,"vmap:AdTagURI"))&&(v=fd(v))&&p.push({time:u,uri:v}))}g=t(p);h=g.next();case 5:if(h.done){n.u(3);break}k=h.value;return F(n,uq(b,k.uri,c),8);case 8:l=n.h;m=Wc(l,"VAST");if(!m)throw new T(2,10,10007);f.push.apply(f,x(cq(m,k.time)));h=g.next();n.u(5);break;case 3:tq(b,f),H(n)}})};
799
800
  function tq(a,b){var c=!1;b=t(b);for(var d=b.next();!d.done;d=b.next()){d=d.value;var e=d.id||JSON.stringify(d);if(!a.I.has(e)){c=!0;a.I.add(e);a.B.add(d);e=!1;if(d.pre&&null==a.j)e=!0;else if(0==d.startTime&&!d.canJump)e=!0;else if(null!=a.j){var f=d.startTime-a.j;0<f&&10>=f&&(e=!0)}e&&(a.o.has(d)||a.o.set(d,a.i.preload(d.uri)))}}c&&pq(a)}
800
- function mq(a,b,c,d){var e=0,f=null;if(a.B.size&&null!=a.j){var g=a.g.ended,h=Array.from(a.B).sort(function(n,p){return p.startTime-n.startTime});h=t(h);for(var k=h.next();!k.done;k=h.next()){k=k.value;var l=!1;if(b)l=k.pre;else if(g)l=k.post;else if(!k.pre&&!k.post){var m=a.j-Math.round(1E3*k.startTime)/1E3;0<m&&(1>=m||!k.canJump)&&(l=1<m&&d&&!d.pre&&!d.post&&d.startTime>=k.startTime?!1:!0)}if(l){if(e==c){f=k;break}e++}}}return f}
801
+ function mq(a,b,c,d){var e=0,f=null;if(a.B.size&&null!=a.j){var g=a.g.ended,h=Array.from(a.B).sort(function(n,p){return p.startTime-n.startTime});h=t(h);for(var k=h.next();!k.done;k=h.next()){k=k.value;var l=!1;if(b)l=k.pre;else if(g)l=k.post;else if(!k.pre&&!k.post){var m=a.j-Math.round(1E3*k.startTime)/1E3;0<m&&(1>=m||!k.canJump)&&(l=d&&!d.pre&&!d.post&&d.startTime>=k.startTime?!1:!0)}if(l){if(e==c){f=k;break}e++}}}return f}
801
802
  function nq(a,b,c,d,e,f){f=void 0===f?0:f;var g,h,k,l,m,n,p,r,u,v,w,y,z,B,A,D;P(function(E){switch(E.g){case 1:qq(a);a.C=b;g=Date.now();!a.l.parentElement&&a.G&&a.G.appendChild(a.l);1==d&&1==c&&(c=Array.from(a.B).filter(function(C){return b.pre?C.pre==b.pre:b.post?C.post==b.post:.001>Math.abs(C.startTime-b.startTime)}).length);if(b.once||b.pre)f++,a.B.delete(b),pq(a);a.H=!0;if(!a.s||1!=d){E.u(2);break}a.h(new U("ad-content-pause-requested",(new Map).set("saveLivePosition",!0)));h=new $g;k=function(C){return P(function(G){if(1==
802
803
  G.g)return"detach"!=C.state?G.u(0):xc()?F(G,new Promise(function(J){return(new Zb(J)).Z(.1)}),3):G.u(3);h.resolve();a.m.ab(a.A,"onstatechange",k);H(G)})};a.m.D(a.A,"onstatechange",k);return F(E,h,2);case 2:return a.s||(a.g.pause(),null!=b.resumeOffset&&0!=b.resumeOffset&&(a.g.currentTime+=b.resumeOffset)),l=!1,m=null,n=function(){if(!a.s&&null==b.resumeOffset)if(b.timelineRange&&b.endTime&&Infinity!=b.endTime)a.g.currentTime!=b.endTime&&(a.g.currentTime=b.endTime);else{var C=Date.now();a.g.currentTime+=
803
- (C-e)/1E3;e=C}},p=function(){var C,G;return P(function(J){if(1==J.g)return n(),m&&m.stop(),(C=mq(a,b.pre,d-f))?(a.h(new U("ad-stopped")),a.m.Sa(),nq(a,C,c,++d,e,f),J.u(0)):a.s?F(J,a.i.detach(),4):F(J,a.i.hc(),4);a.s&&(G=b.resumeOffset,null==G&&(G=b.timelineRange&&b.endTime&&Infinity!=b.endTime?b.endTime-(a.j||0):(Date.now()-e)/1E3),a.h(new U("ad-content-resume-requested",(new Map).set("offset",G))));a.h(new U("ad-stopped"));a.m.Sa();a.H=!1;a.s||(n(),a.g.ended||a.g.play());qq(a);H(J)})},r=function(C){return P(function(G){if(l)return G.return();
804
+ (C-e)/1E3;e=C}},p=function(){var C,G;return P(function(J){if(1==J.g)return n(),m&&m.stop(),(C=mq(a,b.pre,d-f))?(a.h(new U("ad-stopped")),a.m.Sa(),nq(a,C,c,++d,e,f),J.u(0)):a.s?F(J,a.i.detach(),4):F(J,a.i.hc(),4);a.s&&(G=b.resumeOffset,null==G&&(G=b.timelineRange&&b.endTime&&Infinity!=b.endTime?b.endTime-(a.j||0):(Date.now()-e)/1E3),a.h(new U("ad-content-resume-requested",(new Map).set("offset",G))));a.h(new U("ad-stopped"));a.m.Sa();a.H=!1;a.s?pq(a):(n(),a.g.ended||a.g.play());qq(a);H(J)})},r=function(C){return P(function(G){if(l)return G.return();
804
805
  l=!0;a.h(new U("ad-error",(new Map).set("originalEvent",C)));return F(G,p(),0)})},u=function(){return P(function(C){if(1==C.g){if(l)return C.return();l=!0;return F(C,p(),2)}a.h(new U("ad-complete"));H(C)})},v=function(){return P(function(C){if(l)return C.return();l=!0;a.h(new U("ad-skipped"));return F(C,p(),0)})},w=new kq(a.l,b.isSkippable,b.skipOffset,v,c,d),a.s||(w.setMuted(a.g.muted),w.setVolume(a.g.volume)),a.h(new U("ad-started",(new Map).set("ad",w))),w.canSkipNow()&&a.h(new U("ad-skip-state-changed")),
805
806
  y=new Set,a.m.va(a.i,"error",r),a.m.D(a.l,"timeupdate",function(){var C=a.l.duration;C&&(b.isSkippable&&b.skipOffset&&w.canSkipNow()&&0<w.getRemainingTime()&&0<w.getDuration()&&a.h(new U("ad-skip-state-changed")),C=100*a.l.currentTime/C,25<=C&&!y.has("firstquartile")?(n(),a.h(new U("ad-first-quartile")),y.add("firstquartile")):50<=C&&!y.has("midpoint")?(n(),a.h(new U("ad-midpoint")),y.add("midpoint")):75<=C&&!y.has("thirdquartile")&&(n(),a.h(new U("ad-third-quartile")),y.add("thirdquartile")))}),
806
807
  a.m.va(a.i,"complete",u),a.m.D(a.l,"play",function(){a.h(new U("ad-resumed"))}),a.m.D(a.l,"pause",function(){var C=a.i.getConfiguration();a.l.currentTime>=C.playRangeEnd?u():a.h(new U("ad-paused"))}),a.m.D(a.l,"volumechange",function(){a.l.muted?a.h(new U("ad-muted")):a.h(new U("ad-volume-changed"))}),va(E,4),oq(a),b.startTime&&b.endTime&&Infinity!=b.endTime&&b.startTime!=b.endTime&&(z=b.endTime-b.startTime,0<z&&a.i.configure("playRangeEnd",z)),b.playoutLimit&&(m=(new Zb(function(){w.skip()})).Z(b.playoutLimit),
@@ -818,7 +819,7 @@ vq.prototype.getMediaUrl=vq.prototype.getMediaUrl;vq.prototype.getAdvertiserName
818
819
  vq.prototype.getPositionInSequence=vq.prototype.getPositionInSequence;vq.prototype.getSequenceLength=vq.prototype.getSequenceLength;vq.prototype.setMuted=vq.prototype.setMuted;vq.prototype.resize=vq.prototype.resize;vq.prototype.isLinear=vq.prototype.isLinear;vq.prototype.isMuted=vq.prototype.isMuted;vq.prototype.setVolume=vq.prototype.setVolume;vq.prototype.getVolume=vq.prototype.getVolume;vq.prototype.play=vq.prototype.play;vq.prototype.pause=vq.prototype.pause;vq.prototype.skip=vq.prototype.skip;
819
820
  vq.prototype.canSkipNow=vq.prototype.canSkipNow;vq.prototype.getTimeUntilSkippable=vq.prototype.getTimeUntilSkippable;vq.prototype.isSkippable=vq.prototype.isSkippable;vq.prototype.isPaused=vq.prototype.isPaused;vq.prototype.getRemainingTime=vq.prototype.getRemainingTime;vq.prototype.getMinSuggestedDuration=vq.prototype.getMinSuggestedDuration;vq.prototype.getDuration=vq.prototype.getDuration;vq.prototype.isClientRendering=vq.prototype.isClientRendering;vq.prototype.needsSkipUI=vq.prototype.needsSkipUI;function wq(a,b,c,d){this.B=a;this.K=b;this.h=c;this.l=null;this.R=NaN;this.i=d;this.I=!1;this.A=null;this.j=[];this.M=[];this.L=this.C=this.g=null;this.F=new Map;this.m=[];this.s=[];this.G="";this.O=!0;this.H="";this.o=new gb}wq.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.ab(b.target,b.type,b.listener);xq(this);this.m=[];this.s=[];this.G="";this.O=!0;this.H="";this.A=null;this.j=[];this.M=[];this.F.clear()};
820
821
  wq.prototype.release=function(){this.stop();this.o&&this.o.release()};wq.prototype.onManifestUpdated=function(a){this.I=a;""!=this.G&&(yq(this,this.G,this.O),this.O=!1)};wq.prototype.getCuePoints=function(){for(var a=[],b=t(this.j),c=b.next();!c.done;c=b.next()){c=t(c.value.ads);for(var d=c.next();!d.done;d=c.next())d=d.value,a.push({start:d.startTimeInSeconds,end:d.startTimeInSeconds+d.durationInSeconds})}return a};
821
- function zq(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u;P(function(v){if(1==v.g)return d={type:7},e=th([b],Yg()),e.method="POST",c&&(f=JSON.stringify(c),e.body=Ic(f)),g=a.K.request(7,e,d),va(v,2),F(v,g.promise,4);if(2!=v.g){h=v.h;k=Dc(h.data);l=JSON.parse(k);if(l.manifestUrl&&l.trackingUrl)m=new te(b),n=new te(l.trackingUrl),a.G=m.resolve(n).toString(),p=Date.now()/1E3,r=p-a.R,a.i(new U("ads-loaded",(new Map).set("loadTime",r))),u=new te(l.manifestUrl),a.l.resolve(m.resolve(u).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
822
+ function zq(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u;P(function(v){if(1==v.g)return d={type:7},e=th([b],Yg()),e.method="POST",c&&(f=JSON.stringify(c),e.body=Ic(f)),g=a.K.request(7,e,d),va(v,2),F(v,g.promise,4);if(2!=v.g){h=v.h;k=Dc(h.data);l=JSON.parse(k);if(l.manifestUrl&&l.trackingUrl)m=new se(b),n=new se(l.trackingUrl),a.G=m.resolve(n).toString(),p=Date.now()/1E3,r=p-a.R,a.i(new U("ads-loaded",(new Map).set("loadTime",r))),u=new se(l.manifestUrl),a.l.resolve(m.resolve(u).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
822
823
  return xa(v,0)}ya(v);if(!a.H.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,v.return();a.l.resolve(a.H);a.l=null;H(v)})}
823
824
  function yq(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,y,z;P(function(B){if(1==B.g)return d={type:8},e=th([b],Yg()),f=a.K.request(7,e,d),va(B,2),F(B,f.promise,4);if(2!=B.g){g=B.h;h=[];k=Dc(g.data);l=JSON.parse(k);if(0<l.avails.length){if(JSON.stringify(a.j)!=JSON.stringify(l.avails)){a.j=l.avails;m=t(a.j);for(n=m.next();!n.done;n=m.next())for(p=n.value,r=t(p.nonLinearAdsList),u=r.next();!u.done;u=r.next())for(v=u.value,w=t(v.nonLinearAdList),y=w.next();!y.done;y=w.next())z=y.value,Aq(a,z);h=a.getCuePoints();
824
825
  a.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",h)))}}else a.j.length&&a.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",h))),xq(a),a.j=[];c&&(a.I||0<h.length)&&Bq(a);return xa(B,0)}ya(B);H(B)})}
@@ -851,11 +852,11 @@ q.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!goo
851
852
  q.onAssetUnload=function(){this.h&&this.h.stop();this.j&&this.j.stop();this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new U("ad-stopped"));this.dispatchEvent(new U("ad-content-attach-requested"));this.m=new Zp};q.requestClientSideAds=function(a){if(!this.j)throw new T(1,10,10001);var b=this.j;b.g&&b.g.destroy();b.m&&b.m.contentComplete();b.G=Date.now()/1E3;b.m.requestAds(a)};
852
853
  q.updateClientSideAdsRenderingSettings=function(a){if(!this.j)throw new T(1,10,10001);var b=this.j;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};q.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new wq(a,b,c,function(e){return Kq(d,e)})};q.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new T(1,10,10005);var d=this.i;c=void 0===c?"":c;d.l?a=Promise.reject(new T(1,10,10004)):(d.l=new $g,zq(d,a,b),d.H=c||"",d.R=Date.now()/1E3,a=d.l);return a};
853
854
  q.addMediaTailorTrackingUrl=function(a){if(!this.i)throw new T(1,10,10005);var b=this.i;b.G=a;b.i(new U("ads-loaded",(new Map).set("loadTime",0)))};q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new T(2,10,10002);this.g&&this.g.release();this.g=new Iq(a,b,this.o,function(d){return Kq(c,d)});this.g.configure(this.l)};
854
- q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&$a('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.11.12";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
855
- (c.G=!0),c.j=new $g,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&$a('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.11.12";this.g.g.replaceAdTagParameters(a)};
855
+ q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&$a('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.11.13";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
856
+ (c.G=!0),c.j=new $g,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&$a('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.11.13";this.g.g.replaceAdTagParameters(a)};
856
857
  q.getServerSideCuePoints=function(){rb("AdManager.getServerSideCuePoints","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.m;return{loadTimes:a.g,averageLoadTime:$p(a),started:a.h,playedCompletely:a.j,skipped:a.l,errors:a.i}};q.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)};
857
858
  q.onDashTimedMetadata=function(a){this.g&&"urn:google:dai:2018"==a.schemeIdUri&&this.g.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,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)};q.onHLSInterstitialMetadata=function(a,b,c){this.h||this.initInterstitial(null,a,b);this.h&&rq(this.h,c)};
858
- q.onDASHInterstitialMetadata=function(a,b,c){if("urn:mpeg:dash:event:alternativeMPD:2022"==c.schemeIdUri&&(this.h||this.initInterstitial(null,a,b),this.h)){a=this.h;b=t(c.eventNode.children);for(var d=b.next();!d.done;d=b.next()){var e=d.value;if("AlternativeMPD"==e.tagName&&(d=e.attributes.uri,e=e.attributes.mode,d)){var f=d;var g=e;break}}f?(b="replace"==g,g="insert"==g,(b||g)&&tq(a,[{id:null,startTime:c.startTime,endTime:b?c.endTime:null,uri:f,isSkippable:!1,skipOffset:null,canJump:!0,resumeOffset:g?
859
+ q.onDASHInterstitialMetadata=function(a,b,c){if("urn:mpeg:dash:event:alternativeMPD:2022"==c.schemeIdUri&&(this.h||this.initInterstitial(null,a,b),this.h)){a=this.h;b=t(c.eventNode.children);for(var d=b.next();!d.done;d=b.next()){var e=d.value;if("AlternativeMPD"==e.tagName&&(d=e.attributes.uri,e=e.attributes.mode,d)){var f=d;var g=e;break}}f?(b="replace"==g,g="insert"==g,(b||g)&&tq(a,[{id:null,startTime:c.startTime,endTime:c.endTime,uri:f,isSkippable:!1,skipOffset:null,canJump:!0,resumeOffset:g?
859
860
  0:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:b&&!g}])):$a("Unsupported MPD alternate",c)}};q.addCustomInterstitial=function(a){if(!this.h)throw new T(1,10,10006);tq(this.h,[a])};q.addAdUrlInterstitial=function(a){if(!this.h)throw new T(1,10,10006);return this.h.addAdUrlInterstitial(a)};
860
861
  function Kq(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.m.g.push(b.loadTime);break;case "ad-started":a.m.h++;break;case "ad-complete":a.m.j++;break;case "ad-skipped":a.m.l++;break;case "ad-error":a.m.i++}a.dispatchEvent(b)}S("shaka.ads.AdManager",Y);Y.prototype.addAdUrlInterstitial=Y.prototype.addAdUrlInterstitial;Y.prototype.addCustomInterstitial=Y.prototype.addCustomInterstitial;Y.prototype.onDASHInterstitialMetadata=Y.prototype.onDASHInterstitialMetadata;
861
862
  Y.prototype.onHLSInterstitialMetadata=Y.prototype.onHLSInterstitialMetadata;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;Y.prototype.getCuePoints=Y.prototype.getCuePoints;Y.prototype.getServerSideCuePoints=Y.prototype.getServerSideCuePoints;
@@ -989,10 +990,10 @@ q.get=function(a){var b=this;a-=this.i;if(0>a||a>=this.getNumReferences()||!this
989
990
  null==y.ue&&(y.ue=Pt(b.h.cc,b.F,e,b.B,f,y.kh,b.C,b.H));return y.ue}}(r),0,null,this.s,c,this.j,this.l,[],"",null,null,Yi,this.A);r.codecs=k;r.mimeType=l;r.bandwidth=m;0==this.G?0<u&&r.Mc():0!=u%this.G&&r.Mc();n.push(r)}c=new Xi(this.j+d.start,h,function(){return 0<d.Cb||!b.h?[]:Pt(b.h.cc,b.F,e,b.B,f,null,b.C,b.H)},0,null,this.s,c,this.j,this.l,n,"",null,null,Yi,this.A,0<d.Cb);c.codecs=k;c.mimeType=l;c.j=g;c.bandwidth=m;this.g[a]=c}return c};
990
991
  q.yb=function(a){Nt(this);for(var b=0;b<this.getNumReferences();b++){var c=this.get(b+this.i);c&&a(c)}};function Pt(a,b,c,d,e,f,g,h){a=bt(a,b,c,f,d||null,e);return Qe(g(),[a],h()).map(function(k){return k.toString()})};function Qt(a){this.o=null;this.A=a;this.G=new mh;this.i=[];this.h=null;this.m=[];this.B=null;this.F=[];this.C=300;this.l=new Map;this.j=new Map;this.g=null;this.s="UNKNOWN"}Qt.prototype.configure=function(a){this.o=a};Qt.prototype.destroy=function(){this.A=this.o=null;this.i=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};Qt.prototype.setManifestType=function(a){this.s=a};
991
992
  function Rt(a,b){var c,d,e,f,g,h,k;return P(function(l){if(1==l.g)return c=Qe(a.i,[St(a,b)]),d=th(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),nh(a.G,e),va(l,2),F(l,e.promise,4);if(2!=l.g)return f=l.h,g=Dc(f.data),h=JSON.parse(g),1==h.VERSION&&Tt(a,h,f.uri),xa(l,0);if((k=ya(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Zb(function(){Rt(a,b)});a.g.Z(a.C);H(l)})}
992
- function St(a,b){if(!a.m.length)return b;b=new te(b);var c=a.B||a.m[0],d=Math.round(a.A.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)));Ie(e)&&xe(b,e);return b.toString()}function Tt(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Zb(function(){Rt(a,d)});if(c=b.TTL)a.C=c;a.g.Z(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
993
+ function St(a,b){if(!a.m.length)return b;b=new se(b);var c=a.B||a.m[0],d=Math.round(a.A.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)));Ie(e)&&xe(b,e);return b.toString()}function Tt(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Zb(function(){Rt(a,d)});if(c=b.TTL)a.C=c;a.g.Z(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
993
994
  function Ut(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}Qt.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
994
- function Vt(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e=t(a.m),f=e.next(),g={};!f.done;g={Qc:void 0},f=e.next())if(g.Qc=f.value,f=b.get(g.Qc))d.push({Ef:g.Qc,location:f});else if(f=a.F.find(function(k){return function(l){return l.xj==k.Qc}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].rh?(h=new te(h),ve(h,f["URI-REPLACEMENT"].rh),d.push({Ef:g.Qc,location:h.toString()})):d.push({Ef:g.Qc,location:h}))}e=Date.now();g=t(a.j.keys());for(f=g.next();!f.done;f=g.next())f=f.value,
995
- h=a.j.get(f),e>h&&a.j.delete(f);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new te(k.location)).Fb))return!1;return!0});d.length&&(a.B=d[0].Ef);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.B=a.h,d.push(g);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Qe(a.i,d)};function Wt(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.s=this.o=!1;this.m=new Set}q=Wt.prototype;q.release=function(){for(var a=t(this.h.concat(this.g,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.j=[];this.i=[];this.l=[];this.s=this.o=!1;this.m.clear()};q.fi=function(){return this.l};q.jf=function(){return this.j.slice()};q.Oh=function(){return this.i};
995
+ function Vt(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e=t(a.m),f=e.next(),g={};!f.done;g={Qc:void 0},f=e.next())if(g.Qc=f.value,f=b.get(g.Qc))d.push({Ef:g.Qc,location:f});else if(f=a.F.find(function(k){return function(l){return l.xj==k.Qc}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].rh?(h=new se(h),ve(h,f["URI-REPLACEMENT"].rh),d.push({Ef:g.Qc,location:h.toString()})):d.push({Ef:g.Qc,location:h}))}e=Date.now();g=t(a.j.keys());for(f=g.next();!f.done;f=g.next())f=f.value,
996
+ h=a.j.get(f),e>h&&a.j.delete(f);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new se(k.location)).Fb))return!1;return!0});d.length&&(a.B=d[0].Ef);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.B=a.h,d.push(g);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Qe(a.i,d)};function Wt(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.s=this.o=!1;this.m=new Set}q=Wt.prototype;q.release=function(){for(var a=t(this.h.concat(this.g,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.j=[];this.i=[];this.l=[];this.s=this.o=!1;this.m.clear()};q.fi=function(){return this.l};q.jf=function(){return this.j.slice()};q.Oh=function(){return this.i};
996
997
  q.og=function(a,b){if(a){if("audio"==a.type)for(var c=t(this.h),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("video"==a.type)for(c=t(this.g),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a}),d.trickModeVideo&&(d.trickModeVideo.matchedStreams=d.trickModeVideo.matchedStreams.filter(function(e){return e!==a}));else if(a.type==We)for(c=t(this.j),d=c.next();!d.done;d=c.next())d=
997
998
  d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("image"==a.type)for(c=t(this.i),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});a.segmentIndex&&a.closeSegmentIndex();this.m.delete(b)}};
998
999
  function Xt(a,b){var c=[],d=[],e=[],f=[];a=t(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[Yt(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[Zt(n),n]})),l=new Map(h.textStreams.map(function(n){return[$t(n),n]}));h=new Map(h.imageStreams.map(function(n){return[au(n),n]}));if(b){var m=bu(We);l.set($t(m),m);m=bu("image");h.set(au(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{hg:c,ph:d,lh:e,Dg:f}}
@@ -1033,16 +1034,16 @@ q.start=function(a,b){var c=this,d;return P(function(e){if(1==e.g)return c.H=b.i
1033
1034
  q.stop=function(){for(var a=t(Object.values(this.o)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.j=null;this.A=[];this.i=null;this.o={};this.B={};this.s.clear();this.l={Zd:"",type:"",profiles:[],Mb:null,Ta:0,Ja:null,td:0};this.m=null;null!=this.L&&(this.L.stop(),this.L=null);this.h&&this.h.destroy();this.G&&(this.G.release(),this.G=null);return this.R.destroy()};
1034
1035
  q.update=function(){var a=this,b;return P(function(c){if(1==c.g)return va(c,2),F(c,Ku(a),4);if(2!=c.g)return xa(c,0);b=ya(c);if(!a.j||!b)return c.return();a.j.onError(b);H(c)})};q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(a){if(this.i&&this.i.presentationTimeline.U()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.i.presentationTimeline.Yb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.K=b.endTime-a,Lu(this,0))}}};
1035
1036
  q.banLocation=function(a){this.h&&this.h.banLocation(a)};q.setMediaElement=function(a){this.I=a};
1036
- function Ku(a){var b,c,d,e,f,g,h,k,l,m,n;return P(function(p){if(1==p.g)return b=4,c="MPD",d=Mu(a),e=a.A,d.length?(e=d,c="Patch",b=6):1<a.A.length&&a.h&&(f=Vt(a.h,"Location",!0),f.length&&(e=f)),g=th(e,a.g.retryParameters),h=Date.now(),F(p,Nu(a,g,0,{type:b}),2);if(3!=p.g){k=p.h;if(!a.j)return p.return(0);k.uri&&k.uri!=k.originalUri&&!a.A.includes(k.uri)&&a.A.unshift(k.uri);l=new te(k.uri);a.ca=l.g.toString();return F(p,Ou(a,k.data,k.uri,c),3)}m=Date.now();n=(m-h)/1E3;a.oa.sample(1,n);return p.return(n)})}
1037
+ function Ku(a){var b,c,d,e,f,g,h,k,l,m,n;return P(function(p){if(1==p.g)return b=4,c="MPD",d=Mu(a),e=a.A,d.length?(e=d,c="Patch",b=6):1<a.A.length&&a.h&&(f=Vt(a.h,"Location",!0),f.length&&(e=f)),g=th(e,a.g.retryParameters),h=Date.now(),F(p,Nu(a,g,0,{type:b}),2);if(3!=p.g){k=p.h;if(!a.j)return p.return(0);k.uri&&k.uri!=k.originalUri&&!a.A.includes(k.uri)&&a.A.unshift(k.uri);l=new se(k.uri);a.ca=l.g.toString();return F(p,Ou(a,k.data,k.uri,c),3)}m=Date.now();n=(m-h)/1E3;a.oa.sample(1,n);return p.return(n)})}
1037
1038
  function Ou(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u;return P(function(v){if(1==v.g){e=b;f=a.g.dash.manifestPreprocessor;g=Om;if(f!=g){rb("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=Hu(e,d);if(!h)throw new T(2,4,4001,c);f(h);e=Ic(h.outerHTML)}k=Wc(e,d);if(!k)throw new T(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=Pm;l!=m&&l(k);if("Patch"===d)return v.return(Pu(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(Qu(a,k,c));
1038
1039
  p=a.g.dash.xlinkFailGracefully;r=ht(k,a.g.retryParameters,p,c,a.j.networkingEngine);nh(a.R,r);return F(v,r.promise,2)}u=v.h;return v.return(Qu(a,u,c))})}
1039
- function Qu(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,y,z,B,A,D,E,C,G,J,I,K,L,O,M,N,Q,R,X,ka,aa,ea,Aa,Ha,Ya,Pa,sa,Sa,qc,hb,cc,Hc,nb,Sc,oe,Nd,uf,pe,Zi,Rg,$i,Sg;return P(function(dc){switch(dc.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=ed(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=gd(l))p=Qe(d,[n])[0],m&&(a.h?Ut(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(r=Vt(a.h,"Location",!0),0<r.length&&(d=a.A=r)):e.length&&(d=a.A=e);a.l.Zd=b.attributes.id||
1040
+ function Qu(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,y,z,B,A,D,E,C,G,J,I,K,L,O,M,N,Q,R,X,ka,aa,ea,Aa,Ha,Ya,Pa,sa,Sa,qc,hb,cc,Hc,nb,Sc,qe,Nd,uf,re,$i,Rg,aj,Sg;return P(function(dc){switch(dc.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=ed(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=gd(l))p=Qe(d,[n])[0],m&&(a.h?Ut(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(r=Vt(a.h,"Location",!0),0<r.length&&(d=a.A=r)):e.length&&(d=a.A=e);a.l.Zd=b.attributes.id||
1040
1041
  "";a.l.td=ld(b,"publishTime",od)||0;a.F=ed(b,"PatchLocation");u=Promise.resolve();if((v=id(b,"ContentSteering"))&&a.j){w=v.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new Qt(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,y=gd(v))(z=ld(v,"queryBeforeStart",vd,!1))?u=Rt(a.h,y):Rt(a.h,y);B=t(f.keys());for(A=B.next();!A.done;A=B.next())D=A.value,E=f.get(D),Ut(a.h,"Location",D,E)}C=ed(b,"BaseURL");G=!1;if(a.h)for(J=t(C),I=J.next();!I.done;I=J.next())K=I.value,
1041
1042
  L=K.attributes.serviceLocation,O=gd(K),L&&O&&(Ut(a.h,"BaseURL",L,O),G=!0);a.aa=null;G&&a.h||(M=C.map(gd),a.aa=Qe(d,M));N=function(){return a.h&&G?Vt(a.h,"BaseURL"):a.aa?a.aa:[]};a.l.Ja=N;Q=0;C&&C.length&&(Q=ld(C[0],"availabilityTimeOffset",ud)||0);a.l.Ta=Q;R=a.g.dash.ignoreMinBufferTime;X=0;R||(X=ld(b,"minBufferTime",pd)||0);a.K=ld(b,"minimumUpdatePeriod",pd,-1);ka=ld(b,"availabilityStartTime",od);aa=ld(b,"timeShiftBufferDepth",pd);ea=a.g.dash.ignoreSuggestedPresentationDelay;Aa=null;ea||(Aa=ld(b,
1042
1043
  "suggestedPresentationDelay",pd));Ha=a.g.dash.ignoreMaxSegmentDuration;Ya=null;Ha||(Ya=ld(b,"maxSegmentDuration",pd));Pa=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.X=a.i.presentationTimeline.U()&&"static"==Pa);a.l.type=Pa;Ru(a);if(a.i)for(sa=a.i.presentationTimeline,Sa=t(Object.values(a.o)),qc=Sa.next();!qc.done;qc=Sa.next())hb=qc.value,hb.segmentIndex&&hb.segmentIndex.Ga(sa.pb());else cc=a.g.defaultPresentationDelay||1.5*X,Hc=null!=Aa?Aa:cc,sa=new Kk(ka,Hc,a.g.dash.autoCorrectDrift);
1043
- sa.xc("static"==Pa);(nb=sa.U())&&!isNaN(a.g.availabilityWindowOverride)&&(aa=a.g.availabilityWindowOverride);null==aa&&(aa=Infinity);sa.oe(aa);Sc=b.attributes.profiles||"";a.l.profiles=Sc.split(",");oe={xb:"static"!=Pa,presentationTimeline:sa,na:null,ia:null,ga:null,J:null,bandwidth:0,lf:!1,Ta:Q,Mb:null,profiles:Sc.split(","),roles:null,nb:function(){return""}};a.M=0;Nd=Su(a,oe,N,b,!1);uf=Nd.duration;pe=Nd.periods;("static"!=Pa||a.X)&&Nd.qg||sa.$a(uf||Infinity);a.ja&&!a.H&&(Zi=a.j.isAutoLowLatencyMode())&&
1044
- (a.j.enableLowLatencyMode(),a.H=a.j.isLowLatencyMode());a.H&&sa.Zg(a.ea);sa.yf(Ya||1);return F(dc,u,2);case 2:a.H&&(X=0,Rg=null!=Aa?Aa:a.g.defaultPresentationDelay,sa.Pf(Rg));if(!a.i)return F(dc,a.m.Ke(pe,oe.xb),6);a.i.periodCount=pe.length;a.i.gapCount=a.M;return F(dc,Tu(a,pe,!1),4);case 6:a.i={presentationTimeline:sa,variants:a.m.l,textStreams:a.m.jf(),imageStreams:a.m.i,offlineSessionIds:[],minBufferTime:X||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",
1045
- serviceDescription:Uu(b),nextUrl:Vu(b),periodCount:pe.length,gapCount:a.M,isLowLatency:a.ja,startTime:null};if(!sa.nh()){dc.u(7);break}$i=ed(b,"UTCTiming");return F(dc,Wu(a,N,$i),8);case 8:Sg=dc.h;if(!a.j)return dc.return();sa.$g(Sg);case 7:sa.Vd();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),H(dc)}})}function Tu(a,b,c){var d;return P(function(e){if(1==e.g)return F(e,a.m.Ke(b,!0,c),2);a.i.variants=a.m.l;d=a.m.jf();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);H(e)})}
1044
+ sa.xc("static"==Pa);(nb=sa.U())&&!isNaN(a.g.availabilityWindowOverride)&&(aa=a.g.availabilityWindowOverride);null==aa&&(aa=Infinity);sa.oe(aa);Sc=b.attributes.profiles||"";a.l.profiles=Sc.split(",");qe={xb:"static"!=Pa,presentationTimeline:sa,na:null,ia:null,ga:null,J:null,bandwidth:0,lf:!1,Ta:Q,Mb:null,profiles:Sc.split(","),roles:null,nb:function(){return""}};a.M=0;Nd=Su(a,qe,N,b,!1);uf=Nd.duration;re=Nd.periods;("static"!=Pa||a.X)&&Nd.qg||sa.$a(uf||Infinity);a.ja&&!a.H&&($i=a.j.isAutoLowLatencyMode())&&
1045
+ (a.j.enableLowLatencyMode(),a.H=a.j.isLowLatencyMode());a.H&&sa.Zg(a.ea);sa.yf(Ya||1);return F(dc,u,2);case 2:a.H&&(X=0,Rg=null!=Aa?Aa:a.g.defaultPresentationDelay,sa.Pf(Rg));if(!a.i)return F(dc,a.m.Ke(re,qe.xb),6);a.i.periodCount=re.length;a.i.gapCount=a.M;return F(dc,Tu(a,re,!1),4);case 6:a.i={presentationTimeline:sa,variants:a.m.l,textStreams:a.m.jf(),imageStreams:a.m.i,offlineSessionIds:[],minBufferTime:X||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",
1046
+ serviceDescription:Uu(b),nextUrl:Vu(b),periodCount:re.length,gapCount:a.M,isLowLatency:a.ja,startTime:null};if(!sa.nh()){dc.u(7);break}aj=ed(b,"UTCTiming");return F(dc,Wu(a,N,aj),8);case 8:Sg=dc.h;if(!a.j)return dc.return();sa.$g(Sg);case 7:sa.Vd();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),H(dc)}})}function Tu(a,b,c){var d;return P(function(e){if(1==e.g)return F(e,a.m.Ke(b,!0,c),2);a.i.variants=a.m.l;d=a.m.jf();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);H(e)})}
1046
1047
  function Pu(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,y,z,B,A,D,E,C,G,J,I,K,L;return P(function(O){if(1==O.g){c=b.attributes.mpdId;d=ld(b,"originalPublishTime",od);if(!c||c!==a.l.Zd||d!==a.l.td)throw a.F=[],new T(1,4,4052);e=[];f=[];g=new Set;h=t(dd(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=xd(l.attributes.sel||""),n=m[m.length-1],p=gd(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.Ub){r=gd(l)||"";var M=pd(r);if(null!=M){a.l.Mb=M;for(var N=t(a.s.values()),Q=N.next();!Q.done;Q=N.next())Q.value.Mb=
1047
1048
  M}}else if("type"===n.Ub){a.i.presentationTimeline.xc("static"==p);a.l.type=p;M=t(a.s.values());for(N=M.next();!N.done;N=M.next())N.value.xb="dynamic"==p;"static"==p&&(a.K=-1)}else"publishTime"===n.Ub?a.l.td=od(p)||0:null===n.Ub&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)yd(a.F,l);else if("Period"===n.name)"add"===l.tagName?f.push(l):"remove"===l.tagName&&n.id&&Xu(a,n.id);else if("SegmentTemplate"===n.name){N=xd(l.attributes.sel||"");M=N[N.length-1];if(M.Ub){N=Yu(a,N);Q=gd(l)||
1048
1049
  "";for(var R=t(N),X=R.next();!X.done;X=R.next())X=a.s.get(X.value),Bd(X.J.ec,l.tagName,M.Ub,Q);M=N}else M=[];u=M;v=t(u);for(w=v.next();!w.done;w=v.next())y=w.value,g.add(y)}else if("SegmentTimeline"===n.name||"S"===n.name){M=xd(l.attributes.sel||"");M=Yu(a,M);N=t(M);for(Q=N.next();!Q.done;Q=N.next())Q=a.s.get(Q.value),Q=et(Q,Gt,"SegmentTimeline"),R=ed(Q,"S"),yd(R,l),Q.children=R;z=M;B=t(z);for(A=B.next();!A.done;A=B.next())D=A.value,g.add(D)}E=t(g);for(C=E.next();!C.done;C=E.next())G=C.value,Zu(a,
@@ -1101,7 +1102,7 @@ q.start=function(a,b){var c=this,d;return P(function(e){return 1==e.g?(c.h=b,c.K
1101
1102
  q.stop=function(){this.B&&(this.B.stop(),this.B=null);var a=[];this.ea&&(a.push(this.ea.destroy()),this.ea=null);this.g=this.h=null;this.gb.clear();this.m=null;this.i.clear();this.H.clear();this.G.clear();this.A.clear();this.sa.clear();this.la.clear();this.L.clear();this.oa.clear();this.ra.clear();this.Da.clear();this.j&&this.j.destroy();this.aa&&(this.aa.release(),this.aa=null);return Promise.all(a)};
1102
1103
  q.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m,n,p;return P(function(r){if(1==r.g){if(!ew(a))return r.return();b=[];c=Array.from(a.i.values());a.o=Infinity;a.m.gapCount=0;d=c.filter(function(u){return u.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(fw(a,g));return F(r,Promise.all(b),2)}gw(a,d.map(function(u){return u.stream}));h=d.some(function(u){return 0==u.gd});d.length&&!h&&(k=hw,iw(a,k.sh),l=d.map(function(u){return u.Lb}),a.l.$a(Math.min.apply(Math,x(l))),
1103
1104
  a.h.updateDuration());h&&jw(a);m=t(d);for(n=m.next();!n.done;n=m.next())p=n.value,p.stream.segmentIndex&&!ng(p.stream.segmentIndex)&&a.h.disableStream(p.stream);H(r)})};function kw(a,b){return ew(a)?a.O.get(b.type):b.Wd}
1104
- function fw(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,y,z,B,A,D,E,C,G,J,I,K,L,O,M,N,Q,R,X,ka,aa;return P(function(ea){switch(ea.g){case 1:c=[];d=t(b.N());for(e=d.next();!e.done;e=d.next())f=e.value,g=new te(f),h=g.g,b.Ed&&(0<=b.rb&&h.add("_HLS_msn",String(b.rb)),0<=b.sb&&h.add("_HLS_part",String(b.sb))),b.Fd&&h.add("_HLS_skip","YES"),Ie(h)&&xe(g,h),c.push(g.toString());va(ea,2);return F(ea,cw(a,c,!0).promise,4);case 4:k=ea.h;xa(ea,3);break;case 2:throw l=ya(ea),a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return ea.return();
1105
+ function fw(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,y,z,B,A,D,E,C,G,J,I,K,L,O,M,N,Q,R,X,ka,aa;return P(function(ea){switch(ea.g){case 1:c=[];d=t(b.N());for(e=d.next();!e.done;e=d.next())f=e.value,g=new se(f),h=g.g,b.Ed&&(0<=b.rb&&h.add("_HLS_msn",String(b.rb)),0<=b.sb&&h.add("_HLS_part",String(b.sb))),b.Fd&&h.add("_HLS_skip","YES"),Ie(h)&&xe(g,h),c.push(g.toString());va(ea,2);return F(ea,cw(a,c,!0).promise,4);case 4:k=ea.h;xa(ea,3);break;case 2:throw l=ya(ea),a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return ea.return();
1105
1106
  m=Tv(a.Ua,k.data);if(1!=m.type)throw new T(2,4,4017);n=k.uri;n==k.originalUri||b.N().includes(n)||b.Sg.push(n);p=Lv(m.W,"EXT-X-DEFINE");r=lw(a,p,n);u=b.stream;v=kw(a,b);return F(ea,mw(a,m,u.mimeType,b.N,r),5);case 5:w=ea.h;y=w.keyIds;z=w.drmInfos;B=function(Aa,Ha){return Aa.size===Ha.size&&[].concat(x(Aa)).every(function(Ya){return Ha.has(Ya)})};B(u.keyIds,y)||(u.keyIds=y,u.drmInfos=z,a.h.newDrmInfo(u));A=nw(a,m,v,r,b.N,b.type);D=A.segments;if(E=A.bandwidth)u.bandwidth=E;C=Ll(u);G=t(D);for(J=G.next();!J.done;J=
1106
1107
  G.next())I=J.value,I.$&&(I.$.Nc=C);u.segmentIndex.qd(D,a.l.pb());D.length&&(K=Ov(m.W,"EXT-X-MEDIA-SEQUENCE",0),O=(L=Nv(m.W,"EXT-X-SKIP"))?Number(Z(L,"SKIPPED-SEGMENTS")):0,M=ow(K,D),N=M.rb,Q=M.sb,b.rb=N+O,b.sb=Q,R=v.get(K),u.segmentIndex.Ga(R));if(X=ng(u.segmentIndex))b.tc=X.startTime,ka=D[D.length-1],b.Lb=ka.endTime;if(aa=Nv(m.W,"EXT-X-ENDLIST"))b.gd=!0;pw(a,m);qw(a,m.W,u.type,r,b.N);H(ea)}})}q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};
1107
1108
  q.banLocation=function(a){this.j&&this.j.banLocation(a)};q.setMediaElement=function(a){this.ca=a};
@@ -1114,13 +1115,13 @@ v=Lv(e.W,"EXT-X-I-FRAME-STREAM-INF");w=Lv(e.W,"EXT-X-SESSION-KEY");y=Lv(e.W,"EXT
1114
1115
  audio:"audio"==m?C.stream:null,video:"video"==m?C.stream:null,bandwidth:C.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new T(2,7,7001);Fw(a,e);1==e.type&&(ew(a)&&(Gw(a,e),J=a.o,a.B.Z(J)),I=Array.from(a.i.values()),Hw(a,I),jw(a),qw(a,e.W,m,n,l));a.m={presentationTimeline:a.l,variants:g,textStreams:h,imageStreams:k,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,
1115
1116
  type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:a.s};if(a.fa||!a.g.hls.disableCodecGuessing){aa.u(8);break}K=[];L=t(a.m.variants);for(O=L.next();!O.done;O=L.next())M=O.value,M.audio&&""===M.audio.codecs&&K.push(M.audio.createSegmentIndex()),M.video&&""===M.video.codecs&&K.push(M.video.createSegmentIndex());return F(aa,Promise.all(K),8);case 8:a.h.makeTextStreamsForClosedCaptions(a.m);if(1==g.length){N=[];Q=g[0];R=t([Q.video,Q.audio]);for(X=R.next();!X.done;X=
1116
1117
  R.next())(ka=X.value)&&!ka.segmentIndex&&N.push(ka.createSegmentIndex());if(0<N.length)return F(aa,Promise.all(N),0)}aa.u(0)}})}
1117
- function Iw(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,y,z,B,A,D,E,C,G;return P(function(J){switch(J.g){case 1:c=Ml(a.g.hls.mediaPlaylistFullMimeType);if(!b.length)return J.return(c);d=Jw(a,b);e=d.segment;f=d.segmentIndex;g=e.N();h=g[0];k=new te(h);l=k.Ra.split(".").pop();if(m=Kw[l])return J.return(Ml(m));n=zh;r=p=null;u=e.$;if(!u){J.u(2);break}v=Sl(u.N(),u.Zb(),u.Xb(),a.g.retryParameters);return F(J,Lw(a,v,n,{type:0}).promise,3);case 3:w=J.h;p=w.data;if(!u.aesKey){J.u(4);break}return F(J,Rl(p,u.aesKey,
1118
+ function Iw(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,y,z,B,A,D,E,C,G;return P(function(J){switch(J.g){case 1:c=Ml(a.g.hls.mediaPlaylistFullMimeType);if(!b.length)return J.return(c);d=Jw(a,b);e=d.segment;f=d.segmentIndex;g=e.N();h=g[0];k=new se(h);l=k.Ra.split(".").pop();if(m=Kw[l])return J.return(Ml(m));n=zh;r=p=null;u=e.$;if(!u){J.u(2);break}v=Sl(u.N(),u.Zb(),u.Xb(),a.g.retryParameters);return F(J,Lw(a,v,n,{type:0}).promise,3);case 3:w=J.h;p=w.data;if(!u.aesKey){J.u(4);break}return F(J,Rl(p,u.aesKey,
1118
1119
  0),5);case 5:p=J.h;case 4:(r=w.headers["content-type"])&&(r=r.split(";")[0].toLowerCase());case 2:return y=Sl(e.N(),e.Zb(),e.Xb(),a.g.retryParameters),F(J,Lw(a,y,n,{type:1}).promise,6);case 6:z=J.h;B=z.data;if(!e.aesKey){J.u(7);break}return F(J,Rl(B,e.aesKey,f),8);case 8:B=J.h;case 7:(A=z.headers["content-type"])&&(A=A.split(";")[0].toLowerCase());D="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" ");E=["audio/mp4","video/mp4","video/iso.segment"];if(Yj(Ab(B))){var I=B;var K=Ab(I);K=(new Qj).parse(K);
1119
1120
  var L=K.cd();K=K.kf();var O=[],M=!1,N=!1;switch(L.audio){case "aac":case "aac-loas":O.push("mp4a.40.2");M=!0;break;case "mp3":O.push("mp4a.40.34");M=!0;break;case "ac3":O.push("ac-3");M=!0;break;case "ec3":O.push("ec-3");M=!0;break;case "opus":O.push("opus"),M=!0}switch(L.video){case "avc":K.codec?O.push(K.codec):O.push("avc1.42E01E");N=!0;break;case "hvc":K.codec?O.push(K.codec):O.push("hvc1.1.6.L93.90");N=!0;break;case "av1":O.push("av01.0.01M.08"),N=!0}if(O.length){L=M&&!N;M=new Map;if(N){N=new Hb("video/mp2t");
1120
1121
  N.i(I);I=t(N.j());for(var Q=I.next();!Q.done;Q=I.next())Q=Q.value,M.set(Q,Q);N.g()}K={type:L?"audio":"video",mimeType:"video/mp2t",codecs:O.join(", "),language:null,height:K.height,width:K.width,channelCount:null,sampleRate:null,closedCaptions:M,xd:null,colorGamut:null,frameRate:K.frameRate}}else K=null;if(C=K)return J.return(C)}else if(D.includes(l)||E.includes(A)||r&&E.includes(r))if(G=Nl(p,B))return J.return(G);return A?J.return(Ml(A)):r?J.return(Ml(r)):J.return(c)}})}
1121
1122
  function jw(a){if(ew(a)){if(a.za==Mw){for(var b=Infinity,c=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.Lb),c=Math.min(c,e.tc));b=b-c||0;isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.oe(b)}}else a.l.$a(Nw(a));if(!a.l.s)for(b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=ng(c.stream.segmentIndex))&&c.h&&a.l.ah(c.h);
1122
- a.l.Vd()}function ww(a,b){var c=(new te(a.M)).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.A.has(d)||a.A.set(d,f));e&&(d=c.get(e)[0])&&!a.A.has(d)&&a.A.set(e,d)}}
1123
- function lw(a,b,c){c=(new te(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.A.get(f))&&d.set(f,e)}return d}
1123
+ a.l.Vd()}function ww(a,b){var c=(new se(a.M)).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.A.has(d)||a.A.set(d,f));e&&(d=c.get(e)[0])&&!a.A.has(d)&&a.A.set(e,d)}}
1124
+ function lw(a,b,c){c=(new se(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.A.get(f))&&d.set(f,e)}return d}
1124
1125
  function zw(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=Ow(a,d);if(f){var g=Ue(We,d);a.G.set(f,g);Ob(d,g)}e&&(f=Ue("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.G.set(e,f));c&&(e=Ue("video",d),e||(e=a.g.hls.defaultVideoCodec),a.G.set(c,e))}}
1125
1126
  function xw(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"DATA-ID");c=Z(d,"URI");var f=Z(d,"LANGUAGE");d=Z(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",Pv([a.M],c,a.A)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new U("sessiondata",e);if(a.h)a.h.onEvent(c)}}
1126
1127
  function yw(a,b){var c,d,e,f,g,h;return P(function(k){if(!a.h||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Z(f,"PATHWAY-ID"),h=Z(f,"SERVER-URI"),g&&h){a.j=new Qt(a.h);a.j.configure(a.g);a.j.i=[a.M];a.j.setManifestType("HLS");a.j.h=g;c=Rt(a.j,h);break}return F(k,c,0)})}
@@ -1170,7 +1171,7 @@ function pw(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<
1170
1171
  Hv(b,"HOLD-BACK"):null,a.Ea=c?Number(c.value):0);a.cb=Math.max(d,a.cb)}function Gw(a,b){var c=0;if(a.g.defaultPresentationDelay)c=a.g.defaultPresentationDelay;else if(a.Fa)c=a.Fa;else if(a.Ea)c=a.Ea;else{var d=b.segments.length,e=a.g.hls.liveSegmentsDelay;e>d-2&&(e=Math.max(1,d-2));for(e=d-e;e<d;e++){var f=Nv(b.segments[e].W,"EXTINF");c=f?c+Math.ceil(Number(f.value.split(",")[0])):c+a.cb}}a.s&&0>a.s&&(c=Math.min(-a.s,c),a.s+=c);a.l.bh(0);a.l.Pf(c);a.l.xc(!1)}
1171
1172
  function kx(a,b,c,d,e){var f=Nv(c,"EXT-X-MAP");if(!f)return null;var g=Iv(f,"URI"),h=Pv(d(),g,e);g=[h.toString(),Z(f,"BYTERANGE","")].join("-");if(!a.sa.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?Ww(Iv(m,"METHOD"))&&m.id<f.id&&(k=lx(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=nx(h,f,l,k);a.sa.set(g,b)}return a.sa.get(g)}
1172
1173
  function nx(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 Vi(function(){return a},e,f,null,null,null,d)}
1173
- function ox(a,b,c,d,e,f,g,h,k){function l(X){X=(new te(X)).Ra.split(".").pop();var ka=px[g][X];ka||(ka=Kw[X]);return ka}var m=d.W,n=Nv(m,"EXTINF"),p=0,r=0,u=null;d.Cb.length&&(a.m.isLowLatency=!0);var v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Nv(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=od(w.value),a.bc=!0)}var y=Yi;Nv(m,"EXT-X-GAP")&&(a.m.gapCount++,y=2);if(!n){if(0==d.Cb.length)throw new T(2,4,4024,"EXTINF");if(!a.K)return null}var z=[];w=!1;var B=null,A=!1,D=!1;if(a.K&&d.Cb.length){p=
1174
+ function ox(a,b,c,d,e,f,g,h,k){function l(X){X=(new se(X)).Ra.split(".").pop();var ka=px[g][X];ka||(ka=Kw[X]);return ka}var m=d.W,n=Nv(m,"EXTINF"),p=0,r=0,u=null;d.Cb.length&&(a.m.isLowLatency=!0);var v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Nv(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=od(w.value),a.bc=!0)}var y=Yi;Nv(m,"EXT-X-GAP")&&(a.m.gapCount++,y=2);if(!n){if(0==d.Cb.length)throw new T(2,4,4024,"EXTINF");if(!a.K)return null}var z=[];w=!1;var B=null,A=!1,D=!1;if(a.K&&d.Cb.length){p=
1174
1175
  b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var E=v,C={},G=0;G<d.Cb.length;C={ve:void 0,ee:void 0},G++){var J=d.Cb[G],I=0==G?c:z[z.length-1],K=0==G?e:I.endTime,L=Number(Z(J,"DURATION"))||a.X;if(L){var O=K+L,M=0,N=null;"EXT-X-PRELOAD-HINT"==J.name?(M=(M=Z(J,"BYTERANGE-START"))?Number(M):0,(I=Z(J,"BYTERANGE-LENGTH"))?N=M+Number(I)-1:M&&(N=Number.MAX_SAFE_INTEGER)):(M=Z(J,"BYTERANGE"),N=t(qx(I,M)),M=N.next().value,N=N.next().value);C.ee=Z(J,"URI");if(C.ee){I=Yi;"YES"==
1175
1176
  Z(J,"GAP")&&(a.m.gapCount++,I=2,A=!0);C.ve=null;var Q=function(X){return function(){null==X.ve&&(X.ve=Pv(h(),X.ee,f));return X.ve}}(C);p&&0<=M&&null!=N&&(B=Q,w=!0);K=new Xi(K,O,Q,M,N,b,0,0,Infinity,[],"",null,E,I,k);"EXT-X-PRELOAD-HINT"==J.name&&(K.xf(),D=!0);"YES"!=Z(J,"INDEPENDENT")&&0<G&&K.Mc();if(C=l(C.ee))K.mimeType=C,rx.has(C)&&(K.$=null);z.push(K);E&&(E+=L)}}}}if(n){n=Number(n.value.split(",")[0]);if(0==n)return null;p=e+n}else if(z.length)p=z[z.length-1].endTime;else return null;w&&(A||0!=
1176
1177
  z[0].Ha?(w=!1,B=null):z=[]);(n=Nv(m,"EXT-X-BYTERANGE"))?(u=t(qx(c,n.value)),r=u.next().value,u=u.next().value):z.length&&(r=z[0].Ha,u=z[z.length-1].ua);c="";n=null;"image"==g&&(c="1x1",m=Nv(m,"EXT-X-TILES"))&&(c=Iv(m,"LAYOUT"),(m=Z(m,"DURATION"))&&(n=Number(m)));var R=null;b=new Xi(e,p,function(){if(B)return B();null==R&&(R=Pv(h(),d.g,f));return R||[]},r,u,b,0,0,Infinity,z,c,n,v,y,k,0<z.length&&!!d.g);if(e=l(d.g))b.mimeType=e,rx.has(e)&&(b.$=null);w&&(a.Ib=!0,b.Hg(),D&&b.xf());return b}
@@ -1183,7 +1184,7 @@ function nw(a,b,c,d,e,f){var g=b.segments,h=void 0,k=Ov(b.W,"EXT-X-DISCONTINUITY
1183
1184
  0)/b*1E3));if(m=u.some(function(D){return null!=D.h}))for(c={},d=0;d<u.length;c={Jd:void 0,Id:void 0,Bd:void 0,vc:void 0,zd:void 0},d++)if(c.vc=u[d],null==c.vc.h)for(c.Id=0,c.Jd=d,e=function(D){return function(){var E=u[D.Jd];if(E){if(null!=E.h)return E.h+D.Id;D.Id-=E.endTime-E.startTime;D.Jd+=1}return null}}(c),c.zd=0,c.Bd=d,g=function(D){return function(){var E=u[D.Bd];if(E){E!=D.vc&&(D.zd+=E.endTime-E.startTime);if(null!=E.h)return E.h+D.zd;--D.Bd}return null}}(c);null==c.vc.h;)c.vc.h=g(),null==
1184
1185
  c.vc.h&&(c.vc.h=e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),g=e.next();!g.done;g=e.next())g=g.value,g.h=d,d+=g.endTime-g.startTime;c=a.ja;if(m&&Infinity!=c&&!sw(a,f))for(a=t(u),f=a.next();!f.done;f=a.next())f.value.Vf(c);return{segments:u,bandwidth:b}}
1185
1186
  function Qw(a,b){if(a==We){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 Rw(a){return a==We?"text/vtt":px[a].mp4}function Jw(a,b){a=ew(a)?Math.trunc((b.length-1)/2):0;for(var c=b[a];2==c.$b()&&a+1<b.length;)a++,c=b[a];return{segment:c,segmentIndex:a}}
1186
- function jx(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,y;return P(function(z){switch(z.g){case 1:e=zh;f=Jw(a,d);g=f.segment;if(2==g.status)return z.return(Rw(b));h=g.N();k=new te(h[0]);l=k.Ra.split(".").pop();m=px[b];if((n=m[l])||(n=Kw[l])||(n=Qw(b,c)))return z.return(n);r=1;u=th(h,a.g.retryParameters);va(z,2);u.method="HEAD";return F(z,Lw(a,u,e,{type:r}).promise,4);case 4:v=z.h;p=v.headers["content-type"];xa(z,3);break;case 2:w=ya(z);if(!w||1002!=w.code&&1001!=w.code){z.u(3);break}u.method="GET";return F(z,
1187
+ function jx(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,y;return P(function(z){switch(z.g){case 1:e=zh;f=Jw(a,d);g=f.segment;if(2==g.status)return z.return(Rw(b));h=g.N();k=new se(h[0]);l=k.Ra.split(".").pop();m=px[b];if((n=m[l])||(n=Kw[l])||(n=Qw(b,c)))return z.return(n);r=1;u=th(h,a.g.retryParameters);va(z,2);u.method="HEAD";return F(z,Lw(a,u,e,{type:r}).promise,4);case 4:v=z.h;p=v.headers["content-type"];xa(z,3);break;case 2:w=ya(z);if(!w||1002!=w.code&&1001!=w.code){z.u(3);break}u.method="GET";return F(z,
1187
1188
  Lw(a,u,e,{type:r}).promise,6);case 6:y=z.h,p=y.headers["content-type"];case 3:return p?z.return(p.toLowerCase().split(";")[0]):z.return(Rw(b))}})}function ex(a,b,c,d,e,f,g){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,a.colorGamut=g||void 0)}function cw(a,b,c){return Lw(a,th(b,a.g.retryParameters),0,{type:c?2:3})}
1188
1189
  function aw(a){var b,c,d,e,f,g;return P(function(h){switch(h.g){case 1:if(!a.h)return h.return();va(h,2);b=Date.now();return F(h,a.update(),4);case 4:c=Date.now();ew(a)&&(d=(c-b)/1E3,a.Gb.sample(1,d),e=a.o,f=Math.max(0,e-Va(a.Gb)),a.B.Z(f));xa(h,3);break;case 2:g=ya(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.B.Z(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();H(h)}})}
1189
1190
  function ew(a){return a.za!=bw}function iw(a,b){a.za=b;a.l&&a.l.xc(!ew(a));ew(a)||a.B.stop()}function Lw(a,b,c,d){if(!a.ea)throw new T(2,7,7001);d||(d={});d.isPreload=a.Hb();b=a.h.networkingEngine.request(c,b,d);nh(a.ea,b);return b}function Ww(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
@@ -1373,7 +1374,7 @@ S("shaka.text.LrcTextParser",ZB);ZB.prototype.parseMedia=ZB.prototype.parseMedia
1373
1374
  bC.prototype.parseMedia=function(a,b,c,d){var e=Dc(a);a=[];if(""==e)return a;var f=Xc(e,"tt",!0);if(!f)throw new T(2,2,2005,"Failed to parse TTML.");e=hd(f,"body")[0];if(!e)return[];var g=nd(f,cC,"frameRate"),h=nd(f,cC,"subFrameRate"),k=nd(f,cC,"frameRateMultiplier"),l=nd(f,cC,"tickRate"),m=nd(f,cC,"cellResolution"),n=f.attributes["xml:space"]||"default",p=nd(f,dC,"extent");if("default"!=n&&"preserve"!=n)throw new T(2,2,2005,"Invalid xml:space value: "+n);n="default"==n;g=new eC(g,h,k,l);m=fC(m);
1374
1375
  h=hd(f,"metadata")[0];h=(h?h.children:[]).filter(function(v){return"\n"!=v});k=hd(f,"style");f=hd(f,"region");l=[];for(var r=t(f),u=r.next();!u.done;u=r.next())(u=gC(u.value,k,p))&&l.push(u);if(ed(e,"p").length)throw new T(2,2,2001,"<p> can only be inside <div> in TTML");p=t(ed(e,"div"));for(r=p.next();!r.done;r=p.next())if(ed(r.value,"span").length)throw new T(2,2,2001,"<span> can only be inside <p> in TTML");if(b=hC(e,b,g,h,k,f,l,n,m,null,!1,c,d))b.backgroundColor||(b.backgroundColor="transparent"),
1375
1376
  a.push(b);return a};
1376
- function hC(a,b,c,d,e,f,g,h,k,l,m,n,p){var r=l;if(cd(a)){if(!m)return null;var u={tagName:"span",children:[fd(a)],attributes:{},parent:null}}else u=a;for(var v=null,w=t(iC),y=w.next();!y.done&&!(v=jC(u,"backgroundImage",d,"#",y.value)[0]);y=w.next());w=null;y=nd(u,iC,"backgroundImage");var z=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(y&&z.test(y)){w=parseInt(y.split(":").pop(),10)-1;if(w>=p.length)return null;w=p[w]}else n&&y&&!y.startsWith("#")&&(z=new te(n),y=new te(y),(y=z.resolve(y).toString())&&
1377
+ function hC(a,b,c,d,e,f,g,h,k,l,m,n,p){var r=l;if(cd(a)){if(!m)return null;var u={tagName:"span",children:[fd(a)],attributes:{},parent:null}}else u=a;for(var v=null,w=t(iC),y=w.next();!y.done&&!(v=jC(u,"backgroundImage",d,"#",y.value)[0]);y=w.next());w=null;y=nd(u,iC,"backgroundImage");var z=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(y&&z.test(y)){w=parseInt(y.split(":").pop(),10)-1;if(w>=p.length)return null;w=p[w]}else n&&y&&!y.startsWith("#")&&(z=new se(n),y=new se(y),(y=z.resolve(y).toString())&&
1377
1378
  (w=y));if("p"==a.tagName||v||w)m=!0;a=m;y="default"==(u.attributes["xml:space"]||(h?"default":"preserve"));z=u.children.every(cd);h=[];if(!z)for(var B=t(u.children),A=B.next();!A.done;A=B.next())(A=hC(A.value,b,c,d,e,f,g,y,k,u,m,n,p))&&h.push(A);d=null!=l;n=fd(u);n=u.children.length&&n&&/\S/.test(n);B=u.attributes.begin||u.attributes.end||u.attributes.dur;if(!(B||n||"br"==u.tagName||0!=h.length||d&&!y))return null;p=kC(u,c);n=p.start;for(p=p.end;r&&r.tagName&&"tt"!=r.tagName;)p=lC(r,c,n,p),n=p.start,
1378
1379
  p=p.end,r=r.parent;null==n&&(n=0);n+=b.periodStart;p=null==p?Infinity:p+b.periodStart;n=Math.max(n,b.segmentStart);p=Math.min(p,b.segmentEnd);if(!B&&0<h.length)for(n=Infinity,p=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),p=Math.max(p,c.endTime);if("br"==u.tagName)return e=new Ed(n,p,""),e.lineBreak=!0,e;b="";z&&(b=Lc(fd(u)||""),y&&(b=b.replace(/\s+/g," ")));b=new Ed(n,p,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=jC(u,"region",f,"")[0];if(u.attributes.region&&
1379
1380
  k&&k.attributes["xml:id"]){var D=k.attributes["xml:id"];b.region=g.filter(function(E){return E.id==D})[0]}g=k;l&&d&&!u.attributes.region&&!u.attributes.style&&(g=jC(l,"region",f,"")[0]);mC(b,u,g,v,w,e,a,0==h.length);return b}
@@ -1423,15 +1424,15 @@ function bD(a,b){switch(a){case "mp4a.40.2":if(1===b)return new Uint8Array([0,20
1423
1424
  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 cD(a){this.i=a;this.h=0;this.g=new Map}q=cD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?mb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(mf(b)||"mp4a.40.2")+'"':b};q.getOriginalMimeType=function(){return this.i};
1424
1425
  q.transmux=function(a,b,c,d){for(var e=Ab(a),f=oj(e),g=f.length;g<e.length&&!aD(e,g);g++);a=1E3*c.endTime;f=nj(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=$C(e,g);if(!f)return Promise.reject(new T(2,3,3018,c?c.N()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=ZC(e,g);if(!k)return Promise.reject(new T(2,3,3018,c?c.N()[0]:null));var l=k.Od+k.da;g+l<=e.length&&h.push({data:e.subarray(g+
1425
1426
  k.Od,g+l),size:k.da,duration:1024,fb:0,flags:{jb:0,Ya:0,Xa:0,Va:0,Wa:2,kb:0}});g+=l}e=f.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:f.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,bb:[],pa:new Uint8Array([]),ya:new Uint8Array([]),Ba:0,Ca:0,data:{vb:this.h,baseMediaDecodeTime:a,Za:h},stream:b};d=new xx([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Dx(d),this.g.set(c,b));c=Ux(d);this.h++;b=Pe(b,c);return Promise.resolve(b)};
1426
- S("shaka.transmuxer.AacTransmuxer",cD);cD.prototype.transmux=cD.prototype.transmux;cD.prototype.getOriginalMimeType=cD.prototype.getOriginalMimeType;cD.prototype.convertCodecs=cD.prototype.convertCodecs;cD.prototype.isSupported=cD.prototype.isSupported;cD.prototype.destroy=cD.prototype.destroy;ie("audio/aac",function(){return new cD("audio/aac")},qe);function dD(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,
1427
+ S("shaka.transmuxer.AacTransmuxer",cD);cD.prototype.transmux=cD.prototype.transmux;cD.prototype.getOriginalMimeType=cD.prototype.getOriginalMimeType;cD.prototype.convertCodecs=cD.prototype.convertCodecs;cD.prototype.isSupported=cD.prototype.isSupported;cD.prototype.destroy=cD.prototype.destroy;ie("audio/aac",function(){return new cD("audio/aac")},oe);function dD(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,
1427
1428
  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,pa:a,da:e}}
1428
1429
  function eD(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 fD(a){this.i=a;this.h=0;this.g=new Map}q=fD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?mb(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};
1429
1430
  q.transmux=function(a,b,c,d){a=Ab(a);for(var e=oj(a),f=e.length;f<a.length&&!eD(a,f);f++);var g=1E3*c.endTime;e=nj(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=dD(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.N()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.pa;k.push({data:a.subarray(f,f+l.da),size:l.da,duration:1536,
1430
1431
  fb:0,flags:{jb:0,Ya:0,Xa:0,Va:0,Wa:2,kb:0}});f+=l.da}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,bb:[],pa:h,ya:new Uint8Array([]),Ba:0,Ca:0,data:{vb:this.h,baseMediaDecodeTime:a,Za:k},stream:b};d=new xx([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Dx(d),this.g.set(c,b));c=Ux(d);this.h++;b=Pe(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ac3Transmuxer",fD);fD.prototype.transmux=fD.prototype.transmux;
1431
- fD.prototype.getOriginalMimeType=fD.prototype.getOriginalMimeType;fD.prototype.convertCodecs=fD.prototype.convertCodecs;fD.prototype.isSupported=fD.prototype.isSupported;fD.prototype.destroy=fD.prototype.destroy;ie("audio/ac3",function(){return new fD("audio/ac3")},qe);function gD(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new yj(a.subarray(b+2));Aj(c,2);Aj(c,3);var d=Bj(c,11)+1<<1,e=Bj(c,2);if(3==e){e=Bj(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=Bj(c,2);var g=Bj(c,3),h=Bj(c,1);c=Bj(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,pa:a,da:d}};function hD(a){this.i=a;this.h=0;this.g=new Map}q=hD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?mb(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};
1432
+ fD.prototype.getOriginalMimeType=fD.prototype.getOriginalMimeType;fD.prototype.convertCodecs=fD.prototype.convertCodecs;fD.prototype.isSupported=fD.prototype.isSupported;fD.prototype.destroy=fD.prototype.destroy;ie("audio/ac3",function(){return new fD("audio/ac3")},oe);function gD(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new yj(a.subarray(b+2));Aj(c,2);Aj(c,3);var d=Bj(c,11)+1<<1,e=Bj(c,2);if(3==e){e=Bj(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=Bj(c,2);var g=Bj(c,3),h=Bj(c,1);c=Bj(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,pa:a,da:d}};function hD(a){this.i=a;this.h=0;this.g=new Map}q=hD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?mb(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};
1432
1433
  q.transmux=function(a,b,c,d){a=Ab(a);for(var e=oj(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=nj(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=gD(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.N()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.pa;k.push({data:a.subarray(f,f+l.da),
1433
1434
  size:l.da,duration:1536,fb:0,flags:{jb:0,Ya:0,Xa:0,Va:0,Wa:2,kb:0}});f+=l.da}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,bb:[],pa:h,ya:new Uint8Array([]),Ba:0,Ca:0,data:{vb:this.h,baseMediaDecodeTime:a,Za:k},stream:b};d=new xx([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Dx(d),this.g.set(c,b));c=Ux(d);this.h++;b=Pe(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ec3Transmuxer",hD);hD.prototype.transmux=hD.prototype.transmux;
1434
- hD.prototype.getOriginalMimeType=hD.prototype.getOriginalMimeType;hD.prototype.convertCodecs=hD.prototype.convertCodecs;hD.prototype.isSupported=hD.prototype.isSupported;hD.prototype.destroy=hD.prototype.destroy;ie("audio/ec3",function(){return new hD("audio/ec3")},qe);function iD(a){if(!a.length)return null;var b=a.find(function(v){return 7==v.type});a=a.find(function(v){return 8==v.type});if(!b||!a)return null;var c=new yj(b.data),d=Gj(c);Gj(c);Gj(c);Dj(c);if(jD.includes(d)&&(d=V(c),3===d&&Aj(c,1),Dj(c),Dj(c),Aj(c,1),Fj(c))){d=3!==d?8:12;for(var e=0;e<d;e++)Fj(c)&&(6>e?Oj(c,16):Oj(c,64))}Dj(c);d=V(c);if(0===d)V(c);else if(1===d)for(Aj(c,1),Dj(c),Dj(c),d=V(c),e=0;e<d;e++)Dj(c);Dj(c);Aj(c,1);var f=V(c),g=V(c),h=Bj(c,1);0===h&&Aj(c,1);Aj(c,1);var k=0,l=0,m=0,n=0;
1435
+ hD.prototype.getOriginalMimeType=hD.prototype.getOriginalMimeType;hD.prototype.convertCodecs=hD.prototype.convertCodecs;hD.prototype.isSupported=hD.prototype.isSupported;hD.prototype.destroy=hD.prototype.destroy;ie("audio/ec3",function(){return new hD("audio/ec3")},oe);function iD(a){if(!a.length)return null;var b=a.find(function(v){return 7==v.type});a=a.find(function(v){return 8==v.type});if(!b||!a)return null;var c=new yj(b.data),d=Gj(c);Gj(c);Gj(c);Dj(c);if(jD.includes(d)&&(d=V(c),3===d&&Aj(c,1),Dj(c),Dj(c),Aj(c,1),Fj(c))){d=3!==d?8:12;for(var e=0;e<d;e++)Fj(c)&&(6>e?Hj(c,16):Hj(c,64))}Dj(c);d=V(c);if(0===d)V(c);else if(1===d)for(Aj(c,1),Dj(c),Dj(c),d=V(c),e=0;e<d;e++)Dj(c);Dj(c);Aj(c,1);var f=V(c),g=V(c),h=Bj(c,1);0===h&&Aj(c,1);Aj(c,1);var k=0,l=0,m=0,n=0;
1435
1436
  Fj(c)&&(k=V(c),l=V(c),m=V(c),n=V(c));e=d=1;if(Fj(c)&&Fj(c)){var p=Gj(c),r=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],u=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<p&&16>=p?(d=r[p-1],e=u[p-1]):255===p&&(d=Bj(c,16),e=Bj(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,x(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,x(a));a=new Uint8Array([1,k[3],k[4],
1436
1437
  k[5],255,225].concat(k,[1],b));return{height:c,width:f,ya:a,Ba:d,Ca:e}}
1437
1438
  function kD(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=Pj(new yj(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(h),c.push(f.fullData))}return c.length?
@@ -1448,7 +1449,7 @@ function vD(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function
1448
1449
  var rD=[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],sD=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],tD=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],uD=[0,1,1,4];function xD(a){this.i=a;this.h=0;this.g=new Map}q=xD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?mb(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};
1449
1450
  q.transmux=function(a,b,c,d){for(var e=Ab(a),f=oj(e).length;f<e.length&&!wD(e,f);f++);var g;for(a=[];f<e.length;){var h=qD(e,f);if(!h)return Promise.reject(new T(2,3,3018,c?c.N()[0]:null));g||(g=h);f+h.da<=e.length&&a.push({data:e.subarray(f,f+h.da),size:h.da,duration:1152,fb:0,flags:{jb:0,Ya:0,Xa:0,Va:0,Wa:2,kb:0}});f+=h.da}if(!g)return Promise.reject(new T(2,3,3018,c?c.N()[0]:null));e=9E4*g.Qi/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
1450
1451
  duration:d,bb:[],pa:new Uint8Array([]),ya:new Uint8Array([]),Ba:0,Ca:0,data:{vb:this.h,baseMediaDecodeTime:e,Za:a},stream:b};d=new xx([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Dx(d),this.g.set(c,b));c=Ux(d);this.h++;b=Pe(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Mp3Transmuxer",xD);xD.prototype.transmux=xD.prototype.transmux;xD.prototype.getOriginalMimeType=xD.prototype.getOriginalMimeType;xD.prototype.convertCodecs=xD.prototype.convertCodecs;xD.prototype.isSupported=xD.prototype.isSupported;
1451
- xD.prototype.destroy=xD.prototype.destroy;ie("audio/mpeg",function(){return new xD("audio/mpeg")},qe);function yD(a){this.h=a;this.g=null}q=yD.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=mf(a).split(","),c=Ue("audio",b);b=Ue("video",b);return!c||b||"mp3"!=hf(c)?!1:mb(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};
1452
+ xD.prototype.destroy=xD.prototype.destroy;ie("audio/mpeg",function(){return new xD("audio/mpeg")},oe);function yD(a){this.h=a;this.g=null}q=yD.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=mf(a).split(","),c=Ue("audio",b);b=Ue("video",b);return!c||b||"mp3"!=hf(c)?!1:mb(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};
1452
1453
  q.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new Qj;a=Ab(a);a=this.g.parse(a);if("mp3"!=a.cd().audio||"audio"!=e)return Promise.reject(new T(2,3,3018,c?c.N()[0]:null));c=new Uint8Array([]);e=t(a.Wb());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=qD(a,b))?(b+d.da<=a.length&&(c=Pe(c,a.subarray(b,b+d.da))),b+=d.da):b++;return Promise.resolve(c)};S("shaka.transmuxer.MpegTsTransmuxer",yD);yD.prototype.transmux=yD.prototype.transmux;
1453
1454
  yD.prototype.getOriginalMimeType=yD.prototype.getOriginalMimeType;yD.prototype.convertCodecs=yD.prototype.convertCodecs;yD.prototype.isSupported=yD.prototype.isSupported;yD.prototype.destroy=yD.prototype.destroy;ie("video/mp2t",function(){return new yD("video/mp2t")},ne);/*
1454
1455
  @license
@@ -1464,7 +1465,7 @@ q.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;i
1464
1465
  q.transmux=function(a,b,c){if(!c)return Promise.resolve(Ab(a));if(!b.mssPrivateData)return Promise.reject(new T(2,3,3020,c?c.N()[0]:null));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");
1465
1466
  m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var p=e.fetch("saio");if(null===p){p=this.g.createFullBox("saio",h);p.version=0;p.flags=0;p.entry_count=1;p.offset=[0];var r=this.g.createFullBox("saiz",h);r.version=0;r.flags=0;r.sample_count=n.sample_count;r.default_sample_info_size=0;r.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)r.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else r.default_sample_info_size=
1466
1467
  8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=CD(u,"traf")+CD(h,"senc")+16);var w=Ab(e.write());return Promise.resolve(w)}catch(y){return y instanceof T?Promise.reject(y):Promise.reject(new T(2,3,3022,c?c.N()[0]:null))}};function CD(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}S("shaka.transmuxer.MssTransmuxer",zD);zD.prototype.transmux=zD.prototype.transmux;
1467
- zD.prototype.getOriginalMimeType=zD.prototype.getOriginalMimeType;zD.prototype.convertCodecs=zD.prototype.convertCodecs;zD.prototype.isSupported=zD.prototype.isSupported;zD.prototype.destroy=zD.prototype.destroy;var BD=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);ie("mss/audio/mp4",function(){return new zD("mss/audio/mp4")},qe);ie("mss/video/mp4",function(){return new zD("mss/video/mp4")},qe);function DD(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}q=DD.prototype;q.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
1468
+ zD.prototype.getOriginalMimeType=zD.prototype.getOriginalMimeType;zD.prototype.convertCodecs=zD.prototype.convertCodecs;zD.prototype.isSupported=zD.prototype.isSupported;zD.prototype.destroy=zD.prototype.destroy;var BD=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);ie("mss/audio/mp4",function(){return new zD("mss/audio/mp4")},oe);ie("mss/video/mp4",function(){return new zD("mss/video/mp4")},oe);function DD(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}q=DD.prototype;q.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
1468
1469
  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=mf(c).split(",");c=Ue("audio",d);d=Ue("video",d);if(c&&(c=hf(c),!ED.includes(c))||d&&(c=hf(d),!FD.includes(c)))return!1;if(b)return mb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return mb(b)||mb(a)};
1469
1470
  q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=mf(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return bg(c,"audio/mp4")}).map(ag).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};q.getOriginalMimeType=function(){return this.l};
1470
1471
  q.transmux=function(a,b,c,d,e){var f=Ab(a);if("audio"==e&&!Yj(f)){for(var g=oj(f),h=g.length;h<f.length;h++)if(wD(f,h))return Promise.reject(new T(2,3,3018,c?c.N()[0]:null));for(h=g.length;h<f.length;h++)if(aD(f,h))return this.h||(this.h=new cD("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new T(2,3,3018,c?c.N()[0]:null))}this.j?this.j.clearData():this.j=new Qj;var k=this.j.parse(f),l=[],m=k.cd();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],r=null,u=[],v=k.qc();
@@ -1472,16 +1473,16 @@ if(!v.length)throw new T(2,3,3023,c?c.N()[0]:null);for(var w=0;w<v.length;w++){v
1472
1473
  b.width=D.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,bb:[],pa:new Uint8Array([]),ya:D.ya,Ba:D.Ba,Ca:D.Ca,data:{vb:this.g,baseMediaDecodeTime:r,Za:p},stream:b};break;case "hvc":var E=[],C=null,G=[],J=k.qc();if(!J.length)throw new T(2,3,3023,c?c.N()[0]:null);for(var I=0;I<J.length;I++){var K=J[I],L=K.nalus;G.push.apply(G,x(L));for(var O=!1,M=[],N=!1,Q=t(L),R=Q.next();!R.done;R=Q.next()){var X=R.value;switch(X.type){case 1:case 0:var ka=
1473
1474
  N=!0;break;case 19:case 20:case 21:O=ka=N=!0;break;case 32:ka=!0;break;case 33:ka=!0;break;case 34:ka=!0;break;case 35:N=ka=!0;break;case 39:case 40:ka=!0;break;default:ka=!1}if(N&&ka){var aa=X.fullData.byteLength,ea=new Uint8Array(4);ea[0]=aa>>24&255;ea[1]=aa>>16&255;ea[2]=aa>>8&255;ea[3]=aa&255;M.push(ea);M.push(X.fullData)}}var Aa=M.length?{data:Pe.apply(Je,x(M)),kd:O}:null;if(Aa){null==C&&null!=K.dts&&(C=K.dts);var Ha=void 0;Ha=I+1<J.length?(J[I+1].dts||0)-(K.dts||0):1<J.length?(K.dts||0)-(J[I-
1474
1475
  1].dts||0):9E4*(c.endTime-c.startTime);E.push({data:Aa.data,size:Aa.data.byteLength,duration:Ha,fb:Math.round((K.pts||0)-(K.dts||0)),flags:{jb:0,Ya:0,Xa:0,Va:0,Wa:Aa.kd?2:1,kb:Aa.kd?0:1}})}}var Ya=lD(G);if(!Ya||null==C)throw new T(2,3,3018,c?c.N()[0]:null);b.height=Ya.height;b.width=Ya.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,bb:[],pa:new Uint8Array([]),ya:Ya.ya,Ba:Ya.Ba,Ca:Ya.Ca,data:{vb:this.g,baseMediaDecodeTime:C,Za:E},stream:b}}n&&
1475
- (l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Pa=[],sa,Sa=null,qc=t(k.Wb()),hb=qc.next();!hb.done;hb=qc.next()){var cc=hb.value,Hc=cc.data;if(Hc){var nb=0;sa=$C(Hc,nb);if(!sa)throw new T(2,3,3018,c?c.N()[0]:null);b.audioSamplingRate=sa.sampleRate;b.channelsCount=sa.channelCount;null==Sa&&null!==cc.pts&&(Sa=cc.pts);for(;nb<Hc.length;){var Sc=ZC(Hc,nb);if(Sc){var oe=Sc.Od+Sc.da;nb+oe<=Hc.length&&Pa.push({data:Hc.subarray(nb+Sc.Od,nb+oe),size:Sc.da,duration:1024,fb:0,flags:{jb:0,
1476
- Ya:0,Xa:0,Va:0,Wa:2,kb:0}});nb+=oe}else nb++}}}if(!sa||null==Sa){if(!k.qc().length)throw new T(2,3,3018,c?c.N()[0]:null);Sa=9E4*c.startTime;var Nd=Ue("audio",b.codecs.split(","));if(!Nd||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.N()[0]:null);sa={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:Nd};var uf=bD(Nd,b.channelsCount);if(!uf)throw new T(2,3,3018,c?c.N()[0]:null);for(var pe=Sa+9E4*(c.endTime-c.startTime),Zi=Sa;Zi<pe;)Pa.push({data:uf,size:uf.byteLength,
1477
- duration:1024,fb:0,flags:{jb:0,Ya:0,Xa:0,Va:0,Wa:2,kb:0}}),Zi+=1024/sa.sampleRate*9E4}var Rg=sa.sampleRate,$i=Sa/9E4*Rg;n={id:b.id,type:"audio",codecs:sa.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Rg,duration:d,bb:[],pa:new Uint8Array([]),ya:new Uint8Array([]),Ba:0,Ca:0,data:{vb:this.g,baseMediaDecodeTime:$i,Za:Pa},stream:b};break;case "ac3":for(var Sg=[],dc=0,qn=new Uint8Array([]),Hj=null,bv=t(k.Wb()),rn=bv.next();!rn.done;rn=bv.next()){var sn=rn.value,tn=sn.data;null==Hj&&null!==
1478
- sn.pts&&(Hj=sn.pts);for(var Cf=0;Cf<tn.length;){var Qd=dD(tn,Cf);Qd?(b.audioSamplingRate=Qd.sampleRate,b.channelsCount=Qd.channelCount,dc=Qd.sampleRate,qn=Qd.pa,Sg.push({data:tn.subarray(Cf,Cf+Qd.da),size:Qd.da,duration:1536,fb:0,flags:{jb:0,Ya:0,Xa:0,Va:0,Wa:2,kb:0}}),Cf+=Qd.da):Cf++}}if(0==dc||0==qn.byteLength||null==Hj)throw new T(2,3,3018,c?c.N()[0]:null);var VD=Hj/9E4*dc;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:dc,duration:d,bb:[],pa:qn,ya:new Uint8Array([]),
1479
- Ba:0,Ca:0,data:{vb:this.g,baseMediaDecodeTime:VD,Za:Sg},stream:b};break;case "ec3":for(var cv=[],Ij=0,un=new Uint8Array([]),Jj=null,dv=t(k.Wb()),vn=dv.next();!vn.done;vn=dv.next()){var wn=vn.value,xn=wn.data;null==Jj&&null!==wn.pts&&(Jj=wn.pts);for(var Df=0;Df<xn.length;){var Rd=gD(xn,Df);Rd?(b.audioSamplingRate=Rd.sampleRate,b.channelsCount=Rd.channelCount,Ij=Rd.sampleRate,un=Rd.pa,cv.push({data:xn.subarray(Df,Df+Rd.da),size:Rd.da,duration:1536,fb:0,flags:{jb:0,Ya:0,Xa:0,Va:0,Wa:2,kb:0}}),Df+=Rd.da):
1480
- Df++}}if(0==Ij||0==un.byteLength||null==Jj)throw new T(2,3,3018,c?c.N()[0]:null);var WD=Jj/9E4*Ij;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Ij,duration:d,bb:[],pa:un,ya:new Uint8Array([]),Ba:0,Ca:0,data:{vb:this.g,baseMediaDecodeTime:WD,Za:cv},stream:b};break;case "mp3":for(var ev=[],Kj,Lj=null,fv=t(k.Wb()),yn=fv.next();!yn.done;yn=fv.next()){var zn=yn.value,eh=zn.data;if(eh){null==Lj&&null!==zn.pts&&(Lj=zn.pts);for(var se=0;se<eh.length;){var Ef=qD(eh,
1481
- se);Ef?(Kj||(Kj=Ef),se+Ef.da<=eh.length&&ev.push({data:eh.subarray(se,se+Ef.da),size:Ef.da,duration:1152,fb:0,flags:{jb:0,Ya:0,Xa:0,Va:0,Wa:2,kb:0}}),se+=Ef.da):se++}}}if(!Kj||null==Lj)throw new T(2,3,3018,c?c.N()[0]:null);var gv=Kj.sampleRate,XD=Lj/9E4*gv;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:gv,duration:d,bb:[],pa:new Uint8Array([]),ya:new Uint8Array([]),Ba:0,Ca:0,data:{vb:this.g,baseMediaDecodeTime:XD,Za:ev},stream:b};break;case "opus":var hv=
1482
- [],Mj=null,$c=k.F;if(!$c)throw new T(2,3,3018,c?c.N()[0]:null);var Db=[];switch($c.Ch){case 1:case 2:Db=[0];break;case 0:Db=[255,1,1,0,1];break;case 128:Db=[255,2,0,0,1];break;case 3:Db=[1,2,1,0,2,1];break;case 4:Db=[1,2,2,0,1,2,3];break;case 5:Db=[1,3,2,0,4,1,2,3];break;case 6:Db=[1,4,2,0,4,1,2,3,5];break;case 7:Db=[1,4,2,0,4,1,2,3,5,6];break;case 8:Db=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Db=[1,1,2,0,1];break;case 131:Db=[1,1,3,0,1,2];break;case 132:Db=[1,1,4,0,1,2,3];break;case 133:Db=[1,1,5,
1483
- 0,1,2,3,4];break;case 134:Db=[1,1,6,0,1,2,3,4,5];break;case 135:Db=[1,1,7,0,1,2,3,4,5,6];break;case 136:Db=[1,1,8,0,1,2,3,4,5,6,7]}var iv=new Uint8Array([0,$c.channelCount,0,0,$c.sampleRate>>>24&255,$c.sampleRate>>>17&255,$c.sampleRate>>>8&255,$c.sampleRate>>>0&255,0,0].concat(x(Db)));for(var jv=$c.sampleRate,kv=t(k.Wb()),An=kv.next();!An.done;An=kv.next()){var Bn=An.value,Ff=Bn.data;null==Mj&&null!==Bn.pts&&(Mj=Bn.pts);for(var fh=0;fh<Ff.length;){for(var YD=0!==(Ff[fh+1]&16),ZD=0!==(Ff[fh+1]&8),
1484
- zd=fh+2,Nj=0;255===Ff[zd];)Nj+=255,zd+=1;Nj+=Ff[zd];zd+=1;zd+=YD?2:0;zd+=ZD?2:0;var lv=Ff.slice(zd,zd+Nj);hv.push({data:lv,size:lv.byteLength,duration:960,fb:0,flags:{jb:0,Ya:0,Xa:0,Va:0,Wa:2,kb:0}});fh=zd+Nj}}if(0==iv.byteLength||null==Mj)throw new T(2,3,3018,c?c.N()[0]:null);b.audioSamplingRate=$c.sampleRate;b.channelsCount=$c.channelCount;var $D=Mj/9E4*jv;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:jv,duration:d,bb:[],pa:iv,ya:new Uint8Array([]),Ba:0,
1476
+ (l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Pa=[],sa,Sa=null,qc=t(k.Wb()),hb=qc.next();!hb.done;hb=qc.next()){var cc=hb.value,Hc=cc.data;if(Hc){var nb=0;sa=$C(Hc,nb);if(!sa)throw new T(2,3,3018,c?c.N()[0]:null);b.audioSamplingRate=sa.sampleRate;b.channelsCount=sa.channelCount;null==Sa&&null!==cc.pts&&(Sa=cc.pts);for(;nb<Hc.length;){var Sc=ZC(Hc,nb);if(Sc){var qe=Sc.Od+Sc.da;nb+qe<=Hc.length&&Pa.push({data:Hc.subarray(nb+Sc.Od,nb+qe),size:Sc.da,duration:1024,fb:0,flags:{jb:0,
1477
+ Ya:0,Xa:0,Va:0,Wa:2,kb:0}});nb+=qe}else nb++}}}if(!sa||null==Sa){if(!k.qc().length)throw new T(2,3,3018,c?c.N()[0]:null);Sa=9E4*c.startTime;var Nd=Ue("audio",b.codecs.split(","));if(!Nd||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.N()[0]:null);sa={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:Nd};var uf=bD(Nd,b.channelsCount);if(!uf)throw new T(2,3,3018,c?c.N()[0]:null);for(var re=Sa+9E4*(c.endTime-c.startTime),$i=Sa;$i<re;)Pa.push({data:uf,size:uf.byteLength,
1478
+ duration:1024,fb:0,flags:{jb:0,Ya:0,Xa:0,Va:0,Wa:2,kb:0}}),$i+=1024/sa.sampleRate*9E4}var Rg=sa.sampleRate,aj=Sa/9E4*Rg;n={id:b.id,type:"audio",codecs:sa.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Rg,duration:d,bb:[],pa:new Uint8Array([]),ya:new Uint8Array([]),Ba:0,Ca:0,data:{vb:this.g,baseMediaDecodeTime:aj,Za:Pa},stream:b};break;case "ac3":for(var Sg=[],dc=0,qn=new Uint8Array([]),Ij=null,bv=t(k.Wb()),rn=bv.next();!rn.done;rn=bv.next()){var sn=rn.value,tn=sn.data;null==Ij&&null!==
1479
+ sn.pts&&(Ij=sn.pts);for(var Cf=0;Cf<tn.length;){var Qd=dD(tn,Cf);Qd?(b.audioSamplingRate=Qd.sampleRate,b.channelsCount=Qd.channelCount,dc=Qd.sampleRate,qn=Qd.pa,Sg.push({data:tn.subarray(Cf,Cf+Qd.da),size:Qd.da,duration:1536,fb:0,flags:{jb:0,Ya:0,Xa:0,Va:0,Wa:2,kb:0}}),Cf+=Qd.da):Cf++}}if(0==dc||0==qn.byteLength||null==Ij)throw new T(2,3,3018,c?c.N()[0]:null);var VD=Ij/9E4*dc;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:dc,duration:d,bb:[],pa:qn,ya:new Uint8Array([]),
1480
+ Ba:0,Ca:0,data:{vb:this.g,baseMediaDecodeTime:VD,Za:Sg},stream:b};break;case "ec3":for(var cv=[],Jj=0,un=new Uint8Array([]),Kj=null,dv=t(k.Wb()),vn=dv.next();!vn.done;vn=dv.next()){var wn=vn.value,xn=wn.data;null==Kj&&null!==wn.pts&&(Kj=wn.pts);for(var Df=0;Df<xn.length;){var Rd=gD(xn,Df);Rd?(b.audioSamplingRate=Rd.sampleRate,b.channelsCount=Rd.channelCount,Jj=Rd.sampleRate,un=Rd.pa,cv.push({data:xn.subarray(Df,Df+Rd.da),size:Rd.da,duration:1536,fb:0,flags:{jb:0,Ya:0,Xa:0,Va:0,Wa:2,kb:0}}),Df+=Rd.da):
1481
+ Df++}}if(0==Jj||0==un.byteLength||null==Kj)throw new T(2,3,3018,c?c.N()[0]:null);var WD=Kj/9E4*Jj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Jj,duration:d,bb:[],pa:un,ya:new Uint8Array([]),Ba:0,Ca:0,data:{vb:this.g,baseMediaDecodeTime:WD,Za:cv},stream:b};break;case "mp3":for(var ev=[],Lj,Mj=null,fv=t(k.Wb()),yn=fv.next();!yn.done;yn=fv.next()){var zn=yn.value,eh=zn.data;if(eh){null==Mj&&null!==zn.pts&&(Mj=zn.pts);for(var ue=0;ue<eh.length;){var Ef=qD(eh,
1482
+ ue);Ef?(Lj||(Lj=Ef),ue+Ef.da<=eh.length&&ev.push({data:eh.subarray(ue,ue+Ef.da),size:Ef.da,duration:1152,fb:0,flags:{jb:0,Ya:0,Xa:0,Va:0,Wa:2,kb:0}}),ue+=Ef.da):ue++}}}if(!Lj||null==Mj)throw new T(2,3,3018,c?c.N()[0]:null);var gv=Lj.sampleRate,XD=Mj/9E4*gv;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:gv,duration:d,bb:[],pa:new Uint8Array([]),ya:new Uint8Array([]),Ba:0,Ca:0,data:{vb:this.g,baseMediaDecodeTime:XD,Za:ev},stream:b};break;case "opus":var hv=
1483
+ [],Nj=null,$c=k.F;if(!$c)throw new T(2,3,3018,c?c.N()[0]:null);var Db=[];switch($c.Ch){case 1:case 2:Db=[0];break;case 0:Db=[255,1,1,0,1];break;case 128:Db=[255,2,0,0,1];break;case 3:Db=[1,2,1,0,2,1];break;case 4:Db=[1,2,2,0,1,2,3];break;case 5:Db=[1,3,2,0,4,1,2,3];break;case 6:Db=[1,4,2,0,4,1,2,3,5];break;case 7:Db=[1,4,2,0,4,1,2,3,5,6];break;case 8:Db=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Db=[1,1,2,0,1];break;case 131:Db=[1,1,3,0,1,2];break;case 132:Db=[1,1,4,0,1,2,3];break;case 133:Db=[1,1,5,
1484
+ 0,1,2,3,4];break;case 134:Db=[1,1,6,0,1,2,3,4,5];break;case 135:Db=[1,1,7,0,1,2,3,4,5,6];break;case 136:Db=[1,1,8,0,1,2,3,4,5,6,7]}var iv=new Uint8Array([0,$c.channelCount,0,0,$c.sampleRate>>>24&255,$c.sampleRate>>>17&255,$c.sampleRate>>>8&255,$c.sampleRate>>>0&255,0,0].concat(x(Db)));for(var jv=$c.sampleRate,kv=t(k.Wb()),An=kv.next();!An.done;An=kv.next()){var Bn=An.value,Ff=Bn.data;null==Nj&&null!==Bn.pts&&(Nj=Bn.pts);for(var fh=0;fh<Ff.length;){for(var YD=0!==(Ff[fh+1]&16),ZD=0!==(Ff[fh+1]&8),
1485
+ zd=fh+2,Oj=0;255===Ff[zd];)Oj+=255,zd+=1;Oj+=Ff[zd];zd+=1;zd+=YD?2:0;zd+=ZD?2:0;var lv=Ff.slice(zd,zd+Oj);hv.push({data:lv,size:lv.byteLength,duration:960,fb:0,flags:{jb:0,Ya:0,Xa:0,Va:0,Wa:2,kb:0}});fh=zd+Oj}}if(0==iv.byteLength||null==Nj)throw new T(2,3,3018,c?c.N()[0]:null);b.audioSamplingRate=$c.sampleRate;b.channelsCount=$c.channelCount;var $D=Nj/9E4*jv;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:jv,duration:d,bb:[],pa:iv,ya:new Uint8Array([]),Ba:0,
1485
1486
  Ca:0,data:{vb:this.g,baseMediaDecodeTime:$D,Za:hv},stream:b}}n&&(l.push(n),n=null)}}catch(Cn){return Cn&&3023==Cn.code?Promise.resolve(new Uint8Array([])):Promise.reject(Cn)}if(!l.length)return Promise.reject(new T(2,3,3018,c?c.N()[0]:null));var mv=new xx(l),Dn=b.id+"_"+c.i;if(this.i.has(Dn))var En=this.i.get(Dn);else En=Dx(mv),this.i.set(Dn,En);var aE=Ux(mv);this.g++;var bE=Pe(En,aE);return Promise.resolve(bE)};S("shaka.transmuxer.TsTransmuxer",DD);DD.prototype.transmux=DD.prototype.transmux;
1486
1487
  DD.prototype.getOriginalMimeType=DD.prototype.getOriginalMimeType;DD.prototype.convertCodecs=DD.prototype.convertCodecs;DD.prototype.isSupported=DD.prototype.isSupported;DD.prototype.destroy=DD.prototype.destroy;var ED=["aac","ac-3","ec-3","mp3","opus"],FD=["avc","hevc"];ie("video/mp2t",function(){return new DD("video/mp2t")},me);/*
1487
1488
  @license