/*! For license information please see dash.all.min.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.dashjs=t():e.dashjs=t()}(self,(function(){return function(){var e={37267:function(e,t,n){"use strict";n(16280),n(23792),n(48598),n(44114),n(54743),n(16573),n(78100),n(77936),n(26099),n(21489),n(48140),n(81630),n(72170),n(75044),n(69539),n(31694),n(89955),n(21903),n(91134),n(33206),n(44496),n(66651),n(12887),n(19369),n(66812),n(8995),n(31575),n(36072),n(88747),n(28845),n(29423),n(57301),n(373),n(86614),n(41405),n(37467),n(44732),n(33684),n(79577),n(41549),n(49797),n(49631),n(35623),t.byteLength=function(e){var t=u(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=u(e),o=r[0],s=r[1],c=new a(function(e,t,n){return 3*(t+n)/4-n}(0,o,s)),l=0,f=s>0?o-4:o;for(n=0;n<f;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,c[l++]=255&t),1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],o=16383,s=0,u=n-i;s<u;s+=o)a.push(c(e,s,s+o>u?u:s+o));return 1===i?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),a.join("")};for(var r=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],i[o.charCodeAt(s)]=s;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){for(var i,a,o=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(r[(a=i)>>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},40044:function(e,t,n){"use strict";var r=n(15020),i=n(99730),a=n(88665),o=n(85047),s=n(19460),u=n(95429);function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}n(52675),n(89463),n(45700),n(16280),n(28706),n(26835),n(33771),n(74423),n(23792),n(44114),n(34782),n(54743),n(16573),n(78100),n(77936),n(89572),n(62010),n(2892),n(32637),n(26099),n(60825),n(27495),n(38781),n(21699),n(25440),n(42762),n(21489),n(48140),n(81630),n(72170),n(75044),n(69539),n(31694),n(89955),n(21903),n(91134),n(33206),n(44496),n(66651),n(12887),n(19369),n(66812),n(8995),n(31575),n(36072),n(88747),n(28845),n(29423),n(57301),n(373),n(86614),n(41405),n(37467),n(44732),n(33684),n(79577),n(41549),n(49797),n(49631),n(35623);var l=n(37267),f=n(87986),d="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=p,t.SlowBuffer=function(e){return+e!=e&&(e=0),p.alloc(+e)},t.INSPECT_MAX_BYTES=50;var h=2147483647;function g(e){if(e>h)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,p.prototype),t}function p(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return v(e)}return m(e,t,n)}function m(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!p.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|_(e,t),r=g(n),i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(ne(e,Uint8Array)){var t=new Uint8Array(e);return y(t.buffer,t.byteOffset,t.byteLength)}return A(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+u(e));if(ne(e,ArrayBuffer)||e&&ne(e.buffer,ArrayBuffer))return y(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(ne(e,SharedArrayBuffer)||e&&ne(e.buffer,SharedArrayBuffer)))return y(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return p.from(r,t,n);var i=function(e){if(p.isBuffer(e)){var t=0|T(e.length),n=g(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||re(e.length)?g(0):A(e):"Buffer"===e.type&&Array.isArray(e.data)?A(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return p.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+u(e))}function E(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function v(e){return E(e),g(e<0?0:0|T(e))}function A(e){for(var t=e.length<0?0:0|T(e.length),n=g(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function y(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,p.prototype),r}function T(e){if(e>=h)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h.toString(16)+" bytes");return 0|e}function _(e,t){if(p.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||ne(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+u(e));var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return J(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return ee(e).length;default:if(i)return r?-1:J(e).length;t=(""+t).toLowerCase(),i=!0}}function S(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return U(this,t,n);case"utf8":case"utf-8":return P(this,t,n);case"ascii":return x(this,t,n);case"latin1":case"binary":return F(this,t,n);case"base64":return M(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function I(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),re(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=p.from(t,r)),p.isBuffer(t))return 0===t.length?-1:R(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):R(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function R(e,t,n,r,i){var a,o=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,n/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var l=-1;for(a=n;a<s;a++)if(c(e,a)===c(t,-1===l?0:a-l)){if(-1===l&&(l=a),a-l+1===u)return l*o}else-1!==l&&(a-=a-l),l=-1}else for(n+u>s&&(n=s-u),a=n;a>=0;a--){for(var f=!0,d=0;d<u;d++)if(c(e,a+d)!==c(t,d)){f=!1;break}if(f)return a}return-1}function N(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a,o=t.length;for(r>o/2&&(r=o/2),a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(re(s))return a;e[n+a]=s}return a}function C(e,t,n,r){return te(J(t,e.length-n),e,n,r)}function w(e,t,n,r){return te(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function D(e,t,n,r){return te(ee(t),e,n,r)}function O(e,t,n,r){return te(function(e,t){for(var n,r,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)r=(n=e.charCodeAt(o))>>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function M(e,t,n){return 0===t&&n===e.length?l.fromByteArray(e):l.fromByteArray(e.slice(t,n))}function P(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a=e[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(i+s<=n){var u=void 0,c=void 0,l=void 0,f=void 0;switch(s){case 1:a<128&&(o=a);break;case 2:128==(192&(u=e[i+1]))&&(f=(31&a)<<6|63&u)>127&&(o=f);break;case 3:u=e[i+1],c=e[i+2],128==(192&u)&&128==(192&c)&&(f=(15&a)<<12|(63&u)<<6|63&c)>2047&&(f<55296||f>57343)&&(o=f);break;case 4:u=e[i+1],c=e[i+2],l=e[i+3],128==(192&u)&&128==(192&c)&&128==(192&l)&&(f=(15&a)<<18|(63&u)<<12|(63&c)<<6|63&l)>65535&&f<1114112&&(o=f)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=s}return function(e){var t=e.length;if(t<=L)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=L));return n}(r)}t.kMaxLength=h,p.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),p.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(p.prototype,"parent",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.buffer}}),Object.defineProperty(p.prototype,"offset",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.byteOffset}}),p.poolSize=8192,p.from=function(e,t,n){return m(e,t,n)},Object.setPrototypeOf(p.prototype,Uint8Array.prototype),Object.setPrototypeOf(p,Uint8Array),p.alloc=function(e,t,n){return function(e,t,n){return E(e),e<=0?g(e):void 0!==t?"string"==typeof n?g(e).fill(t,n):g(e).fill(t):g(e)}(e,t,n)},p.allocUnsafe=function(e){return v(e)},p.allocUnsafeSlow=function(e){return v(e)},p.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==p.prototype},p.compare=function(e,t){if(ne(e,Uint8Array)&&(e=p.from(e,e.offset,e.byteLength)),ne(t,Uint8Array)&&(t=p.from(t,t.offset,t.byteLength)),!p.isBuffer(e)||!p.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},p.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},p.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return p.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=p.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var a=e[n];if(ne(a,Uint8Array))i+a.length>r.length?(p.isBuffer(a)||(a=p.from(a)),a.copy(r,i)):Uint8Array.prototype.set.call(r,a,i);else{if(!p.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i)}i+=a.length}return r},p.byteLength=_,p.prototype._isBuffer=!0,p.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)I(this,t,t+1);return this},p.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)I(this,t,t+3),I(this,t+1,t+2);return this},p.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)I(this,t,t+7),I(this,t+1,t+6),I(this,t+2,t+5),I(this,t+3,t+4);return this},p.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?P(this,0,e):S.apply(this,arguments)},p.prototype.toLocaleString=p.prototype.toString,p.prototype.equals=function(e){if(!p.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===p.compare(this,e)},p.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},d&&(p.prototype[d]=p.prototype.inspect),p.prototype.compare=function(e,t,n,r,i){if(ne(e,Uint8Array)&&(e=p.from(e,e.offset,e.byteLength)),!p.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+u(e));if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),s=Math.min(a,o),c=this.slice(r,i),l=e.slice(t,n),f=0;f<s;++f)if(c[f]!==l[f]){a=c[f],o=l[f];break}return a<o?-1:o<a?1:0},p.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},p.prototype.indexOf=function(e,t,n){return b(this,e,t,n,!0)},p.prototype.lastIndexOf=function(e,t,n){return b(this,e,t,n,!1)},p.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return N(this,e,t,n);case"utf8":case"utf-8":return C(this,e,t,n);case"ascii":case"latin1":case"binary":return w(this,e,t,n);case"base64":return D(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var L=4096;function x(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function F(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function U(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=t;a<n;++a)i+=ie[e[a]];return i}function k(e,t,n){for(var r=e.slice(t,n),i="",a=0;a<r.length-1;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function B(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function G(e,t,n,r,i,a){if(!p.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function H(e,t,n,r,i){Q(t,r,i,e,n,7);var a=Number(t&BigInt(4294967295));e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a;var o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,n}function Y(e,t,n,r,i){Q(t,r,i,e,n,7);var a=Number(t&BigInt(4294967295));e[n+7]=a,a>>=8,e[n+6]=a,a>>=8,e[n+5]=a,a>>=8,e[n+4]=a;var o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=o,o>>=8,e[n+2]=o,o>>=8,e[n+1]=o,o>>=8,e[n]=o,n+8}function V(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function q(e,t,n,r,i){return t=+t,n>>>=0,i||V(e,0,n,4),f.write(e,t,n,r,23,4),n+4}function K(e,t,n,r,i){return t=+t,n>>>=0,i||V(e,0,n,8),f.write(e,t,n,r,52,8),n+8}p.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return Object.setPrototypeOf(r,p.prototype),r},p.prototype.readUintLE=p.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},p.prototype.readUintBE=p.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},p.prototype.readUint8=p.prototype.readUInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),this[e]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]|this[e+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]<<8|this[e+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},p.prototype.readBigUInt64LE=ae((function(e){X(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||$(e,this.length-8);var r=t+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,24),i=this[++e]+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+n*Math.pow(2,24);return BigInt(r)+(BigInt(i)<<BigInt(32))})),p.prototype.readBigUInt64BE=ae((function(e){X(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||$(e,this.length-8);var r=t*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e],i=this[++e]*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+n;return(BigInt(r)<<BigInt(32))+BigInt(i)})),p.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},p.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},p.prototype.readInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},p.prototype.readInt16LE=function(e,t){e>>>=0,t||B(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},p.prototype.readInt16BE=function(e,t){e>>>=0,t||B(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},p.prototype.readInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},p.prototype.readInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},p.prototype.readBigInt64LE=ae((function(e){X(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||$(e,this.length-8);var r=this[e+4]+this[e+5]*Math.pow(2,8)+this[e+6]*Math.pow(2,16)+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,24))})),p.prototype.readBigInt64BE=ae((function(e){X(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||$(e,this.length-8);var r=(t<<24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+n)})),p.prototype.readFloatLE=function(e,t){return e>>>=0,t||B(e,4,this.length),f.read(this,e,!0,23,4)},p.prototype.readFloatBE=function(e,t){return e>>>=0,t||B(e,4,this.length),f.read(this,e,!1,23,4)},p.prototype.readDoubleLE=function(e,t){return e>>>=0,t||B(e,8,this.length),f.read(this,e,!0,52,8)},p.prototype.readDoubleBE=function(e,t){return e>>>=0,t||B(e,8,this.length),f.read(this,e,!1,52,8)},p.prototype.writeUintLE=p.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||G(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},p.prototype.writeUintBE=p.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||G(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},p.prototype.writeUint8=p.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||G(this,e,t,1,255,0),this[t]=255&e,t+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||G(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||G(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||G(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||G(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},p.prototype.writeBigUInt64LE=ae((function(e){return H(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),p.prototype.writeBigUInt64BE=ae((function(e){return Y(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),p.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);G(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<n&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+n},p.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);G(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+n},p.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||G(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},p.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||G(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},p.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||G(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},p.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||G(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},p.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||G(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},p.prototype.writeBigInt64LE=ae((function(e){return H(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),p.prototype.writeBigInt64BE=ae((function(e){return Y(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),p.prototype.writeFloatLE=function(e,t,n){return q(this,e,t,!0,n)},p.prototype.writeFloatBE=function(e,t,n){return q(this,e,t,!1,n)},p.prototype.writeDoubleLE=function(e,t,n){return K(this,e,t,!0,n)},p.prototype.writeDoubleBE=function(e,t,n){return K(this,e,t,!1,n)},p.prototype.copy=function(e,t,n,r){if(!p.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},p.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!p.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){var i=e.charCodeAt(0);("utf8"===r&&i<128||"latin1"===r)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{var o=p.isBuffer(e)?e:p.from(e,r),s=o.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<n-t;++a)this[a+t]=o[a%s]}return this};var j={};function z(e,t,n){j[e]=function(n){function u(){var n,i,s,l;return r(this,u),i=this,s=o(s=u),n=a(i,c()?Reflect.construct(s,[],o(i).constructor):s.apply(i,l)),Object.defineProperty(n,"message",{value:t.apply(n,arguments),writable:!0,configurable:!0}),n.name="".concat(n.name," [").concat(e,"]"),n.stack,delete n.name,n}return s(u,n),i(u,[{key:"code",get:function(){return e},set:function(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(e,"]: ").concat(this.message)}}])}(n)}function W(e){for(var t="",n=e.length,r="-"===e[0]?1:0;n>=r+4;n-=3)t="_".concat(e.slice(n-3,n)).concat(t);return"".concat(e.slice(0,n)).concat(t)}function Q(e,t,n,r,i,a){if(e>n||e<t){var o,s="bigint"==typeof t?"n":"";throw o=a>3?0===t||t===BigInt(0)?">= 0".concat(s," and < 2").concat(s," ** ").concat(8*(a+1)).concat(s):">= -(2".concat(s," ** ").concat(8*(a+1)-1).concat(s,") and < 2 ** ")+"".concat(8*(a+1)-1).concat(s):">= ".concat(t).concat(s," and <= ").concat(n).concat(s),new j.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,n){X(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||$(t,e.length-(n+1))}(r,i,a)}function X(e,t){if("number"!=typeof e)throw new j.ERR_INVALID_ARG_TYPE(t,"number",e)}function $(e,t,n){if(Math.floor(e)!==e)throw X(e,n),new j.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new j.ERR_BUFFER_OUT_OF_BOUNDS;throw new j.ERR_OUT_OF_RANGE(n||"offset",">= ".concat(n?1:0," and <= ").concat(t),e)}z("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),z("ERR_INVALID_ARG_TYPE",(function(e,t){return'The "'.concat(e,'" argument must be of type number. Received type ').concat(u(t))}),TypeError),z("ERR_OUT_OF_RANGE",(function(e,t,n){var r='The value of "'.concat(e,'" is out of range.'),i=n;return Number.isInteger(n)&&Math.abs(n)>Math.pow(2,32)?i=W(String(n)):"bigint"==typeof n&&(i=String(n),(n>Math.pow(BigInt(2),BigInt(32))||n<-Math.pow(BigInt(2),BigInt(32)))&&(i=W(i)),i+="n"),r+" It must be ".concat(t,". Received ").concat(i)}),RangeError);var Z=/[^+/0-9A-Za-z-_]/g;function J(e,t){var n;t=t||1/0;for(var r=e.length,i=null,a=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function ee(e){return l.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(Z,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function te(e,t,n,r){var i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function ne(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function re(e){return e!=e}var ie=function(){for(var e="0123456789abcdef",t=new Array(256),n=0;n<16;++n)for(var r=16*n,i=0;i<16;++i)t[r+i]=e[n]+e[i];return t}();function ae(e){return"undefined"==typeof BigInt?oe:e}function oe(){throw new Error("BigInt not supported")}},96877:function(e,t,n){var r=n(95429);n(23792),n(48598),n(44114),n(54554),n(54743),n(16573),n(78100),n(77936),n(26099),n(69479),n(21489),n(48140),n(81630),n(72170),n(75044),n(69539),n(31694),n(89955),n(21903),n(91134),n(33206),n(44496),n(66651),n(12887),n(19369),n(66812),n(8995),n(31575),n(36072),n(88747),n(28845),n(29423),n(57301),n(373),n(86614),n(41405),n(37467),n(44732),n(33684),n(79577),n(41549),n(49797),n(49631),n(35623);var i={parseBuffer:function(e){return new a(e).parse()},addBoxProcessor:function(e,t){"string"==typeof e&&"function"==typeof t&&(o.prototype._boxProcessors[e]=t)},createFile:function(){return new a},createBox:function(e,t,n){var r=o.create(e);return t&&t.append(r,n),r},createFullBox:function(e,t,n){var r=i.createBox(e,t,n);return r.version=0,r.flags=0,r},Utils:{}};i.Utils.dataViewToString=function(e,t){var n=t||"utf-8";if("undefined"!=typeof TextDecoder)return new TextDecoder(n).decode(e);var r=[],i=0;if("utf-8"===n)for(;i<e.byteLength;){var a=e.getUint8(i++);a<128||(a<224?(a=(31&a)<<6,a|=63&e.getUint8(i++)):a<240?(a=(15&a)<<12,a|=(63&e.getUint8(i++))<<6,a|=63&e.getUint8(i++)):(a=(7&a)<<18,a|=(63&e.getUint8(i++))<<12,a|=(63&e.getUint8(i++))<<6,a|=63&e.getUint8(i++))),r.push(String.fromCharCode(a))}else for(;i<e.byteLength;)r.push(String.fromCharCode(e.getUint8(i++)));return r.join("")},i.Utils.utf8ToByteArray=function(e){var t,n;if("undefined"!=typeof TextEncoder)t=(new TextEncoder).encode(e);else for(t=[],n=0;n<e.length;++n){var r=e.charCodeAt(n);r<128?t.push(r):r<2048?(t.push(192|r>>6),t.push(128|63&r)):r<65536?(t.push(224|r>>12),t.push(128|63&r>>6),t.push(128|63&r)):(t.push(240|r>>18),t.push(128|63&r>>12),t.push(128|63&r>>6),t.push(128|63&r))}return t},i.Utils.appendBox=function(e,t,n){if(t._offset=e._cursor.offset,t._root=e._root?e._root:e,t._raw=e._raw,t._parent=e,-1!==n)if(null!=n){var i,a=-1;if("number"==typeof n)a=n;else{if("string"==typeof n)i=n;else{if("object"!==r(n)||!n.type)return void e.boxes.push(t);i=n.type}for(var o=0;o<e.boxes.length;o++)if(i===e.boxes[o].type){a=o+1;break}}e.boxes.splice(a,0,t)}else e.boxes.push(t)},t.parseBuffer=i.parseBuffer,t.addBoxProcessor=i.addBoxProcessor,t.createFile=i.createFile,t.createBox=i.createBox,t.createFullBox=i.createFullBox,t.Utils=i.Utils,i.Cursor=function(e){this.offset=void 0===e?0:e};var a=function(e){this._cursor=new i.Cursor,this.boxes=[],e&&(this._raw=new DataView(e))};a.prototype.fetch=function(e){var t=this.fetchAll(e,!0);return t.length?t[0]:null},a.prototype.fetchAll=function(e,t){var n=[];return a._sweep.call(this,e,n,t),n},a.prototype.parse=function(){for(this._cursor.offset=0,this.boxes=[];this._cursor.offset<this._raw.byteLength;){var e=o.parse(this);if(void 0===e.type)break;this.boxes.push(e)}return this},a._sweep=function(e,t,n){for(var r in this.type&&this.type==e&&t.push(this),this.boxes){if(t.length&&n)return;a._sweep.call(this.boxes[r],e,t,n)}},a.prototype.write=function(){var e,t=0;for(e=0;e<this.boxes.length;e++)t+=this.boxes[e].getLength(!1);var n=new Uint8Array(t);for(this._rawo=new DataView(n.buffer),this.bytes=n,this._cursor.offset=0,e=0;e<this.boxes.length;e++)this.boxes[e].write();return n.buffer},a.prototype.append=function(e,t){i.Utils.appendBox(this,e,t)};var o=function(){this._cursor=new i.Cursor};o.parse=function(e){var t=new o;return t._offset=e._cursor.offset,t._root=e._root?e._root:e,t._raw=e._raw,t._parent=e,t._parseBox(),e._cursor.offset=t._raw.byteOffset+t._raw.byteLength,t},o.create=function(e){var t=new o;return t.type=e,t.boxes=[],t},o.prototype._boxContainers=["dinf","edts","mdia","meco","mfra","minf","moof","moov","mvex","stbl","strk","traf","trak","tref","udta","vttc","sinf","schi","encv","enca","meta","grpl","prsl"],o.prototype._boxProcessors={},o.prototype._procField=function(e,t,n){this._parsing?this[e]=this._readField(t,n):this._writeField(t,n,this[e])},o.prototype._procFieldArray=function(e,t,n,r){var i;if(this._parsing)for(this[e]=[],i=0;i<t;i++)this[e][i]=this._readField(n,r);else for(i=0;i<this[e].length;i++)this._writeField(n,r,this[e][i])},o.prototype._procFullBox=function(){this._procField("version","uint",8),this._procField("flags","uint",24)},o.prototype._procEntries=function(e,t,n){var r;if(this._parsing)for(this[e]=[],r=0;r<t;r++)this[e].push({}),n.call(this,this[e][r]);else for(r=0;r<t;r++)n.call(this,this[e][r])},o.prototype._procSubEntries=function(e,t,n,r){var i;if(this._parsing)for(e[t]=[],i=0;i<n;i++)e[t].push({}),r.call(this,e[t][i]);else for(i=0;i<n;i++)r.call(this,e[t][i])},o.prototype._procEntryField=function(e,t,n,r){this._parsing?e[t]=this._readField(n,r):this._writeField(n,r,e[t])},o.prototype._procSubBoxes=function(e,t){var n;if(this._parsing)for(this[e]=[],n=0;n<t;n++)this[e].push(o.parse(this));else for(n=0;n<t;n++)this._rawo?this[e][n].write():this.size+=this[e][n].getLength()},o.prototype._readField=function(e,t){switch(e){case"uint":return this._readUint(t);case"int":return this._readInt(t);case"template":return this._readTemplate(t);case"string":return-1===t?this._readTerminatedString():this._readString(t);case"data":return this._readData(t);case"utf8":return this._readUTF8String();case"utf8string":return this._readUTF8TerminatedString();default:return-1}},o.prototype._readInt=function(e){var t=null,n=this._cursor.offset-this._raw.byteOffset;switch(e){case 8:t=this._raw.getInt8(n);break;case 16:t=this._raw.getInt16(n);break;case 32:t=this._raw.getInt32(n);break;case 64:var r=this._raw.getInt32(n),i=this._raw.getInt32(n+4);t=r*Math.pow(2,32)+i}return this._cursor.offset+=e>>3,t},o.prototype._readUint=function(e){var t,n,r=null,i=this._cursor.offset-this._raw.byteOffset;switch(e){case 8:r=this._raw.getUint8(i);break;case 16:r=this._raw.getUint16(i);break;case 24:r=((t=this._raw.getUint16(i))<<8)+(n=this._raw.getUint8(i+2));break;case 32:r=this._raw.getUint32(i);break;case 64:t=this._raw.getUint32(i),n=this._raw.getUint32(i+4),r=t*Math.pow(2,32)+n}return this._cursor.offset+=e>>3,r},o.prototype._readString=function(e){for(var t="",n=0;n<e;n++){var r=this._readUint(8);t+=String.fromCharCode(r)}return t},o.prototype._readTemplate=function(e){return this._readUint(e/2)+this._readUint(e/2)/Math.pow(2,e/2)},o.prototype._readTerminatedString=function(){for(var e="";this._cursor.offset-this._offset<this._raw.byteLength;){var t=this._readUint(8);if(0===t)break;e+=String.fromCharCode(t)}return e},o.prototype._readData=function(e){var t=e>0?e:this._raw.byteLength-(this._cursor.offset-this._offset);if(t>0){var n=new Uint8Array(this._raw.buffer,this._cursor.offset,t);return this._cursor.offset+=t,n}return null},o.prototype._readUTF8String=function(){var e=this._raw.byteLength-(this._cursor.offset-this._offset),t=null;return e>0&&(t=new DataView(this._raw.buffer,this._cursor.offset,e),this._cursor.offset+=e),t?i.Utils.dataViewToString(t):t},o.prototype._readUTF8TerminatedString=function(){var e=this._raw.byteLength-(this._cursor.offset-this._offset),t=null;if(e>0){var n;for(t=new DataView(this._raw.buffer,this._cursor.offset,e),n=0;n<e&&0!==t.getUint8(n);n++);t=new DataView(this._raw.buffer,this._cursor.offset,n),this._cursor.offset+=Math.min(n+1,e)}return t?i.Utils.dataViewToString(t):t},o.prototype._parseBox=function(){if(this._parsing=!0,this._cursor.offset=this._offset,this._offset+8>this._raw.buffer.byteLength)this._root._incomplete=!0;else{switch(this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this.size){case 0:this._raw=new DataView(this._raw.buffer,this._offset);break;case 1:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.largesize);break;default:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.size)}this._incomplete||(this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type)?this._parseContainerBox():this._data=this._readData())}},o.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},o.prototype._parseContainerBox=function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(o.parse(this))},o.prototype.append=function(e,t){i.Utils.appendBox(this,e,t)},o.prototype.getLength=function(){if(this._parsing=!1,this._rawo=null,this.size=0,this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type))for(var e=0;e<this.boxes.length;e++)this.size+=this.boxes[e].getLength();return this._data&&this._writeData(this._data),this.size},o.prototype.write=function(){switch(this._parsing=!1,this._cursor.offset=this._parent._cursor.offset,this.size){case 0:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.parent._rawo.byteLength-this._cursor.offset);break;case 1:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.largesize);break;default:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.size)}if(this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type))for(var e=0;e<this.boxes.length;e++)this.boxes[e].write();return this._data&&this._writeData(this._data),this._parent._cursor.offset+=this.size,this.size},o.prototype._writeInt=function(e,t){if(this._rawo){var n=this._cursor.offset-this._rawo.byteOffset;switch(e){case 8:this._rawo.setInt8(n,t);break;case 16:this._rawo.setInt16(n,t);break;case 32:this._rawo.setInt32(n,t);break;case 64:var r=Math.floor(t/Math.pow(2,32)),i=t-r*Math.pow(2,32);this._rawo.setUint32(n,r),this._rawo.setUint32(n+4,i)}this._cursor.offset+=e>>3}else this.size+=e>>3},o.prototype._writeUint=function(e,t){if(this._rawo){var n,r,i=this._cursor.offset-this._rawo.byteOffset;switch(e){case 8:this._rawo.setUint8(i,t);break;case 16:this._rawo.setUint16(i,t);break;case 24:n=(16776960&t)>>8,r=255&t,this._rawo.setUint16(i,n),this._rawo.setUint8(i+2,r);break;case 32:this._rawo.setUint32(i,t);break;case 64:r=t-(n=Math.floor(t/Math.pow(2,32)))*Math.pow(2,32),this._rawo.setUint32(i,n),this._rawo.setUint32(i+4,r)}this._cursor.offset+=e>>3}else this.size+=e>>3},o.prototype._writeString=function(e,t){for(var n=0;n<e;n++)this._writeUint(8,t.charCodeAt(n))},o.prototype._writeTerminatedString=function(e){if(0!==e.length){for(var t=0;t<e.length;t++)this._writeUint(8,e.charCodeAt(t));this._writeUint(8,0)}},o.prototype._writeTemplate=function(e,t){var n=Math.floor(t),r=(t-n)*Math.pow(2,e/2);this._writeUint(e/2,n),this._writeUint(e/2,r)},o.prototype._writeData=function(e){if(e)if(this._rawo){if(e instanceof Array){for(var t=this._cursor.offset-this._rawo.byteOffset,n=0;n<e.length;n++)this._rawo.setInt8(t+n,e[n]);this._cursor.offset+=e.length}e instanceof Uint8Array&&(this._root.bytes.set(e,this._cursor.offset),this._cursor.offset+=e.length)}else this.size+=e.length},o.prototype._writeUTF8String=function(e){var t=i.Utils.utf8ToByteArray(e);if(this._rawo)for(var n=new DataView(this._rawo.buffer,this._cursor.offset,t.length),r=0;r<t.length;r++)n.setUint8(r,t[r]);else this.size+=t.length},o.prototype._writeField=function(e,t,n){switch(e){case"uint":this._writeUint(t,n);break;case"int":this._writeInt(t,n);break;case"template":this._writeTemplate(t,n);break;case"string":-1==t?this._writeTerminatedString(n):this._writeString(t,n);break;case"data":this._writeData(n);break;case"utf8":this._writeUTF8String(n)}},o.prototype._boxProcessors.ardi=function(){this._procFullBox(),this._procField("audio_rendering_indication","uint",8)},o.prototype._boxProcessors.avc1=o.prototype._boxProcessors.avc2=o.prototype._boxProcessors.avc3=o.prototype._boxProcessors.avc4=o.prototype._boxProcessors.hvc1=o.prototype._boxProcessors.hev1=o.prototype._boxProcessors.encv=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procField("pre_defined1","uint",16),this._procField("reserved2","uint",16),this._procFieldArray("pre_defined2",3,"uint",32),this._procField("width","uint",16),this._procField("height","uint",16),this._procField("horizresolution","template",32),this._procField("vertresolution","template",32),this._procField("reserved3","uint",32),this._procField("frame_count","uint",16),this._procFieldArray("compressorname",32,"uint",8),this._procField("depth","uint",16),this._procField("pre_defined3","int",16),this._procField("config","data",-1)},o.prototype._boxProcessors.ctts=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(e){this._procEntryField(e,"sample_count","uint",32),this._procEntryField(e,"sample_offset",1===this.version?"int":"uint",32)}))},o.prototype._boxProcessors.dref=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},o.prototype._boxProcessors.elng=function(){this._procFullBox(),this._procField("extended_language","utf8string")},o.prototype._boxProcessors.elst=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(e){this._procEntryField(e,"segment_duration","uint",1===this.version?64:32),this._procEntryField(e,"media_time","int",1===this.version?64:32),this._procEntryField(e,"media_rate_integer","int",16),this._procEntryField(e,"media_rate_fraction","int",16)}))},o.prototype._boxProcessors.emsg=function(){this._procFullBox(),1==this.version?(this._procField("timescale","uint",32),this._procField("presentation_time","uint",64),this._procField("event_duration","uint",32),this._procField("id","uint",32),this._procField("scheme_id_uri","string",-1),this._procField("value","string",-1)):(this._procField("scheme_id_uri","string",-1),this._procField("value","string",-1),this._procField("timescale","uint",32),this._procField("presentation_time_delta","uint",32),this._procField("event_duration","uint",32),this._procField("id","uint",32)),this._procField("message_data","data",-1)},o.prototype._boxProcessors.free=o.prototype._boxProcessors.skip=function(){this._procField("data","data",-1)},o.prototype._boxProcessors.frma=function(){this._procField("data_format","uint",32)},o.prototype._boxProcessors.ftyp=o.prototype._boxProcessors.styp=function(){this._procField("major_brand","string",4),this._procField("minor_version","uint",32);var e=-1;this._parsing&&(e=(this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset))/4),this._procFieldArray("compatible_brands",e,"string",4)},o.prototype._boxProcessors.hdlr=function(){this._procFullBox(),this._procField("pre_defined","uint",32),this._procField("handler_type","string",4),this._procFieldArray("reserved",3,"uint",32),this._procField("name","string",-1)},o.prototype._boxProcessors.imda=function(){this._procField("imda_identifier","uint",32),this._procField("data","data",-1)},o.prototype._boxProcessors.kind=function(){this._procFullBox(),this._procField("schemeURI","utf8string"),this._procField("value","utf8string")},o.prototype._boxProcessors.labl=function(){this._procFullBox(),this.is_group_label=!!(1&this.flags),this._procField("label_id","uint",16),this._procField("language","utf8string"),this._procField("label","utf8string")},o.prototype._boxProcessors.mdat=function(){this._procField("data","data",-1)},o.prototype._boxProcessors.mdhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",1==this.version?64:32),this._parsing||"string"!=typeof this.language||(this.language=this.language.charCodeAt(0)-96<<10|this.language.charCodeAt(1)-96<<5|this.language.charCodeAt(2)-96),this._procField("language","uint",16),this._parsing&&(this.language=String.fromCharCode(96+(this.language>>10&31),96+(this.language>>5&31),96+(31&this.language))),this._procField("pre_defined","uint",16)},o.prototype._boxProcessors.mehd=function(){this._procFullBox(),this._procField("fragment_duration","uint",1==this.version?64:32)},o.prototype._boxProcessors.meta=function(){this._procFullBox()},o.prototype._boxProcessors.mfhd=function(){this._procFullBox(),this._procField("sequence_number","uint",32)},o.prototype._boxProcessors.mfro=function(){this._procFullBox(),this._procField("mfra_size","uint",32)},o.prototype._boxProcessors.mp4a=o.prototype._boxProcessors.enca=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procField("channelcount","uint",16),this._procField("samplesize","uint",16),this._procField("pre_defined","uint",16),this._procField("reserved3","uint",16),this._procField("samplerate","template",32),this._procField("esds","data",-1)},o.prototype._boxProcessors.mvhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",1==this.version?64:32),this._procField("rate","template",32),this._procField("volume","template",16),this._procField("reserved1","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procFieldArray("matrix",9,"template",32),this._procFieldArray("pre_defined",6,"uint",32),this._procField("next_track_ID","uint",32)},o.prototype._boxProcessors.payl=function(){this._procField("cue_text","utf8")},o.prototype._boxProcessors.prft=function(){this._procFullBox(),this._procField("reference_track_ID","uint",32),this._procField("ntp_timestamp_sec","uint",32),this._procField("ntp_timestamp_frac","uint",32),this._procField("media_time","uint",1==this.version?64:32)},o.prototype._boxProcessors.prsl=function(){this._procFullBox(),this._procField("group_id","uint",32),this._procField("num_entities_in_group","uint",32),this._procEntries("entities",this.num_entities_in_group,(function(e){this._procEntryField(e,"entity_id","uint",32)})),4096&this.flags&&this._procField("preselection_tag","utf8string"),8192&this.flags&&this._procField("selection_priority","uint",8),16384&this.flags&&this._procField("interleaving_tag","utf8string")},o.prototype._boxProcessors.pssh=function(){this._procFullBox(),this._procFieldArray("SystemID",16,"uint",8),this._procField("DataSize","uint",32),this._procFieldArray("Data",this.DataSize,"uint",8)},o.prototype._boxProcessors.schm=function(){this._procFullBox(),this._procField("scheme_type","uint",32),this._procField("scheme_version","uint",32),1&this.flags&&this._procField("scheme_uri","string",-1)},o.prototype._boxProcessors.sdtp=function(){this._procFullBox();var e=-1;this._parsing&&(e=this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset)),this._procFieldArray("sample_dependency_table",e,"uint",8)},o.prototype._boxProcessors.sidx=function(){this._procFullBox(),this._procField("reference_ID","uint",32),this._procField("timescale","uint",32),this._procField("earliest_presentation_time","uint",1==this.version?64:32),this._procField("first_offset","uint",1==this.version?64:32),this._procField("reserved","uint",16),this._procField("reference_count","uint",16),this._procEntries("references",this.reference_count,(function(e){this._parsing||(e.reference=(1&e.reference_type)<<31,e.reference|=2147483647&e.referenced_size,e.sap=(1&e.starts_with_SAP)<<31,e.sap|=(3&e.SAP_type)<<28,e.sap|=268435455&e.SAP_delta_time),this._procEntryField(e,"reference","uint",32),this._procEntryField(e,"subsegment_duration","uint",32),this._procEntryField(e,"sap","uint",32),this._parsing&&(e.reference_type=e.reference>>31&1,e.referenced_size=2147483647&e.reference,e.starts_with_SAP=e.sap>>31&1,e.SAP_type=e.sap>>28&7,e.SAP_delta_time=268435455&e.sap)}))},o.prototype._boxProcessors.smhd=function(){this._procFullBox(),this._procField("balance","uint",16),this._procField("reserved","uint",16)},o.prototype._boxProcessors.ssix=function(){this._procFullBox(),this._procField("subsegment_count","uint",32),this._procEntries("subsegments",this.subsegment_count,(function(e){this._procEntryField(e,"ranges_count","uint",32),this._procSubEntries(e,"ranges",e.ranges_count,(function(e){this._procEntryField(e,"level","uint",8),this._procEntryField(e,"range_size","uint",24)}))}))},o.prototype._boxProcessors.stsd=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},o.prototype._boxProcessors.sttg=function(){this._procField("settings","utf8")},o.prototype._boxProcessors.stts=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(e){this._procEntryField(e,"sample_count","uint",32),this._procEntryField(e,"sample_delta","uint",32)}))},o.prototype._boxProcessors.subs=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(e){this._procEntryField(e,"sample_delta","uint",32),this._procEntryField(e,"subsample_count","uint",16),this._procSubEntries(e,"subsamples",e.subsample_count,(function(e){this._procEntryField(e,"subsample_size","uint",1===this.version?32:16),this._procEntryField(e,"subsample_priority","uint",8),this._procEntryField(e,"discardable","uint",8),this._procEntryField(e,"codec_specific_parameters","uint",32)}))}))},o.prototype._boxProcessors.tenc=function(){this._procFullBox(),this._procField("default_IsEncrypted","uint",24),this._procField("default_IV_size","uint",8),this._procFieldArray("default_KID",16,"uint",8)},o.prototype._boxProcessors.tfdt=function(){this._procFullBox(),this._procField("baseMediaDecodeTime","uint",1==this.version?64:32)},o.prototype._boxProcessors.tfhd=function(){this._procFullBox(),this._procField("track_ID","uint",32),1&this.flags&&this._procField("base_data_offset","uint",64),2&this.flags&&this._procField("sample_description_offset","uint",32),8&this.flags&&this._procField("default_sample_duration","uint",32),16&this.flags&&this._procField("default_sample_size","uint",32),32&this.flags&&this._procField("default_sample_flags","uint",32)},o.prototype._boxProcessors.tfra=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._parsing||(this.reserved=0,this.reserved|=(48&this.length_size_of_traf_num)<<4,this.reserved|=(12&this.length_size_of_trun_num)<<2,this.reserved|=3&this.length_size_of_sample_num),this._procField("reserved","uint",32),this._parsing&&(this.length_size_of_traf_num=(48&this.reserved)>>4,this.length_size_of_trun_num=(12&this.reserved)>>2,this.length_size_of_sample_num=3&this.reserved),this._procField("number_of_entry","uint",32),this._procEntries("entries",this.number_of_entry,(function(e){this._procEntryField(e,"time","uint",1===this.version?64:32),this._procEntryField(e,"moof_offset","uint",1===this.version?64:32),this._procEntryField(e,"traf_number","uint",8*(this.length_size_of_traf_num+1)),this._procEntryField(e,"trun_number","uint",8*(this.length_size_of_trun_num+1)),this._procEntryField(e,"sample_number","uint",8*(this.length_size_of_sample_num+1))}))},o.prototype._boxProcessors.tkhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("track_ID","uint",32),this._procField("reserved1","uint",32),this._procField("duration","uint",1==this.version?64:32),this._procFieldArray("reserved2",2,"uint",32),this._procField("layer","uint",16),this._procField("alternate_group","uint",16),this._procField("volume","template",16),this._procField("reserved3","uint",16),this._procFieldArray("matrix",9,"template",32),this._procField("width","template",32),this._procField("height","template",32)},o.prototype._boxProcessors.trex=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._procField("default_sample_description_index","uint",32),this._procField("default_sample_duration","uint",32),this._procField("default_sample_size","uint",32),this._procField("default_sample_flags","uint",32)},o.prototype._boxProcessors.trun=function(){this._procFullBox(),this._procField("sample_count","uint",32),1&this.flags&&this._procField("data_offset","int",32),4&this.flags&&this._procField("first_sample_flags","uint",32),this._procEntries("samples",this.sample_count,(function(e){256&this.flags&&this._procEntryField(e,"sample_duration","uint",32),512&this.flags&&this._procEntryField(e,"sample_size","uint",32),1024&this.flags&&this._procEntryField(e,"sample_flags","uint",32),2048&this.flags&&this._procEntryField(e,"sample_composition_time_offset",1===this.version?"int":"uint",32)}))},o.prototype._boxProcessors["url "]=o.prototype._boxProcessors["urn "]=function(){this._procFullBox(),"urn "===this.type&&this._procField("name","string",-1),this._procField("location","string",-1)},o.prototype._boxProcessors.vlab=function(){this._procField("source_label","utf8")},o.prototype._boxProcessors.vmhd=function(){this._procFullBox(),this._procField("graphicsmode","uint",16),this._procFieldArray("opcolor",3,"uint",16)},o.prototype._boxProcessors.vttC=function(){this._procField("config","utf8")},o.prototype._boxProcessors.vtte=function(){}},79826:function(e,t,n){"use strict";var r=n(95429);n(52675),n(16280),n(28706),n(44114),n(34782),n(62010),n(40150),n(1480),n(40875),n(79432),n(26099),n(3362),n(15472);var i,a="object"===("undefined"==typeof Reflect?"undefined":r(Reflect))?Reflect:null,o=a&&"function"==typeof a.apply?a.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};i=a&&"function"==typeof a.ownKeys?a.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function u(){u.init.call(this)}e.exports=u,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}v(e,t,a,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&v(e,"error",t,{once:!0})}(e,i)}))},u.EventEmitter=u,u.prototype._events=void 0,u.prototype._eventsCount=0,u.prototype._maxListeners=void 0;var c=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+r(e))}function f(e){return void 0===e._maxListeners?u.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var i,a,o,s;if(l(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),o=a[t]),void 0===o)o=a[t]=n,++e._eventsCount;else if("function"==typeof o?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=f(e))>0&&o.length>i&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=o.length,s=u,console&&console.warn&&console.warn(s)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function g(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=h.bind(r);return i.listener=n,r.wrapFn=i,i}function p(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):E(i,i.length)}function m(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function E(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function v(e,t,n,i){if("function"==typeof e.on)i.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+r(e));e.addEventListener(t,(function r(a){i.once&&e.removeEventListener(t,r),n(a)}))}}Object.defineProperty(u,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");c=e}}),u.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},u.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},u.prototype.getMaxListeners=function(){return f(this)},u.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)o(u,this,t);else{var c=u.length,l=E(u,c);for(n=0;n<c;++n)o(l[n],this,t)}return!0},u.prototype.addListener=function(e,t){return d(this,e,t,!1)},u.prototype.on=u.prototype.addListener,u.prototype.prependListener=function(e,t){return d(this,e,t,!0)},u.prototype.once=function(e,t){return l(t),this.on(e,g(this,e,t)),this},u.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,g(this,e,t)),this},u.prototype.removeListener=function(e,t){var n,r,i,a,o;if(l(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,o||t)}return this},u.prototype.off=u.prototype.removeListener,u.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,a=Object.keys(n);for(r=0;r<a.length;++r)"removeListener"!==(i=a[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},u.prototype.listeners=function(e){return p(this,e,!0)},u.prototype.rawListeners=function(e){return p(this,e,!1)},u.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},u.prototype.listenerCount=m,u.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},37316:function(e,t,n){"use strict";var r=n(95429);n(79432),n(26099),n(84864),n(57465),n(27495),n(69479),n(87745),n(38781),e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==r(t)&&"object"==r(n)){if(t.constructor!==n.constructor)return!1;var i,a,o;if(Array.isArray(t)){if((i=t.length)!=n.length)return!1;for(a=i;0!=a--;)if(!e(t[a],n[a]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((i=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(a=i;0!=a--;)if(!Object.prototype.hasOwnProperty.call(n,o[a]))return!1;for(a=i;0!=a--;){var s=o[a];if(!e(t[s],n[s]))return!1}return!0}return t!=t&&n!=n}},87986:function(e,t){t.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,u=(1<<s)-1,c=u>>1,l=-7,f=n?i-1:0,d=n?-1:1,h=e[t+f];for(f+=d,a=h&(1<<-l)-1,h>>=-l,l+=s;l>0;a=256*a+e[t+f],f+=d,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=r;l>0;o=256*o+e[t+f],f+=d,l-=8);if(0===a)a=1-c;else{if(a===u)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,r),a-=c}return(h?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,u,c=8*a-i-1,l=(1<<c)-1,f=l>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:a-1,g=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+f>=1?d/u:d*Math.pow(2,1-f))*u>=2&&(o++,u/=2),o+f>=l?(s=0,o=l):o+f>=1?(s=(t*u-1)*Math.pow(2,i),o+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[n+h]=255&s,h+=g,s/=256,i-=8);for(o=o<<i|s,c+=i;c>0;e[n+h]=255&o,h+=g,o/=256,c-=8);e[n+h-g]|=128*p}},65474:function(e,t,n){var r=n(95429);n(16280),n(2008),n(48598),n(44114),n(34782),n(54554),n(62010),n(18111),n(22489),n(7588),n(18237),n(33110),n(2892),n(79432),n(26099),n(27495),n(38781),n(27337),n(71761),n(25440),n(42762),n(23500),function(e){e.parser=function(e,t){return new a(e,t)},e.SAXParser=a,e.SAXStream=s,e.createStream=function(e,t){return new s(e,t)},e.MAX_BUFFER_LENGTH=65536;var t,i=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function a(t,n){if(!(this instanceof a))return new a(t,n);var r=this;!function(e){for(var t=0,n=i.length;t<n;t++)e[i[t]]=""}(r),r.q=r.c="",r.bufferCheckPosition=e.MAX_BUFFER_LENGTH,r.opt=n||{},r.opt.lowercase=r.opt.lowercase||r.opt.lowercasetags,r.looseCase=r.opt.lowercase?"toLowerCase":"toUpperCase",r.tags=[],r.closed=r.closedRoot=r.sawRoot=!1,r.tag=r.error=null,r.strict=!!t,r.noscript=!(!t&&!r.opt.noscript),r.state=C.BEGIN,r.strictEntities=r.opt.strictEntities,r.ENTITIES=r.strictEntities?Object.create(e.XML_ENTITIES):Object.create(e.ENTITIES),r.attribList=[],r.opt.xmlns&&(r.ns=Object.create(E)),r.trackPosition=!1!==r.opt.position,r.trackPosition&&(r.position=r.line=r.column=0),D(r,"onready")}e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(e){function t(){}return t.prototype=e,new t}),Object.keys||(Object.keys=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}),a.prototype={end:function(){x(this)},write:function(t){var n=this;if(this.error)throw this.error;if(n.closed)return L(n,"Cannot write after close. Assign an onready handler.");if(null===t)return x(n);"object"===r(t)&&(t=t.toString());for(var a=0,o="";o=q(t,a++),n.c=o,o;)switch(n.trackPosition&&(n.position++,"\n"===o?(n.line++,n.column=0):n.column++),n.state){case C.BEGIN:if(n.state=C.BEGIN_WHITESPACE,"\ufeff"===o)continue;V(n,o);continue;case C.BEGIN_WHITESPACE:V(n,o);continue;case C.TEXT:if(n.sawRoot&&!n.closedRoot){for(var s=a-1;o&&"<"!==o&&"&"!==o;)(o=q(t,a++))&&n.trackPosition&&(n.position++,"\n"===o?(n.line++,n.column=0):n.column++);n.textNode+=t.substring(s,a-1)}"<"!==o||n.sawRoot&&n.closedRoot&&!n.strict?(!I(u,o)||n.sawRoot&&!n.closedRoot||F(n,"Text data outside of root node."),"&"===o?n.state=C.TEXT_ENTITY:n.textNode+=o):(n.state=C.OPEN_WAKA,n.startTagPosition=n.position);continue;case C.SCRIPT:"<"===o?n.state=C.SCRIPT_ENDING:n.script+=o;continue;case C.SCRIPT_ENDING:"/"===o?n.state=C.CLOSE_TAG:(n.script+="<"+o,n.state=C.SCRIPT);continue;case C.OPEN_WAKA:if("!"===o)n.state=C.SGML_DECL,n.sgmlDecl="";else if(S(u,o));else if(S(v,o))n.state=C.OPEN_TAG,n.tagName=o;else if("/"===o)n.state=C.CLOSE_TAG,n.tagName="";else if("?"===o)n.state=C.PROC_INST,n.procInstName=n.procInstBody="";else{if(F(n,"Unencoded <"),n.startTagPosition+1<n.position){var c=n.position-n.startTagPosition;o=new Array(c).join(" ")+o}n.textNode+="<"+o,n.state=C.TEXT}continue;case C.SGML_DECL:(n.sgmlDecl+o).toUpperCase()===h?(O(n,"onopencdata"),n.state=C.CDATA,n.sgmlDecl="",n.cdata=""):n.sgmlDecl+o==="--"?(n.state=C.COMMENT,n.comment="",n.sgmlDecl=""):(n.sgmlDecl+o).toUpperCase()===g?(n.state=C.DOCTYPE,(n.doctype||n.sawRoot)&&F(n,"Inappropriately located doctype declaration"),n.doctype="",n.sgmlDecl=""):">"===o?(O(n,"onsgmldeclaration",n.sgmlDecl),n.sgmlDecl="",n.state=C.TEXT):S(f,o)?(n.state=C.SGML_DECL_QUOTED,n.sgmlDecl+=o):n.sgmlDecl+=o;continue;case C.SGML_DECL_QUOTED:o===n.q&&(n.state=C.SGML_DECL,n.q=""),n.sgmlDecl+=o;continue;case C.DOCTYPE:">"===o?(n.state=C.TEXT,O(n,"ondoctype",n.doctype),n.doctype=!0):(n.doctype+=o,"["===o?n.state=C.DOCTYPE_DTD:S(f,o)&&(n.state=C.DOCTYPE_QUOTED,n.q=o));continue;case C.DOCTYPE_QUOTED:n.doctype+=o,o===n.q&&(n.q="",n.state=C.DOCTYPE);continue;case C.DOCTYPE_DTD:n.doctype+=o,"]"===o?n.state=C.DOCTYPE:S(f,o)&&(n.state=C.DOCTYPE_DTD_QUOTED,n.q=o);continue;case C.DOCTYPE_DTD_QUOTED:n.doctype+=o,o===n.q&&(n.state=C.DOCTYPE_DTD,n.q="");continue;case C.COMMENT:"-"===o?n.state=C.COMMENT_ENDING:n.comment+=o;continue;case C.COMMENT_ENDING:"-"===o?(n.state=C.COMMENT_ENDED,n.comment=P(n.opt,n.comment),n.comment&&O(n,"oncomment",n.comment),n.comment=""):(n.comment+="-"+o,n.state=C.COMMENT);continue;case C.COMMENT_ENDED:">"!==o?(F(n,"Malformed comment"),n.comment+="--"+o,n.state=C.COMMENT):n.state=C.TEXT;continue;case C.CDATA:"]"===o?n.state=C.CDATA_ENDING:n.cdata+=o;continue;case C.CDATA_ENDING:"]"===o?n.state=C.CDATA_ENDING_2:(n.cdata+="]"+o,n.state=C.CDATA);continue;case C.CDATA_ENDING_2:">"===o?(n.cdata&&O(n,"oncdata",n.cdata),O(n,"onclosecdata"),n.cdata="",n.state=C.TEXT):"]"===o?n.cdata+="]":(n.cdata+="]]"+o,n.state=C.CDATA);continue;case C.PROC_INST:"?"===o?n.state=C.PROC_INST_ENDING:S(u,o)?n.state=C.PROC_INST_BODY:n.procInstName+=o;continue;case C.PROC_INST_BODY:if(!n.procInstBody&&S(u,o))continue;"?"===o?n.state=C.PROC_INST_ENDING:n.procInstBody+=o;continue;case C.PROC_INST_ENDING:">"===o?(O(n,"onprocessinginstruction",{name:n.procInstName,body:n.procInstBody}),n.procInstName=n.procInstBody="",n.state=C.TEXT):(n.procInstBody+="?"+o,n.state=C.PROC_INST_BODY);continue;case C.OPEN_TAG:S(A,o)?n.tagName+=o:(U(n),">"===o?G(n):"/"===o?n.state=C.OPEN_TAG_SLASH:(I(u,o)&&F(n,"Invalid character in tag name"),n.state=C.ATTRIB));continue;case C.OPEN_TAG_SLASH:">"===o?(G(n,!0),H(n)):(F(n,"Forward-slash in opening tag not followed by >"),n.state=C.ATTRIB);continue;case C.ATTRIB:if(S(u,o))continue;">"===o?G(n):"/"===o?n.state=C.OPEN_TAG_SLASH:S(v,o)?(n.attribName=o,n.attribValue="",n.state=C.ATTRIB_NAME):F(n,"Invalid attribute name");continue;case C.ATTRIB_NAME:"="===o?n.state=C.ATTRIB_VALUE:">"===o?(F(n,"Attribute without value"),n.attribValue=n.attribName,B(n),G(n)):S(u,o)?n.state=C.ATTRIB_NAME_SAW_WHITE:S(A,o)?n.attribName+=o:F(n,"Invalid attribute name");continue;case C.ATTRIB_NAME_SAW_WHITE:if("="===o)n.state=C.ATTRIB_VALUE;else{if(S(u,o))continue;F(n,"Attribute without value"),n.tag.attributes[n.attribName]="",n.attribValue="",O(n,"onattribute",{name:n.attribName,value:""}),n.attribName="",">"===o?G(n):S(v,o)?(n.attribName=o,n.state=C.ATTRIB_NAME):(F(n,"Invalid attribute name"),n.state=C.ATTRIB)}continue;case C.ATTRIB_VALUE:if(S(u,o))continue;S(f,o)?(n.q=o,n.state=C.ATTRIB_VALUE_QUOTED):(F(n,"Unquoted attribute value"),n.state=C.ATTRIB_VALUE_UNQUOTED,n.attribValue=o);continue;case C.ATTRIB_VALUE_QUOTED:if(o!==n.q){"&"===o?n.state=C.ATTRIB_VALUE_ENTITY_Q:n.attribValue+=o;continue}B(n),n.q="",n.state=C.ATTRIB_VALUE_CLOSED;continue;case C.ATTRIB_VALUE_CLOSED:S(u,o)?n.state=C.ATTRIB:">"===o?G(n):"/"===o?n.state=C.OPEN_TAG_SLASH:S(v,o)?(F(n,"No whitespace between attributes"),n.attribName=o,n.attribValue="",n.state=C.ATTRIB_NAME):F(n,"Invalid attribute name");continue;case C.ATTRIB_VALUE_UNQUOTED:if(I(d,o)){"&"===o?n.state=C.ATTRIB_VALUE_ENTITY_U:n.attribValue+=o;continue}B(n),">"===o?G(n):n.state=C.ATTRIB;continue;case C.CLOSE_TAG:if(n.tagName)">"===o?H(n):S(A,o)?n.tagName+=o:n.script?(n.script+="</"+n.tagName,n.tagName="",n.state=C.SCRIPT):(I(u,o)&&F(n,"Invalid tagname in closing tag"),n.state=C.CLOSE_TAG_SAW_WHITE);else{if(S(u,o))continue;I(v,o)?n.script?(n.script+="</"+o,n.state=C.SCRIPT):F(n,"Invalid tagname in closing tag."):n.tagName=o}continue;case C.CLOSE_TAG_SAW_WHITE:if(S(u,o))continue;">"===o?H(n):F(n,"Invalid characters in closing tag");continue;case C.TEXT_ENTITY:case C.ATTRIB_VALUE_ENTITY_Q:case C.ATTRIB_VALUE_ENTITY_U:var l,p;switch(n.state){case C.TEXT_ENTITY:l=C.TEXT,p="textNode";break;case C.ATTRIB_VALUE_ENTITY_Q:l=C.ATTRIB_VALUE_QUOTED,p="attribValue";break;case C.ATTRIB_VALUE_ENTITY_U:l=C.ATTRIB_VALUE_UNQUOTED,p="attribValue"}";"===o?(n[p]+=Y(n),n.entity="",n.state=l):S(n.entity.length?T:y,o)?n.entity+=o:(F(n,"Invalid character in entity name"),n[p]+="&"+n.entity+o,n.entity="",n.state=l);continue;default:throw new Error(n,"Unknown state: "+n.state)}return n.position>=n.bufferCheckPosition&&function(t){for(var n=Math.max(e.MAX_BUFFER_LENGTH,10),r=0,a=0,o=i.length;a<o;a++){var s=t[i[a]].length;if(s>n)switch(i[a]){case"textNode":M(t);break;case"cdata":O(t,"oncdata",t.cdata),t.cdata="";break;case"script":O(t,"onscript",t.script),t.script="";break;default:L(t,"Max buffer length exceeded: "+i[a])}r=Math.max(r,s)}var u=e.MAX_BUFFER_LENGTH-r;t.bufferCheckPosition=u+t.position}(n),n},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var e;M(e=this),""!==e.cdata&&(O(e,"oncdata",e.cdata),e.cdata=""),""!==e.script&&(O(e,"onscript",e.script),e.script="")}};try{t=n(3515).Stream}catch(e){t=function(){}}var o=e.EVENTS.filter((function(e){return"error"!==e&&"end"!==e}));function s(e,n){if(!(this instanceof s))return new s(e,n);t.apply(this),this._parser=new a(e,n),this.writable=!0,this.readable=!0;var r=this;this._parser.onend=function(){r.emit("end")},this._parser.onerror=function(e){r.emit("error",e),r._parser.error=null},this._decoder=null,o.forEach((function(e){Object.defineProperty(r,"on"+e,{get:function(){return r._parser["on"+e]},set:function(t){if(!t)return r.removeAllListeners(e),r._parser["on"+e]=t,t;r.on(e,t)},enumerable:!0,configurable:!1})}))}s.prototype=Object.create(t.prototype,{constructor:{value:s}}),s.prototype.write=function(e){if("function"==typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(e)){if(!this._decoder){var t=n(90748).I;this._decoder=new t("utf8")}e=this._decoder.write(e)}return this._parser.write(e.toString()),this.emit("data",e),!0},s.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},s.prototype.on=function(e,n){var r=this;return r._parser["on"+e]||-1===o.indexOf(e)||(r._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),r.emit.apply(r,t)}),t.prototype.on.call(r,e,n)};var u="\r\n\t ",c="0124356789",l="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",f="'\"",d=u+">",h="[CDATA[",g="DOCTYPE",p="http://www.w3.org/XML/1998/namespace",m="http://www.w3.org/2000/xmlns/",E={xml:p,xmlns:m};u=_(u),c=_(c),l=_(l);var v=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,A=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/,y=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,T=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/;function _(e){return e.split("").reduce((function(e,t){return e[t]=!0,e}),{})}function S(e,t){return function(e){return"[object RegExp]"===Object.prototype.toString.call(e)}(e)?!!t.match(e):e[t]}function I(e,t){return!S(e,t)}f=_(f),d=_(d);var b,R,N,C=0;for(var w in e.STATE={BEGIN:C++,BEGIN_WHITESPACE:C++,TEXT:C++,TEXT_ENTITY:C++,OPEN_WAKA:C++,SGML_DECL:C++,SGML_DECL_QUOTED:C++,DOCTYPE:C++,DOCTYPE_QUOTED:C++,DOCTYPE_DTD:C++,DOCTYPE_DTD_QUOTED:C++,COMMENT_STARTING:C++,COMMENT:C++,COMMENT_ENDING:C++,COMMENT_ENDED:C++,CDATA:C++,CDATA_ENDING:C++,CDATA_ENDING_2:C++,PROC_INST:C++,PROC_INST_BODY:C++,PROC_INST_ENDING:C++,OPEN_TAG:C++,OPEN_TAG_SLASH:C++,ATTRIB:C++,ATTRIB_NAME:C++,ATTRIB_NAME_SAW_WHITE:C++,ATTRIB_VALUE:C++,ATTRIB_VALUE_QUOTED:C++,ATTRIB_VALUE_CLOSED:C++,ATTRIB_VALUE_UNQUOTED:C++,ATTRIB_VALUE_ENTITY_Q:C++,ATTRIB_VALUE_ENTITY_U:C++,CLOSE_TAG:C++,CLOSE_TAG_SAW_WHITE:C++,SCRIPT:C++,SCRIPT_ENDING:C++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach((function(t){var n=e.ENTITIES[t],r="number"==typeof n?String.fromCharCode(n):n;e.ENTITIES[t]=r})),e.STATE)e.STATE[e.STATE[w]]=w;function D(e,t,n){e[t]&&e[t](n)}function O(e,t,n){e.textNode&&M(e),D(e,t,n)}function M(e){e.textNode=P(e.opt,e.textNode),e.textNode&&D(e,"ontext",e.textNode),e.textNode=""}function P(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function L(e,t){return M(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,D(e,"onerror",t),e}function x(e){return e.sawRoot&&!e.closedRoot&&F(e,"Unclosed root tag"),e.state!==C.BEGIN&&e.state!==C.BEGIN_WHITESPACE&&e.state!==C.TEXT&&L(e,"Unexpected end"),M(e),e.c="",e.closed=!0,D(e,"onend"),a.call(e,e.strict,e.opt),e}function F(e,t){if("object"!==r(e)||!(e instanceof a))throw new Error("bad call to strictFail");e.strict&&L(e,t)}function U(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,n=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(n.ns=t.ns),e.attribList.length=0,O(e,"onopentagstart",n)}function k(e,t){var n=e.indexOf(":")<0?["",e]:e.split(":"),r=n[0],i=n[1];return t&&"xmlns"===e&&(r="xmlns",i=""),{prefix:r,local:i}}function B(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==e.attribList.indexOf(e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName))e.attribName=e.attribValue="";else{if(e.opt.xmlns){var t=k(e.attribName,!0),n=t.prefix,r=t.local;if("xmlns"===n)if("xml"===r&&e.attribValue!==p)F(e,"xml: prefix must be bound to "+p+"\nActual: "+e.attribValue);else if("xmlns"===r&&e.attribValue!==m)F(e,"xmlns: prefix must be bound to "+m+"\nActual: "+e.attribValue);else{var i=e.tag,a=e.tags[e.tags.length-1]||e;i.ns===a.ns&&(i.ns=Object.create(a.ns)),i.ns[r]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,O(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}}function G(e,t){if(e.opt.xmlns){var n=e.tag,r=k(e.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||"",n.prefix&&!n.uri&&(F(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),n.uri=r.prefix);var i=e.tags[e.tags.length-1]||e;n.ns&&i.ns!==n.ns&&Object.keys(n.ns).forEach((function(t){O(e,"onopennamespace",{prefix:t,uri:n.ns[t]})}));for(var a=0,o=e.attribList.length;a<o;a++){var s=e.attribList[a],u=s[0],c=s[1],l=k(u,!0),f=l.prefix,d=l.local,h=""===f?"":n.ns[f]||"",g={name:u,value:c,prefix:f,local:d,uri:h};f&&"xmlns"!==f&&!h&&(F(e,"Unbound namespace prefix: "+JSON.stringify(f)),g.uri=f),e.tag.attributes[u]=g,O(e,"onattribute",g)}e.attribList.length=0}e.tag.isSelfClosing=!!t,e.sawRoot=!0,e.tags.push(e.tag),O(e,"onopentag",e.tag),t||(e.noscript||"script"!==e.tagName.toLowerCase()?e.state=C.TEXT:e.state=C.SCRIPT,e.tag=null,e.tagName=""),e.attribName=e.attribValue="",e.attribList.length=0}function H(e){if(!e.tagName)return F(e,"Weird empty close tag."),e.textNode+="</>",void(e.state=C.TEXT);if(e.script){if("script"!==e.tagName)return e.script+="</"+e.tagName+">",e.tagName="",void(e.state=C.SCRIPT);O(e,"onscript",e.script),e.script=""}var t=e.tags.length,n=e.tagName;e.strict||(n=n[e.looseCase]());for(var r=n;t--&&e.tags[t].name!==r;)F(e,"Unexpected close tag");if(t<0)return F(e,"Unmatched closing tag: "+e.tagName),e.textNode+="</"+e.tagName+">",void(e.state=C.TEXT);e.tagName=n;for(var i=e.tags.length;i-- >t;){var a=e.tag=e.tags.pop();e.tagName=e.tag.name,O(e,"onclosetag",e.tagName);var o={};for(var s in a.ns)o[s]=a.ns[s];var u=e.tags[e.tags.length-1]||e;e.opt.xmlns&&a.ns!==u.ns&&Object.keys(a.ns).forEach((function(t){var n=a.ns[t];O(e,"onclosenamespace",{prefix:t,uri:n})}))}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=C.TEXT}function Y(e){var t,n=e.entity,r=n.toLowerCase(),i="";return e.ENTITIES[n]?e.ENTITIES[n]:e.ENTITIES[r]?e.ENTITIES[r]:("#"===(n=r).charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),i=(t=parseInt(n,16)).toString(16)):(n=n.slice(1),i=(t=parseInt(n,10)).toString(10))),n=n.replace(/^0+/,""),i.toLowerCase()!==n?(F(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function V(e,t){"<"===t?(e.state=C.OPEN_WAKA,e.startTagPosition=e.position):I(u,t)&&(F(e,"Non-whitespace before first tag."),e.textNode=t,e.state=C.TEXT)}function q(e,t){var n="";return t<e.length&&(n=e.charAt(t)),n}C=e.STATE,String.fromCodePoint||(b=String.fromCharCode,R=Math.floor,N=function(){var e,t,n=[],r=-1,i=arguments.length;if(!i)return"";for(var a="";++r<i;){var o=Number(arguments[r]);if(!isFinite(o)||o<0||o>1114111||R(o)!==o)throw RangeError("Invalid code point: "+o);o<=65535?n.push(o):(e=55296+((o-=65536)>>10),t=o%1024+56320,n.push(e,t)),(r+1===i||n.length>16384)&&(a+=b.apply(null,n),n.length=0)}return a},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:N,configurable:!0,writable:!0}):String.fromCodePoint=N)}(t)},76739:function(e,t,n){n(44114),n(54554),n(2892),n(27495),function(e,t,n,r,i){function a(e){if("contents"in e)for(var t=("styleAttrs"in e?e.styleAttrs[r.byName.ruby.qname]:null),n="span"===e.kind&&("container"===t||"textContainer"===t||"baseContainer"===t),i=e.contents.length-1;i>=0;i--)!n||"styleAttrs"in e.contents[i]&&r.byName.ruby.qname in e.contents[i].styleAttrs?a(e.contents[i]):delete e.contents[i]}function o(e,t,n,r){var i=r&&"seq"===r.timeContainer,a=0;r&&(a=i&&n?n.end:r.begin),t.begin=t.explicit_begin?t.explicit_begin+a:a;var s=t.begin,u=null;if("sets"in t)for(var c=0;c<t.sets.length;c++)o(e,t.sets[c],u,t),s="seq"===t.timeContainer?t.sets[c].end:Math.max(s,t.sets[c].end),u=t.sets[c];if("contents"in t){if("contents"in t)for(var l=0;l<t.contents.length;l++)o(e,t.contents[l],u,t),s="seq"===t.timeContainer?t.contents[l].end:Math.max(s,t.contents[l].end),u=t.contents[l]}else s=i?t.begin:Number.POSITIVE_INFINITY;null!==t.explicit_end&&null!==t.explicit_dur?t.end=Math.min(t.begin+t.explicit_dur,a+t.explicit_end):null===t.explicit_end&&null!==t.explicit_dur?t.end=t.begin+t.explicit_dur:null!==t.explicit_end&&null===t.explicit_dur?t.end=a+t.explicit_end:t.end=s,delete t.explicit_begin,delete t.explicit_dur,delete t.explicit_end,e._registerEvent(t)}function s(e){this.node=e}function u(){this.events=[],this.head=new c,this.body=null}function c(){this.styling=new l,this.layout=new h}function l(){this.styles={},this.initials={}}function f(){this.id=null,this.styleAttrs=null,this.styleRefs=null}function d(){this.styleAttrs=null}function h(){this.regions={}}function g(e,t){p.call(this,"image"),this.src=e,this.type=t}function p(e){this.kind=e}function m(e){this.id=e}function E(e){this.regionID=e}function v(e){this.styleAttrs=e}function A(e){this.sets=e}function y(e){this.contents=e}function T(e,t,n){this.explicit_begin=e,this.explicit_end=t,this.explicit_dur=n}function _(){p.call(this,"body")}function S(){p.call(this,"div")}function I(){p.call(this,"p")}function b(){p.call(this,"span")}function R(){p.call(this,"span")}function N(){p.call(this,"br")}function C(){}function w(){}function D(e){return e&&"xml:id"in e.attributes&&e.attributes["xml:id"].value||null}function O(e){return e&&"style"in e.attributes?e.attributes.style.value.split(" "):[]}function M(e,t){var n={};if(null!==e)for(var i in e.attributes){var a=e.attributes[i].uri+" "+e.attributes[i].local,o=r.byQName[a];if(void 0!==o){var s=o.parse(e.attributes[i].value);null!==s?(n[a]=s,o===r.byName.zIndex&&k(t,"zIndex attribute present but not used by IMSC1 since regions do not overlap")):B(t,"Cannot parse styling attribute "+a+" --\x3e "+e.attributes[i].value)}}return n}function P(e,t,n){for(var r in e.attributes)if(e.attributes[r].uri===t&&e.attributes[r].local===n)return e.attributes[r].value;return null}function L(e,t,n){var r,i=null;return null!==(r=/^(\d+(?:\.\d+)?)f$/.exec(n))?null!==t&&(i=parseFloat(r[1])/t):null!==(r=/^(\d+(?:\.\d+)?)t$/.exec(n))?null!==e&&(i=parseFloat(r[1])/e):null!==(r=/^(\d+(?:\.\d+)?)ms$/.exec(n))?i=parseFloat(r[1])/1e3:null!==(r=/^(\d+(?:\.\d+)?)s$/.exec(n))?i=parseFloat(r[1]):null!==(r=/^(\d+(?:\.\d+)?)h$/.exec(n))?i=3600*parseFloat(r[1]):null!==(r=/^(\d+(?:\.\d+)?)m$/.exec(n))?i=60*parseFloat(r[1]):null!==(r=/^(\d{2,}):(\d\d):(\d\d(?:\.\d+)?)$/.exec(n))?i=3600*parseInt(r[1])+60*parseInt(r[2])+parseFloat(r[3]):null!==(r=/^(\d{2,}):(\d\d):(\d\d)\:(\d{2,})$/.exec(n))&&null!==t&&(i=3600*parseInt(r[1])+60*parseInt(r[2])+parseInt(r[3])+(null===r[4]?0:parseInt(r[4])/t)),i}function x(e,t,n){for(;t.styleRefs.length>0;){var r=t.styleRefs.pop();r in e.styles?(x(e,e.styles[r],n),U(e.styles[r].styleAttrs,t.styleAttrs)):B(n,"Non-existant style id referenced")}}function F(e,t,n,r){for(var i=t.length-1;i>=0;i--){var a=t[i];a in e.styles?U(e.styles[a].styleAttrs,n):B(r,"Non-existant style id referenced")}}function U(e,t){for(var n in e)e.hasOwnProperty(n)&&(n in t||(t[n]=e[n]))}function k(e,t){if(e&&e.warn&&e.warn(t))throw t}function B(e,t){if(e&&e.error&&e.error(t))throw t}function G(e,t){throw e&&e.fatal&&e.fatal(t),t}function H(e,t){for(var n,r=0,i=e.length-1;r<=i;){var a=e[n=Math.floor((r+i)/2)];if(a<t)r=n+1;else{if(!(a>t))return{found:!0,index:n};i=n-1}}return{found:!1,index:r}}e.fromXML=function(e,i,p){var m=t.parser(!0,{xmlns:!0}),E=[],v=[],A=[],y=0,T=null;m.onclosetag=function(e){if(E[0]instanceof C)null!==T.head&&null!==T.head.styling&&F(T.head.styling,E[0].styleRefs,E[0].styleAttrs,i),delete E[0].styleRefs;else if(E[0]instanceof l)for(var t in E[0].styles)E[0].styles.hasOwnProperty(t)&&x(E[0],E[0].styles[t],i);else if(E[0]instanceof I||E[0]instanceof b){if(E[0].contents.length>1){var r,a=[E[0].contents[0]];for(r=1;r<E[0].contents.length;r++)E[0].contents[r]instanceof R&&a[a.length-1]instanceof R?a[a.length-1].text+=E[0].contents[r].text:a.push(E[0].contents[r]);E[0].contents=a}E[0]instanceof b&&1===E[0].contents.length&&E[0].contents[0]instanceof R&&(E[0].text=E[0].contents[0].text,delete E[0].contents)}else E[0]instanceof s&&(E[0].node.uri===n.ns_tt&&"metadata"===E[0].node.local?y--:y>0&&p&&"onCloseTag"in p&&p.onCloseTag());A.shift(),v.shift(),E.shift()},m.ontext=function(e){if(void 0===E[0]);else if(E[0]instanceof b||E[0]instanceof I){if(E[0]instanceof b){var t=E[0].styleAttrs[r.byName.ruby.qname];if("container"===t||"textContainer"===t||"baseContainer"===t)return}var n=new R;n.initFromText(T,E[0],e,v[0],A[0],i),E[0].contents.push(n)}else E[0]instanceof s&&y>0&&p&&"onText"in p&&p.onText(e)},m.onopentag=function(e){var t=e.attributes["xml:space"];t?A.unshift(t.value):0===A.length?A.unshift("default"):A.unshift(A[0]);var a=e.attributes["xml:lang"];if(a?v.unshift(a.value):0===v.length?v.unshift(""):v.unshift(v[0]),e.uri===n.ns_tt)if("tt"===e.local)null!==T&&G(i,"Two <tt> elements at ("+this.line+","+this.column+")"),(T=new u).initFromNode(e,v[0],i),E.unshift(T);else if("head"===e.local)E[0]instanceof u||G(i,"Parent of <head> element is not <tt> at ("+this.line+","+this.column+")"),E.unshift(T.head);else if("styling"===e.local)E[0]instanceof c||G(i,"Parent of <styling> element is not <head> at ("+this.line+","+this.column+")"),E.unshift(T.head.styling);else if("style"===e.local){var o;E[0]instanceof l?((o=new f).initFromNode(e,i),o.id?T.head.styling.styles[o.id]=o:B(i,"<style> element missing @id attribute"),E.unshift(o)):E[0]instanceof C?((o=new f).initFromNode(e,i),U(o.styleAttrs,E[0].styleAttrs),E.unshift(o)):G(i,"Parent of <style> element is not <styling> or <region> at ("+this.line+","+this.column+")")}else if("initial"===e.local){var m;if(E[0]instanceof l){for(var R in(m=new d).initFromNode(e,i),m.styleAttrs)m.styleAttrs.hasOwnProperty(R)&&(T.head.styling.initials[R]=m.styleAttrs[R]);E.unshift(m)}else G(i,"Parent of <initial> element is not <styling> at ("+this.line+","+this.column+")")}else if("layout"===e.local)E[0]instanceof c||G(i,"Parent of <layout> element is not <head> at "+this.line+","+this.column+")"),E.unshift(T.head.layout);else if("region"===e.local){E[0]instanceof h||G(i,"Parent of <region> element is not <layout> at "+this.line+","+this.column+")");var D=new C;D.initFromNode(T,e,v[0],i),!D.id||D.id in T.head.layout.regions?B(i,"Ignoring <region> with duplicate or missing @id at "+this.line+","+this.column+")"):T.head.layout.regions[D.id]=D,E.unshift(D)}else if("body"===e.local){E[0]instanceof u||G(i,"Parent of <body> element is not <tt> at "+this.line+","+this.column+")"),null!==T.body&&G(i,"Second <body> element at "+this.line+","+this.column+")");var O=new _;O.initFromNode(T,e,v[0],i),T.body=O,E.unshift(O)}else if("div"===e.local){E[0]instanceof S||E[0]instanceof _||G(i,"Parent of <div> element is not <body> or <div> at "+this.line+","+this.column+")");var M=new S;M.initFromNode(T,E[0],e,v[0],i);var P=M.styleAttrs[r.byName.backgroundImage.qname];P&&(M.contents.push(new g(P)),delete M.styleAttrs[r.byName.backgroundImage.qname]),E[0].contents.push(M),E.unshift(M)}else if("image"===e.local){E[0]instanceof S||G(i,"Parent of <image> element is not <div> at "+this.line+","+this.column+")");var L=new g;L.initFromNode(T,E[0],e,v[0],i),E[0].contents.push(L),E.unshift(L)}else if("p"===e.local){E[0]instanceof S||G(i,"Parent of <p> element is not <div> at "+this.line+","+this.column+")");var x=new I;x.initFromNode(T,E[0],e,v[0],i),E[0].contents.push(x),E.unshift(x)}else if("span"===e.local){E[0]instanceof b||E[0]instanceof I||G(i,"Parent of <span> element is not <span> or <p> at "+this.line+","+this.column+")");var F=new b;F.initFromNode(T,E[0],e,v[0],A[0],i),E[0].contents.push(F),E.unshift(F)}else if("br"===e.local){E[0]instanceof b||E[0]instanceof I||G(i,"Parent of <br> element is not <span> or <p> at "+this.line+","+this.column+")");var k=new N;k.initFromNode(T,E[0],e,v[0],i),E[0].contents.push(k),E.unshift(k)}else if("set"===e.local){E[0]instanceof b||E[0]instanceof I||E[0]instanceof S||E[0]instanceof _||E[0]instanceof C||E[0]instanceof N||G(i,"Parent of <set> element is not a content element or a region at "+this.line+","+this.column+")");var H=new w;H.initFromNode(T,E[0],e,i),E[0].sets.push(H),E.unshift(H)}else E.unshift(new s(e));else E.unshift(new s(e));if(E[0]instanceof s)if(e.uri===n.ns_tt&&"metadata"===e.local)y++;else if(y>0&&p&&"onOpenTag"in p){var Y=[];for(var V in e.attributes)Y[e.attributes[V].uri+" "+e.attributes[V].local]={uri:e.attributes[V].uri,local:e.attributes[V].local,value:e.attributes[V].value};p.onOpenTag(e.uri,e.local,Y)}},m.write(e).close(),delete T.head.styling.styles;var D=!1;for(var O in T.head.layout.regions)if(T.head.layout.regions.hasOwnProperty(O)){D=!0;break}if(!D){var M=C.prototype.createDefaultRegion(T.lang);T.head.layout.regions[M.id]=M}for(var P in T.head.layout.regions)T.head.layout.regions.hasOwnProperty(P)&&o(T,T.head.layout.regions[P],null,null);return T.body&&o(T,T.body,null,null),T.body&&a(T.body),T},u.prototype.initFromNode=function(e,t,r){var a=function(e,t){var r=P(e,n.ns_ttp,"cellResolution"),i=15,a=32;if(null!==r){var o=/(\d+) (\d+)/.exec(r);null!==o?(a=parseInt(o[1]),i=parseInt(o[2])):k(t,"Malformed cellResolution value (using initial value instead)")}return{w:a,h:i}}(e,r);this.cellLength={h:new i.ComputedLength(0,1/a.h),w:new i.ComputedLength(1/a.w,0)};var o=function(e,t){var r,i=P(e,n.ns_ttp,"frameRate"),a=30;null!==i&&(null!==(r=/(\d+)/.exec(i))?a=parseInt(r[1]):k(t,"Malformed frame rate attribute (using initial value instead)"));var o=P(e,n.ns_ttp,"frameRateMultiplier"),s=1;null!==o&&(null!==(r=/(\d+) (\d+)/.exec(o))?s=parseInt(r[1])/parseInt(r[2]):k(t,"Malformed frame rate multiplier attribute (using initial value instead)"));var u=s*a,c=1,l=P(e,n.ns_ttp,"tickRate");return null===l?null!==i&&(c=u):null!==(r=/(\d+)/.exec(l))?c=parseInt(r[1]):k(t,"Malformed tick rate attribute (using initial value instead)"),{effectiveFrameRate:u,tickRate:c}}(e,r);this.effectiveFrameRate=o.effectiveFrameRate,this.tickRate=o.tickRate,this.aspectRatio=function(e,t){var r=P(e,n.ns_ittp,"aspectRatio");null===r&&(r=P(e,n.ns_ttp,"displayAspectRatio"));var i=null;if(null!==r){var a=/(\d+)\s+(\d+)/.exec(r);if(null!==a){var o=parseInt(a[1]),s=parseInt(a[2]);0!==o&&0!==s?i=o/s:B(t,"Illegal aspectRatio values (ignoring)")}else B(t,"Malformed aspectRatio attribute (ignoring)")}return i}(e,r);var s=P(e,n.ns_ttp,"timeBase");null!==s&&"media"!==s&&G(r,"Unsupported time base");var u=function(e,t){var r=P(e,n.ns_tts,"extent");if(null===r)return null;var a=r.split(" ");if(2!==a.length)return k(t,"Malformed extent (ignoring)"),null;var o=i.parseLength(a[0]),s=i.parseLength(a[1]);return s&&o?{h:s,w:o}:(k(t,"Malformed extent values (ignoring)"),null)}(e,r);null===u?this.pxLength={h:null,w:null}:("px"===u.h.unit&&"px"===u.w.unit||G(r,"Extent on TT must be in px or absent"),this.pxLength={h:new i.ComputedLength(0,1/u.h.value),w:new i.ComputedLength(1/u.w.value,0)}),this.dimensions={h:new i.ComputedLength(0,1),w:new i.ComputedLength(1,0)},this.lang=t},u.prototype._registerEvent=function(e){if(!(e.end<=e.begin)){var t=H(this.events,e.begin);if(t.found||this.events.splice(t.index,0,e.begin),e.end!==Number.POSITIVE_INFINITY){var n=H(this.events,e.end);n.found||this.events.splice(n.index,0,e.end)}}},u.prototype.getMediaTimeRange=function(){return[this.events[0],this.events[this.events.length-1]]},u.prototype.getMediaTimeEvents=function(){return this.events},f.prototype.initFromNode=function(e,t){this.id=D(e),this.styleAttrs=M(e,t),this.styleRefs=O(e)},d.prototype.initFromNode=function(e,t){for(var r in this.styleAttrs={},e.attributes)if(e.attributes[r].uri===n.ns_itts||e.attributes[r].uri===n.ns_ebutts||e.attributes[r].uri===n.ns_tts){var i=e.attributes[r].uri+" "+e.attributes[r].local;this.styleAttrs[i]=e.attributes[r].value}},g.prototype.initFromNode=function(e,t,n,r,i){this.src="src"in n.attributes?n.attributes.src.value:null,this.src||B(i,"Invalid image@src attribute"),this.type="type"in n.attributes?n.attributes.type.value:null,this.type||B(i,"Invalid image@type attribute"),v.prototype.initFromNode.call(this,e,t,n,i),T.prototype.initFromNode.call(this,e,t,n,i),A.prototype.initFromNode.call(this,e,t,n,i),E.prototype.initFromNode.call(this,e,t,n,i),this.lang=r},m.prototype.initFromNode=function(e,t,n,r){this.id=D(n)},E.prototype.initFromNode=function(e,t,n,r){this.regionID=function(e){return e&&"region"in e.attributes?e.attributes.region.value:""}(n)},v.prototype.initFromNode=function(e,t,n,r){this.styleAttrs=M(n,r),null!==e.head&&null!==e.head.styling&&F(e.head.styling,O(n),this.styleAttrs,r)},A.prototype.initFromNode=function(e,t,n,r){this.sets=[]},y.prototype.initFromNode=function(e,t,n,r){this.contents=[]},T.prototype.initFromNode=function(e,t,n,r){var i=function(e,t,n,r){var i=null;n&&"begin"in n.attributes&&null===(i=L(e.tickRate,e.effectiveFrameRate,n.attributes.begin.value))&&k(r,"Malformed begin value "+n.attributes.begin.value+" (using 0)");var a=null;n&&"dur"in n.attributes&&null===(a=L(e.tickRate,e.effectiveFrameRate,n.attributes.dur.value))&&k(r,"Malformed dur value "+n.attributes.dur.value+" (ignoring)");var o=null;return n&&"end"in n.attributes&&null===(o=L(e.tickRate,e.effectiveFrameRate,n.attributes.end.value))&&k(r,"Malformed end value (ignoring)"),{explicit_begin:i,explicit_end:o,explicit_dur:a}}(e,0,n,r);this.explicit_begin=i.explicit_begin,this.explicit_end=i.explicit_end,this.explicit_dur=i.explicit_dur,this.timeContainer=function(e,t){var n=e&&"timeContainer"in e.attributes?e.attributes.timeContainer.value:null;return n&&"par"!==n?"seq"===n?"seq":(B(t,"Illegal value of timeContainer (assuming 'par')"),"par"):"par"}(n,r)},_.prototype.initFromNode=function(e,t,n,r){v.prototype.initFromNode.call(this,e,null,t,r),T.prototype.initFromNode.call(this,e,null,t,r),A.prototype.initFromNode.call(this,e,null,t,r),E.prototype.initFromNode.call(this,e,null,t,r),y.prototype.initFromNode.call(this,e,null,t,r),this.lang=n},S.prototype.initFromNode=function(e,t,n,r,i){v.prototype.initFromNode.call(this,e,t,n,i),T.prototype.initFromNode.call(this,e,t,n,i),A.prototype.initFromNode.call(this,e,t,n,i),E.prototype.initFromNode.call(this,e,t,n,i),y.prototype.initFromNode.call(this,e,t,n,i),this.lang=r},I.prototype.initFromNode=function(e,t,n,r,i){v.prototype.initFromNode.call(this,e,t,n,i),T.prototype.initFromNode.call(this,e,t,n,i),A.prototype.initFromNode.call(this,e,t,n,i),E.prototype.initFromNode.call(this,e,t,n,i),y.prototype.initFromNode.call(this,e,t,n,i),this.lang=r},b.prototype.initFromNode=function(e,t,n,r,i,a){v.prototype.initFromNode.call(this,e,t,n,a),T.prototype.initFromNode.call(this,e,t,n,a),A.prototype.initFromNode.call(this,e,t,n,a),E.prototype.initFromNode.call(this,e,t,n,a),y.prototype.initFromNode.call(this,e,t,n,a),this.space=i,this.lang=r},R.prototype.initFromText=function(e,t,n,r,i,a){T.prototype.initFromNode.call(this,e,t,null,a),this.text=n,this.space=i,this.lang=r},N.prototype.initFromNode=function(e,t,n,r,i){E.prototype.initFromNode.call(this,e,t,n,i),T.prototype.initFromNode.call(this,e,t,n,i),this.lang=r},C.prototype.createDefaultRegion=function(e){var t=new C;return m.call(t,""),v.call(t,{}),A.call(t,[]),T.call(t,0,Number.POSITIVE_INFINITY,null),this.lang=e,t},C.prototype.initFromNode=function(e,t,n,r){m.prototype.initFromNode.call(this,e,null,t,r),T.prototype.initFromNode.call(this,e,null,t,r),A.prototype.initFromNode.call(this,e,null,t,r),this.styleAttrs=M(t,r),this.styleRefs=O(t),this.lang=n},w.prototype.initFromNode=function(e,t,n,r){T.prototype.initFromNode.call(this,e,t,n,r);var i=M(n,r);for(var a in this.qname=null,this.value=null,i)if(i.hasOwnProperty(a)){if(this.qname){B(r,"More than one style specified on set");break}this.qname=a,this.value=i[a]}}}(t,"undefined"==typeof sax?n(65474):sax,"undefined"==typeof imscNames?n(50977):imscNames,"undefined"==typeof imscStyles?n(31219):imscStyles,"undefined"==typeof imscUtils?n(26404):imscUtils)},1612:function(e,t,n){n(74423),n(48598),n(62062),n(44114),n(54554),n(18111),n(61701),n(5914),n(26099),n(27495),n(90906),n(38781),n(21699),n(25440),n(42762);var r=/firefox/i.test(navigator.userAgent);!function(e,t,n){function i(e,t,f,h){var g;if("region"===f.kind)(g=document.createElement("div")).style.position="absolute";else if("body"===f.kind)g=document.createElement("div");else if("div"===f.kind)g=document.createElement("div");else if("image"===f.kind){if(g=document.createElement("img"),null!==e.imgResolver&&null!==f.src){var E=e.imgResolver(f.src,g);E&&(g.src=E),g.height=e.regionH,g.width=e.regionW}}else if("p"===f.kind)g=document.createElement("p");else if("span"===f.kind)if("container"===f.styleAttrs[n.byName.ruby.qname])g=document.createElement("ruby"),e.ruby=!0;else if("base"===f.styleAttrs[n.byName.ruby.qname])g=document.createElement("span");else if("text"===f.styleAttrs[n.byName.ruby.qname])g=document.createElement("rt");else if("baseContainer"===f.styleAttrs[n.byName.ruby.qname])g=document.createElement("rbc");else if("textContainer"===f.styleAttrs[n.byName.ruby.qname])g=document.createElement("rtc");else{if("delimiter"===f.styleAttrs[n.byName.ruby.qname])return;g=document.createElement("span")}else"br"===f.kind&&(g=document.createElement("br"));if(g){if(f.lang&&("region"!==f.kind&&f.lang===h.lang||(g.lang=f.lang)),t.appendChild(g),g.style.margin="0","region"===f.kind){var y=f.styleAttrs[n.byName.writingMode.qname];"lrtb"===y||"lr"===y?(e.ipd="lr",e.bpd="tb"):"rltb"===y||"rl"===y?(e.ipd="rl",e.bpd="tb"):"tblr"===y?(e.ipd="tb",e.bpd="lr"):"tbrl"!==y&&"tb"!==y||(e.ipd="tb",e.bpd="rl")}else if("p"===f.kind&&"tb"===e.bpd){var T=f.styleAttrs[n.byName.direction.qname];e.ipd="ltr"===T?"lr":"rl"}for(var _=0;_<d.length;_++){var S=d[_],I=f.styleAttrs[S.qname];void 0!==I&&null!==S.map&&S.map(e,g,f,I)}var b=g,R=f.styleAttrs[n.byName.linePadding.qname];if(R&&!R.isZero()){var N=R.toUsedLength(e.w,e.h);if(N>0){var C=Math.ceil(N)+"px";"tb"===e.bpd?(b.style.paddingLeft=C,b.style.paddingRight=C):(b.style.paddingTop=C,b.style.paddingBottom=C),e.lp=R}}var w=f.styleAttrs[n.byName.multiRowAlign.qname];if(w&&"auto"!==w){var D=document.createElement("span");D.style.display="inline-block",D.style.textAlign=w,g.appendChild(D),b=D,e.mra=w}var O=f.styleAttrs[n.byName.rubyReserve.qname];if(O&&"none"!==O[0]&&(e.rubyReserve=O),f.styleAttrs[n.byName.fillLineGap.qname]&&(e.flg=!0),"span"===f.kind&&f.text){var M=f.styleAttrs[n.byName.textEmphasis.qname];if(M&&"none"!==M.style&&(e.textEmphasis=!0),n.byName.textCombine.qname in f.styleAttrs&&"all"===f.styleAttrs[n.byName.textCombine.qname])g.textContent=f.text,g._isd_element=f,M&&l(e,g,0,M);else for(var P="",L=0;L<f.text.length;L++){P+=f.text.charAt(L);var x=f.text.charCodeAt(L);if(x<55296||x>56319||L===f.text.length-1){var F=document.createElement("span");F.textContent=P,M&&l(e,F,0,M),g.appendChild(F),P="",F._isd_element=f}}}if("contents"in f)for(var U=0;U<f.contents.length;U++)i(e,b,f.contents[U],f);var k=[];if("p"===f.kind&&(c(e,b,k,null),e.rubyReserve&&(function(e,t){for(var n=0;n<e.length;n++){var r,i,a=document.createElement("ruby"),o=document.createElement("span");o.textContent="",a.appendChild(o);var s,u=t.rubyReserve[1].toUsedLength(t.w,t.h)+"px";"both"===t.rubyReserve[0]||"outside"===t.rubyReserve[0]&&1==e.length?((r=document.createElement("rtc")).style[m]=p?"after":"under",r.textContent="",r.style.fontSize=u,(i=document.createElement("rtc")).style[m]=p?"before":"over",i.textContent="",i.style.fontSize=u,a.appendChild(r),a.appendChild(i)):((r=document.createElement("rtc")).textContent="",r.style.fontSize=u,s="after"===t.rubyReserve[0]||"outside"===t.rubyReserve[0]&&n>0?p?"after":"tb"===t.bpd||"rl"===t.bpd?"under":"over":p?"before":"tb"===t.bpd||"rl"===t.bpd?"over":"under",r.style[m]=s,a.appendChild(r));for(var c=null,l=0;l<e[n].rbc.length;l++)if("ruby"===e[n].rbc[l].localName){c=e[n].rbc[l];for(var f=0;f<c.style.length;f++)a.style.setProperty(c.style.item(f),c.style.getPropertyValue(c.style.item(f)));break}(c=c||e[n].elements[0].node).parentElement.insertBefore(a,c)}}(k,e),e.rubyReserve=null),(e.ruby||e.rubyReserve)&&(function(e,t){for(var n=0;n<e.length;n++)for(var r=0;r<e[n].rbc.length;r++){var i;e[n].rbc[r].style[m]||(i=p?0===n?"before":"after":"tb"===t.bpd||"rl"===t.bpd?0===n?"over":"under":0===n?"under":"over",e[n].rbc[r].style[m]=i)}}(k,e),e.ruby=null),e.textEmphasis&&(function(e,t){for(var n=0;n<e.length;n++)for(var r=0;r<e[n].te.length;r++){var i;e[n].te[r].style[v]&&"none"!==e[n].te[r].style[v]||(i="tb"===t.bpd?0===n?"left over":"left under":"rl"===t.bpd?0===n?"right under":"left under":0===n?"left under":"right under",e[n].te[r].style[v]=i)}}(k,e),e.textEmphasis=null),e.mra&&(function(e){for(var t=0;t<e.length-1;t++){var n=e[t].elements.length;if(0!==n&&!1===e[t].br){var r=document.createElement("br"),i=e[t].elements[n-1].node;i.parentElement.insertBefore(r,i.nextSibling)}}}(k),e.mra=null),e.lp&&(function(e,t,n){if(null!==e)for(var i=0;i<e.length;i++){var a=e[i].elements.length,o=Math.ceil(t)+"px",s="-"+Math.ceil(t)+"px";if(0!==a){var u=e[i].elements[e[i].start_elem],c=e[i].elements[e[i].end_elem];if(u===c){var l=u.node.getBoundingClientRect();if(0==l.width||0==l.height)continue}"lr"===n.ipd?(u.node.style.marginLeft=s,u.node.style.paddingLeft=o):"rl"===n.ipd?(u.node.style.paddingRight=o,u.node.style.marginRight=s):"tb"===n.ipd&&(u.node.style.paddingTop=o,u.node.style.marginTop=s),"lr"===n.ipd?(r||(c.node.style.marginRight=s),c.node.style.paddingRight=o):"rl"===n.ipd?(c.node.style.paddingLeft=o,r||(c.node.style.marginLeft=s)):"tb"===n.ipd&&(c.node.style.paddingBottom=o,c.node.style.marginBottom=s)}}}(k,e.lp.toUsedLength(e.w,e.h),e),e.lp=null),function(e,t){for(var n=0;n<e.length;n++)for(var r=e[n],i=1;i<r.elements.length;){var s=r.elements[i-1],u=r.elements[i];o(s.node,u.node,t)?r.elements.splice(i,1):i++}for(var c,l,f=[],d=0;d<e.length;d++)for(var h=0;h<e[d].elements.length;h++)(l=a(c=e[d].elements[h].node,f,!1))&&(c.style.backgroundColor=l);for(var g=0;g<f.length;g++)f[g].style.backgroundColor=""}(k,e),e.flg)){var B=u(b.getBoundingClientRect(),e);!function(e,t,n,r){for(var i=Math.sign(n-t),a=0;a<=e.length;a++){var o,s,u,c;if(o=0===a?Math.round(t):a===e.length?Math.round(n):Math.round((e[a-1].after+e[a].before)/2),a>0&&e[a-1])for(u=0;u<e[a-1].elements.length;u++)s=i*(o-(c=e[a-1].elements[u]).after)+"px","lr"===r.bpd?c.node.style.paddingRight=s:"rl"===r.bpd?c.node.style.paddingLeft=s:"tb"===r.bpd&&(c.node.style.paddingBottom=s);if(a<e.length)for(u=0;u<e[a].elements.length;u++)s=i*((c=e[a].elements[u]).before-o)+"px","lr"===r.bpd?c.node.style.paddingLeft=s:"rl"===r.bpd?c.node.style.paddingRight=s:"tb"===r.bpd&&(c.node.style.paddingTop=s)}}(k,B.before,B.after,e),e.flg=null}if("region"===f.kind&&"tb"===e.bpd&&e.enableRollUp&&f.contents.length>0&&"after"===f.styleAttrs[n.byName.displayAlign.qname]){c(e,b,k,null);var G=new s(""===f.id?"_":f.id,k);if(e.currentISDState[G.id]=G,e.previousISDState&&G.id in e.previousISDState&&e.previousISDState[G.id].plist.length>0&&G.plist.length>1&&G.plist[G.plist.length-2].text===e.previousISDState[G.id].plist[e.previousISDState[G.id].plist.length-1].text){var H=g.firstElementChild,Y=G.plist[G.plist.length-1].after-G.plist[G.plist.length-1].before;H.style.bottom="-"+Y+"px",H.style.transition="transform 0.4s",H.style.position="relative",H.style.transform="translateY(-"+Y+"px)"}}}else A(e.errorHandler,"Error processing ISD element kind: "+f.kind)}function a(e,t,n){return e.style.backgroundColor?(n&&!t.includes(e)&&t.push(e),e.style.backgroundColor):"SPAN"===e.parentElement.nodeName||"RUBY"===e.parentElement.nodeName||"RBC"===e.parentElement.nodeName||"RTC"===e.parentElement.nodeName||"RT"===e.parentElement.nodeName?a(e.parentElement,t,!0):void 0}function o(e,t,n){if("SPAN"===e.tagName&&"SPAN"===t.tagName&&e._isd_element===t._isd_element){if(!e._isd_element)return A(n.errorHandler,"Internal error: HTML span is not linked to a source element; cannot merge spans."),!1;e.textContent+=t.textContent;for(var r=0;r<t.style.length;r++){var i=t.style[r];(i.indexOf("border")>=0||i.indexOf("padding")>=0||i.indexOf("margin")>=0)&&(e.style[i]=t.style[i])}return t.parentElement.removeChild(t),!0}return!1}function s(e,t){this.id=e,this.plist=t}function u(e,t){var n={before:null,after:null,start:null,end:null};return"tb"===t.bpd?(n.before=e.top,n.after=e.bottom,"lr"===t.ipd?(n.start=e.left,n.end=e.right):(n.start=e.right,n.end=e.left)):"lr"===t.bpd?(n.before=e.left,n.after=e.right,n.start=e.top,n.end=e.bottom):"rl"===t.bpd&&(n.before=e.right,n.after=e.left,n.start=e.top,n.end=e.bottom),n}function c(e,t,n,r){if("rt"!==t.localName&&"rtc"!==t.localName){var i,a,o,s,l=t.style.backgroundColor||r;if(0===t.childElementCount)if("span"===t.localName||"rb"===t.localName){var f=u(t.getBoundingClientRect(),e);if(0!==n.length&&(i=f.before,a=f.after,o=n[n.length-1].before,a<(s=n[n.length-1].after)&&i>o||s<=a&&o>=i)){var d=Math.sign(f.after-f.before),h=Math.sign(f.end-f.start);d*(f.before-n[n.length-1].before)<0&&(n[n.length-1].before=f.before),d*(f.after-n[n.length-1].after)>0&&(n[n.length-1].after=f.after),h*(f.start-n[n.length-1].start)<0&&(n[n.length-1].start=f.start,n[n.length-1].start_elem=n[n.length-1].elements.length),h*(f.end-n[n.length-1].end)>0&&(n[n.length-1].end=f.end,n[n.length-1].end_elem=n[n.length-1].elements.length)}else n.push({before:f.before,after:f.after,start:f.start,end:f.end,start_elem:0,end_elem:0,elements:[],rbc:[],te:[],text:"",br:!1});n[n.length-1].text+=t.textContent,n[n.length-1].elements.push({node:t,bgcolor:l,before:f.before,after:f.after})}else"br"===t.localName&&0!==n.length&&(n[n.length-1].br=!0);else for(var g=t.firstChild;g;)g.nodeType===Node.ELEMENT_NODE&&(c(e,g,n,l),"ruby"===g.localName||"rtc"===g.localName?n.length>0&&n[n.length-1].rbc.push(g):"span"===g.localName&&g.style[E]&&"none"!==g.style[E]&&n.length>0&&n[n.length-1].te.push(g)),g=g.nextSibling}}function l(e,t,n,r){var i;"none"!==r.style&&("auto"===r.style?t.style[E]="filled":t.style[E]=r.style+" "+r.symbol,("before"===r.position||"after"===r.position)&&(i="tb"===e.bpd?"before"===r.position?"left over":"left under":"rl"===e.bpd?"before"===r.position?"right under":"left under":"before"===r.position?"left under":"right under",t.style[v]=i))}function f(e,t){this.qname=e,this.map=t}e.render=function(e,t,n,r,a,o,s,u,c){var l=r||t.clientHeight,f=a||t.clientWidth;if(null!==e.aspectRatio){var d=l*e.aspectRatio;d>f?l=Math.round(f/e.aspectRatio):f=d}var h=document.createElement("div");h.style.position="relative",h.style.width=f+"px",h.style.height=l+"px",h.style.margin="auto",h.style.top=0,h.style.bottom=0,h.style.left=0,h.style.right=0,h.style.zIndex=0;var g={h:l,w:f,regionH:null,regionW:null,imgResolver:n,displayForcedOnlyMode:o||!1,isd:e,errorHandler:s,previousISDState:u,enableRollUp:c||!1,currentISDState:{},flg:null,lp:null,mra:null,ipd:null,bpd:null,ruby:null,textEmphasis:null,rubyReserve:null};if(t.appendChild(h),"contents"in e)for(var p=0;p<e.contents.length;p++)i(g,h,e.contents[p],e);return g.currentISDState};for(var d=[new f("http://www.w3.org/ns/ttml#styling backgroundColor",(function(e,t,n,r){0!==r[3]&&(t.style.backgroundColor="rgba("+r[0].toString()+","+r[1].toString()+","+r[2].toString()+","+(r[3]/255).toString()+")")})),new f("http://www.w3.org/ns/ttml#styling color",(function(e,t,n,r){t.style.color="rgba("+r[0].toString()+","+r[1].toString()+","+r[2].toString()+","+(r[3]/255).toString()+")"})),new f("http://www.w3.org/ns/ttml#styling direction",(function(e,t,n,r){t.style.direction=r})),new f("http://www.w3.org/ns/ttml#styling display",(function(e,t,n,r){})),new f("http://www.w3.org/ns/ttml#styling displayAlign",(function(e,t,n,r){t.style.display="flex",t.style.flexDirection="column","before"===r?t.style.justifyContent="flex-start":"center"===r?t.style.justifyContent="center":"after"===r&&(t.style.justifyContent="flex-end")})),new f("http://www.w3.org/ns/ttml#styling extent",(function(e,t,n,r){e.regionH=r.h.toUsedLength(e.w,e.h),e.regionW=r.w.toUsedLength(e.w,e.h);var i=0,a=0,o=n.styleAttrs["http://www.w3.org/ns/ttml#styling padding"];o&&(i=o[0].toUsedLength(e.w,e.h)+o[2].toUsedLength(e.w,e.h),a=o[1].toUsedLength(e.w,e.h)+o[3].toUsedLength(e.w,e.h)),t.style.height=e.regionH-i+"px",t.style.width=e.regionW-a+"px"})),new f("http://www.w3.org/ns/ttml#styling fontFamily",(function(e,t,n,r){for(var i=[],a=0;a<r.length;a++)r[a]=r[a].trim(),"monospaceSerif"===r[a]?(i.push("Courier New"),i.push('"Liberation Mono"'),i.push("Courier"),i.push("monospace")):"proportionalSansSerif"===r[a]?(i.push("Arial"),i.push("Helvetica"),i.push('"Liberation Sans"'),i.push("sans-serif")):"monospace"===r[a]?i.push("monospace"):"sansSerif"===r[a]?i.push("sans-serif"):"serif"===r[a]?i.push("serif"):"monospaceSansSerif"===r[a]?(i.push("Consolas"),i.push("monospace")):"proportionalSerif"===r[a]?i.push("serif"):i.push(r[a]);if(i.length>0){for(var o=[i[0]],s=1;s<i.length;s++)-1==o.indexOf(i[s])&&o.push(i[s]);i=o}t.style.fontFamily=i.join(",")})),new f("http://www.w3.org/ns/ttml#styling shear",(function(e,t,n,r){if(0!==r){var i=-.9*r;"tb"===e.bpd?t.style.transform="skewX("+i+"deg)":t.style.transform="skewY("+i+"deg)"}})),new f("http://www.w3.org/ns/ttml#styling fontSize",(function(e,t,n,r){t.style.fontSize=r.toUsedLength(e.w,e.h)+"px"})),new f("http://www.w3.org/ns/ttml#styling fontStyle",(function(e,t,n,r){t.style.fontStyle=r})),new f("http://www.w3.org/ns/ttml#styling fontWeight",(function(e,t,n,r){t.style.fontWeight=r})),new f("http://www.w3.org/ns/ttml#styling lineHeight",(function(e,t,n,r){t.style.lineHeight="normal"===r?"normal":r.toUsedLength(e.w,e.h)+"px"})),new f("http://www.w3.org/ns/ttml#styling opacity",(function(e,t,n,r){t.style.opacity=r})),new f("http://www.w3.org/ns/ttml#styling origin",(function(e,t,n,r){t.style.top=r.h.toUsedLength(e.w,e.h)+"px",t.style.left=r.w.toUsedLength(e.w,e.h)+"px"})),new f("http://www.w3.org/ns/ttml#styling overflow",(function(e,t,n,r){t.style.overflow=r})),new f("http://www.w3.org/ns/ttml#styling padding",(function(e,t,n,r){var i=[];i[0]=r[0].toUsedLength(e.w,e.h)+"px",i[1]=r[3].toUsedLength(e.w,e.h)+"px",i[2]=r[2].toUsedLength(e.w,e.h)+"px",i[3]=r[1].toUsedLength(e.w,e.h)+"px",t.style.padding=i.join(" ")})),new f("http://www.w3.org/ns/ttml#styling position",(function(e,t,n,r){t.style.top=r.h.toUsedLength(e.w,e.h)+"px",t.style.left=r.w.toUsedLength(e.w,e.h)+"px"})),new f("http://www.w3.org/ns/ttml#styling rubyAlign",(function(e,t,n,r){t.style.rubyAlign="spaceAround"===r?"space-around":"center"})),new f("http://www.w3.org/ns/ttml#styling rubyPosition",(function(e,t,n,r){var i;"before"!==r&&"after"!==r||(i=p?r:"tb"===e.bpd||"rl"===e.bpd?"before"===r?"over":"under":"before"===r?"under":"over",t.parentElement.style[m]=i)})),new f("http://www.w3.org/ns/ttml#styling showBackground",null),new f("http://www.w3.org/ns/ttml#styling textAlign",(function(e,t,n,r){var i;i="start"===r?"rl"===e.ipd?"right":"left":"end"===r?"rl"===e.ipd?"left":"right":r,t.style.textAlign=i})),new f("http://www.w3.org/ns/ttml#styling textDecoration",(function(e,t,n,r){t.style.textDecoration=r.join(" ").replace("lineThrough","line-through")})),new f("http://www.w3.org/ns/ttml#styling textOutline",(function(e,t,n,r){})),new f("http://www.w3.org/ns/ttml#styling textShadow",(function(e,t,r,i){var a=r.styleAttrs[n.byName.textOutline.qname];if("none"===i&&"none"===a)t.style.textShadow="";else{var o=[];if("none"!==a){var s="rgba("+a.color[0].toString()+","+a.color[1].toString()+","+a.color[2].toString()+","+(a.color[3]/255).toString()+")";o.push("1px 1px 1px "+s),o.push("-1px 1px 1px "+s),o.push("1px -1px 1px "+s),o.push("-1px -1px 1px "+s)}if("none"!==i)for(var u=0;u<i.length;u++)o.push(i[u].x_off.toUsedLength(e.w,e.h)+"px "+i[u].y_off.toUsedLength(e.w,e.h)+"px "+i[u].b_radius.toUsedLength(e.w,e.h)+"px rgba("+i[u].color[0].toString()+","+i[u].color[1].toString()+","+i[u].color[2].toString()+","+(i[u].color[3]/255).toString()+")");t.style.textShadow=o.join(",")}})),new f("http://www.w3.org/ns/ttml#styling textCombine",(function(e,t,n,r){t.style.textCombineUpright=r})),new f("http://www.w3.org/ns/ttml#styling textEmphasis",(function(e,t,n,r){})),new f("http://www.w3.org/ns/ttml#styling unicodeBidi",(function(e,t,n,r){var i;i="bidiOverride"===r?"bidi-override":r,t.style.unicodeBidi=i})),new f("http://www.w3.org/ns/ttml#styling visibility",(function(e,t,n,r){t.style.visibility=r})),new f("http://www.w3.org/ns/ttml#styling wrapOption",(function(e,t,n,r){"wrap"===r?"preserve"===n.space?t.style.whiteSpace="pre-wrap":t.style.whiteSpace="normal":"preserve"===n.space?t.style.whiteSpace="pre":t.style.whiteSpace="noWrap"})),new f("http://www.w3.org/ns/ttml#styling writingMode",(function(e,t,n,r){"lrtb"===r||"lr"===r||"rltb"===r||"rl"===r?t.style.writingMode="horizontal-tb":"tblr"===r?t.style.writingMode="vertical-lr":"tbrl"!==r&&"tb"!==r||(t.style.writingMode="vertical-rl")})),new f("http://www.w3.org/ns/ttml#styling zIndex",(function(e,t,n,r){t.style.zIndex=r})),new f("http://www.w3.org/ns/ttml/profile/imsc1#styling forcedDisplay",(function(e,t,n,r){e.displayForcedOnlyMode&&!1===r&&(t.style.visibility="hidden")}))],h={},g=0;g<d.length;g++)h[d[g].qname]=d[g];var p="webkitRubyPosition"in window.getComputedStyle(document.documentElement),m=p?"webkitRubyPosition":"rubyPosition",E="webkitTextEmphasisStyle"in window.getComputedStyle(document.documentElement)?"webkitTextEmphasisStyle":"textEmphasisStyle",v="webkitTextEmphasisPosition"in window.getComputedStyle(document.documentElement)?"webkitTextEmphasisPosition":"textEmphasisPosition";function A(e,t){if(e&&e.error&&e.error(t))throw t}}(t,"undefined"==typeof imscNames?n(50977):imscNames,"undefined"==typeof imscStyles?n(31219):imscStyles,"undefined"==typeof imscUtils?n(26404):imscUtils)},68905:function(e,t,n){n(2008),n(44114),n(34782),n(54554),n(18111),n(22489),n(7588),n(26099),n(27495),n(90906),n(25440),n(23500),function(e,t,n,r){e.generateISD=function(e,t,r){var i,o=new u(e),s={},c={},l=e.head.styling.initials[n.byName.showBackground.qname],f=e.head.styling.initials[n.byName.backgroundColor.qname];for(var d in e.head.layout.regions)if(e.head.layout.regions.hasOwnProperty(d)){var h=e.head.layout.regions[d],g=h.styleAttrs[n.byName.showBackground.qname]||l,p=h.styleAttrs[n.byName.backgroundColor.qname]||f;c[h.id]=("always"===g||void 0===g)&&void 0!==p&&!(t<h.begin||t>=h.end)}for(var m in e.body&&e.body.regionID&&(c[e.body.regionID]=!0),i=null!==e.body?function e(t,n){if(n.contents){var r={};for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i]);return r.contents=[],n.contents.filter((function(e){return!(t<e.begin||t>=e.end)})).forEach((function(n){var i=e(t,n);i.regionID&&(c[i.regionID]=!0),null!==i&&r.contents.push(i)})),r}return n}(t,e.body):null,void 0!==c[""]&&(c[""]=!0),c)if(c[m]){var E=a(e,t,e.head.layout.regions[m],i,null,"",e.head.layout.regions[m],r,s);null!==E&&o.contents.push(E.element)}return o};var i=[n.byName.color.qname,n.byName.textCombine.qname,n.byName.textDecoration.qname,n.byName.textEmphasis.qname,n.byName.textOutline.qname,n.byName.textShadow.qname];function a(e,t,u,f,d,h,g,p,m){if(t<g.begin||t>=g.end)return null;var E="regionID"in g&&""!==g.regionID?g.regionID:h;if(null!==d&&E!==u.id&&(!("contents"in g)||"contents"in g&&0===g.contents.length||""!==E))return null;var v=new c(g);if("sets"in g)for(var A=0;A<g.sets.length;A++)t<g.sets[A].begin||t>=g.sets[A].end||(v.styleAttrs[g.sets[A].qname]=g.sets[A].value);var y={};for(var T in v.styleAttrs)if(v.styleAttrs.hasOwnProperty(T)&&(y[T]=!0,"region"===v.kind&&T===n.byName.writingMode.qname&&!(n.byName.direction.qname in v.styleAttrs))){var _=v.styleAttrs[T];"lrtb"===_||"lr"===_?v.styleAttrs[n.byName.direction.qname]="ltr":"rltb"!==_&&"rl"!==_||(v.styleAttrs[n.byName.direction.qname]="rtl")}if(null!==d)for(var S=0;S<n.all.length;S++){var I=n.all[S];if(I.qname===n.byName.textDecoration.qname){var b=d.styleAttrs[I.qname],R=v.styleAttrs[I.qname],N=[];void 0===R?N=b:-1===R.indexOf("none")?((-1===R.indexOf("noUnderline")&&-1!==b.indexOf("underline")||-1!==R.indexOf("underline"))&&N.push("underline"),(-1===R.indexOf("noLineThrough")&&-1!==b.indexOf("lineThrough")||-1!==R.indexOf("lineThrough"))&&N.push("lineThrough"),(-1===R.indexOf("noOverline")&&-1!==b.indexOf("overline")||-1!==R.indexOf("overline"))&&N.push("overline")):N.push("none"),v.styleAttrs[I.qname]=N}else if(I.qname!==n.byName.fontSize.qname||I.qname in v.styleAttrs||"span"!==v.kind||"textContainer"!==v.styleAttrs[n.byName.ruby.qname])if(I.qname!==n.byName.fontSize.qname||I.qname in v.styleAttrs||"span"!==v.kind||"text"!==v.styleAttrs[n.byName.ruby.qname])I.inherit&&I.qname in d.styleAttrs&&!(I.qname in v.styleAttrs)&&(v.styleAttrs[I.qname]=d.styleAttrs[I.qname]);else{var C=d.styleAttrs[n.byName.fontSize.qname];"textContainer"===d.styleAttrs[n.byName.ruby.qname]?v.styleAttrs[I.qname]=C:v.styleAttrs[I.qname]=new r.ComputedLength(.5*C.rw,.5*C.rh)}else{var w=d.styleAttrs[n.byName.fontSize.qname];v.styleAttrs[I.qname]=new r.ComputedLength(.5*w.rw,.5*w.rh)}}for(var D=0;D<n.all.length;D++){var O=n.all[D];if(!(O.qname in v.styleAttrs)&&!(O.qname===n.byName.position.qname&&n.byName.origin.qname in v.styleAttrs||O.qname===n.byName.origin.qname&&n.byName.position.qname in v.styleAttrs)){var M=e.head.styling.initials[O.qname]||O.initial;if(null!==M&&("region"===v.kind||!1===O.inherit&&null!==M)){var P=O.parse(M);null!==P?(v.styleAttrs[O.qname]=P,y[O.qname]=!0):l(p,"Invalid initial value for '"+O.qname+"' on element '"+v.kind)}}}for(var L=0;L<n.all.length;L++){var x=n.all[L];if(x.qname in y&&null!==x.compute){var F=x.compute(e,d,v,v.styleAttrs[x.qname],m);null!==F?v.styleAttrs[x.qname]=F:(v.styleAttrs[x.qname]=x.compute(e,d,v,x.parse(x.initial),m),l(p,"Style '"+x.qname+"' on element '"+v.kind+"' cannot be computed"))}}if("none"===v.styleAttrs[n.byName.display.qname])return null;var U=null;null===d?U=null===f?[]:[f]:"contents"in g&&(U=g.contents);for(var k=0;null!==U&&k<U.length;k++){var B=a(e,t,u,f,v,E,U[k],p,m);null!==B&&v.contents.push(B.element)}for(var G in v.styleAttrs)if(v.styleAttrs.hasOwnProperty(G)){var H=!1;if("span"===v.kind){var Y=v.styleAttrs[n.byName.ruby.qname];(H=("container"===Y||"textContainer"===Y||"baseContainer"===Y)&&-1!==i.indexOf(G))||(H="container"!==Y&&G===n.byName.rubyAlign.qname),H||(H=!("textContainer"===Y||"text"===Y)&&G===n.byName.rubyPosition.qname)}if(!H){var V=n.byQName[G];"applies"in V&&(H=-1===V.applies.indexOf(v.kind))}H&&delete v.styleAttrs[G]}var q=v.styleAttrs[n.byName.ruby.qname];if("p"===v.kind||"span"===v.kind&&("textContainer"===q||"text"===q)){var K=[];o(v,K),function(e){for(var t,n=0;n<e.length;)if("br"!==(t=e[n]).kind&&"preserve"!==t.space){var r=t.text.replace(/[\t\r\n ]+/g," ");/^[ ]/.test(r)&&(0===n||("br"===(i=e[n-1]).kind||/[\r\n\t ]$/.test(i.text)))&&(r=r.substring(1)),t.text=r,0===r.length?e.splice(n,1):n++}else n++;var i,a;for(n=0;n<e.length;n++)"br"!==(t=e[n]).kind&&"preserve"!==t.space?/[ ]$/.test(t.text)&&(n===e.length-1||("br"===(a=e[n+1]).kind||"preserve"===a.space&&/^[\r\n]/.test(a.text)))&&(t.text=t.text.slice(0,-1)):n++}(K),s(v)}return"div"===v.kind&&n.byName.backgroundImage.qname in v.styleAttrs||"br"===v.kind||"image"===v.kind||"contents"in v&&v.contents.length>0||"span"===v.kind&&null!==v.text||"region"===v.kind&&"always"===v.styleAttrs[n.byName.showBackground.qname]?{region_id:E,element:v}:null}function o(e,t){if("contents"in e)for(var r=0;r<e.contents.length;r++){var i=e.contents[r],a=i.styleAttrs[n.byName.ruby.qname];("span"!==i.kind||"textContainer"!==a&&"text"!==a)&&("contents"in i?o(i,t):("span"===i.kind&&0!==i.text.length||"br"===i.kind)&&t.push(i))}}function s(e){if("br"===e.kind)return!1;if("text"in e)return 0===e.text.length;if("contents"in e){for(var t=e.contents.length;t--;)s(e.contents[t])&&e.contents.splice(t,1);return 0===e.contents.length}}function u(e){this.contents=[],this.aspectRatio=e.aspectRatio,this.lang=e.lang}function c(e){for(var t in this.kind=e.kind||"region",this.lang=e.lang,e.id&&(this.id=e.id),this.styleAttrs={},e.styleAttrs)e.styleAttrs.hasOwnProperty(t)&&(this.styleAttrs[t]=e.styleAttrs[t]);"src"in e&&(this.src=e.src),"type"in e&&(this.type=e.type),"text"in e?this.text=e.text:("region"===this.kind||"contents"in e)&&(this.contents=[]),"space"in e&&(this.space=e.space)}function l(e,t){if(e&&e.error&&e.error(t))throw t}}(t,"undefined"==typeof imscNames?n(50977):imscNames,"undefined"==typeof imscStyles?n(31219):imscStyles,"undefined"==typeof imscUtils?n(26404):imscUtils)},37640:function(e,t,n){t.generateISD=n(68905).generateISD,t.fromXML=n(76739).fromXML,t.renderHTML=n(1612).render},50977:function(e,t){!function(e){e.ns_tt="http://www.w3.org/ns/ttml",e.ns_tts="http://www.w3.org/ns/ttml#styling",e.ns_ttp="http://www.w3.org/ns/ttml#parameter",e.ns_xml="http://www.w3.org/XML/1998/namespace",e.ns_itts="http://www.w3.org/ns/ttml/profile/imsc1#styling",e.ns_ittp="http://www.w3.org/ns/ttml/profile/imsc1#parameter",e.ns_smpte="http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt",e.ns_ebutts="urn:ebu:tt:style"}(t)},31219:function(e,t,n){n(44114),n(62010),n(5914),n(42762),function(e,t,n){function r(e,t,n,r,i,a,o,s){this.name=t,this.ns=e,this.qname=e+" "+t,this.inherit=i,this.animatable=a,this.initial=n,this.applies=r,this.parse=o,this.compute=s}for(var i in e.all=[new r(t.ns_tts,"backgroundColor","transparent",["body","div","p","region","span"],!1,!0,n.parseColor,null),new r(t.ns_tts,"color","white",["span"],!0,!0,n.parseColor,null),new r(t.ns_tts,"direction","ltr",["p","span"],!0,!0,(function(e){return e}),null),new r(t.ns_tts,"display","auto",["body","div","p","region","span"],!1,!0,(function(e){return e}),null),new r(t.ns_tts,"displayAlign","before",["region"],!1,!0,(function(e){return e}),null),new r(t.ns_tts,"extent","auto",["tt","region"],!1,!0,(function(e){if("auto"===e)return e;var t=e.split(" ");if(2!==t.length)return null;var r=n.parseLength(t[0]),i=n.parseLength(t[1]);return i&&r?{h:i,w:r}:null}),(function(e,t,r,i,a){var o,s;if("auto"===i)o=new n.ComputedLength(0,1);else if(null===(o=n.toComputedLength(i.h.value,i.h.unit,null,e.dimensions.h,null,e.pxLength.h)))return null;if("auto"===i)s=new n.ComputedLength(1,0);else if(null===(s=n.toComputedLength(i.w.value,i.w.unit,null,e.dimensions.w,null,e.pxLength.w)))return null;return{h:o,w:s}})),new r(t.ns_tts,"fontFamily","default",["span","p"],!0,!0,(function(e){for(var t=e.split(","),n=[],r=0;r<t.length;r++)t[r]=t[r].trim(),"'"!==t[r].charAt(0)&&'"'!==t[r].charAt(0)&&"default"===t[r]?n.push("monospaceSerif"):n.push(t[r]);return n}),null),new r(t.ns_tts,"shear","0%",["p"],!0,!0,n.parseLength,(function(e,t,n,r){return"%"!==r.unit?null:Math.abs(r.value)>100?100*Math.sign(r.value):r.value})),new r(t.ns_tts,"fontSize","1c",["span","p"],!0,!0,n.parseLength,(function(t,r,i,a,o){return n.toComputedLength(a.value,a.unit,null!==r?r.styleAttrs[e.byName.fontSize.qname]:t.cellLength.h,null!==r?r.styleAttrs[e.byName.fontSize.qname]:t.cellLength.h,t.cellLength.h,t.pxLength.h)})),new r(t.ns_tts,"fontStyle","normal",["span","p"],!0,!0,(function(e){return e}),null),new r(t.ns_tts,"fontWeight","normal",["span","p"],!0,!0,(function(e){return e}),null),new r(t.ns_tts,"lineHeight","normal",["p"],!0,!0,(function(e){return"normal"===e?e:n.parseLength(e)}),(function(t,r,i,a,o){var s;if("normal"===a)s=a;else if(null===(s=n.toComputedLength(a.value,a.unit,i.styleAttrs[e.byName.fontSize.qname],i.styleAttrs[e.byName.fontSize.qname],t.cellLength.h,t.pxLength.h)))return null;return s})),new r(t.ns_tts,"opacity",1,["region"],!1,!0,parseFloat,null),new r(t.ns_tts,"origin","auto",["region"],!1,!0,(function(e){if("auto"===e)return e;var t=e.split(" ");if(2!==t.length)return null;var r=n.parseLength(t[0]),i=n.parseLength(t[1]);return i&&r?{h:i,w:r}:null}),(function(e,t,r,i,a){var o,s;if("auto"===i)o=new n.ComputedLength(0,0);else if(null===(o=n.toComputedLength(i.h.value,i.h.unit,null,e.dimensions.h,null,e.pxLength.h)))return null;if("auto"===i)s=new n.ComputedLength(0,0);else if(null===(s=n.toComputedLength(i.w.value,i.w.unit,null,e.dimensions.w,null,e.pxLength.w)))return null;return{h:o,w:s}})),new r(t.ns_tts,"overflow","hidden",["region"],!1,!0,(function(e){return e}),null),new r(t.ns_tts,"padding","0px",["region"],!1,!0,(function(e){var t=e.split(" ");if(t.length>4)return null;for(var r=[],i=0;i<t.length;i++){var a=n.parseLength(t[i]);if(!a)return null;r.push(a)}return r}),(function(t,r,i,a,o){var s;if(1===a.length)s=[a[0],a[0],a[0],a[0]];else if(2===a.length)s=[a[0],a[1],a[0],a[1]];else if(3===a.length)s=[a[0],a[1],a[2],a[1]];else{if(4!==a.length)return null;s=[a[0],a[1],a[2],a[3]]}var u=i.styleAttrs[e.byName.writingMode.qname];if("lrtb"===u||"lr"===u)s=[s[0],s[3],s[2],s[1]];else if("rltb"===u||"rl"===u)s=[s[0],s[1],s[2],s[3]];else if("tblr"===u)s=[s[3],s[0],s[1],s[2]];else{if("tbrl"!==u&&"tb"!==u)return null;s=[s[3],s[2],s[1],s[0]]}for(var c=[],l=0;l<s.length;l++)if(0===s[l].value)c[l]=new n.ComputedLength(0,0);else if(c[l]=n.toComputedLength(s[l].value,s[l].unit,i.styleAttrs[e.byName.fontSize.qname],0===l||2===l?i.styleAttrs[e.byName.extent.qname].h:i.styleAttrs[e.byName.extent.qname].w,0===l||2===l?t.cellLength.h:t.cellLength.w,0===l||2===l?t.pxLength.h:t.pxLength.w),null===c[l])return null;return c})),new r(t.ns_tts,"position","top left",["region"],!1,!0,(function(e){return n.parsePosition(e)}),(function(t,r,i,a){var o,s;return null===(o=n.toComputedLength(a.v.offset.value,a.v.offset.unit,null,new n.ComputedLength(-i.styleAttrs[e.byName.extent.qname].h.rw,t.dimensions.h.rh-i.styleAttrs[e.byName.extent.qname].h.rh),null,t.pxLength.h))?null:("bottom"===a.v.edge&&(o=new n.ComputedLength(-o.rw-i.styleAttrs[e.byName.extent.qname].h.rw,t.dimensions.h.rh-o.rh-i.styleAttrs[e.byName.extent.qname].h.rh)),s=n.toComputedLength(a.h.offset.value,a.h.offset.unit,null,new n.ComputedLength(t.dimensions.w.rw-i.styleAttrs[e.byName.extent.qname].w.rw,-i.styleAttrs[e.byName.extent.qname].w.rh),null,t.pxLength.w),null===o?null:("right"===a.h.edge&&(s=new n.ComputedLength(t.dimensions.w.rw-s.rw-i.styleAttrs[e.byName.extent.qname].w.rw,-s.rh-i.styleAttrs[e.byName.extent.qname].w.rh)),{h:o,w:s}))})),new r(t.ns_tts,"ruby","none",["span"],!1,!0,(function(e){return e}),null),new r(t.ns_tts,"rubyAlign","center",["span"],!0,!0,(function(e){return"center"!==e&&"spaceAround"!==e?null:e}),null),new r(t.ns_tts,"rubyPosition","outside",["span"],!0,!0,(function(e){return e}),null),new r(t.ns_tts,"rubyReserve","none",["p"],!0,!0,(function(e){var t=e.split(" "),r=[null,null];if(0===t.length||t.length>2)return null;if("none"!==t[0]&&"both"!==t[0]&&"after"!==t[0]&&"before"!==t[0]&&"outside"!==t[0])return null;if(r[0]=t[0],2===t.length&&"none"!==t[0]){var i=n.parseLength(t[1]);if(!i)return null;r[1]=i}return r}),(function(t,r,i,a,o){if("none"===a[0])return a;var s;return null===(s=null===a[1]?new n.ComputedLength(.5*i.styleAttrs[e.byName.fontSize.qname].rw,.5*i.styleAttrs[e.byName.fontSize.qname].rh):n.toComputedLength(a[1].value,a[1].unit,i.styleAttrs[e.byName.fontSize.qname],i.styleAttrs[e.byName.fontSize.qname],t.cellLength.h,t.pxLength.h))?null:[a[0],s]})),new r(t.ns_tts,"showBackground","always",["region"],!1,!0,(function(e){return e}),null),new r(t.ns_tts,"textAlign","start",["p"],!0,!0,(function(e){return e}),(function(e,t,n,r,i){return"left"===r?"start":"right"===r?"end":r})),new r(t.ns_tts,"textCombine","none",["span"],!0,!0,(function(e){return"none"===e||"all"===e?e:null}),null),new r(t.ns_tts,"textDecoration","none",["span"],!0,!0,(function(e){return e.split(" ")}),null),new r(t.ns_tts,"textEmphasis","none",["span"],!0,!0,(function(e){for(var t=e.split(" "),r={style:null,symbol:null,color:null,position:null},i=0;i<t.length;i++)if("none"===t[i]||"auto"===t[i])r.style=t[i];else if("filled"===t[i]||"open"===t[i])r.style=t[i];else if("circle"===t[i]||"dot"===t[i]||"sesame"===t[i])r.symbol=t[i];else if("current"===t[i])r.color=t[i];else if("outside"===t[i]||"before"===t[i]||"after"===t[i])r.position=t[i];else if(r.color=n.parseColor(t[i]),null===r.color)return null;return null==r.style&&null==r.symbol?r.style="auto":(r.symbol=r.symbol||"circle",r.style=r.style||"filled"),r.position=r.position||"outside",r.color=r.color||"current",r}),null),new r(t.ns_tts,"textOutline","none",["span"],!0,!0,(function(e){if("none"===e)return e;var t={},r=e.split(" ");if(0===r.length||r.length>2)return null;var i=n.parseColor(r[0]);if(t.color=i,null!==i&&r.shift(),1!==r.length)return null;var a=n.parseLength(r[0]);return a?(t.thickness=a,t):null}),(function(t,r,i,a,o){if("none"===a)return a;var s={};return null===a.color?s.color=i.styleAttrs[e.byName.color.qname]:s.color=a.color,s.thickness=n.toComputedLength(a.thickness.value,a.thickness.unit,i.styleAttrs[e.byName.fontSize.qname],i.styleAttrs[e.byName.fontSize.qname],t.cellLength.h,t.pxLength.h),null===s.thickness?null:s})),new r(t.ns_tts,"textShadow","none",["span"],!0,!0,n.parseTextShadow,(function(t,r,i,a){if("none"===a)return a;for(var o=[],s=0;s<a.length;s++){var u={};if(u.x_off=n.toComputedLength(a[s][0].value,a[s][0].unit,null,i.styleAttrs[e.byName.fontSize.qname],null,t.pxLength.w),null===u.x_off)return null;if(u.y_off=n.toComputedLength(a[s][1].value,a[s][1].unit,null,i.styleAttrs[e.byName.fontSize.qname],null,t.pxLength.h),null===u.y_off)return null;if(null===a[s][2])u.b_radius=0;else if(u.b_radius=n.toComputedLength(a[s][2].value,a[s][2].unit,null,i.styleAttrs[e.byName.fontSize.qname],null,t.pxLength.h),null===u.b_radius)return null;null===a[s][3]?u.color=i.styleAttrs[e.byName.color.qname]:u.color=a[s][3],o.push(u)}return o})),new r(t.ns_tts,"unicodeBidi","normal",["span","p"],!1,!0,(function(e){return e}),null),new r(t.ns_tts,"visibility","visible",["body","div","p","region","span"],!0,!0,(function(e){return e}),null),new r(t.ns_tts,"wrapOption","wrap",["span"],!0,!0,(function(e){return e}),null),new r(t.ns_tts,"writingMode","lrtb",["region"],!1,!0,(function(e){return e}),null),new r(t.ns_tts,"zIndex","auto",["region"],!1,!0,(function(e){var t;return"auto"===e?t=e:(t=parseInt(e),isNaN(t)&&(t=null)),t}),null),new r(t.ns_ebutts,"linePadding","0c",["p"],!0,!1,n.parseLength,(function(e,t,r,i,a){return n.toComputedLength(i.value,i.unit,null,null,e.cellLength.w,null)})),new r(t.ns_ebutts,"multiRowAlign","auto",["p"],!0,!1,(function(e){return e}),null),new r(t.ns_smpte,"backgroundImage",null,["div"],!1,!1,(function(e){return e}),null),new r(t.ns_itts,"forcedDisplay","false",["body","div","p","region","span"],!0,!0,(function(e){return"true"===e}),null),new r(t.ns_itts,"fillLineGap","false",["p"],!0,!0,(function(e){return"true"===e}),null)],e.byQName={},e.all)e.byQName[e.all[i].qname]=e.all[i];for(var a in e.byName={},e.all)e.byName[e.all[a].name]=e.all[a]}(t,"undefined"==typeof imscNames?n(50977):imscNames,"undefined"==typeof imscUtils?n(26404):imscUtils)},26404:function(e,t,n){n(44114),n(27495),n(71761),function(e){var t=/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?/,n=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/,r=/rgba\(\s*(\d+),\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/,i={transparent:[0,0,0,0],black:[0,0,0,255],silver:[192,192,192,255],gray:[128,128,128,255],white:[255,255,255,255],maroon:[128,0,0,255],red:[255,0,0,255],purple:[128,0,128,255],fuchsia:[255,0,255,255],magenta:[255,0,255,255],green:[0,128,0,255],lime:[0,255,0,255],olive:[128,128,0,255],yellow:[255,255,0,255],navy:[0,0,128,255],blue:[0,0,255,255],teal:[0,128,128,255],aqua:[0,255,255,255],cyan:[0,255,255,255]};e.parseColor=function(e){var a,o=null,s=i[e.toLowerCase()];return void 0!==s?o=s:null!==(a=t.exec(e))?o=[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16),void 0!==a[4]?parseInt(a[4],16):255]:null!==(a=n.exec(e))?o=[parseInt(a[1]),parseInt(a[2]),parseInt(a[3]),255]:null!==(a=r.exec(e))&&(o=[parseInt(a[1]),parseInt(a[2]),parseInt(a[3]),parseInt(a[4])]),o};var a=/^((?:\+|\-)?\d*(?:\.\d+)?)(px|em|c|%|rh|rw)$/;e.parseLength=function(e){var t,n=null;return null!==(t=a.exec(e))&&(n={value:parseFloat(t[1]),unit:t[2]}),n},e.parseTextShadow=function(t){for(var n=t.match(/([^\(,\)]|\([^\)]+\))+/g),r=[],i=0;i<n.length;i++){var a=n[i].split(" ");if(1===a.length&&"none"===a[0])return"none";if(a.length>1&&a.length<5){var o=[null,null,null,null],s=e.parseLength(a.shift());if(null===s)return null;if(o[0]=s,null===(s=e.parseLength(a.shift())))return null;if(o[1]=s,0===a.length){r.push(o);continue}if(null!==(s=e.parseLength(a[0]))&&(o[2]=s,a.shift()),0===a.length){r.push(o);continue}var u=e.parseColor(a[0]);if(null===u)return null;o[3]=u,r.push(o)}}return r},e.parsePosition=function(t){var n=t.split(" "),r=function(e){return"center"===e||"left"===e||"top"===e||"bottom"===e||"right"===e};if(n.length>4)return null;for(var i=0;i<n.length;i++)if(!r(n[i])){var a=e.parseLength(n[i]);if(null===a)return null;n[i]=a}for(var o={h:{edge:"left",offset:{value:50,unit:"%"}},v:{edge:"top",offset:{value:50,unit:"%"}}},s=0;s<n.length;){var u=n[s++];if(r(u)){var c={value:0,unit:"%"};2!==n.length&&s<n.length&&!r(n[s])&&(c=n[s++]),"right"===u?(o.h.edge=u,o.h.offset=c):"bottom"===u?(o.v.edge=u,o.v.offset=c):"left"===u?o.h.offset=c:"top"===u&&(o.v.offset=c)}else{if(1!==n.length&&2!==n.length)return null;1===s?o.h.offset=u:o.v.offset=u}}return o},e.ComputedLength=function(e,t){this.rw=e,this.rh=t},e.ComputedLength.prototype.toUsedLength=function(e,t){return e*this.rw+t*this.rh},e.ComputedLength.prototype.isZero=function(){return 0===this.rw&&0===this.rh},e.toComputedLength=function(t,n,r,i,a,o){return"%"===n&&i?new e.ComputedLength(i.rw*t/100,i.rh*t/100):"em"===n&&r?new e.ComputedLength(r.rw*t,r.rh*t):"c"===n&&a?new e.ComputedLength(t*a.rw,t*a.rh):"px"===n&&o?new e.ComputedLength(t*o.rw,t*o.rh):"rh"===n?new e.ComputedLength(0,t/100):"rw"===n?new e.ComputedLength(t/100,0):null}}(t)},47523:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},93282:function(e,t,n){"use strict";var r=n(95429);function i(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function a(e,t){for(var n,r="",i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(47===n)break;n=47}if(47===n){if(a===s-1||1===o);else if(a!==s-1&&2===o){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var u=r.lastIndexOf("/");if(u!==r.length-1){-1===u?(r="",i=0):i=(r=r.slice(0,u)).length-1-r.lastIndexOf("/"),a=s,o=0;continue}}else if(2===r.length||1===r.length){r="",i=0,a=s,o=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(a+1,s):r=e.slice(a+1,s),i=s-a-1;a=s,o=0}else 46===n&&-1!==o?++o:o=-1}return r}n(16280),n(34782),n(62010),n(33110);var o={resolve:function(){for(var e,t="",n=!1,r=arguments.length-1;r>=-1&&!n;r--){var o;r>=0?o=arguments[r]:(void 0===e&&(e=process.cwd()),o=e),i(o),0!==o.length&&(t=o+"/"+t,n=47===o.charCodeAt(0))}return t=a(t,!n),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(i(e),0===e.length)return".";var t=47===e.charCodeAt(0),n=47===e.charCodeAt(e.length-1);return 0!==(e=a(e,!t)).length||t||(e="."),e.length>0&&n&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return i(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var n=arguments[t];i(n),n.length>0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":o.normalize(e)},relative:function(e,t){if(i(e),i(t),e===t)return"";if((e=o.resolve(e))===(t=o.resolve(t)))return"";for(var n=1;n<e.length&&47===e.charCodeAt(n);++n);for(var r=e.length,a=r-n,s=1;s<t.length&&47===t.charCodeAt(s);++s);for(var u=t.length-s,c=a<u?a:u,l=-1,f=0;f<=c;++f){if(f===c){if(u>c){if(47===t.charCodeAt(s+f))return t.slice(s+f+1);if(0===f)return t.slice(s+f)}else a>c&&(47===e.charCodeAt(n+f)?l=f:0===f&&(l=0));break}var d=e.charCodeAt(n+f);if(d!==t.charCodeAt(s+f))break;47===d&&(l=f)}var h="";for(f=n+l+1;f<=r;++f)f!==r&&47!==e.charCodeAt(f)||(0===h.length?h+="..":h+="/..");return h.length>0?h+t.slice(s+l):(s+=l,47===t.charCodeAt(s)&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(i(e),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,a=!0,o=e.length-1;o>=1;--o)if(47===(t=e.charCodeAt(o))){if(!a){r=o;break}}else a=!1;return-1===r?n?"/":".":n&&1===r?"//":e.slice(0,r)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');i(e);var n,r=0,a=-1,o=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,u=-1;for(n=e.length-1;n>=0;--n){var c=e.charCodeAt(n);if(47===c){if(!o){r=n+1;break}}else-1===u&&(o=!1,u=n+1),s>=0&&(c===t.charCodeAt(s)?-1==--s&&(a=n):(s=-1,a=u))}return r===a?a=u:-1===a&&(a=e.length),e.slice(r,a)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!o){r=n+1;break}}else-1===a&&(o=!1,a=n+1);return-1===a?"":e.slice(r,a)},extname:function(e){i(e);for(var t=-1,n=0,r=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var u=e.charCodeAt(s);if(47!==u)-1===r&&(a=!1,r=s+1),46===u?-1===t?t=s:1!==o&&(o=1):-1!==t&&(o=-1);else if(!a){n=s+1;break}}return-1===t||-1===r||0===o||1===o&&t===r-1&&t===n+1?"":e.slice(t,r)},format:function(e){if(null===e||"object"!==r(e))throw new TypeError('The "pathObject" argument must be of type Object. Received type '+r(e));return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){i(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n,r=e.charCodeAt(0),a=47===r;a?(t.root="/",n=1):n=0;for(var o=-1,s=0,u=-1,c=!0,l=e.length-1,f=0;l>=n;--l)if(47!==(r=e.charCodeAt(l)))-1===u&&(c=!1,u=l+1),46===r?-1===o?o=l:1!==f&&(f=1):-1!==o&&(f=-1);else if(!c){s=l+1;break}return-1===o||-1===u||0===f||1===f&&o===u-1&&o===s+1?-1!==u&&(t.base=t.name=0===s&&a?e.slice(1,u):e.slice(s,u)):(0===s&&a?(t.name=e.slice(1,o),t.base=e.slice(1,u)):(t.name=e.slice(s,o),t.base=e.slice(s,u)),t.ext=e.slice(o,u)),s>0?t.dir=e.slice(0,s-1):a&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,e.exports=o},3515:function(e,t,n){e.exports=i;var r=n(79826).EventEmitter;function i(){r.call(this)}n(47523)(i,r),i.Readable=n(92762),i.Writable=n(33726),i.Duplex=n(10884),i.Transform=n(86756),i.PassThrough=n(1390),i.finished=n(32896),i.pipeline=n(38460),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function a(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",a),e._isStdio||t&&!1===t.end||(n.on("end",s),n.on("close",u));var o=!1;function s(){o||(o=!0,e.end())}function u(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(l(),0===r.listenerCount(this,"error"))throw e}function l(){n.removeListener("data",i),e.removeListener("drain",a),n.removeListener("end",s),n.removeListener("close",u),n.removeListener("error",c),e.removeListener("error",c),n.removeListener("end",l),n.removeListener("close",l),e.removeListener("close",l)}return n.on("error",c),e.on("error",c),n.on("end",l),n.on("close",l),e.on("close",l),e.emit("pipe",n),e}},41602:function(e,t,n){"use strict";var r=n(95429);n(16280),n(28706),n(48598),n(62062),n(34782),n(62010),n(18111),n(61701),n(26099),n(27495),n(25440);var i={};function a(e,t,n){n||(n=Error);var r=function(e){var n,r;function i(n,r,i){return e.call(this,function(e,n,r){return"string"==typeof t?t:t(e,n,r)}(n,r,i))||this}return r=e,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i}(n);r.prototype.name=n.name,r.prototype.code=e,i[e]=r}function o(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}a("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),a("ERR_INVALID_ARG_TYPE",(function(e,t,n){var i,a,s,u,c;if("string"==typeof t&&(a="not ",t.substr(0,4)===a)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-9,n)===t}(e," argument"))s="The ".concat(e," ").concat(i," ").concat(o(t,"type"));else{var l=("number"!=typeof c&&(c=0),c+1>(u=e).length||-1===u.indexOf(".",c)?"argument":"property");s='The "'.concat(e,'" ').concat(l," ").concat(i," ").concat(o(t,"type"))}return s+". Received type ".concat(r(n))}),TypeError),a("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),a("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),a("ERR_STREAM_PREMATURE_CLOSE","Premature close"),a("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),a("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),a("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),a("ERR_STREAM_WRITE_AFTER_END","write after end"),a("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),a("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),a("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.F=i},10884:function(e,t,n){"use strict";n(44114),n(79432);var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=c;var i=n(92762),a=n(33726);n(47523)(c,i);for(var o=r(a.prototype),s=0;s<o.length;s++){var u=o[s];c.prototype[u]||(c.prototype[u]=a.prototype[u])}function c(e){if(!(this instanceof c))return new c(e);i.call(this,e),a.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||process.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},1390:function(e,t,n){"use strict";e.exports=i;var r=n(86756);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}n(47523)(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},92762:function(e,t,n){"use strict";var r;n(52675),n(89463),n(66412),n(28706),n(48598),n(44114),n(54554),n(40875),n(26099),n(13611),e.exports=I,I.ReadableState=S,n(79826).EventEmitter;var i,a=function(e,t){return e.listeners(t).length},o=n(92611),s=n(40044).Buffer,u=(void 0!==n.g?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},c=n(77199);i=c&&c.debuglog?c.debuglog("stream"):function(){};var l,f,d,h=n(73791),g=n(52410),p=n(61749).getHighWaterMark,m=n(41602).F,E=m.ERR_INVALID_ARG_TYPE,v=m.ERR_STREAM_PUSH_AFTER_EOF,A=m.ERR_METHOD_NOT_IMPLEMENTED,y=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(47523)(I,o);var T=g.errorOrDestroy,_=["error","close","destroy","pause","resume"];function S(e,t,i){r=r||n(10884),e=e||{},"boolean"!=typeof i&&(i=t instanceof r),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=p(this,e,"readableHighWaterMark",i),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(l||(l=n(90748).I),this.decoder=new l(e.encoding),this.encoding=e.encoding)}function I(e){if(r=r||n(10884),!(this instanceof I))return new I(e);var t=this instanceof r;this._readableState=new S(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),o.call(this)}function b(e,t,n,r,a){i("readableAddChunk",t);var o,c=e._readableState;if(null===t)c.reading=!1,function(e,t){if(i("onEofChunk"),!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?w(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,D(e)))}}(e,c);else if(a||(o=function(e,t){var n,r;return r=t,s.isBuffer(r)||r instanceof u||"string"==typeof t||void 0===t||e.objectMode||(n=new E("chunk",["string","Buffer","Uint8Array"],t)),n}(c,t)),o)T(e,o);else if(c.objectMode||t&&t.length>0)if("string"==typeof t||c.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),r)c.endEmitted?T(e,new y):R(e,c,t,!0);else if(c.ended)T(e,new v);else{if(c.destroyed)return!1;c.reading=!1,c.decoder&&!n?(t=c.decoder.write(t),c.objectMode||0!==t.length?R(e,c,t,!1):O(e,c)):R(e,c,t,!1)}else r||(c.reading=!1,O(e,c));return!c.ended&&(c.length<c.highWaterMark||0===c.length)}function R(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&w(e)),O(e,t)}Object.defineProperty(I.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),I.prototype.destroy=g.destroy,I.prototype._undestroy=g.undestroy,I.prototype._destroy=function(e,t){t(e)},I.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=s.from(e,t),t=""),n=!0),b(this,e,t,!1,n)},I.prototype.unshift=function(e){return b(this,e,null,!0,!1)},I.prototype.isPaused=function(){return!1===this._readableState.flowing},I.prototype.setEncoding=function(e){l||(l=n(90748).I);var t=new l(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var N=1073741824;function C(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=N?e=N:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function w(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(D,e))}function D(e){var t=e._readableState;i("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,F(e)}function O(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(M,e,t))}function M(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(i("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function P(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function L(e){i("readable nexttick read 0"),e.read(0)}function x(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),F(e),t.flowing&&!t.reading&&e.read(0)}function F(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function U(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function k(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(B,t,e))}function B(e,t){if(i("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function G(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}I.prototype.read=function(e){i("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return i("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?k(this):w(this),null;if(0===(e=C(e,t))&&t.ended)return 0===t.length&&k(this),null;var r,a=t.needReadable;return i("need readable",a),(0===t.length||t.length-e<t.highWaterMark)&&i("length less than watermark",a=!0),t.ended||t.reading?i("reading or ended",a=!1):a&&(i("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=C(n,t))),null===(r=e>0?U(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&k(this)),null!==r&&this.emit("data",r),r},I.prototype._read=function(e){T(this,new A("_read()"))},I.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,i("pipe count=%d opts=%j",r.pipesCount,t);var o=t&&!1===t.end||e===process.stdout||e===process.stderr?g:s;function s(){i("onend"),e.end()}r.endEmitted?process.nextTick(o):n.once("end",o),e.on("unpipe",(function t(a,o){i("onunpipe"),a===n&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,i("cleanup"),e.removeListener("close",d),e.removeListener("finish",h),e.removeListener("drain",u),e.removeListener("error",f),e.removeListener("unpipe",t),n.removeListener("end",s),n.removeListener("end",g),n.removeListener("data",l),c=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}));var u=function(e){return function(){var t=e._readableState;i("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,F(e))}}(n);e.on("drain",u);var c=!1;function l(t){i("ondata");var a=e.write(t);i("dest.write",a),!1===a&&((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==G(r.pipes,e))&&!c&&(i("false write response, pause",r.awaitDrain),r.awaitDrain++),n.pause())}function f(t){i("onerror",t),g(),e.removeListener("error",f),0===a(e,"error")&&T(e,t)}function d(){e.removeListener("finish",h),g()}function h(){i("onfinish"),e.removeListener("close",d),g()}function g(){i("unpipe"),n.unpipe(e)}return n.on("data",l),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",f),e.once("close",d),e.once("finish",h),e.emit("pipe",n),r.flowing||(i("pipe resume"),n.resume()),e},I.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)r[a].emit("unpipe",this,{hasUnpiped:!1});return this}var o=G(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},I.prototype.on=function(e,t){var n=o.prototype.on.call(this,e,t),r=this._readableState;return"data"===e?(r.readableListening=this.listenerCount("readable")>0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,i("on readable",r.length,r.reading),r.length?w(this):r.reading||process.nextTick(L,this))),n},I.prototype.addListener=I.prototype.on,I.prototype.removeListener=function(e,t){var n=o.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(P,this),n},I.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(P,this),t},I.prototype.resume=function(){var e=this._readableState;return e.flowing||(i("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(x,e,t))}(this,e)),e.paused=!1,this},I.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},I.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var a in e.on("end",(function(){if(i("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(a){i("wrapped data"),n.decoder&&(a=n.decoder.write(a)),n.objectMode&&null==a||(n.objectMode||a&&a.length)&&(t.push(a)||(r=!0,e.pause()))})),e)void 0===this[a]&&"function"==typeof e[a]&&(this[a]=function(t){return function(){return e[t].apply(e,arguments)}}(a));for(var o=0;o<_.length;o++)e.on(_[o],this.emit.bind(this,_[o]));return this._read=function(t){i("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"==typeof Symbol&&(I.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=n(55857)),f(this)}),Object.defineProperty(I.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(I.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(I.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),I._fromList=U,Object.defineProperty(I.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(I.from=function(e,t){return void 0===d&&(d=n(93411)),d(I,e,t)})},86756:function(e,t,n){"use strict";n(44114),e.exports=l;var r=n(41602).F,i=r.ERR_METHOD_NOT_IMPLEMENTED,a=r.ERR_MULTIPLE_CALLBACK,o=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,u=n(10884);function c(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new a);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(e){if(!(this instanceof l))return new l(e);u.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function f(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush((function(t,n){d(e,t,n)}))}function d(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new s;if(e._transformState.transforming)throw new o;return e.push(null)}n(47523)(l,u),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,n){n(new i("_transform()"))},l.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},l.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},33726:function(e,t,n){"use strict";function r(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t){var n=e.entry;for(e.entry=null;n;){var r=n.callback;t.pendingcb--,r(undefined),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var i;n(52675),n(89463),n(60193),n(44114),n(48957),n(26099),n(13611),e.exports=I,I.WritableState=S;var a,o={deprecate:n(59e3)},s=n(92611),u=n(40044).Buffer,c=(void 0!==n.g?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},l=n(52410),f=n(61749).getHighWaterMark,d=n(41602).F,h=d.ERR_INVALID_ARG_TYPE,g=d.ERR_METHOD_NOT_IMPLEMENTED,p=d.ERR_MULTIPLE_CALLBACK,m=d.ERR_STREAM_CANNOT_PIPE,E=d.ERR_STREAM_DESTROYED,v=d.ERR_STREAM_NULL_VALUES,A=d.ERR_STREAM_WRITE_AFTER_END,y=d.ERR_UNKNOWN_ENCODING,T=l.errorOrDestroy;function _(){}function S(e,t,a){i=i||n(10884),e=e||{},"boolean"!=typeof a&&(a=t instanceof i),this.objectMode=!!e.objectMode,a&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=f(this,e,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===e.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if("function"!=typeof i)throw new p;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(process.nextTick(i,r),process.nextTick(D,e,t),e._writableState.errorEmitted=!0,T(e,r)):(i(r),e._writableState.errorEmitted=!0,T(e,r),D(e,t))}(e,n,r,t,i);else{var a=C(n)||e.destroyed;a||n.corked||n.bufferProcessing||!n.bufferedRequest||N(e,n),r?process.nextTick(R,e,n,a,i):R(e,n,a,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}function I(e){var t=this instanceof(i=i||n(10884));if(!t&&!a.call(I,this))return new I(e);this._writableState=new S(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),s.call(this)}function b(e,t,n,r,i,a,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new E("write")):n?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function R(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),D(e,t)}function N(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var i=t.bufferedRequestCount,a=new Array(i),o=t.corkedRequestsFree;o.entry=n;for(var s=0,u=!0;n;)a[s]=n,n.isBuf||(u=!1),n=n.next,s+=1;a.allBuffers=u,b(e,t,!0,t.length,a,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new r(t),t.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,l=n.encoding,f=n.callback;if(b(e,t,!1,t.objectMode?1:c.length,c,l,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function C(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function w(e,t){e._final((function(n){t.pendingcb--,n&&T(e,n),t.prefinished=!0,e.emit("prefinish"),D(e,t)}))}function D(e,t){var n=C(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(w,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return n}n(47523)(I,s),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(a=Function.prototype[Symbol.hasInstance],Object.defineProperty(I,Symbol.hasInstance,{value:function(e){return!!a.call(this,e)||this===I&&e&&e._writableState instanceof S}})):a=function(e){return e instanceof this},I.prototype.pipe=function(){T(this,new m)},I.prototype.write=function(e,t,n){var r,i=this._writableState,a=!1,o=!i.objectMode&&(r=e,u.isBuffer(r)||r instanceof c);return o&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"==typeof t&&(n=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=_),i.ending?function(e,t){var n=new A;T(e,n),process.nextTick(t,n)}(this,n):(o||function(e,t,n,r){var i;return null===n?i=new v:"string"==typeof n||t.objectMode||(i=new h("chunk",["string","Buffer"],n)),!i||(T(e,i),process.nextTick(r,i),!1)}(this,i,e,n))&&(i.pendingcb++,a=function(e,t,n,r,i,a){if(!n){var o=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,n)),t}(t,r,i);r!==o&&(n=!0,i="buffer",r=o)}var s=t.objectMode?1:r.length;t.length+=s;var c=t.length<t.highWaterMark;if(c||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:a,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else b(e,t,!1,s,r,i,a);return c}(this,i,o,e,t,n)),a},I.prototype.cork=function(){this._writableState.corked++},I.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||N(this,e))},I.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new y(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(I.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(I.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),I.prototype._write=function(e,t,n){n(new g("_write()"))},I.prototype._writev=null,I.prototype.end=function(e,t,n){var r=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,D(e,t),n&&(t.finished?process.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,r,n),this},Object.defineProperty(I.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(I.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),I.prototype.destroy=l.destroy,I.prototype._undestroy=l.undestroy,I.prototype._destroy=function(e,t){t(e)}},55857:function(e,t,n){"use strict";var r,i=n(95429);function a(e,t,n){return(t=function(e){var t=function(e){if("object"!==i(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===i(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(52675),n(89463),n(66412),n(45700),n(16280),n(89572),n(2892),n(40875),n(26099),n(3362);var o=n(32896),s=Symbol("lastResolve"),u=Symbol("lastReject"),c=Symbol("error"),l=Symbol("ended"),f=Symbol("lastPromise"),d=Symbol("handlePromise"),h=Symbol("stream");function g(e,t){return{value:e,done:t}}function p(e){var t=e[s];if(null!==t){var n=e[h].read();null!==n&&(e[f]=null,e[s]=null,e[u]=null,t(g(n,!1)))}}function m(e){process.nextTick(p,e)}var E=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((a(r={get stream(){return this[h]},next:function(){var e=this,t=this[c];if(null!==t)return Promise.reject(t);if(this[l])return Promise.resolve(g(void 0,!0));if(this[h].destroyed)return new Promise((function(t,n){process.nextTick((function(){e[c]?n(e[c]):t(g(void 0,!0))}))}));var n,r=this[f];if(r)n=new Promise(function(e,t){return function(n,r){e.then((function(){t[l]?n(g(void 0,!0)):t[d](n,r)}),r)}}(r,this));else{var i=this[h].read();if(null!==i)return Promise.resolve(g(i,!1));n=new Promise(this[d])}return this[f]=n,n}},Symbol.asyncIterator,(function(){return this})),a(r,"return",(function(){var e=this;return new Promise((function(t,n){e[h].destroy(null,(function(e){e?n(e):t(g(void 0,!0))}))}))})),r),E);e.exports=function(e){var t,n=Object.create(v,(a(t={},h,{value:e,writable:!0}),a(t,s,{value:null,writable:!0}),a(t,u,{value:null,writable:!0}),a(t,c,{value:null,writable:!0}),a(t,l,{value:e._readableState.endEmitted,writable:!0}),a(t,d,{value:function(e,t){var r=n[h].read();r?(n[f]=null,n[s]=null,n[u]=null,e(g(r,!1))):(n[s]=e,n[u]=t)},writable:!0}),t));return n[f]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[u];return null!==t&&(n[f]=null,n[s]=null,n[u]=null,t(e)),void(n[c]=e)}var r=n[s];null!==r&&(n[f]=null,n[s]=null,n[u]=null,r(g(void 0,!0))),n[l]=!0})),e.on("readable",m.bind(null,n)),n}},73791:function(e,t,n){"use strict";var r=n(95429);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t,n){return(t=u(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r)}}function u(e){var t=function(e){if("object"!==r(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===r(t)?t:String(t)}n(52675),n(45700),n(16280),n(2008),n(44114),n(34782),n(89572),n(18111),n(22489),n(7588),n(2892),n(83851),n(81278),n(79432),n(26099),n(23500);var c=n(40044).Buffer,l=n(63779).inspect,f=l&&l.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,n;return t=e,(n=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return c.alloc(0);for(var t,n,r,i=c.allocUnsafe(e>>>0),a=this.head,o=0;a;)t=a.data,n=i,r=o,c.prototype.copy.call(t,n,r),o+=a.data.length,a=a.next;return i}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var i=t.data,a=e>i.length?i.length:e;if(a===i.length?r+=i:r+=i.slice(0,e),0==(e-=a)){a===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(a));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=c.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),0==(e-=a)){a===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(a));break}++r}return this.length-=r,t}},{key:f,value:function(e,t){return l(this,a(a({},t),{},{depth:0,customInspect:!1}))}}])&&s(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()},52410:function(e){"use strict";function t(e,t){r(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function r(e,t){e.emit("error",t)}e.exports={destroy:function(e,i){var a=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(i?i(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(r,this,e)):process.nextTick(r,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!i&&e?a._writableState?a._writableState.errorEmitted?process.nextTick(n,a):(a._writableState.errorEmitted=!0,process.nextTick(t,a,e)):process.nextTick(t,a,e):i?(process.nextTick(n,a),i(e)):process.nextTick(n,a)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}}},32896:function(e,t,n){"use strict";var r=n(41602).F.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,n,a){if("function"==typeof n)return e(t,null,n);n||(n={}),a=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}}(a||i);var o=n.readable||!1!==n.readable&&t.readable,s=n.writable||!1!==n.writable&&t.writable,u=function(){t.writable||l()},c=t._writableState&&t._writableState.finished,l=function(){s=!1,c=!0,o||a.call(t)},f=t._readableState&&t._readableState.endEmitted,d=function(){o=!1,f=!0,s||a.call(t)},h=function(e){a.call(t,e)},g=function(){var e;return o&&!f?(t._readableState&&t._readableState.ended||(e=new r),a.call(t,e)):s&&!c?(t._writableState&&t._writableState.ended||(e=new r),a.call(t,e)):void 0},p=function(){t.req.on("finish",l)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",l),t.on("abort",g),t.req?p():t.on("request",p)):s&&!t._writableState&&(t.on("end",u),t.on("close",u)),t.on("end",d),t.on("finish",l),!1!==n.error&&t.on("error",h),t.on("close",g),function(){t.removeListener("complete",l),t.removeListener("abort",g),t.removeListener("request",p),t.req&&t.req.removeListener("finish",l),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",l),t.removeListener("end",d),t.removeListener("error",h),t.removeListener("close",g)}}},93411:function(e,t,n){n(16280),e.exports=function(){throw new Error("Readable.from is not available in the browser")}},38460:function(e,t,n){"use strict";var r;n(62062),n(18111),n(7588),n(61701),n(18237),n(26099),n(23500);var i=n(41602).F,a=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function u(e){e()}function c(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var l,f=function(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new a("streams");var d=t.map((function(e,i){var a=i<t.length-1;return function(e,t,i,a){a=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(a);var s=!1;e.on("close",(function(){s=!0})),void 0===r&&(r=n(32896)),r(e,{readable:t,writable:i},(function(e){if(e)return a(e);s=!0,a()}));var u=!1;return function(t){if(!s&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void a(t||new o("pipe"))}}(e,a,i>0,(function(e){l||(l=e),e&&d.forEach(u),a||(d.forEach(u),f(l))}))}));return t.reduce(c)}},61749:function(e,t,n){"use strict";var r=n(41602).F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,n,i){var a=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,i,n);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new r(i?n:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}}},92611:function(e,t,n){e.exports=n(79826).EventEmitter},90748:function(e,t,n){"use strict";n(16280),n(34782),n(26099),n(38781);var r=n(24598).Buffer,i=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function l(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.I=a,a.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},a.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},a.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=o(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||-2===i?0:(i=o(t[r]))>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||-2===i?0:(i=o(t[r]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},24598:function(e,t,n){n(16280),n(33771);var r=n(40044),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=o),a(i,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},59e3:function(e,t,n){function r(e){try{if(!n.g.localStorage)return!1}catch(e){return!1}var t=n.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}n(16280),e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}},63779:function(){},77199:function(){},79306:function(e,t,n){"use strict";var r=n(94901),i=n(16823),a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(i(e)+" is not a function")}},35548:function(e,t,n){"use strict";var r=n(33517),i=n(16823),a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(i(e)+" is not a constructor")}},73506:function(e,t,n){"use strict";var r=n(13925),i=String,a=TypeError;e.exports=function(e){if(r(e))return e;throw new a("Can't set "+i(e)+" as a prototype")}},97080:function(e,t,n){"use strict";var r=n(94402).has;e.exports=function(e){return r(e),e}},63463:function(e){"use strict";var t=TypeError;e.exports=function(e){if("string"==typeof e)return e;throw new t("Argument is not a string")}},6469:function(e,t,n){"use strict";var r=n(78227),i=n(2360),a=n(24913).f,o=r("unscopables"),s=Array.prototype;void 0===s[o]&&a(s,o,{configurable:!0,value:i(null)}),e.exports=function(e){s[o][e]=!0}},57829:function(e,t,n){"use strict";var r=n(68183).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},90679:function(e,t,n){"use strict";var r=n(1625),i=TypeError;e.exports=function(e,t){if(r(t,e))return e;throw new i("Incorrect invocation")}},83972:function(e,t,n){"use strict";var r=n(20034),i=String,a=TypeError;e.exports=function(e){if(void 0===e||r(e))return e;throw new a(i(e)+" is not an object or undefined")}},28551:function(e,t,n){"use strict";var r=n(20034),i=String,a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(i(e)+" is not an object")}},34154:function(e,t,n){"use strict";var r=n(36955),i=TypeError;e.exports=function(e){if("Uint8Array"===r(e))return e;throw new i("Argument is not an Uint8Array")}},77811:function(e){"use strict";e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},67394:function(e,t,n){"use strict";var r=n(44576),i=n(46706),a=n(22195),o=r.ArrayBuffer,s=r.TypeError;e.exports=o&&i(o.prototype,"byteLength","get")||function(e){if("ArrayBuffer"!==a(e))throw new s("ArrayBuffer expected");return e.byteLength}},3238:function(e,t,n){"use strict";var r=n(44576),i=n(77811),a=n(67394),o=r.DataView;e.exports=function(e){if(!i||0!==a(e))return!1;try{return new o(e),!1}catch(e){return!0}}},15652:function(e,t,n){"use strict";var r=n(79039);e.exports=r((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},55169:function(e,t,n){"use strict";var r=n(3238),i=TypeError;e.exports=function(e){if(r(e))throw new i("ArrayBuffer is detached");return e}},95636:function(e,t,n){"use strict";var r=n(44576),i=n(79504),a=n(46706),o=n(57696),s=n(55169),u=n(67394),c=n(94483),l=n(1548),f=r.structuredClone,d=r.ArrayBuffer,h=r.DataView,g=Math.min,p=d.prototype,m=h.prototype,E=i(p.slice),v=a(p,"resizable","get"),A=a(p,"maxByteLength","get"),y=i(m.getInt8),T=i(m.setInt8);e.exports=(l||c)&&function(e,t,n){var r,i=u(e),a=void 0===t?i:o(t),p=!v||!v(e);if(s(e),l&&(e=f(e,{transfer:[e]}),i===a&&(n||p)))return e;if(i>=a&&(!n||p))r=E(e,0,a);else{var m=n&&!p&&A?{maxByteLength:A(e)}:void 0;r=new d(a,m);for(var _=new h(e),S=new h(r),I=g(a,i),b=0;b<I;b++)T(S,b,y(_,b))}return l||c(e),r}},94644:function(e,t,n){"use strict";var r,i,a,o=n(77811),s=n(43724),u=n(44576),c=n(94901),l=n(20034),f=n(39297),d=n(36955),h=n(16823),g=n(66699),p=n(36840),m=n(62106),E=n(1625),v=n(42787),A=n(52967),y=n(78227),T=n(33392),_=n(91181),S=_.enforce,I=_.get,b=u.Int8Array,R=b&&b.prototype,N=u.Uint8ClampedArray,C=N&&N.prototype,w=b&&v(b),D=R&&v(R),O=Object.prototype,M=u.TypeError,P=y("toStringTag"),L=T("TYPED_ARRAY_TAG"),x="TypedArrayConstructor",F=o&&!!A&&"Opera"!==d(u.opera),U=!1,k={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},B={BigInt64Array:8,BigUint64Array:8},G=function(e){var t=v(e);if(l(t)){var n=I(t);return n&&f(n,x)?n[x]:G(t)}},H=function(e){if(!l(e))return!1;var t=d(e);return f(k,t)||f(B,t)};for(r in k)(a=(i=u[r])&&i.prototype)?S(a)[x]=i:F=!1;for(r in B)(a=(i=u[r])&&i.prototype)&&(S(a)[x]=i);if((!F||!c(w)||w===Function.prototype)&&(w=function(){throw new M("Incorrect invocation")},F))for(r in k)u[r]&&A(u[r],w);if((!F||!D||D===O)&&(D=w.prototype,F))for(r in k)u[r]&&A(u[r].prototype,D);if(F&&v(C)!==D&&A(C,D),s&&!f(D,P))for(r in U=!0,m(D,P,{configurable:!0,get:function(){return l(this)?this[L]:void 0}}),k)u[r]&&g(u[r],L,r);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:F,TYPED_ARRAY_TAG:U&&L,aTypedArray:function(e){if(H(e))return e;throw new M("Target is not a typed array")},aTypedArrayConstructor:function(e){if(c(e)&&(!A||E(w,e)))return e;throw new M(h(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,r){if(s){if(n)for(var i in k){var a=u[i];if(a&&f(a.prototype,e))try{delete a.prototype[e]}catch(n){try{a.prototype[e]=t}catch(e){}}}D[e]&&!n||p(D,e,n?t:F&&R[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,i;if(s){if(A){if(n)for(r in k)if((i=u[r])&&f(i,e))try{delete i[e]}catch(e){}if(w[e]&&!n)return;try{return p(w,e,n?t:F&&w[e]||t)}catch(e){}}for(r in k)!(i=u[r])||i[e]&&!n||p(i,e,t)}},getTypedArrayConstructor:G,isView:function(e){if(!l(e))return!1;var t=d(e);return"DataView"===t||f(k,t)||f(B,t)},isTypedArray:H,TypedArray:w,TypedArrayPrototype:D}},66346:function(e,t,n){"use strict";var r=n(44576),i=n(79504),a=n(43724),o=n(77811),s=n(10350),u=n(66699),c=n(62106),l=n(56279),f=n(79039),d=n(90679),h=n(91291),g=n(18014),p=n(57696),m=n(15617),E=n(88490),v=n(42787),A=n(52967),y=n(84373),T=n(67680),_=n(23167),S=n(77740),I=n(10687),b=n(91181),R=s.PROPER,N=s.CONFIGURABLE,C="ArrayBuffer",w="DataView",D="prototype",O="Wrong index",M=b.getterFor(C),P=b.getterFor(w),L=b.set,x=r[C],F=x,U=F&&F[D],k=r[w],B=k&&k[D],G=Object.prototype,H=r.Array,Y=r.RangeError,V=i(y),q=i([].reverse),K=E.pack,j=E.unpack,z=function(e){return[255&e]},W=function(e){return[255&e,e>>8&255]},Q=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},X=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},$=function(e){return K(m(e),23,4)},Z=function(e){return K(e,52,8)},J=function(e,t,n){c(e[D],t,{configurable:!0,get:function(){return n(this)[t]}})},ee=function(e,t,n,r){var i=P(e),a=p(n),o=!!r;if(a+t>i.byteLength)throw new Y(O);var s=i.bytes,u=a+i.byteOffset,c=T(s,u,u+t);return o?c:q(c)},te=function(e,t,n,r,i,a){var o=P(e),s=p(n),u=r(+i),c=!!a;if(s+t>o.byteLength)throw new Y(O);for(var l=o.bytes,f=s+o.byteOffset,d=0;d<t;d++)l[f+d]=u[c?d:t-d-1]};if(o){var ne=R&&x.name!==C;f((function(){x(1)}))&&f((function(){new x(-1)}))&&!f((function(){return new x,new x(1.5),new x(NaN),1!==x.length||ne&&!N}))?ne&&N&&u(x,"name",C):((F=function(e){return d(this,U),_(new x(p(e)),this,F)})[D]=U,U.constructor=F,S(F,x)),A&&v(B)!==G&&A(B,G);var re=new k(new F(2)),ie=i(B.setInt8);re.setInt8(0,2147483648),re.setInt8(1,2147483649),!re.getInt8(0)&&re.getInt8(1)||l(B,{setInt8:function(e,t){ie(this,e,t<<24>>24)},setUint8:function(e,t){ie(this,e,t<<24>>24)}},{unsafe:!0})}else U=(F=function(e){d(this,U);var t=p(e);L(this,{type:C,bytes:V(H(t),0),byteLength:t}),a||(this.byteLength=t,this.detached=!1)})[D],B=(k=function(e,t,n){d(this,B),d(e,U);var r=M(e),i=r.byteLength,o=h(t);if(o<0||o>i)throw new Y("Wrong offset");if(o+(n=void 0===n?i-o:g(n))>i)throw new Y("Wrong length");L(this,{type:w,buffer:e,byteLength:n,byteOffset:o,bytes:r.bytes}),a||(this.buffer=e,this.byteLength=n,this.byteOffset=o)})[D],a&&(J(F,"byteLength",M),J(k,"buffer",P),J(k,"byteLength",P),J(k,"byteOffset",P)),l(B,{getInt8:function(e){return ee(this,1,e)[0]<<24>>24},getUint8:function(e){return ee(this,1,e)[0]},getInt16:function(e){var t=ee(this,2,e,arguments.length>1&&arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=ee(this,2,e,arguments.length>1&&arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return X(ee(this,4,e,arguments.length>1&&arguments[1]))},getUint32:function(e){return X(ee(this,4,e,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(e){return j(ee(this,4,e,arguments.length>1&&arguments[1]),23)},getFloat64:function(e){return j(ee(this,8,e,arguments.length>1&&arguments[1]),52)},setInt8:function(e,t){te(this,1,e,z,t)},setUint8:function(e,t){te(this,1,e,z,t)},setInt16:function(e,t){te(this,2,e,W,t,arguments.length>2&&arguments[2])},setUint16:function(e,t){te(this,2,e,W,t,arguments.length>2&&arguments[2])},setInt32:function(e,t){te(this,4,e,Q,t,arguments.length>2&&arguments[2])},setUint32:function(e,t){te(this,4,e,Q,t,arguments.length>2&&arguments[2])},setFloat32:function(e,t){te(this,4,e,$,t,arguments.length>2&&arguments[2])},setFloat64:function(e,t){te(this,8,e,Z,t,arguments.length>2&&arguments[2])}});I(F,C),I(k,w),e.exports={ArrayBuffer:F,DataView:k}},57029:function(e,t,n){"use strict";var r=n(48981),i=n(35610),a=n(26198),o=n(84606),s=Math.min;e.exports=[].copyWithin||function(e,t){var n=r(this),u=a(n),c=i(e,u),l=i(t,u),f=arguments.length>2?arguments[2]:void 0,d=s((void 0===f?u:i(f,u))-l,u-c),h=1;for(l<c&&c<l+d&&(h=-1,l+=d-1,c+=d-1);d-- >0;)l in n?n[c]=n[l]:o(n,c),c+=h,l+=h;return n}},84373:function(e,t,n){"use strict";var r=n(48981),i=n(35610),a=n(26198);e.exports=function(e){for(var t=r(this),n=a(t),o=arguments.length,s=i(o>1?arguments[1]:void 0,n),u=o>2?arguments[2]:void 0,c=void 0===u?n:i(u,n);c>s;)t[s++]=e;return t}},90235:function(e,t,n){"use strict";var r=n(59213).forEach,i=n(34598)("forEach");e.exports=i?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},35370:function(e,t,n){"use strict";var r=n(26198);e.exports=function(e,t,n){for(var i=0,a=arguments.length>2?n:r(t),o=new e(a);a>i;)o[i]=t[i++];return o}},97916:function(e,t,n){"use strict";var r=n(76080),i=n(69565),a=n(48981),o=n(96319),s=n(44209),u=n(33517),c=n(26198),l=n(97040),f=n(70081),d=n(50851),h=Array;e.exports=function(e){var t=a(e),n=u(this),g=arguments.length,p=g>1?arguments[1]:void 0,m=void 0!==p;m&&(p=r(p,g>2?arguments[2]:void 0));var E,v,A,y,T,_,S=d(t),I=0;if(!S||this===h&&s(S))for(E=c(t),v=n?new this(E):h(E);E>I;I++)_=m?p(t[I],I):t[I],l(v,I,_);else for(v=n?new this:[],T=(y=f(t,S)).next;!(A=i(T,y)).done;I++)_=m?o(y,p,[A.value,I],!0):A.value,l(v,I,_);return v.length=I,v}},19617:function(e,t,n){"use strict";var r=n(25397),i=n(35610),a=n(26198),o=function(e){return function(t,n,o){var s=r(t),u=a(s);if(0===u)return!e&&-1;var c,l=i(o,u);if(e&&n!=n){for(;u>l;)if((c=s[l++])!=c)return!0}else for(;u>l;l++)if((e||l in s)&&s[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},43839:function(e,t,n){"use strict";var r=n(76080),i=n(47055),a=n(48981),o=n(26198),s=function(e){var t=1===e;return function(n,s,u){for(var c,l=a(n),f=i(l),d=o(f),h=r(s,u);d-- >0;)if(h(c=f[d],d,l))switch(e){case 0:return c;case 1:return d}return t?-1:void 0}};e.exports={findLast:s(0),findLastIndex:s(1)}},59213:function(e,t,n){"use strict";var r=n(76080),i=n(79504),a=n(47055),o=n(48981),s=n(26198),u=n(1469),c=i([].push),l=function(e){var t=1===e,n=2===e,i=3===e,l=4===e,f=6===e,d=7===e,h=5===e||f;return function(g,p,m,E){for(var v,A,y=o(g),T=a(y),_=s(T),S=r(p,m),I=0,b=E||u,R=t?b(g,_):n||d?b(g,0):void 0;_>I;I++)if((h||I in T)&&(A=S(v=T[I],I,y),e))if(t)R[I]=A;else if(A)switch(e){case 3:return!0;case 5:return v;case 6:return I;case 2:c(R,v)}else switch(e){case 4:return!1;case 7:c(R,v)}return f?-1:i||l?l:R}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},8379:function(e,t,n){"use strict";var r=n(18745),i=n(25397),a=n(91291),o=n(26198),s=n(34598),u=Math.min,c=[].lastIndexOf,l=!!c&&1/[1].lastIndexOf(1,-0)<0,f=s("lastIndexOf"),d=l||!f;e.exports=d?function(e){if(l)return r(c,this,arguments)||0;var t=i(this),n=o(t);if(0===n)return-1;var s=n-1;for(arguments.length>1&&(s=u(s,a(arguments[1]))),s<0&&(s=n+s);s>=0;s--)if(s in t&&t[s]===e)return s||0;return-1}:c},70597:function(e,t,n){"use strict";var r=n(79039),i=n(78227),a=n(39519),o=i("species");e.exports=function(e){return a>=51||!r((function(){var t=[];return(t.constructor={})[o]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},34598:function(e,t,n){"use strict";var r=n(79039);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){return 1},1)}))}},80926:function(e,t,n){"use strict";var r=n(79306),i=n(48981),a=n(47055),o=n(26198),s=TypeError,u="Reduce of empty array with no initial value",c=function(e){return function(t,n,c,l){var f=i(t),d=a(f),h=o(f);if(r(n),0===h&&c<2)throw new s(u);var g=e?h-1:0,p=e?-1:1;if(c<2)for(;;){if(g in d){l=d[g],g+=p;break}if(g+=p,e?g<0:h<=g)throw new s(u)}for(;e?g>=0:h>g;g+=p)g in d&&(l=n(l,d[g],g,f));return l}};e.exports={left:c(!1),right:c(!0)}},34527:function(e,t,n){"use strict";var r=n(43724),i=n(34376),a=TypeError,o=Object.getOwnPropertyDescriptor,s=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=s?function(e,t){if(i(e)&&!o(e,"length").writable)throw new a("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},67680:function(e,t,n){"use strict";var r=n(79504);e.exports=r([].slice)},74488:function(e,t,n){"use strict";var r=n(67680),i=Math.floor,a=function(e,t){var n=e.length;if(n<8)for(var o,s,u=1;u<n;){for(s=u,o=e[u];s&&t(e[s-1],o)>0;)e[s]=e[--s];s!==u++&&(e[s]=o)}else for(var c=i(n/2),l=a(r(e,0,c),t),f=a(r(e,c),t),d=l.length,h=f.length,g=0,p=0;g<d||p<h;)e[g+p]=g<d&&p<h?t(l[g],f[p])<=0?l[g++]:f[p++]:g<d?l[g++]:f[p++];return e};e.exports=a},87433:function(e,t,n){"use strict";var r=n(34376),i=n(33517),a=n(20034),o=n(78227)("species"),s=Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,(i(t)&&(t===s||r(t.prototype))||a(t)&&null===(t=t[o]))&&(t=void 0)),void 0===t?s:t}},1469:function(e,t,n){"use strict";var r=n(87433);e.exports=function(e,t){return new(r(e))(0===t?0:t)}},37628:function(e,t,n){"use strict";var r=n(26198);e.exports=function(e,t){for(var n=r(e),i=new t(n),a=0;a<n;a++)i[a]=e[n-a-1];return i}},39928:function(e,t,n){"use strict";var r=n(26198),i=n(91291),a=RangeError;e.exports=function(e,t,n,o){var s=r(e),u=i(n),c=u<0?s+u:u;if(c>=s||c<0)throw new a("Incorrect index");for(var l=new t(s),f=0;f<s;f++)l[f]=f===c?o:e[f];return l}},92804:function(e){"use strict";var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=t+"+/",r=t+"-_",i=function(e){for(var t={},n=0;n<64;n++)t[e.charAt(n)]=n;return t};e.exports={i2c:n,c2i:i(n),i2cUrl:r,c2iUrl:i(r)}},96319:function(e,t,n){"use strict";var r=n(28551),i=n(9539);e.exports=function(e,t,n,a){try{return a?t(r(n)[0],n[1]):t(n)}catch(t){i(e,"throw",t)}}},84428:function(e,t,n){"use strict";var r=n(78227)("iterator"),i=!1;try{var a=0,o={next:function(){return{done:!!a++}},return:function(){i=!0}};o[r]=function(){return this},Array.from(o,(function(){throw 2}))}catch(e){}e.exports=function(e,t){try{if(!t&&!i)return!1}catch(e){return!1}var n=!1;try{var a={};a[r]=function(){return{next:function(){return{done:n=!0}}}},e(a)}catch(e){}return n}},22195:function(e,t,n){"use strict";var r=n(79504),i=r({}.toString),a=r("".slice);e.exports=function(e){return a(i(e),8,-1)}},36955:function(e,t,n){"use strict";var r=n(92140),i=n(94901),a=n(22195),o=n(78227)("toStringTag"),s=Object,u="Arguments"===a(function(){return arguments}());e.exports=r?a:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=s(e),o))?n:u?a(t):"Object"===(r=a(t))&&i(t.callee)?"Arguments":r}},86938:function(e,t,n){"use strict";var r=n(2360),i=n(62106),a=n(56279),o=n(76080),s=n(90679),u=n(64117),c=n(72652),l=n(51088),f=n(62529),d=n(87633),h=n(43724),g=n(3451).fastKey,p=n(91181),m=p.set,E=p.getterFor;e.exports={getConstructor:function(e,t,n,l){var f=e((function(e,i){s(e,d),m(e,{type:t,index:r(null),first:null,last:null,size:0}),h||(e.size=0),u(i)||c(i,e[l],{that:e,AS_ENTRIES:n})})),d=f.prototype,p=E(t),v=function(e,t,n){var r,i,a=p(e),o=A(e,t);return o?o.value=n:(a.last=o={index:i=g(t,!0),key:t,value:n,previous:r=a.last,next:null,removed:!1},a.first||(a.first=o),r&&(r.next=o),h?a.size++:e.size++,"F"!==i&&(a.index[i]=o)),e},A=function(e,t){var n,r=p(e),i=g(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key===t)return n};return a(d,{clear:function(){for(var e=p(this),t=e.first;t;)t.removed=!0,t.previous&&(t.previous=t.previous.next=null),t=t.next;e.first=e.last=null,e.index=r(null),h?e.size=0:this.size=0},delete:function(e){var t=this,n=p(t),r=A(t,e);if(r){var i=r.next,a=r.previous;delete n.index[r.index],r.removed=!0,a&&(a.next=i),i&&(i.previous=a),n.first===r&&(n.first=i),n.last===r&&(n.last=a),h?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=p(this),r=o(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!A(this,e)}}),a(d,n?{get:function(e){var t=A(this,e);return t&&t.value},set:function(e,t){return v(this,0===e?0:e,t)}}:{add:function(e){return v(this,e=0===e?0:e,e)}}),h&&i(d,"size",{configurable:!0,get:function(){return p(this).size}}),f},setStrong:function(e,t,n){var r=t+" Iterator",i=E(t),a=E(r);l(e,t,(function(e,t){m(this,{type:r,target:e,state:i(e),kind:t,last:null})}),(function(){for(var e=a(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?f("keys"===t?n.key:"values"===t?n.value:[n.key,n.value],!1):(e.target=null,f(void 0,!0))}),n?"entries":"values",!n,!0),d(t)}}},16468:function(e,t,n){"use strict";var r=n(46518),i=n(44576),a=n(79504),o=n(92796),s=n(36840),u=n(3451),c=n(72652),l=n(90679),f=n(94901),d=n(64117),h=n(20034),g=n(79039),p=n(84428),m=n(10687),E=n(23167);e.exports=function(e,t,n){var v=-1!==e.indexOf("Map"),A=-1!==e.indexOf("Weak"),y=v?"set":"add",T=i[e],_=T&&T.prototype,S=T,I={},b=function(e){var t=a(_[e]);s(_,e,"add"===e?function(e){return t(this,0===e?0:e),this}:"delete"===e?function(e){return!(A&&!h(e))&&t(this,0===e?0:e)}:"get"===e?function(e){return A&&!h(e)?void 0:t(this,0===e?0:e)}:"has"===e?function(e){return!(A&&!h(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(o(e,!f(T)||!(A||_.forEach&&!g((function(){(new T).entries().next()})))))S=n.getConstructor(t,e,v,y),u.enable();else if(o(e,!0)){var R=new S,N=R[y](A?{}:-0,1)!==R,C=g((function(){R.has(1)})),w=p((function(e){new T(e)})),D=!A&&g((function(){for(var e=new T,t=5;t--;)e[y](t,t);return!e.has(-0)}));w||((S=t((function(e,t){l(e,_);var n=E(new T,e,S);return d(t)||c(t,n[y],{that:n,AS_ENTRIES:v}),n}))).prototype=_,_.constructor=S),(C||D)&&(b("delete"),b("has"),v&&b("get")),(D||N)&&b(y),A&&_.clear&&delete _.clear}return I[e]=S,r({global:!0,constructor:!0,forced:S!==T},I),m(S,e),A||n.setStrong(S,e,v),S}},77740:function(e,t,n){"use strict";var r=n(39297),i=n(35031),a=n(77347),o=n(24913);e.exports=function(e,t,n){for(var s=i(t),u=o.f,c=a.f,l=0;l<s.length;l++){var f=s[l];r(e,f)||n&&r(n,f)||u(e,f,c(t,f))}}},41436:function(e,t,n){"use strict";var r=n(78227)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},12211:function(e,t,n){"use strict";var r=n(79039);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},62529:function(e){"use strict";e.exports=function(e,t){return{value:e,done:t}}},66699:function(e,t,n){"use strict";var r=n(43724),i=n(24913),a=n(6980);e.exports=r?function(e,t,n){return i.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},6980:function(e){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},97040:function(e,t,n){"use strict";var r=n(43724),i=n(24913),a=n(6980);e.exports=function(e,t,n){r?i.f(e,t,a(0,n)):e[t]=n}},53640:function(e,t,n){"use strict";var r=n(28551),i=n(84270),a=TypeError;e.exports=function(e){if(r(this),"string"===e||"default"===e)e="string";else if("number"!==e)throw new a("Incorrect hint");return i(this,e)}},62106:function(e,t,n){"use strict";var r=n(50283),i=n(24913);e.exports=function(e,t,n){return n.get&&r(n.get,t,{getter:!0}),n.set&&r(n.set,t,{setter:!0}),i.f(e,t,n)}},36840:function(e,t,n){"use strict";var r=n(94901),i=n(24913),a=n(50283),o=n(39433);e.exports=function(e,t,n,s){s||(s={});var u=s.enumerable,c=void 0!==s.name?s.name:t;if(r(n)&&a(n,c,s),s.global)u?e[t]=n:o(t,n);else{try{s.unsafe?e[t]&&(u=!0):delete e[t]}catch(e){}u?e[t]=n:i.f(e,t,{value:n,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return e}},56279:function(e,t,n){"use strict";var r=n(36840);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},39433:function(e,t,n){"use strict";var r=n(44576),i=Object.defineProperty;e.exports=function(e,t){try{i(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},84606:function(e,t,n){"use strict";var r=n(16823),i=TypeError;e.exports=function(e,t){if(!delete e[t])throw new i("Cannot delete property "+r(t)+" of "+r(e))}},43724:function(e,t,n){"use strict";var r=n(79039);e.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},94483:function(e,t,n){"use strict";var r,i,a,o,s=n(44576),u=n(89429),c=n(1548),l=s.structuredClone,f=s.ArrayBuffer,d=s.MessageChannel,h=!1;if(c)h=function(e){l(e,{transfer:[e]})};else if(f)try{d||(r=u("worker_threads"))&&(d=r.MessageChannel),d&&(i=new d,a=new f(2),o=function(e){i.port1.postMessage(null,[e])},2===a.byteLength&&(o(a),0===a.byteLength&&(h=o)))}catch(e){}e.exports=h},4055:function(e,t,n){"use strict";var r=n(44576),i=n(20034),a=r.document,o=i(a)&&i(a.createElement);e.exports=function(e){return o?a.createElement(e):{}}},96837:function(e){"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},55002:function(e){"use strict";e.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},67400:function(e){"use strict";e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},79296:function(e,t,n){"use strict";var r=n(4055)("span").classList,i=r&&r.constructor&&r.constructor.prototype;e.exports=i===Object.prototype?void 0:i},88727:function(e){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},13709:function(e,t,n){"use strict";var r=n(82839).match(/firefox\/(\d+)/i);e.exports=!!r&&+r[1]},13763:function(e,t,n){"use strict";var r=n(82839);e.exports=/MSIE|Trident/.test(r)},44265:function(e,t,n){"use strict";var r=n(82839);e.exports=/ipad|iphone|ipod/i.test(r)&&"undefined"!=typeof Pebble},89544:function(e,t,n){"use strict";var r=n(82839);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},38574:function(e,t,n){"use strict";var r=n(84215);e.exports="NODE"===r},7860:function(e,t,n){"use strict";var r=n(82839);e.exports=/web0s(?!.*chrome)/i.test(r)},82839:function(e,t,n){"use strict";var r=n(44576).navigator,i=r&&r.userAgent;e.exports=i?String(i):""},39519:function(e,t,n){"use strict";var r,i,a=n(44576),o=n(82839),s=a.process,u=a.Deno,c=s&&s.versions||u&&u.version,l=c&&c.v8;l&&(i=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&o&&(!(r=o.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=o.match(/Chrome\/(\d+)/))&&(i=+r[1]),e.exports=i},3607:function(e,t,n){"use strict";var r=n(82839).match(/AppleWebKit\/(\d+)\./);e.exports=!!r&&+r[1]},84215:function(e,t,n){"use strict";var r=n(44576),i=n(82839),a=n(22195),o=function(e){return i.slice(0,e.length)===e};e.exports=o("Bun/")?"BUN":o("Cloudflare-Workers")?"CLOUDFLARE":o("Deno/")?"DENO":o("Node.js/")?"NODE":r.Bun&&"string"==typeof Bun.version?"BUN":r.Deno&&"object"==typeof Deno.version?"DENO":"process"===a(r.process)?"NODE":r.window&&r.document?"BROWSER":"REST"},16193:function(e,t,n){"use strict";var r=n(79504),i=Error,a=r("".replace),o=String(new i("zxcasd").stack),s=/\n\s*at [^:]*:[^\n]*/,u=s.test(o);e.exports=function(e,t){if(u&&"string"==typeof e&&!i.prepareStackTrace)for(;t--;)e=a(e,s,"");return e}},80747:function(e,t,n){"use strict";var r=n(66699),i=n(16193),a=n(24659),o=Error.captureStackTrace;e.exports=function(e,t,n,s){a&&(o?o(e,t):r(e,"stack",i(n,s)))}},24659:function(e,t,n){"use strict";var r=n(79039),i=n(6980);e.exports=!r((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",i(1,7)),7!==e.stack)}))},77536:function(e,t,n){"use strict";var r=n(43724),i=n(79039),a=n(28551),o=n(32603),s=Error.prototype.toString,u=i((function(){if(r){var e=Object.create(Object.defineProperty({},"name",{get:function(){return this===e}}));if("true"!==s.call(e))return!0}return"2: 1"!==s.call({message:1,name:2})||"Error"!==s.call({})}));e.exports=u?function(){var e=a(this),t=o(e.name,"Error"),n=o(e.message);return t?n?t+": "+n:t:n}:s},46518:function(e,t,n){"use strict";var r=n(44576),i=n(77347).f,a=n(66699),o=n(36840),s=n(39433),u=n(77740),c=n(92796);e.exports=function(e,t){var n,l,f,d,h,g=e.target,p=e.global,m=e.stat;if(n=p?r:m?r[g]||s(g,{}):r[g]&&r[g].prototype)for(l in t){if(d=t[l],f=e.dontCallGetSet?(h=i(n,l))&&h.value:n[l],!c(p?l:g+(m?".":"#")+l,e.forced)&&void 0!==f){if(typeof d==typeof f)continue;u(d,f)}(e.sham||f&&f.sham)&&a(d,"sham",!0),o(n,l,d,e)}}},79039:function(e){"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},89228:function(e,t,n){"use strict";n(27495);var r=n(69565),i=n(36840),a=n(57323),o=n(79039),s=n(78227),u=n(66699),c=s("species"),l=RegExp.prototype;e.exports=function(e,t,n,f){var d=s(e),h=!o((function(){var t={};return t[d]=function(){return 7},7!==""[e](t)})),g=h&&!o((function(){var t=!1,n=/a/;if("split"===e){var r={};r[c]=function(){return n},(n={constructor:r,flags:""})[d]=/./[d]}return n.exec=function(){return t=!0,null},n[d](""),!t}));if(!h||!g||n){var p=/./[d],m=t(d,""[e],(function(e,t,n,i,o){var s=t.exec;return s===a||s===l.exec?h&&!o?{done:!0,value:r(p,t,n,i)}:{done:!0,value:r(e,n,t,i)}:{done:!1}}));i(String.prototype,e,m[0]),i(l,d,m[1])}f&&u(l[d],"sham",!0)}},70259:function(e,t,n){"use strict";var r=n(34376),i=n(26198),a=n(96837),o=n(76080),s=function(e,t,n,u,c,l,f,d){for(var h,g,p=c,m=0,E=!!f&&o(f,d);m<u;)m in n&&(h=E?E(n[m],m,t):n[m],l>0&&r(h)?(g=i(h),p=s(e,t,h,g,p,l-1)-1):(a(p+1),e[p]=h),p++),m++;return p};e.exports=s},92744:function(e,t,n){"use strict";var r=n(79039);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},18745:function(e,t,n){"use strict";var r=n(40616),i=Function.prototype,a=i.apply,o=i.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?o.bind(a):function(){return o.apply(a,arguments)})},76080:function(e,t,n){"use strict";var r=n(27476),i=n(79306),a=n(40616),o=r(r.bind);e.exports=function(e,t){return i(e),void 0===t?e:a?o(e,t):function(){return e.apply(t,arguments)}}},40616:function(e,t,n){"use strict";var r=n(79039);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},30566:function(e,t,n){"use strict";var r=n(79504),i=n(79306),a=n(20034),o=n(39297),s=n(67680),u=n(40616),c=Function,l=r([].concat),f=r([].join),d={};e.exports=u?c.bind:function(e){var t=i(this),n=t.prototype,r=s(arguments,1),u=function(){var n=l(r,s(arguments));return this instanceof u?function(e,t,n){if(!o(d,t)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";d[t]=c("C,a","return new C("+f(r,",")+")")}return d[t](e,n)}(t,n.length,n):t.apply(e,n)};return a(n)&&(u.prototype=n),u}},69565:function(e,t,n){"use strict";var r=n(40616),i=Function.prototype.call;e.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},10350:function(e,t,n){"use strict";var r=n(43724),i=n(39297),a=Function.prototype,o=r&&Object.getOwnPropertyDescriptor,s=i(a,"name"),u=s&&"something"===function(){}.name,c=s&&(!r||r&&o(a,"name").configurable);e.exports={EXISTS:s,PROPER:u,CONFIGURABLE:c}},46706:function(e,t,n){"use strict";var r=n(79504),i=n(79306);e.exports=function(e,t,n){try{return r(i(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}},27476:function(e,t,n){"use strict";var r=n(22195),i=n(79504);e.exports=function(e){if("Function"===r(e))return i(e)}},79504:function(e,t,n){"use strict";var r=n(40616),i=Function.prototype,a=i.call,o=r&&i.bind.bind(a,a);e.exports=r?o:function(e){return function(){return a.apply(e,arguments)}}},944:function(e){"use strict";var t=TypeError;e.exports=function(e){var n=e&&e.alphabet;if(void 0===n||"base64"===n||"base64url"===n)return n||"base64";throw new t("Incorrect `alphabet` option")}},89429:function(e,t,n){"use strict";var r=n(44576),i=n(38574);e.exports=function(e){if(i){try{return r.process.getBuiltinModule(e)}catch(e){}try{return Function('return require("'+e+'")')()}catch(e){}}}},97751:function(e,t,n){"use strict";var r=n(44576),i=n(94901);e.exports=function(e,t){return arguments.length<2?(n=r[e],i(n)?n:void 0):r[e]&&r[e][t];var n}},1767:function(e){"use strict";e.exports=function(e){return{iterator:e,next:e.next,done:!1}}},48646:function(e,t,n){"use strict";var r=n(69565),i=n(28551),a=n(1767),o=n(50851);e.exports=function(e,t){t&&"string"==typeof e||i(e);var n=o(e);return a(i(void 0!==n?r(n,e):e))}},50851:function(e,t,n){"use strict";var r=n(36955),i=n(55966),a=n(64117),o=n(26269),s=n(78227)("iterator");e.exports=function(e){if(!a(e))return i(e,s)||i(e,"@@iterator")||o[r(e)]}},70081:function(e,t,n){"use strict";var r=n(69565),i=n(79306),a=n(28551),o=n(16823),s=n(50851),u=TypeError;e.exports=function(e,t){var n=arguments.length<2?s(e):t;if(i(n))return a(r(n,e));throw new u(o(e)+" is not iterable")}},55966:function(e,t,n){"use strict";var r=n(79306),i=n(64117);e.exports=function(e,t){var n=e[t];return i(n)?void 0:r(n)}},83789:function(e,t,n){"use strict";var r=n(79306),i=n(28551),a=n(69565),o=n(91291),s=n(1767),u="Invalid size",c=RangeError,l=TypeError,f=Math.max,d=function(e,t){this.set=e,this.size=f(t,0),this.has=r(e.has),this.keys=r(e.keys)};d.prototype={getIterator:function(){return s(i(a(this.keys,this.set)))},includes:function(e){return a(this.has,this.set,e)}},e.exports=function(e){i(e);var t=+e.size;if(t!=t)throw new l(u);var n=o(t);if(n<0)throw new c(u);return new d(e,n)}},2478:function(e,t,n){"use strict";var r=n(79504),i=n(48981),a=Math.floor,o=r("".charAt),s=r("".replace),u=r("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,r,f,d){var h=n+e.length,g=r.length,p=l;return void 0!==f&&(f=i(f),p=c),s(d,p,(function(i,s){var c;switch(o(s,0)){case"$":return"$";case"&":return e;case"`":return u(t,0,n);case"'":return u(t,h);case"<":c=f[u(s,1,-1)];break;default:var l=+s;if(0===l)return i;if(l>g){var d=a(l/10);return 0===d?i:d<=g?void 0===r[d-1]?o(s,1):r[d-1]+o(s,1):i}c=r[l-1]}return void 0===c?"":c}))}},44576:function(e,t,n){"use strict";var r=function(e){return e&&e.Math===Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},39297:function(e,t,n){"use strict";var r=n(79504),i=n(48981),a=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return a(i(e),t)}},30421:function(e){"use strict";e.exports={}},90757:function(e){"use strict";e.exports=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}},20397:function(e,t,n){"use strict";var r=n(97751);e.exports=r("document","documentElement")},35917:function(e,t,n){"use strict";var r=n(43724),i=n(79039),a=n(4055);e.exports=!r&&!i((function(){return 7!==Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},88490:function(e){"use strict";var t=Array,n=Math.abs,r=Math.pow,i=Math.floor,a=Math.log,o=Math.LN2;e.exports={pack:function(e,s,u){var c,l,f,d=t(u),h=8*u-s-1,g=(1<<h)-1,p=g>>1,m=23===s?r(2,-24)-r(2,-77):0,E=e<0||0===e&&1/e<0?1:0,v=0;for((e=n(e))!=e||e===1/0?(l=e!=e?1:0,c=g):(c=i(a(e)/o),e*(f=r(2,-c))<1&&(c--,f*=2),(e+=c+p>=1?m/f:m*r(2,1-p))*f>=2&&(c++,f/=2),c+p>=g?(l=0,c=g):c+p>=1?(l=(e*f-1)*r(2,s),c+=p):(l=e*r(2,p-1)*r(2,s),c=0));s>=8;)d[v++]=255&l,l/=256,s-=8;for(c=c<<s|l,h+=s;h>0;)d[v++]=255&c,c/=256,h-=8;return d[v-1]|=128*E,d},unpack:function(e,t){var n,i=e.length,a=8*i-t-1,o=(1<<a)-1,s=o>>1,u=a-7,c=i-1,l=e[c--],f=127&l;for(l>>=7;u>0;)f=256*f+e[c--],u-=8;for(n=f&(1<<-u)-1,f>>=-u,u+=t;u>0;)n=256*n+e[c--],u-=8;if(0===f)f=1-s;else{if(f===o)return n?NaN:l?-1/0:1/0;n+=r(2,t),f-=s}return(l?-1:1)*n*r(2,f-t)}}},47055:function(e,t,n){"use strict";var r=n(79504),i=n(79039),a=n(22195),o=Object,s=r("".split);e.exports=i((function(){return!o("z").propertyIsEnumerable(0)}))?function(e){return"String"===a(e)?s(e,""):o(e)}:o},23167:function(e,t,n){"use strict";var r=n(94901),i=n(20034),a=n(52967);e.exports=function(e,t,n){var o,s;return a&&r(o=t.constructor)&&o!==n&&i(s=o.prototype)&&s!==n.prototype&&a(e,s),e}},33706:function(e,t,n){"use strict";var r=n(79504),i=n(94901),a=n(77629),o=r(Function.toString);i(a.inspectSource)||(a.inspectSource=function(e){return o(e)}),e.exports=a.inspectSource},77584:function(e,t,n){"use strict";var r=n(20034),i=n(66699);e.exports=function(e,t){r(t)&&"cause"in t&&i(e,"cause",t.cause)}},3451:function(e,t,n){"use strict";var r=n(46518),i=n(79504),a=n(30421),o=n(20034),s=n(39297),u=n(24913).f,c=n(38480),l=n(10298),f=n(34124),d=n(33392),h=n(92744),g=!1,p=d("meta"),m=0,E=function(e){u(e,p,{value:{objectID:"O"+m++,weakData:{}}})},v=e.exports={enable:function(){v.enable=function(){},g=!0;var e=c.f,t=i([].splice),n={};n[p]=1,e(n).length&&(c.f=function(n){for(var r=e(n),i=0,a=r.length;i<a;i++)if(r[i]===p){t(r,i,1);break}return r},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,p)){if(!f(e))return"F";if(!t)return"E";E(e)}return e[p].objectID},getWeakData:function(e,t){if(!s(e,p)){if(!f(e))return!0;if(!t)return!1;E(e)}return e[p].weakData},onFreeze:function(e){return h&&g&&f(e)&&!s(e,p)&&E(e),e}};a[p]=!0},91181:function(e,t,n){"use strict";var r,i,a,o=n(58622),s=n(44576),u=n(20034),c=n(66699),l=n(39297),f=n(77629),d=n(66119),h=n(30421),g="Object already initialized",p=s.TypeError,m=s.WeakMap;if(o||f.state){var E=f.state||(f.state=new m);E.get=E.get,E.has=E.has,E.set=E.set,r=function(e,t){if(E.has(e))throw new p(g);return t.facade=e,E.set(e,t),t},i=function(e){return E.get(e)||{}},a=function(e){return E.has(e)}}else{var v=d("state");h[v]=!0,r=function(e,t){if(l(e,v))throw new p(g);return t.facade=e,c(e,v,t),t},i=function(e){return l(e,v)?e[v]:{}},a=function(e){return l(e,v)}}e.exports={set:r,get:i,has:a,enforce:function(e){return a(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=i(t)).type!==e)throw new p("Incompatible receiver, "+e+" required");return n}}}},44209:function(e,t,n){"use strict";var r=n(78227),i=n(26269),a=r("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||o[a]===e)}},34376:function(e,t,n){"use strict";var r=n(22195);e.exports=Array.isArray||function(e){return"Array"===r(e)}},18727:function(e,t,n){"use strict";var r=n(36955);e.exports=function(e){var t=r(e);return"BigInt64Array"===t||"BigUint64Array"===t}},94901:function(e){"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},33517:function(e,t,n){"use strict";var r=n(79504),i=n(79039),a=n(94901),o=n(36955),s=n(97751),u=n(33706),c=function(){},l=s("Reflect","construct"),f=/^\s*(?:class|function)\b/,d=r(f.exec),h=!f.test(c),g=function(e){if(!a(e))return!1;try{return l(c,[],e),!0}catch(e){return!1}},p=function(e){if(!a(e))return!1;switch(o(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!d(f,u(e))}catch(e){return!0}};p.sham=!0,e.exports=!l||i((function(){var e;return g(g.call)||!g(Object)||!g((function(){e=!0}))||e}))?p:g},16575:function(e,t,n){"use strict";var r=n(39297);e.exports=function(e){return void 0!==e&&(r(e,"value")||r(e,"writable"))}},92796:function(e,t,n){"use strict";var r=n(79039),i=n(94901),a=/#|\.prototype\./,o=function(e,t){var n=u[s(e)];return n===l||n!==c&&(i(t)?r(t):!!t)},s=o.normalize=function(e){return String(e).replace(a,".").toLowerCase()},u=o.data={},c=o.NATIVE="N",l=o.POLYFILL="P";e.exports=o},2087:function(e,t,n){"use strict";var r=n(20034),i=Math.floor;e.exports=Number.isInteger||function(e){return!r(e)&&isFinite(e)&&i(e)===e}},64117:function(e){"use strict";e.exports=function(e){return null==e}},20034:function(e,t,n){"use strict";var r=n(94901);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},13925:function(e,t,n){"use strict";var r=n(20034);e.exports=function(e){return r(e)||null===e}},96395:function(e){"use strict";e.exports=!1},65810:function(e,t,n){"use strict";var r=n(20034),i=n(91181).get;e.exports=function(e){if(!r(e))return!1;var t=i(e);return!!t&&"RawJSON"===t.type}},60788:function(e,t,n){"use strict";var r=n(20034),i=n(22195),a=n(78227)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[a])?!!t:"RegExp"===i(e))}},10757:function(e,t,n){"use strict";var r=n(97751),i=n(94901),a=n(1625),o=n(7040),s=Object;e.exports=o?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return i(t)&&a(t.prototype,s(e))}},40507:function(e,t,n){"use strict";var r=n(69565);e.exports=function(e,t,n){for(var i,a,o=n?e:e.iterator,s=e.next;!(i=r(s,o)).done;)if(void 0!==(a=t(i.value)))return a}},72652:function(e,t,n){"use strict";var r=n(76080),i=n(69565),a=n(28551),o=n(16823),s=n(44209),u=n(26198),c=n(1625),l=n(70081),f=n(50851),d=n(9539),h=TypeError,g=function(e,t){this.stopped=e,this.result=t},p=g.prototype;e.exports=function(e,t,n){var m,E,v,A,y,T,_,S=n&&n.that,I=!(!n||!n.AS_ENTRIES),b=!(!n||!n.IS_RECORD),R=!(!n||!n.IS_ITERATOR),N=!(!n||!n.INTERRUPTED),C=r(t,S),w=function(e){return m&&d(m,"normal"),new g(!0,e)},D=function(e){return I?(a(e),N?C(e[0],e[1],w):C(e[0],e[1])):N?C(e,w):C(e)};if(b)m=e.iterator;else if(R)m=e;else{if(!(E=f(e)))throw new h(o(e)+" is not iterable");if(s(E)){for(v=0,A=u(e);A>v;v++)if((y=D(e[v]))&&c(p,y))return y;return new g(!1)}m=l(e,E)}for(T=b?e.next:m.next;!(_=i(T,m)).done;){try{y=D(_.value)}catch(e){d(m,"throw",e)}if("object"==typeof y&&y&&c(p,y))return y}return new g(!1)}},91385:function(e,t,n){"use strict";var r=n(9539);e.exports=function(e,t,n){for(var i=e.length-1;i>=0;i--)if(void 0!==e[i])try{n=r(e[i].iterator,t,n)}catch(e){t="throw",n=e}if("throw"===t)throw n;return n}},9539:function(e,t,n){"use strict";var r=n(69565),i=n(28551),a=n(55966);e.exports=function(e,t,n){var o,s;i(e);try{if(!(o=a(e,"return"))){if("throw"===t)throw n;return n}o=r(o,e)}catch(e){s=!0,o=e}if("throw"===t)throw n;if(s)throw o;return i(o),n}},33994:function(e,t,n){"use strict";var r=n(57657).IteratorPrototype,i=n(2360),a=n(6980),o=n(10687),s=n(26269),u=function(){return this};e.exports=function(e,t,n,c){var l=t+" Iterator";return e.prototype=i(r,{next:a(+!c,n)}),o(e,l,!1,!0),s[l]=u,e}},19462:function(e,t,n){"use strict";var r=n(69565),i=n(2360),a=n(66699),o=n(56279),s=n(78227),u=n(91181),c=n(55966),l=n(57657).IteratorPrototype,f=n(62529),d=n(9539),h=n(91385),g=s("toStringTag"),p="IteratorHelper",m="WrapForValidIterator",E="normal",v="throw",A=u.set,y=function(e){var t=u.getterFor(e?m:p);return o(i(l),{next:function(){var n=t(this);if(e)return n.nextHandler();if(n.done)return f(void 0,!0);try{var r=n.nextHandler();return n.returnHandlerResult?r:f(r,n.done)}catch(e){throw n.done=!0,e}},return:function(){var n=t(this),i=n.iterator;if(n.done=!0,e){var a=c(i,"return");return a?r(a,i):f(void 0,!0)}if(n.inner)try{d(n.inner.iterator,E)}catch(e){return d(i,v,e)}if(n.openIters)try{h(n.openIters,E)}catch(e){return d(i,v,e)}return i&&d(i,E),f(void 0,!0)}})},T=y(!0),_=y(!1);a(_,g,"Iterator Helper"),e.exports=function(e,t,n){var r=function(r,i){i?(i.iterator=r.iterator,i.next=r.next):i=r,i.type=t?m:p,i.returnHandlerResult=!!n,i.nextHandler=e,i.counter=0,i.done=!1,A(this,i)};return r.prototype=t?T:_,r}},51088:function(e,t,n){"use strict";var r=n(46518),i=n(69565),a=n(96395),o=n(10350),s=n(94901),u=n(33994),c=n(42787),l=n(52967),f=n(10687),d=n(66699),h=n(36840),g=n(78227),p=n(26269),m=n(57657),E=o.PROPER,v=o.CONFIGURABLE,A=m.IteratorPrototype,y=m.BUGGY_SAFARI_ITERATORS,T=g("iterator"),_="keys",S="values",I="entries",b=function(){return this};e.exports=function(e,t,n,o,g,m,R){u(n,t,o);var N,C,w,D=function(e){if(e===g&&x)return x;if(!y&&e&&e in P)return P[e];switch(e){case _:case S:case I:return function(){return new n(this,e)}}return function(){return new n(this)}},O=t+" Iterator",M=!1,P=e.prototype,L=P[T]||P["@@iterator"]||g&&P[g],x=!y&&L||D(g),F="Array"===t&&P.entries||L;if(F&&(N=c(F.call(new e)))!==Object.prototype&&N.next&&(a||c(N)===A||(l?l(N,A):s(N[T])||h(N,T,b)),f(N,O,!0,!0),a&&(p[O]=b)),E&&g===S&&L&&L.name!==S&&(!a&&v?d(P,"name",S):(M=!0,x=function(){return i(L,this)})),g)if(C={values:D(S),keys:m?x:D(_),entries:D(I)},R)for(w in C)(y||M||!(w in P))&&h(P,w,C[w]);else r({target:t,proto:!0,forced:y||M},C);return a&&!R||P[T]===x||h(P,T,x,{name:g}),p[t]=x,C}},30684:function(e){"use strict";e.exports=function(e,t){var n="function"==typeof Iterator&&Iterator.prototype[e];if(n)try{n.call({next:null},t).next()}catch(e){return!0}}},84549:function(e,t,n){"use strict";var r=n(44576);e.exports=function(e,t){var n=r.Iterator,i=n&&n.prototype,a=i&&i[e],o=!1;if(a)try{a.call({next:function(){return{done:!0}},return:function(){o=!0}},-1)}catch(e){e instanceof t||(o=!1)}if(!o)return a}},57657:function(e,t,n){"use strict";var r,i,a,o=n(79039),s=n(94901),u=n(20034),c=n(2360),l=n(42787),f=n(36840),d=n(78227),h=n(96395),g=d("iterator"),p=!1;[].keys&&("next"in(a=[].keys())?(i=l(l(a)))!==Object.prototype&&(r=i):p=!0),!u(r)||o((function(){var e={};return r[g].call(e)!==e}))?r={}:h&&(r=c(r)),s(r[g])||f(r,g,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:p}},26269:function(e){"use strict";e.exports={}},26198:function(e,t,n){"use strict";var r=n(18014);e.exports=function(e){return r(e.length)}},50283:function(e,t,n){"use strict";var r=n(79504),i=n(79039),a=n(94901),o=n(39297),s=n(43724),u=n(10350).CONFIGURABLE,c=n(33706),l=n(91181),f=l.enforce,d=l.get,h=String,g=Object.defineProperty,p=r("".slice),m=r("".replace),E=r([].join),v=s&&!i((function(){return 8!==g((function(){}),"length",{value:8}).length})),A=String(String).split("String"),y=e.exports=function(e,t,n){"Symbol("===p(h(t),0,7)&&(t="["+m(h(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!o(e,"name")||u&&e.name!==t)&&(s?g(e,"name",{value:t,configurable:!0}):e.name=t),v&&n&&o(n,"arity")&&e.length!==n.arity&&g(e,"length",{value:n.arity});try{n&&o(n,"constructor")&&n.constructor?s&&g(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=f(e);return o(r,"source")||(r.source=E(A,"string"==typeof t?t:"")),e};Function.prototype.toString=y((function(){return a(this)&&d(this).source||c(this)}),"toString")},33164:function(e,t,n){"use strict";var r=n(77782),i=n(53602),a=Math.abs;e.exports=function(e,t,n,o){var s=+e,u=a(s),c=r(s);if(u<o)return c*i(u/o/t)*o*t;var l=(1+t/2220446049250313e-31)*u,f=l-(l-u);return f>n||f!=f?c*(1/0):c*f}},15617:function(e,t,n){"use strict";var r=n(33164);e.exports=Math.fround||function(e){return r(e,1.1920928955078125e-7,34028234663852886e22,11754943508222875e-54)}},53602:function(e){"use strict";var t=4503599627370496;e.exports=function(e){return e+t-t}},77782:function(e){"use strict";e.exports=Math.sign||function(e){var t=+e;return 0===t||t!=t?t:t<0?-1:1}},80741:function(e){"use strict";var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},91955:function(e,t,n){"use strict";var r,i,a,o,s,u=n(44576),c=n(93389),l=n(76080),f=n(59225).set,d=n(18265),h=n(89544),g=n(44265),p=n(7860),m=n(38574),E=u.MutationObserver||u.WebKitMutationObserver,v=u.document,A=u.process,y=u.Promise,T=c("queueMicrotask");if(!T){var _=new d,S=function(){var e,t;for(m&&(e=A.domain)&&e.exit();t=_.get();)try{t()}catch(e){throw _.head&&r(),e}e&&e.enter()};h||m||p||!E||!v?!g&&y&&y.resolve?((o=y.resolve(void 0)).constructor=y,s=l(o.then,o),r=function(){s(S)}):m?r=function(){A.nextTick(S)}:(f=l(f,u),r=function(){f(S)}):(i=!0,a=v.createTextNode(""),new E(S).observe(a,{characterData:!0}),r=function(){a.data=i=!i}),T=function(e){_.head||r(),_.add(e)}}e.exports=T},27819:function(e,t,n){"use strict";var r=n(79039);e.exports=!r((function(){var e="9007199254740993",t=JSON.rawJSON(e);return!JSON.isRawJSON(t)||JSON.stringify(t)!==e}))},36043:function(e,t,n){"use strict";var r=n(79306),i=TypeError,a=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw new i("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)};e.exports.f=function(e){return new a(e)}},32603:function(e,t,n){"use strict";var r=n(655);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:r(e)}},24149:function(e){"use strict";var t=RangeError;e.exports=function(e){if(e==e)return e;throw new t("NaN is not allowed")}},60511:function(e,t,n){"use strict";var r=n(60788),i=TypeError;e.exports=function(e){if(r(e))throw new i("The method doesn't accept regular expressions");return e}},50360:function(e,t,n){"use strict";var r=n(44576).isFinite;e.exports=Number.isFinite||function(e){return"number"==typeof e&&r(e)}},44213:function(e,t,n){"use strict";var r=n(43724),i=n(79504),a=n(69565),o=n(79039),s=n(71072),u=n(33717),c=n(48773),l=n(48981),f=n(47055),d=Object.assign,h=Object.defineProperty,g=i([].concat);e.exports=!d||o((function(){if(r&&1!==d({b:1},d(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol("assign detection"),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach((function(e){t[e]=e})),7!==d({},e)[n]||s(d({},t)).join("")!==i}))?function(e,t){for(var n=l(e),i=arguments.length,o=1,d=u.f,h=c.f;i>o;)for(var p,m=f(arguments[o++]),E=d?g(s(m),d(m)):s(m),v=E.length,A=0;v>A;)p=E[A++],r&&!a(h,m,p)||(n[p]=m[p]);return n}:d},2360:function(e,t,n){"use strict";var r,i=n(28551),a=n(96801),o=n(88727),s=n(30421),u=n(20397),c=n(4055),l=n(66119),f="prototype",d="script",h=l("IE_PROTO"),g=function(){},p=function(e){return"<"+d+">"+e+"</"+d+">"},m=function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t},E=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;E="undefined"!=typeof document?document.domain&&r?m(r):(t=c("iframe"),n="java"+d+":",t.style.display="none",u.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F):m(r);for(var i=o.length;i--;)delete E[f][o[i]];return E()};s[h]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(g[f]=i(e),n=new g,g[f]=null,n[h]=e):n=E(),void 0===t?n:a.f(n,t)}},96801:function(e,t,n){"use strict";var r=n(43724),i=n(48686),a=n(24913),o=n(28551),s=n(25397),u=n(71072);t.f=r&&!i?Object.defineProperties:function(e,t){o(e);for(var n,r=s(t),i=u(t),c=i.length,l=0;c>l;)a.f(e,n=i[l++],r[n]);return e}},24913:function(e,t,n){"use strict";var r=n(43724),i=n(35917),a=n(48686),o=n(28551),s=n(56969),u=TypeError,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,f="enumerable",d="configurable",h="writable";t.f=r?a?function(e,t,n){if(o(e),t=s(t),o(n),"function"==typeof e&&"prototype"===t&&"value"in n&&h in n&&!n[h]){var r=l(e,t);r&&r[h]&&(e[t]=n.value,n={configurable:d in n?n[d]:r[d],enumerable:f in n?n[f]:r[f],writable:!1})}return c(e,t,n)}:c:function(e,t,n){if(o(e),t=s(t),o(n),i)try{return c(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new u("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},77347:function(e,t,n){"use strict";var r=n(43724),i=n(69565),a=n(48773),o=n(6980),s=n(25397),u=n(56969),c=n(39297),l=n(35917),f=Object.getOwnPropertyDescriptor;t.f=r?f:function(e,t){if(e=s(e),t=u(t),l)try{return f(e,t)}catch(e){}if(c(e,t))return o(!i(a.f,e,t),e[t])}},10298:function(e,t,n){"use strict";var r=n(22195),i=n(25397),a=n(38480).f,o=n(67680),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&"Window"===r(e)?function(e){try{return a(e)}catch(e){return o(s)}}(e):a(i(e))}},38480:function(e,t,n){"use strict";var r=n(61828),i=n(88727).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},33717:function(e,t){"use strict";t.f=Object.getOwnPropertySymbols},42787:function(e,t,n){"use strict";var r=n(39297),i=n(94901),a=n(48981),o=n(66119),s=n(12211),u=o("IE_PROTO"),c=Object,l=c.prototype;e.exports=s?c.getPrototypeOf:function(e){var t=a(e);if(r(t,u))return t[u];var n=t.constructor;return i(n)&&t instanceof n?n.prototype:t instanceof c?l:null}},34124:function(e,t,n){"use strict";var r=n(79039),i=n(20034),a=n(22195),o=n(15652),s=Object.isExtensible,u=r((function(){s(1)}));e.exports=u||o?function(e){return!!i(e)&&(!o||"ArrayBuffer"!==a(e))&&(!s||s(e))}:s},1625:function(e,t,n){"use strict";var r=n(79504);e.exports=r({}.isPrototypeOf)},61828:function(e,t,n){"use strict";var r=n(79504),i=n(39297),a=n(25397),o=n(19617).indexOf,s=n(30421),u=r([].push);e.exports=function(e,t){var n,r=a(e),c=0,l=[];for(n in r)!i(s,n)&&i(r,n)&&u(l,n);for(;t.length>c;)i(r,n=t[c++])&&(~o(l,n)||u(l,n));return l}},71072:function(e,t,n){"use strict";var r=n(61828),i=n(88727);e.exports=Object.keys||function(e){return r(e,i)}},48773:function(e,t){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);t.f=i?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},52967:function(e,t,n){"use strict";var r=n(46706),i=n(20034),a=n(67750),o=n(73506);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return a(n),o(r),i(n)?(t?e(n,r):n.__proto__=r,n):n}}():void 0)},32357:function(e,t,n){"use strict";var r=n(43724),i=n(79039),a=n(79504),o=n(42787),s=n(71072),u=n(25397),c=a(n(48773).f),l=a([].push),f=r&&i((function(){var e=Object.create(null);return e[2]=2,!c(e,2)})),d=function(e){return function(t){for(var n,i=u(t),a=s(i),d=f&&null===o(i),h=a.length,g=0,p=[];h>g;)n=a[g++],r&&!(d?n in i:c(i,n))||l(p,e?[n,i[n]]:i[n]);return p}};e.exports={entries:d(!0),values:d(!1)}},53179:function(e,t,n){"use strict";var r=n(92140),i=n(36955);e.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},84270:function(e,t,n){"use strict";var r=n(69565),i=n(94901),a=n(20034),o=TypeError;e.exports=function(e,t){var n,s;if("string"===t&&i(n=e.toString)&&!a(s=r(n,e)))return s;if(i(n=e.valueOf)&&!a(s=r(n,e)))return s;if("string"!==t&&i(n=e.toString)&&!a(s=r(n,e)))return s;throw new o("Can't convert object to primitive value")}},35031:function(e,t,n){"use strict";var r=n(97751),i=n(79504),a=n(38480),o=n(33717),s=n(28551),u=i([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=a.f(s(e)),n=o.f;return n?u(t,n(e)):t}},616:function(e,t,n){"use strict";var r=n(79504),i=n(39297),a=SyntaxError,o=parseInt,s=String.fromCharCode,u=r("".charAt),c=r("".slice),l=r(/./.exec),f={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},d=/^[\da-f]{4}$/i,h=/^[\u0000-\u001F]$/;e.exports=function(e,t){for(var n=!0,r="";t<e.length;){var g=u(e,t);if("\\"===g){var p=c(e,t,t+2);if(i(f,p))r+=f[p],t+=2;else{if("\\u"!==p)throw new a('Unknown escape sequence: "'+p+'"');var m=c(e,t+=2,t+4);if(!l(d,m))throw new a("Bad Unicode escape at: "+t);r+=s(o(m,16)),t+=4}}else{if('"'===g){n=!1,t++;break}if(l(h,g))throw new a("Bad control character in string literal at: "+t);r+=g,t++}}if(n)throw new a("Unterminated string at: "+t);return{value:r,end:t}}},19167:function(e,t,n){"use strict";var r=n(44576);e.exports=r},1103:function(e){"use strict";e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},10916:function(e,t,n){"use strict";var r=n(44576),i=n(80550),a=n(94901),o=n(92796),s=n(33706),u=n(78227),c=n(84215),l=n(96395),f=n(39519),d=i&&i.prototype,h=u("species"),g=!1,p=a(r.PromiseRejectionEvent),m=o("Promise",(function(){var e=s(i),t=e!==String(i);if(!t&&66===f)return!0;if(l&&(!d.catch||!d.finally))return!0;if(!f||f<51||!/native code/.test(e)){var n=new i((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[h]=r,!(g=n.then((function(){}))instanceof r))return!0}return!(t||"BROWSER"!==c&&"DENO"!==c||p)}));e.exports={CONSTRUCTOR:m,REJECTION_EVENT:p,SUBCLASSING:g}},80550:function(e,t,n){"use strict";var r=n(44576);e.exports=r.Promise},93438:function(e,t,n){"use strict";var r=n(28551),i=n(20034),a=n(36043);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=a.f(e);return(0,n.resolve)(t),n.promise}},90537:function(e,t,n){"use strict";var r=n(80550),i=n(84428),a=n(10916).CONSTRUCTOR;e.exports=a||!i((function(e){r.all(e).then(void 0,(function(){}))}))},11056:function(e,t,n){"use strict";var r=n(24913).f;e.exports=function(e,t,n){n in e||r(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})}},18265:function(e){"use strict";var t=function(){this.head=null,this.tail=null};t.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}},e.exports=t},56682:function(e,t,n){"use strict";var r=n(69565),i=n(28551),a=n(94901),o=n(22195),s=n(57323),u=TypeError;e.exports=function(e,t){var n=e.exec;if(a(n)){var c=r(n,e,t);return null!==c&&i(c),c}if("RegExp"===o(e))return r(s,e,t);throw new u("RegExp#exec called on incompatible receiver")}},57323:function(e,t,n){"use strict";var r,i,a=n(69565),o=n(79504),s=n(655),u=n(67979),c=n(58429),l=n(25745),f=n(2360),d=n(91181).get,h=n(83635),g=n(18814),p=l("native-string-replace",String.prototype.replace),m=RegExp.prototype.exec,E=m,v=o("".charAt),A=o("".indexOf),y=o("".replace),T=o("".slice),_=(i=/b*/g,a(m,r=/a/,"a"),a(m,i,"a"),0!==r.lastIndex||0!==i.lastIndex),S=c.BROKEN_CARET,I=void 0!==/()??/.exec("")[1];(_||I||S||h||g)&&(E=function(e){var t,n,r,i,o,c,l,h=this,g=d(h),b=s(e),R=g.raw;if(R)return R.lastIndex=h.lastIndex,t=a(E,R,b),h.lastIndex=R.lastIndex,t;var N=g.groups,C=S&&h.sticky,w=a(u,h),D=h.source,O=0,M=b;if(C&&(w=y(w,"y",""),-1===A(w,"g")&&(w+="g"),M=T(b,h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==v(b,h.lastIndex-1))&&(D="(?: "+D+")",M=" "+M,O++),n=new RegExp("^(?:"+D+")",w)),I&&(n=new RegExp("^"+D+"$(?!\\s)",w)),_&&(r=h.lastIndex),i=a(m,C?n:h,M),C?i?(i.input=T(i.input,O),i[0]=T(i[0],O),i.index=h.lastIndex,h.lastIndex+=i[0].length):h.lastIndex=0:_&&i&&(h.lastIndex=h.global?i.index+i[0].length:r),I&&i&&i.length>1&&a(p,i[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(i[o]=void 0)})),i&&N)for(i.groups=c=f(null),o=0;o<N.length;o++)c[(l=N[o])[0]]=i[l[1]];return i}),e.exports=E},65213:function(e,t,n){"use strict";var r=n(44576),i=n(79039),a=r.RegExp,o=!i((function(){var e=!0;try{a(".","d")}catch(t){e=!1}var t={},n="",r=e?"dgimsy":"gimsy",i=function(e,r){Object.defineProperty(t,e,{get:function(){return n+=r,!0}})},o={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var s in e&&(o.hasIndices="d"),o)i(s,o[s]);return Object.getOwnPropertyDescriptor(a.prototype,"flags").get.call(t)!==r||n!==r}));e.exports={correct:o}},67979:function(e,t,n){"use strict";var r=n(28551);e.exports=function(){var e=r(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},61034:function(e,t,n){"use strict";var r=n(69565),i=n(39297),a=n(1625),o=n(65213),s=n(67979),u=RegExp.prototype;e.exports=o.correct?function(e){return e.flags}:function(e){return o.correct||!a(u,e)||i(e,"flags")?e.flags:r(s,e)}},58429:function(e,t,n){"use strict";var r=n(79039),i=n(44576).RegExp,a=r((function(){var e=i("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),o=a||r((function(){return!i("a","y").sticky})),s=a||r((function(){var e=i("^r","gy");return e.lastIndex=2,null!==e.exec("str")}));e.exports={BROKEN_CARET:s,MISSED_STICKY:o,UNSUPPORTED_Y:a}},83635:function(e,t,n){"use strict";var r=n(79039),i=n(44576).RegExp;e.exports=r((function(){var e=i(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)}))},18814:function(e,t,n){"use strict";var r=n(79039),i=n(44576).RegExp;e.exports=r((function(){var e=i("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))},67750:function(e,t,n){"use strict";var r=n(64117),i=TypeError;e.exports=function(e){if(r(e))throw new i("Can't call method on "+e);return e}},93389:function(e,t,n){"use strict";var r=n(44576),i=n(43724),a=Object.getOwnPropertyDescriptor;e.exports=function(e){if(!i)return r[e];var t=a(r,e);return t&&t.value}},3470:function(e){"use strict";e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},89286:function(e,t,n){"use strict";var r=n(94402),i=n(38469),a=r.Set,o=r.add;e.exports=function(e){var t=new a;return i(e,(function(e){o(t,e)})),t}},83440:function(e,t,n){"use strict";var r=n(97080),i=n(94402),a=n(89286),o=n(25170),s=n(83789),u=n(38469),c=n(40507),l=i.has,f=i.remove;e.exports=function(e){var t=r(this),n=s(e),i=a(t);return o(t)<=n.size?u(t,(function(e){n.includes(e)&&f(i,e)})):c(n.getIterator(),(function(e){l(i,e)&&f(i,e)})),i}},94402:function(e,t,n){"use strict";var r=n(79504),i=Set.prototype;e.exports={Set:Set,add:r(i.add),has:r(i.has),remove:r(i.delete),proto:i}},68750:function(e,t,n){"use strict";var r=n(97080),i=n(94402),a=n(25170),o=n(83789),s=n(38469),u=n(40507),c=i.Set,l=i.add,f=i.has;e.exports=function(e){var t=r(this),n=o(e),i=new c;return a(t)>n.size?u(n.getIterator(),(function(e){f(t,e)&&l(i,e)})):s(t,(function(e){n.includes(e)&&l(i,e)})),i}},64449:function(e,t,n){"use strict";var r=n(97080),i=n(94402).has,a=n(25170),o=n(83789),s=n(38469),u=n(40507),c=n(9539);e.exports=function(e){var t=r(this),n=o(e);if(a(t)<=n.size)return!1!==s(t,(function(e){if(n.includes(e))return!1}),!0);var l=n.getIterator();return!1!==u(l,(function(e){if(i(t,e))return c(l,"normal",!1)}))}},53838:function(e,t,n){"use strict";var r=n(97080),i=n(25170),a=n(38469),o=n(83789);e.exports=function(e){var t=r(this),n=o(e);return!(i(t)>n.size)&&!1!==a(t,(function(e){if(!n.includes(e))return!1}),!0)}},28527:function(e,t,n){"use strict";var r=n(97080),i=n(94402).has,a=n(25170),o=n(83789),s=n(40507),u=n(9539);e.exports=function(e){var t=r(this),n=o(e);if(a(t)<n.size)return!1;var c=n.getIterator();return!1!==s(c,(function(e){if(!i(t,e))return u(c,"normal",!1)}))}},38469:function(e,t,n){"use strict";var r=n(79504),i=n(40507),a=n(94402),o=a.Set,s=a.proto,u=r(s.forEach),c=r(s.keys),l=c(new o).next;e.exports=function(e,t,n){return n?i({iterator:c(e),next:l},t):u(e,t)}},84916:function(e,t,n){"use strict";var r=n(97751),i=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},a=function(e){return{size:e,has:function(){return!0},keys:function(){throw new Error("e")}}};e.exports=function(e,t){var n=r("Set");try{(new n)[e](i(0));try{return(new n)[e](i(-1)),!1}catch(r){if(!t)return!0;try{return(new n)[e](a(-1/0)),!1}catch(r){return t(new n([1,2])[e](a(1/0)))}}}catch(e){return!1}}},39835:function(e){"use strict";e.exports=function(e){try{var t=new Set,n={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return t.clear(),t.add(4),function(){return{done:!0}}}})}},r=t[e](n);return 1===r.size&&4===r.values().next().value}catch(e){return!1}}},25170:function(e,t,n){"use strict";var r=n(46706),i=n(94402);e.exports=r(i.proto,"size","get")||function(e){return e.size}},87633:function(e,t,n){"use strict";var r=n(97751),i=n(62106),a=n(78227),o=n(43724),s=a("species");e.exports=function(e){var t=r(e);o&&t&&!t[s]&&i(t,s,{configurable:!0,get:function(){return this}})}},83650:function(e,t,n){"use strict";var r=n(97080),i=n(94402),a=n(89286),o=n(83789),s=n(40507),u=i.add,c=i.has,l=i.remove;e.exports=function(e){var t=r(this),n=o(e).getIterator(),i=a(t);return s(n,(function(e){c(t,e)?l(i,e):u(i,e)})),i}},10687:function(e,t,n){"use strict";var r=n(24913).f,i=n(39297),a=n(78227)("toStringTag");e.exports=function(e,t,n){e&&!n&&(e=e.prototype),e&&!i(e,a)&&r(e,a,{configurable:!0,value:t})}},44204:function(e,t,n){"use strict";var r=n(97080),i=n(94402).add,a=n(89286),o=n(83789),s=n(40507);e.exports=function(e){var t=r(this),n=o(e).getIterator(),u=a(t);return s(n,(function(e){i(u,e)})),u}},66119:function(e,t,n){"use strict";var r=n(25745),i=n(33392),a=r("keys");e.exports=function(e){return a[e]||(a[e]=i(e))}},77629:function(e,t,n){"use strict";var r=n(96395),i=n(44576),a=n(39433),o="__core-js_shared__",s=e.exports=i[o]||a(o,{});(s.versions||(s.versions=[])).push({version:"3.47.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.47.0/LICENSE",source:"https://github.com/zloirock/core-js"})},25745:function(e,t,n){"use strict";var r=n(77629);e.exports=function(e,t){return r[e]||(r[e]=t||{})}},2293:function(e,t,n){"use strict";var r=n(28551),i=n(35548),a=n(64117),o=n(78227)("species");e.exports=function(e,t){var n,s=r(e).constructor;return void 0===s||a(n=r(s)[o])?t:i(n)}},68183:function(e,t,n){"use strict";var r=n(79504),i=n(91291),a=n(655),o=n(67750),s=r("".charAt),u=r("".charCodeAt),c=r("".slice),l=function(e){return function(t,n){var r,l,f=a(o(t)),d=i(n),h=f.length;return d<0||d>=h?e?"":void 0:(r=u(f,d))<55296||r>56319||d+1===h||(l=u(f,d+1))<56320||l>57343?e?s(f,d):r:e?c(f,d,d+2):l-56320+(r-55296<<10)+65536}};e.exports={codeAt:l(!1),charAt:l(!0)}},83063:function(e,t,n){"use strict";var r=n(82839);e.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(r)},60533:function(e,t,n){"use strict";var r=n(79504),i=n(18014),a=n(655),o=n(72333),s=n(67750),u=r(o),c=r("".slice),l=Math.ceil,f=function(e){return function(t,n,r){var o,f,d=a(s(t)),h=i(n),g=d.length,p=void 0===r?" ":a(r);return h<=g||""===p?d:((f=u(p,l((o=h-g)/p.length))).length>o&&(f=c(f,0,o)),e?d+f:f+d)}};e.exports={start:f(!1),end:f(!0)}},3717:function(e,t,n){"use strict";var r=n(79504),i=2147483647,a=/[^\0-\u007E]/,o=/[.\u3002\uFF0E\uFF61]/g,s="Overflow: input needs wider integers to process",u=RangeError,c=r(o.exec),l=Math.floor,f=String.fromCharCode,d=r("".charCodeAt),h=r([].join),g=r([].push),p=r("".replace),m=r("".split),E=r("".toLowerCase),v=function(e){return e+22+75*(e<26)},A=function(e,t,n){var r=0;for(e=n?l(e/700):e>>1,e+=l(e/t);e>455;)e=l(e/35),r+=36;return l(r+36*e/(e+38))},y=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=d(e,n++);if(i>=55296&&i<=56319&&n<r){var a=d(e,n++);56320==(64512&a)?g(t,((1023&i)<<10)+(1023&a)+65536):(g(t,i),n--)}else g(t,i)}return t}(e);var n,r,a=e.length,o=128,c=0,p=72;for(n=0;n<e.length;n++)(r=e[n])<128&&g(t,f(r));var m=t.length,E=m;for(m&&g(t,"-");E<a;){var y=i;for(n=0;n<e.length;n++)(r=e[n])>=o&&r<y&&(y=r);var T=E+1;if(y-o>l((i-c)/T))throw new u(s);for(c+=(y-o)*T,o=y,n=0;n<e.length;n++){if((r=e[n])<o&&++c>i)throw new u(s);if(r===o){for(var _=c,S=36;;){var I=S<=p?1:S>=p+26?26:S-p;if(_<I)break;var b=_-I,R=36-I;g(t,f(v(I+b%R))),_=l(b/R),S+=36}g(t,f(v(_))),p=A(c,T,E===m),c=0,E++}}c++,o++}return h(t,"")};e.exports=function(e){var t,n,r=[],i=m(p(E(e),o,"."),".");for(t=0;t<i.length;t++)n=i[t],g(r,c(a,n)?"xn--"+y(n):n);return h(r,".")}},72333:function(e,t,n){"use strict";var r=n(91291),i=n(655),a=n(67750),o=RangeError;e.exports=function(e){var t=i(a(this)),n="",s=r(e);if(s<0||s===1/0)throw new o("Wrong number of repetitions");for(;s>0;(s>>>=1)&&(t+=t))1&s&&(n+=t);return n}},60706:function(e,t,n){"use strict";var r=n(10350).PROPER,i=n(79039),a=n(47452);e.exports=function(e){return i((function(){return!!a[e]()||"
"!=="
"[e]()||r&&a[e].name!==e}))}},43802:function(e,t,n){"use strict";var r=n(79504),i=n(67750),a=n(655),o=n(47452),s=r("".replace),u=RegExp("^["+o+"]+"),c=RegExp("(^|[^"+o+"])["+o+"]+$"),l=function(e){return function(t){var n=a(i(t));return 1&e&&(n=s(n,u,"")),2&e&&(n=s(n,c,"$1")),n}};e.exports={start:l(1),end:l(2),trim:l(3)}},1548:function(e,t,n){"use strict";var r=n(44576),i=n(79039),a=n(39519),o=n(84215),s=r.structuredClone;e.exports=!!s&&!i((function(){if("DENO"===o&&a>92||"NODE"===o&&a>94||"BROWSER"===o&&a>97)return!1;var e=new ArrayBuffer(8),t=s(e,{transfer:[e]});return 0!==e.byteLength||8!==t.byteLength}))},4495:function(e,t,n){"use strict";var r=n(39519),i=n(79039),a=n(44576).String;e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol("symbol detection");return!a(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},58242:function(e,t,n){"use strict";var r=n(69565),i=n(97751),a=n(78227),o=n(36840);e.exports=function(){var e=i("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,s=a("toPrimitive");t&&!t[s]&&o(t,s,(function(e){return r(n,this)}),{arity:1})}},91296:function(e,t,n){"use strict";var r=n(4495);e.exports=r&&!!Symbol.for&&!!Symbol.keyFor},59225:function(e,t,n){"use strict";var r,i,a,o,s=n(44576),u=n(18745),c=n(76080),l=n(94901),f=n(39297),d=n(79039),h=n(20397),g=n(67680),p=n(4055),m=n(22812),E=n(89544),v=n(38574),A=s.setImmediate,y=s.clearImmediate,T=s.process,_=s.Dispatch,S=s.Function,I=s.MessageChannel,b=s.String,R=0,N={},C="onreadystatechange";d((function(){r=s.location}));var w=function(e){if(f(N,e)){var t=N[e];delete N[e],t()}},D=function(e){return function(){w(e)}},O=function(e){w(e.data)},M=function(e){s.postMessage(b(e),r.protocol+"//"+r.host)};A&&y||(A=function(e){m(arguments.length,1);var t=l(e)?e:S(e),n=g(arguments,1);return N[++R]=function(){u(t,void 0,n)},i(R),R},y=function(e){delete N[e]},v?i=function(e){T.nextTick(D(e))}:_&&_.now?i=function(e){_.now(D(e))}:I&&!E?(o=(a=new I).port2,a.port1.onmessage=O,i=c(o.postMessage,o)):s.addEventListener&&l(s.postMessage)&&!s.importScripts&&r&&"file:"!==r.protocol&&!d(M)?(i=M,s.addEventListener("message",O,!1)):i=C in p("script")?function(e){h.appendChild(p("script"))[C]=function(){h.removeChild(this),w(e)}}:function(e){setTimeout(D(e),0)}),e.exports={set:A,clear:y}},31240:function(e,t,n){"use strict";var r=n(79504);e.exports=r(1.1.valueOf)},35610:function(e,t,n){"use strict";var r=n(91291),i=Math.max,a=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):a(n,t)}},75854:function(e,t,n){"use strict";var r=n(72777),i=TypeError;e.exports=function(e){var t=r(e,"number");if("number"==typeof t)throw new i("Can't convert number to bigint");return BigInt(t)}},57696:function(e,t,n){"use strict";var r=n(91291),i=n(18014),a=RangeError;e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=i(t);if(t!==n)throw new a("Wrong length or index");return n}},25397:function(e,t,n){"use strict";var r=n(47055),i=n(67750);e.exports=function(e){return r(i(e))}},91291:function(e,t,n){"use strict";var r=n(80741);e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},18014:function(e,t,n){"use strict";var r=n(91291),i=Math.min;e.exports=function(e){var t=r(e);return t>0?i(t,9007199254740991):0}},48981:function(e,t,n){"use strict";var r=n(67750),i=Object;e.exports=function(e){return i(r(e))}},58229:function(e,t,n){"use strict";var r=n(99590),i=RangeError;e.exports=function(e,t){var n=r(e);if(n%t)throw new i("Wrong offset");return n}},99590:function(e,t,n){"use strict";var r=n(91291),i=RangeError;e.exports=function(e){var t=r(e);if(t<0)throw new i("The argument can't be less than 0");return t}},72777:function(e,t,n){"use strict";var r=n(69565),i=n(20034),a=n(10757),o=n(55966),s=n(84270),u=n(78227),c=TypeError,l=u("toPrimitive");e.exports=function(e,t){if(!i(e)||a(e))return e;var n,u=o(e,l);if(u){if(void 0===t&&(t="default"),n=r(u,e,t),!i(n)||a(n))return n;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},56969:function(e,t,n){"use strict";var r=n(72777),i=n(10757);e.exports=function(e){var t=r(e,"string");return i(t)?t:t+""}},92140:function(e,t,n){"use strict";var r={};r[n(78227)("toStringTag")]="z",e.exports="[object z]"===String(r)},655:function(e,t,n){"use strict";var r=n(36955),i=String;e.exports=function(e){if("Symbol"===r(e))throw new TypeError("Cannot convert a Symbol value to a string");return i(e)}},58319:function(e){"use strict";var t=Math.round;e.exports=function(e){var n=t(e);return n<0?0:n>255?255:255&n}},16823:function(e){"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},15823:function(e,t,n){"use strict";var r=n(46518),i=n(44576),a=n(69565),o=n(43724),s=n(72805),u=n(94644),c=n(66346),l=n(90679),f=n(6980),d=n(66699),h=n(2087),g=n(18014),p=n(57696),m=n(58229),E=n(58319),v=n(56969),A=n(39297),y=n(36955),T=n(20034),_=n(10757),S=n(2360),I=n(1625),b=n(52967),R=n(38480).f,N=n(43251),C=n(59213).forEach,w=n(87633),D=n(62106),O=n(24913),M=n(77347),P=n(35370),L=n(91181),x=n(23167),F=L.get,U=L.set,k=L.enforce,B=O.f,G=M.f,H=i.RangeError,Y=c.ArrayBuffer,V=Y.prototype,q=c.DataView,K=u.NATIVE_ARRAY_BUFFER_VIEWS,j=u.TYPED_ARRAY_TAG,z=u.TypedArray,W=u.TypedArrayPrototype,Q=u.isTypedArray,X="BYTES_PER_ELEMENT",$="Wrong length",Z=function(e,t){D(e,t,{configurable:!0,get:function(){return F(this)[t]}})},J=function(e){var t;return I(V,e)||"ArrayBuffer"===(t=y(e))||"SharedArrayBuffer"===t},ee=function(e,t){return Q(e)&&!_(t)&&t in e&&h(+t)&&t>=0},te=function(e,t){return t=v(t),ee(e,t)?f(2,e[t]):G(e,t)},ne=function(e,t,n){return t=v(t),!(ee(e,t)&&T(n)&&A(n,"value"))||A(n,"get")||A(n,"set")||n.configurable||A(n,"writable")&&!n.writable||A(n,"enumerable")&&!n.enumerable?B(e,t,n):(e[t]=n.value,e)};o?(K||(M.f=te,O.f=ne,Z(W,"buffer"),Z(W,"byteOffset"),Z(W,"byteLength"),Z(W,"length")),r({target:"Object",stat:!0,forced:!K},{getOwnPropertyDescriptor:te,defineProperty:ne}),e.exports=function(e,t,n){var o=e.match(/\d+/)[0]/8,u=e+(n?"Clamped":"")+"Array",c="get"+e,f="set"+e,h=i[u],v=h,A=v&&v.prototype,y={},_=function(e,t){B(e,t,{get:function(){return function(e,t){var n=F(e);return n.view[c](t*o+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var i=F(e);i.view[f](t*o+i.byteOffset,n?E(r):r,!0)}(this,t,e)},enumerable:!0})};K?s&&(v=t((function(e,t,n,r){return l(e,A),x(T(t)?J(t)?void 0!==r?new h(t,m(n,o),r):void 0!==n?new h(t,m(n,o)):new h(t):Q(t)?P(v,t):a(N,v,t):new h(p(t)),e,v)})),b&&b(v,z),C(R(h),(function(e){e in v||d(v,e,h[e])})),v.prototype=A):(v=t((function(e,t,n,r){l(e,A);var i,s,u,c=0,f=0;if(T(t)){if(!J(t))return Q(t)?P(v,t):a(N,v,t);i=t,f=m(n,o);var d=t.byteLength;if(void 0===r){if(d%o)throw new H($);if((s=d-f)<0)throw new H($)}else if((s=g(r)*o)+f>d)throw new H($);u=s/o}else u=p(t),i=new Y(s=u*o);for(U(e,{buffer:i,byteOffset:f,byteLength:s,length:u,view:new q(i)});c<u;)_(e,c++)})),b&&b(v,z),A=v.prototype=S(W)),A.constructor!==v&&d(A,"constructor",v),k(A).TypedArrayConstructor=v,j&&d(A,j,u);var I=v!==h;y[u]=v,r({global:!0,constructor:!0,forced:I,sham:!K},y),X in v||d(v,X,o),X in A||d(A,X,o),w(u)}):e.exports=function(){}},72805:function(e,t,n){"use strict";var r=n(44576),i=n(79039),a=n(84428),o=n(94644).NATIVE_ARRAY_BUFFER_VIEWS,s=r.ArrayBuffer,u=r.Int8Array;e.exports=!o||!i((function(){u(1)}))||!i((function(){new u(-1)}))||!a((function(e){new u,new u(null),new u(1.5),new u(e)}),!0)||i((function(){return 1!==new u(new s(2),1,void 0).length}))},29948:function(e,t,n){"use strict";var r=n(35370),i=n(94644).getTypedArrayConstructor;e.exports=function(e,t){return r(i(e),t)}},43251:function(e,t,n){"use strict";var r=n(76080),i=n(69565),a=n(35548),o=n(48981),s=n(26198),u=n(70081),c=n(50851),l=n(44209),f=n(18727),d=n(94644).aTypedArrayConstructor,h=n(75854);e.exports=function(e){var t,n,g,p,m,E,v,A,y=a(this),T=o(e),_=arguments.length,S=_>1?arguments[1]:void 0,I=void 0!==S,b=c(T);if(b&&!l(b))for(A=(v=u(T,b)).next,T=[];!(E=i(A,v)).done;)T.push(E.value);for(I&&_>2&&(S=r(S,arguments[2])),n=s(T),g=new(d(y))(n),p=f(g),t=0;n>t;t++)m=I?S(T[t],t):T[t],g[t]=p?h(m):+m;return g}},33392:function(e,t,n){"use strict";var r=n(79504),i=0,a=Math.random(),o=r(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+o(++i+a,36)}},59143:function(e,t,n){"use strict";var r=n(44576),i=n(79504),a=n(83972),o=n(63463),s=n(39297),u=n(92804),c=n(944),l=n(55169),f=u.c2i,d=u.c2iUrl,h=r.SyntaxError,g=r.TypeError,p=i("".charAt),m=function(e,t){for(var n=e.length;t<n;t++){var r=p(e,t);if(" "!==r&&"\t"!==r&&"\n"!==r&&"\f"!==r&&"\r"!==r)break}return t},E=function(e,t,n){var r=e.length;r<4&&(e+=2===r?"AA":"A");var i=(t[p(e,0)]<<18)+(t[p(e,1)]<<12)+(t[p(e,2)]<<6)+t[p(e,3)],a=[i>>16&255,i>>8&255,255&i];if(2===r){if(n&&0!==a[1])throw new h("Extra bits");return[a[0]]}if(3===r){if(n&&0!==a[2])throw new h("Extra bits");return[a[0],a[1]]}return a},v=function(e,t,n){for(var r=t.length,i=0;i<r;i++)e[n+i]=t[i];return n+r};e.exports=function(e,t,n,r){o(e),a(t);var i="base64"===c(t)?f:d,u=t?t.lastChunkHandling:void 0;if(void 0===u&&(u="loose"),"loose"!==u&&"strict"!==u&&"stop-before-partial"!==u)throw new g("Incorrect `lastChunkHandling` option");n&&l(n.buffer);var A=e.length,y=n||[],T=0,_=0,S="",I=0;if(r)for(;;){if((I=m(e,I))===A){if(S.length>0){if("stop-before-partial"===u)break;if("loose"!==u)throw new h("Missing padding");if(1===S.length)throw new h("Malformed padding: exactly one additional character");T=v(y,E(S,i,!1),T)}_=A;break}var b=p(e,I);if(++I,"="===b){if(S.length<2)throw new h("Padding is too early");if(I=m(e,I),2===S.length){if(I===A){if("stop-before-partial"===u)break;throw new h("Malformed padding: only one =")}"="===p(e,I)&&(++I,I=m(e,I))}if(I<A)throw new h("Unexpected character after padding");T=v(y,E(S,i,"strict"===u),T),_=A;break}if(!s(i,b))throw new h("Unexpected character");var R=r-T;if(1===R&&2===S.length||2===R&&3===S.length)break;if(4===(S+=b).length&&(T=v(y,E(S,i,!1),T),S="",_=I,T===r))break}return{bytes:y,read:_,written:T}}},42303:function(e,t,n){"use strict";var r=n(44576),i=n(79504),a=r.Uint8Array,o=r.SyntaxError,s=r.parseInt,u=Math.min,c=/[^\da-f]/i,l=i(c.exec),f=i("".slice);e.exports=function(e,t){var n=e.length;if(n%2!=0)throw new o("String should be an even number of characters");for(var r=t?u(t.length,n/2):n/2,i=t||new a(r),d=0,h=0;h<r;){var g=f(e,d,d+=2);if(l(c,g))throw new o("String should only contain hex characters");i[h++]=s(g,16)}return{bytes:i,read:d}}},67416:function(e,t,n){"use strict";var r=n(79039),i=n(78227),a=n(43724),o=n(96395),s=i("iterator");e.exports=!r((function(){var e=new URL("b?a=1&b=2&c=3","https://a"),t=e.searchParams,n=new URLSearchParams("a=1&a=2&b=3"),r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),n.delete("a",2),n.delete("b",void 0),o&&(!e.toJSON||!n.has("a",1)||n.has("a",2)||!n.has("a",void 0)||n.has("b"))||!t.size&&(o||!a)||!t.sort||"https://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==r||"x"!==new URL("https://x",void 0).host}))},7040:function(e,t,n){"use strict";var r=n(4495);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},48686:function(e,t,n){"use strict";var r=n(43724),i=n(79039);e.exports=r&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},22812:function(e){"use strict";var t=TypeError;e.exports=function(e,n){if(e<n)throw new t("Not enough arguments");return e}},58622:function(e,t,n){"use strict";var r=n(44576),i=n(94901),a=r.WeakMap;e.exports=i(a)&&/native code/.test(String(a))},70511:function(e,t,n){"use strict";var r=n(19167),i=n(39297),a=n(1951),o=n(24913).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});i(t,e)||o(t,e,{value:a.f(e)})}},1951:function(e,t,n){"use strict";var r=n(78227);t.f=r},78227:function(e,t,n){"use strict";var r=n(44576),i=n(25745),a=n(39297),o=n(33392),s=n(4495),u=n(7040),c=r.Symbol,l=i("wks"),f=u?c.for||c:c&&c.withoutSetter||o;e.exports=function(e){return a(l,e)||(l[e]=s&&a(c,e)?c[e]:f("Symbol."+e)),l[e]}},47452:function(e){"use strict";e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},14601:function(e,t,n){"use strict";var r=n(97751),i=n(39297),a=n(66699),o=n(1625),s=n(52967),u=n(77740),c=n(11056),l=n(23167),f=n(32603),d=n(77584),h=n(80747),g=n(43724),p=n(96395);e.exports=function(e,t,n,m){var E="stackTraceLimit",v=m?2:1,A=e.split("."),y=A[A.length-1],T=r.apply(null,A);if(T){var _=T.prototype;if(!p&&i(_,"cause")&&delete _.cause,!n)return T;var S=r("Error"),I=t((function(e,t){var n=f(m?t:e,void 0),r=m?new T(e):new T;return void 0!==n&&a(r,"message",n),h(r,I,r.stack,2),this&&o(_,this)&&l(r,this,I),arguments.length>v&&d(r,arguments[v]),r}));if(I.prototype=_,"Error"!==y?s?s(I,S):u(I,S,{name:!0}):g&&E in T&&(c(I,T,E),c(I,T,"prepareStackTrace")),u(I,T),!p)try{_.name!==y&&a(_,"name",y),_.constructor=I}catch(e){}return I}}},54743:function(e,t,n){"use strict";var r=n(46518),i=n(44576),a=n(66346),o=n(87633),s="ArrayBuffer",u=a[s];r({global:!0,constructor:!0,forced:i[s]!==u},{ArrayBuffer:u}),o(s)},16573:function(e,t,n){"use strict";var r=n(43724),i=n(62106),a=n(3238),o=ArrayBuffer.prototype;r&&!("detached"in o)&&i(o,"detached",{configurable:!0,get:function(){return a(this)}})},77936:function(e,t,n){"use strict";var r=n(46518),i=n(95636);i&&r({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return i(this,arguments.length?arguments[0]:void 0,!1)}})},78100:function(e,t,n){"use strict";var r=n(46518),i=n(95636);i&&r({target:"ArrayBuffer",proto:!0},{transfer:function(){return i(this,arguments.length?arguments[0]:void 0,!0)}})},18107:function(e,t,n){"use strict";var r=n(46518),i=n(48981),a=n(26198),o=n(91291),s=n(6469);r({target:"Array",proto:!0},{at:function(e){var t=i(this),n=a(t),r=o(e),s=r>=0?r:n+r;return s<0||s>=n?void 0:t[s]}}),s("at")},28706:function(e,t,n){"use strict";var r=n(46518),i=n(79039),a=n(34376),o=n(20034),s=n(48981),u=n(26198),c=n(96837),l=n(97040),f=n(1469),d=n(70597),h=n(78227),g=n(39519),p=h("isConcatSpreadable"),m=g>=51||!i((function(){var e=[];return e[p]=!1,e.concat()[0]!==e})),E=function(e){if(!o(e))return!1;var t=e[p];return void 0!==t?!!t:a(e)};r({target:"Array",proto:!0,arity:1,forced:!m||!d("concat")},{concat:function(e){var t,n,r,i,a,o=s(this),d=f(o,0),h=0;for(t=-1,r=arguments.length;t<r;t++)if(E(a=-1===t?o:arguments[t]))for(i=u(a),c(h+i),n=0;n<i;n++,h++)n in a&&l(d,h,a[n]);else c(h+1),l(d,h++,a);return d.length=h,d}})},26835:function(e,t,n){"use strict";var r=n(46518),i=n(57029),a=n(6469);r({target:"Array",proto:!0},{copyWithin:i}),a("copyWithin")},33771:function(e,t,n){"use strict";var r=n(46518),i=n(84373),a=n(6469);r({target:"Array",proto:!0},{fill:i}),a("fill")},2008:function(e,t,n){"use strict";var r=n(46518),i=n(59213).filter;r({target:"Array",proto:!0,forced:!n(70597)("filter")},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},48980:function(e,t,n){"use strict";var r=n(46518),i=n(59213).findIndex,a=n(6469),o="findIndex",s=!0;o in[]&&Array(1)[o]((function(){s=!1})),r({target:"Array",proto:!0,forced:s},{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),a(o)},50113:function(e,t,n){"use strict";var r=n(46518),i=n(59213).find,a=n(6469),o="find",s=!0;o in[]&&Array(1)[o]((function(){s=!1})),r({target:"Array",proto:!0,forced:s},{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),a(o)},78350:function(e,t,n){"use strict";var r=n(46518),i=n(70259),a=n(79306),o=n(48981),s=n(26198),u=n(1469);r({target:"Array",proto:!0},{flatMap:function(e){var t,n=o(this),r=s(n);return a(e),(t=u(n,0)).length=i(t,n,n,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}})},23418:function(e,t,n){"use strict";var r=n(46518),i=n(97916);r({target:"Array",stat:!0,forced:!n(84428)((function(e){Array.from(e)}))},{from:i})},74423:function(e,t,n){"use strict";var r=n(46518),i=n(19617).includes,a=n(79039),o=n(6469);r({target:"Array",proto:!0,forced:a((function(){return!Array(1).includes()}))},{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("includes")},23792:function(e,t,n){"use strict";var r=n(25397),i=n(6469),a=n(26269),o=n(91181),s=n(24913).f,u=n(51088),c=n(62529),l=n(96395),f=n(43724),d="Array Iterator",h=o.set,g=o.getterFor(d);e.exports=u(Array,"Array",(function(e,t){h(this,{type:d,target:r(e),index:0,kind:t})}),(function(){var e=g(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,c(void 0,!0);switch(e.kind){case"keys":return c(n,!1);case"values":return c(t[n],!1)}return c([n,t[n]],!1)}),"values");var p=a.Arguments=a.Array;if(i("keys"),i("values"),i("entries"),!l&&f&&"values"!==p.name)try{s(p,"name",{value:"values"})}catch(e){}},48598:function(e,t,n){"use strict";var r=n(46518),i=n(79504),a=n(47055),o=n(25397),s=n(34598),u=i([].join);r({target:"Array",proto:!0,forced:a!==Object||!s("join",",")},{join:function(e){return u(o(this),void 0===e?",":e)}})},62062:function(e,t,n){"use strict";var r=n(46518),i=n(59213).map;r({target:"Array",proto:!0,forced:!n(70597)("map")},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},44114:function(e,t,n){"use strict";var r=n(46518),i=n(48981),a=n(26198),o=n(34527),s=n(96837);r({target:"Array",proto:!0,arity:1,forced:n(79039)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=i(this),n=a(t),r=arguments.length;s(n+r);for(var u=0;u<r;u++)t[n]=arguments[u],n++;return o(t,n),n}})},34782:function(e,t,n){"use strict";var r=n(46518),i=n(34376),a=n(33517),o=n(20034),s=n(35610),u=n(26198),c=n(25397),l=n(97040),f=n(78227),d=n(70597),h=n(67680),g=d("slice"),p=f("species"),m=Array,E=Math.max;r({target:"Array",proto:!0,forced:!g},{slice:function(e,t){var n,r,f,d=c(this),g=u(d),v=s(e,g),A=s(void 0===t?g:t,g);if(i(d)&&(n=d.constructor,(a(n)&&(n===m||i(n.prototype))||o(n)&&null===(n=n[p]))&&(n=void 0),n===m||void 0===n))return h(d,v,A);for(r=new(void 0===n?m:n)(E(A-v,0)),f=0;v<A;v++,f++)v in d&&l(r,f,d[v]);return r.length=f,r}})},26910:function(e,t,n){"use strict";var r=n(46518),i=n(79504),a=n(79306),o=n(48981),s=n(26198),u=n(84606),c=n(655),l=n(79039),f=n(74488),d=n(34598),h=n(13709),g=n(13763),p=n(39519),m=n(3607),E=[],v=i(E.sort),A=i(E.push),y=l((function(){E.sort(void 0)})),T=l((function(){E.sort(null)})),_=d("sort"),S=!l((function(){if(p)return p<70;if(!(h&&h>3)){if(g)return!0;if(m)return m<603;var e,t,n,r,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)E.push({k:t+r,v:n})}for(E.sort((function(e,t){return t.v-e.v})),r=0;r<E.length;r++)t=E[r].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));r({target:"Array",proto:!0,forced:y||!T||!_||!S},{sort:function(e){void 0!==e&&a(e);var t=o(this);if(S)return void 0===e?v(t):v(t,e);var n,r,i=[],l=s(t);for(r=0;r<l;r++)r in t&&A(i,t[r]);for(f(i,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:c(t)>c(n)?1:-1}}(e)),n=s(i),r=0;r<n;)t[r]=i[r++];for(;r<l;)u(t,r++);return t}})},54554:function(e,t,n){"use strict";var r=n(46518),i=n(48981),a=n(35610),o=n(91291),s=n(26198),u=n(34527),c=n(96837),l=n(1469),f=n(97040),d=n(84606),h=n(70597)("splice"),g=Math.max,p=Math.min;r({target:"Array",proto:!0,forced:!h},{splice:function(e,t){var n,r,h,m,E,v,A=i(this),y=s(A),T=a(e,y),_=arguments.length;for(0===_?n=r=0:1===_?(n=0,r=y-T):(n=_-2,r=p(g(o(t),0),y-T)),c(y+n-r),h=l(A,r),m=0;m<r;m++)(E=T+m)in A&&f(h,m,A[E]);if(h.length=r,n<r){for(m=T;m<y-r;m++)v=m+n,(E=m+r)in A?A[v]=A[E]:d(A,v);for(m=y;m>y-r+n;m--)d(A,m-1)}else if(n>r)for(m=y-r;m>T;m--)v=m+n-1,(E=m+r-1)in A?A[v]=A[E]:d(A,v);for(m=0;m<n;m++)A[m+T]=arguments[m+2];return u(A,y-r+n),h}})},30237:function(e,t,n){"use strict";n(6469)("flatMap")},89572:function(e,t,n){"use strict";var r=n(39297),i=n(36840),a=n(53640),o=n(78227)("toPrimitive"),s=Date.prototype;r(s,o)||i(s,o,a)},16280:function(e,t,n){"use strict";var r=n(46518),i=n(44576),a=n(18745),o=n(14601),s="WebAssembly",u=i[s],c=7!==new Error("e",{cause:7}).cause,l=function(e,t){var n={};n[e]=o(e,t,c),r({global:!0,constructor:!0,arity:1,forced:c},n)},f=function(e,t){if(u&&u[e]){var n={};n[e]=o(s+"."+e,t,c),r({target:s,stat:!0,constructor:!0,arity:1,forced:c},n)}};l("Error",(function(e){return function(t){return a(e,this,arguments)}})),l("EvalError",(function(e){return function(t){return a(e,this,arguments)}})),l("RangeError",(function(e){return function(t){return a(e,this,arguments)}})),l("ReferenceError",(function(e){return function(t){return a(e,this,arguments)}})),l("SyntaxError",(function(e){return function(t){return a(e,this,arguments)}})),l("TypeError",(function(e){return function(t){return a(e,this,arguments)}})),l("URIError",(function(e){return function(t){return a(e,this,arguments)}})),f("CompileError",(function(e){return function(t){return a(e,this,arguments)}})),f("LinkError",(function(e){return function(t){return a(e,this,arguments)}})),f("RuntimeError",(function(e){return function(t){return a(e,this,arguments)}}))},48957:function(e,t,n){"use strict";var r=n(94901),i=n(20034),a=n(24913),o=n(1625),s=n(78227),u=n(50283),c=s("hasInstance"),l=Function.prototype;c in l||a.f(l,c,{value:u((function(e){if(!r(this)||!i(e))return!1;var t=this.prototype;return i(t)?o(t,e):e instanceof this}),c)})},62010:function(e,t,n){"use strict";var r=n(43724),i=n(10350).EXISTS,a=n(79504),o=n(62106),s=Function.prototype,u=a(s.toString),c=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=a(c.exec);r&&!i&&o(s,"name",{configurable:!0,get:function(){try{return l(c,u(this))[1]}catch(e){return""}}})},55081:function(e,t,n){"use strict";var r=n(46518),i=n(44576);r({global:!0,forced:i.globalThis!==i},{globalThis:i})},18111:function(e,t,n){"use strict";var r=n(46518),i=n(44576),a=n(90679),o=n(28551),s=n(94901),u=n(42787),c=n(62106),l=n(97040),f=n(79039),d=n(39297),h=n(78227),g=n(57657).IteratorPrototype,p=n(43724),m=n(96395),E="constructor",v="Iterator",A=h("toStringTag"),y=TypeError,T=i[v],_=m||!s(T)||T.prototype!==g||!f((function(){T({})})),S=function(){if(a(this,g),u(this)===g)throw new y("Abstract class Iterator not directly constructable")},I=function(e,t){p?c(g,e,{configurable:!0,get:function(){return t},set:function(t){if(o(this),this===g)throw new y("You can't redefine this property");d(this,e)?this[e]=t:l(this,e,t)}}):g[e]=t};d(g,A)||I(A,v),!_&&d(g,E)&&g[E]!==Object||I(E,S),S.prototype=g,r({global:!0,constructor:!0,forced:_},{Iterator:S})},29314:function(e,t,n){"use strict";var r=n(46518),i=n(69565),a=n(28551),o=n(1767),s=n(24149),u=n(99590),c=n(9539),l=n(19462),f=n(30684),d=n(84549),h=n(96395),g=!h&&!f("drop",0),p=!h&&!g&&d("drop",RangeError),m=h||g||p,E=l((function(){for(var e,t=this.iterator,n=this.next;this.remaining;)if(this.remaining--,e=a(i(n,t)),this.done=!!e.done)return;if(e=a(i(n,t)),!(this.done=!!e.done))return e.value}));r({target:"Iterator",proto:!0,real:!0,forced:m},{drop:function(e){var t;a(this);try{t=u(s(+e))}catch(e){c(this,"throw",e)}return p?i(p,this,t):new E(o(this),{remaining:t})}})},81148:function(e,t,n){"use strict";var r=n(46518),i=n(69565),a=n(72652),o=n(79306),s=n(28551),u=n(1767),c=n(9539),l=n(84549)("every",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:l},{every:function(e){s(this);try{o(e)}catch(e){c(this,"throw",e)}if(l)return i(l,this,e);var t=u(this),n=0;return!a(t,(function(t,r){if(!e(t,n++))return r()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},22489:function(e,t,n){"use strict";var r=n(46518),i=n(69565),a=n(79306),o=n(28551),s=n(1767),u=n(19462),c=n(96319),l=n(96395),f=n(9539),d=n(30684),h=n(84549),g=!l&&!d("filter",(function(){})),p=!l&&!g&&h("filter",TypeError),m=l||g||p,E=u((function(){for(var e,t,n=this.iterator,r=this.predicate,a=this.next;;){if(e=o(i(a,n)),this.done=!!e.done)return;if(t=e.value,c(n,r,[t,this.counter++],!0))return t}}));r({target:"Iterator",proto:!0,real:!0,forced:m},{filter:function(e){o(this);try{a(e)}catch(e){f(this,"throw",e)}return p?i(p,this,e):new E(s(this),{predicate:e})}})},20116:function(e,t,n){"use strict";var r=n(46518),i=n(69565),a=n(72652),o=n(79306),s=n(28551),u=n(1767),c=n(9539),l=n(84549)("find",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:l},{find:function(e){s(this);try{o(e)}catch(e){c(this,"throw",e)}if(l)return i(l,this,e);var t=u(this),n=0;return a(t,(function(t,r){if(e(t,n++))return r(t)}),{IS_RECORD:!0,INTERRUPTED:!0}).result}})},30531:function(e,t,n){"use strict";var r=n(46518),i=n(69565),a=n(79306),o=n(28551),s=n(1767),u=n(48646),c=n(19462),l=n(9539),f=n(96395),d=n(30684),h=n(84549),g=!f&&!d("flatMap",(function(){})),p=!f&&!g&&h("flatMap",TypeError),m=f||g||p,E=c((function(){for(var e,t,n=this.iterator,r=this.mapper;;){if(t=this.inner)try{if(!(e=o(i(t.next,t.iterator))).done)return e.value;this.inner=null}catch(e){l(n,"throw",e)}if(e=o(i(this.next,n)),this.done=!!e.done)return;try{this.inner=u(r(e.value,this.counter++),!1)}catch(e){l(n,"throw",e)}}}));r({target:"Iterator",proto:!0,real:!0,forced:m},{flatMap:function(e){o(this);try{a(e)}catch(e){l(this,"throw",e)}return p?i(p,this,e):new E(s(this),{mapper:e,inner:null})}})},7588:function(e,t,n){"use strict";var r=n(46518),i=n(69565),a=n(72652),o=n(79306),s=n(28551),u=n(1767),c=n(9539),l=n(84549)("forEach",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:l},{forEach:function(e){s(this);try{o(e)}catch(e){c(this,"throw",e)}if(l)return i(l,this,e);var t=u(this),n=0;a(t,(function(t){e(t,n++)}),{IS_RECORD:!0})}})},61701:function(e,t,n){"use strict";var r=n(46518),i=n(69565),a=n(79306),o=n(28551),s=n(1767),u=n(19462),c=n(96319),l=n(9539),f=n(30684),d=n(84549),h=n(96395),g=!h&&!f("map",(function(){})),p=!h&&!g&&d("map",TypeError),m=h||g||p,E=u((function(){var e=this.iterator,t=o(i(this.next,e));if(!(this.done=!!t.done))return c(e,this.mapper,[t.value,this.counter++],!0)}));r({target:"Iterator",proto:!0,real:!0,forced:m},{map:function(e){o(this);try{a(e)}catch(e){l(this,"throw",e)}return p?i(p,this,e):new E(s(this),{mapper:e})}})},18237:function(e,t,n){"use strict";var r=n(46518),i=n(72652),a=n(79306),o=n(28551),s=n(1767),u=n(9539),c=n(84549),l=n(18745),f=n(79039),d=TypeError,h=f((function(){[].keys().reduce((function(){}),void 0)})),g=!h&&c("reduce",d);r({target:"Iterator",proto:!0,real:!0,forced:h||g},{reduce:function(e){o(this);try{a(e)}catch(e){u(this,"throw",e)}var t=arguments.length<2,n=t?void 0:arguments[1];if(g)return l(g,this,t?[e]:[e,n]);var r=s(this),c=0;if(i(r,(function(r){t?(t=!1,n=r):n=e(n,r,c),c++}),{IS_RECORD:!0}),t)throw new d("Reduce of empty iterator with no initial value");return n}})},13579:function(e,t,n){"use strict";var r=n(46518),i=n(69565),a=n(72652),o=n(79306),s=n(28551),u=n(1767),c=n(9539),l=n(84549)("some",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:l},{some:function(e){s(this);try{o(e)}catch(e){c(this,"throw",e)}if(l)return i(l,this,e);var t=u(this),n=0;return a(t,(function(t,r){if(e(t,n++))return r()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},69112:function(e,t,n){"use strict";var r=n(46518),i=n(43724),a=n(44576),o=n(97751),s=n(79504),u=n(69565),c=n(94901),l=n(20034),f=n(34376),d=n(39297),h=n(655),g=n(26198),p=n(97040),m=n(79039),E=n(616),v=n(4495),A=a.JSON,y=a.Number,T=a.SyntaxError,_=A&&A.parse,S=o("Object","keys"),I=Object.getOwnPropertyDescriptor,b=s("".charAt),R=s("".slice),N=s(/./.exec),C=s([].push),w=/^\d$/,D=/^[1-9]$/,O=/^[\d-]$/,M=/^[\t\n\r ]$/,P=function(e,t,n,r){var i,a,o,s,c,h=e[t],p=r&&h===r.value,m=p&&"string"==typeof r.source?{source:r.source}:{};if(l(h)){var E=f(h),v=p?r.nodes:E?[]:{};if(E)for(i=v.length,o=g(h),s=0;s<o;s++)L(h,s,P(h,""+s,n,s<i?v[s]:void 0));else for(a=S(h),o=g(a),s=0;s<o;s++)c=a[s],L(h,c,P(h,c,n,d(v,c)?v[c]:void 0))}return u(n,e,t,h,m)},L=function(e,t,n){if(i){var r=I(e,t);if(r&&!r.configurable)return}void 0===n?delete e[t]:p(e,t,n)},x=function(e,t,n,r){this.value=e,this.end=t,this.source=n,this.nodes=r},F=function(e,t){this.source=e,this.index=t};F.prototype={fork:function(e){return new F(this.source,e)},parse:function(){var e=this.source,t=this.skip(M,this.index),n=this.fork(t),r=b(e,t);if(N(O,r))return n.number();switch(r){case"{":return n.object();case"[":return n.array();case'"':return n.string();case"t":return n.keyword(!0);case"f":return n.keyword(!1);case"n":return n.keyword(null)}throw new T('Unexpected character: "'+r+'" at: '+t)},node:function(e,t,n,r,i){return new x(t,r,e?null:R(this.source,n,r),i)},object:function(){for(var e=this.source,t=this.index+1,n=!1,r={},i={};t<e.length;){if(t=this.until(['"',"}"],t),"}"===b(e,t)&&!n){t++;break}var a=this.fork(t).string(),o=a.value;t=a.end,t=this.until([":"],t)+1,t=this.skip(M,t),a=this.fork(t).parse(),p(i,o,a),p(r,o,a.value),t=this.until([",","}"],a.end);var s=b(e,t);if(","===s)n=!0,t++;else if("}"===s){t++;break}}return this.node(1,r,this.index,t,i)},array:function(){for(var e=this.source,t=this.index+1,n=!1,r=[],i=[];t<e.length;){if(t=this.skip(M,t),"]"===b(e,t)&&!n){t++;break}var a=this.fork(t).parse();if(C(i,a),C(r,a.value),t=this.until([",","]"],a.end),","===b(e,t))n=!0,t++;else if("]"===b(e,t)){t++;break}}return this.node(1,r,this.index,t,i)},string:function(){var e=this.index,t=E(this.source,this.index+1);return this.node(0,t.value,e,t.end)},number:function(){var e=this.source,t=this.index,n=t;if("-"===b(e,n)&&n++,"0"===b(e,n))n++;else{if(!N(D,b(e,n)))throw new T("Failed to parse number at: "+n);n=this.skip(w,n+1)}if(!("."===b(e,n)&&(n=this.skip(w,n+1)),"e"!==b(e,n)&&"E"!==b(e,n)||(n++,"+"!==b(e,n)&&"-"!==b(e,n)||n++,n!==(n=this.skip(w,n)))))throw new T("Failed to parse number's exponent value at: "+n);return this.node(0,y(R(e,t,n)),t,n)},keyword:function(e){var t=""+e,n=this.index,r=n+t.length;if(R(this.source,n,r)!==t)throw new T("Failed to parse value at: "+n);return this.node(0,e,n,r)},skip:function(e,t){for(var n=this.source;t<n.length&&N(e,b(n,t));t++);return t},until:function(e,t){t=this.skip(M,t);for(var n=b(this.source,t),r=0;r<e.length;r++)if(e[r]===n)return t;throw new T('Unexpected character: "'+n+'" at: '+t)}};var U=m((function(){var e,t="9007199254740993";return _(t,(function(t,n,r){e=r.source})),e!==t})),k=v&&!m((function(){return 1/_("-0 \t")!=-1/0}));r({target:"JSON",stat:!0,forced:U},{parse:function(e,t){return k&&!c(t)?_(e):function(e,t){e=h(e);var n=new F(e,0,""),r=n.parse(),i=r.value,a=n.skip(M,r.end);if(a<e.length)throw new T('Unexpected extra character: "'+b(e,a)+'" after the parsed data at: '+a);return c(t)?P({"":i},"",t,r):i}(e,t)}})},33110:function(e,t,n){"use strict";var r=n(46518),i=n(97751),a=n(18745),o=n(69565),s=n(79504),u=n(79039),c=n(34376),l=n(94901),f=n(65810),d=n(10757),h=n(22195),g=n(655),p=n(67680),m=n(616),E=n(33392),v=n(4495),A=n(27819),y=String,T=i("JSON","stringify"),_=s(/./.exec),S=s("".charAt),I=s("".charCodeAt),b=s("".replace),R=s("".slice),N=s([].push),C=s(1.1.toString),w=/[\uD800-\uDFFF]/g,D=/^[\uD800-\uDBFF]$/,O=/^[\uDC00-\uDFFF]$/,M=E(),P=M.length,L=!v||u((function(){var e=i("Symbol")("stringify detection");return"[null]"!==T([e])||"{}"!==T({a:e})||"{}"!==T(Object(e))})),x=u((function(){return'"\\udf06\\ud834"'!==T("\udf06\ud834")||'"\\udead"'!==T("\udead")})),F=L?function(e,t){var n=p(arguments),r=k(t);if(l(r)||void 0!==e&&!d(e))return n[1]=function(e,t){if(l(r)&&(t=o(r,this,y(e),t)),!d(t))return t},a(T,null,n)}:T,U=function(e,t,n){var r=S(n,t-1),i=S(n,t+1);return _(D,e)&&!_(O,i)||_(O,e)&&!_(D,r)?"\\u"+C(I(e,0),16):e},k=function(e){if(l(e))return e;if(c(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?N(n,i):"number"!=typeof i&&"Number"!==h(i)&&"String"!==h(i)||N(n,g(i))}var a=n.length,o=!0;return function(e,t){if(o)return o=!1,t;if(c(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}};T&&r({target:"JSON",stat:!0,arity:3,forced:L||x||!A},{stringify:function(e,t,n){var r=k(t),i=[],a=F(e,(function(e,t){var n=l(r)?o(r,this,y(e),t):t;return!A&&f(n)?M+(N(i,n.rawJSON)-1):n}),n);if("string"!=typeof a)return a;if(x&&(a=b(a,w,U)),A)return a;for(var s="",u=a.length,c=0;c<u;c++){var d=S(a,c);if('"'===d){var h=m(a,++c).end-1,g=R(a,c,h);s+=R(g,0,P)===M?i[R(g,P)]:'"'+g+'"',c=h}else s+=d}return s}})},48523:function(e,t,n){"use strict";n(16468)("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),n(86938))},36033:function(e,t,n){"use strict";n(48523)},5914:function(e,t,n){"use strict";n(46518)({target:"Math",stat:!0},{sign:n(77782)})},70761:function(e,t,n){"use strict";n(46518)({target:"Math",stat:!0},{trunc:n(80741)})},2892:function(e,t,n){"use strict";var r=n(46518),i=n(96395),a=n(43724),o=n(44576),s=n(19167),u=n(79504),c=n(92796),l=n(39297),f=n(23167),d=n(1625),h=n(10757),g=n(72777),p=n(79039),m=n(38480).f,E=n(77347).f,v=n(24913).f,A=n(31240),y=n(43802).trim,T="Number",_=o[T],S=s[T],I=_.prototype,b=o.TypeError,R=u("".slice),N=u("".charCodeAt),C=c(T,!_(" 0o1")||!_("0b1")||_("+0x1")),w=function(e){var t,n=arguments.length<1?0:_(function(e){var t=g(e,"number");return"bigint"==typeof t?t:function(e){var t,n,r,i,a,o,s,u,c=g(e,"number");if(h(c))throw new b("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=y(c),43===(t=N(c,0))||45===t){if(88===(n=N(c,2))||120===n)return NaN}else if(48===t){switch(N(c,1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+c}for(o=(a=R(c,2)).length,s=0;s<o;s++)if((u=N(a,s))<48||u>i)return NaN;return parseInt(a,r)}return+c}(t)}(e));return d(I,t=this)&&p((function(){A(t)}))?f(Object(n),this,w):n};w.prototype=I,C&&!i&&(I.constructor=w),r({global:!0,constructor:!0,wrap:!0,forced:C},{Number:w});var D=function(e,t){for(var n,r=a?m(t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),i=0;r.length>i;i++)l(t,n=r[i])&&!l(e,n)&&v(e,n,E(t,n))};i&&S&&D(s[T],S),(C||i)&&D(s[T],_)},45374:function(e,t,n){"use strict";n(46518)({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})},25428:function(e,t,n){"use strict";n(46518)({target:"Number",stat:!0},{isFinite:n(50360)})},32637:function(e,t,n){"use strict";n(46518)({target:"Number",stat:!0},{isInteger:n(2087)})},40150:function(e,t,n){"use strict";n(46518)({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},64601:function(e,t,n){"use strict";n(46518)({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})},9868:function(e,t,n){"use strict";var r=n(46518),i=n(79504),a=n(91291),o=n(31240),s=n(72333),u=n(79039),c=RangeError,l=String,f=Math.floor,d=i(s),h=i("".slice),g=i(1.1.toFixed),p=function(e,t,n){return 0===t?n:t%2==1?p(e,t-1,n*e):p(e*e,t/2,n)},m=function(e,t,n){for(var r=-1,i=n;++r<6;)i+=t*e[r],e[r]=i%1e7,i=f(i/1e7)},E=function(e,t){for(var n=6,r=0;--n>=0;)r+=e[n],e[n]=f(r/t),r=r%t*1e7},v=function(e){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==e[t]){var r=l(e[t]);n=""===n?r:n+d("0",7-r.length)+r}return n};r({target:"Number",proto:!0,forced:u((function(){return"0.000"!==g(8e-5,3)||"1"!==g(.9,0)||"1.25"!==g(1.255,2)||"1000000000000000128"!==g(0xde0b6b3a7640080,0)}))||!u((function(){g({})}))},{toFixed:function(e){var t,n,r,i,s=o(this),u=a(e),f=[0,0,0,0,0,0],g="",A="0";if(u<0||u>20)throw new c("Incorrect fraction digits");if(s!=s)return"NaN";if(s<=-1e21||s>=1e21)return l(s);if(s<0&&(g="-",s=-s),s>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(s*p(2,69,1))-69)<0?s*p(2,-t,1):s/p(2,t,1),n*=4503599627370496,(t=52-t)>0){for(m(f,0,n),r=u;r>=7;)m(f,1e7,0),r-=7;for(m(f,p(10,r,1),0),r=t-1;r>=23;)E(f,1<<23),r-=23;E(f,1<<r),m(f,1,1),E(f,2),A=v(f)}else m(f,0,n),m(f,1<<-t,0),A=v(f)+d("0",u);return u>0?g+((i=A.length)<=u?"0."+d("0",u-i)+A:h(A,0,i-u)+"."+h(A,i-u)):g+A}})},69085:function(e,t,n){"use strict";var r=n(46518),i=n(44213);r({target:"Object",stat:!0,arity:2,forced:Object.assign!==i},{assign:i})},5506:function(e,t,n){"use strict";var r=n(46518),i=n(32357).entries;r({target:"Object",stat:!0},{entries:function(e){return i(e)}})},83851:function(e,t,n){"use strict";var r=n(46518),i=n(79039),a=n(25397),o=n(77347).f,s=n(43724);r({target:"Object",stat:!0,forced:!s||i((function(){o(1)})),sham:!s},{getOwnPropertyDescriptor:function(e,t){return o(a(e),t)}})},81278:function(e,t,n){"use strict";var r=n(46518),i=n(43724),a=n(35031),o=n(25397),s=n(77347),u=n(97040);r({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(e){for(var t,n,r=o(e),i=s.f,c=a(r),l={},f=0;c.length>f;)void 0!==(n=i(r,t=c[f++]))&&u(l,t,n);return l}})},1480:function(e,t,n){"use strict";var r=n(46518),i=n(79039),a=n(10298).f;r({target:"Object",stat:!0,forced:i((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:a})},49773:function(e,t,n){"use strict";var r=n(46518),i=n(4495),a=n(79039),o=n(33717),s=n(48981);r({target:"Object",stat:!0,forced:!i||a((function(){o.f(1)}))},{getOwnPropertySymbols:function(e){var t=o.f;return t?t(s(e)):[]}})},40875:function(e,t,n){"use strict";var r=n(46518),i=n(79039),a=n(48981),o=n(42787),s=n(12211);r({target:"Object",stat:!0,forced:i((function(){o(1)})),sham:!s},{getPrototypeOf:function(e){return o(a(e))}})},79432:function(e,t,n){"use strict";var r=n(46518),i=n(48981),a=n(71072);r({target:"Object",stat:!0,forced:n(79039)((function(){a(1)}))},{keys:function(e){return a(i(e))}})},26099:function(e,t,n){"use strict";var r=n(92140),i=n(36840),a=n(53179);r||i(Object.prototype,"toString",a,{unsafe:!0})},16034:function(e,t,n){"use strict";var r=n(46518),i=n(32357).values;r({target:"Object",stat:!0},{values:function(e){return i(e)}})},96167:function(e,t,n){"use strict";var r=n(46518),i=n(69565),a=n(79306),o=n(36043),s=n(1103),u=n(72652);r({target:"Promise",stat:!0,forced:n(90537)},{allSettled:function(e){var t=this,n=o.f(t),r=n.resolve,c=n.reject,l=s((function(){var n=a(t.resolve),o=[],s=0,c=1;u(e,(function(e){var a=s++,u=!1;c++,i(n,t,e).then((function(e){u||(u=!0,o[a]={status:"fulfilled",value:e},--c||r(o))}),(function(e){u||(u=!0,o[a]={status:"rejected",reason:e},--c||r(o))}))})),--c||r(o)}));return l.error&&c(l.value),n.promise}})},16499:function(e,t,n){"use strict";var r=n(46518),i=n(69565),a=n(79306),o=n(36043),s=n(1103),u=n(72652);r({target:"Promise",stat:!0,forced:n(90537)},{all:function(e){var t=this,n=o.f(t),r=n.resolve,c=n.reject,l=s((function(){var n=a(t.resolve),o=[],s=0,l=1;u(e,(function(e){var a=s++,u=!1;l++,i(n,t,e).then((function(e){u||(u=!0,o[a]=e,--l||r(o))}),c)})),--l||r(o)}));return l.error&&c(l.value),n.promise}})},82003:function(e,t,n){"use strict";var r=n(46518),i=n(96395),a=n(10916).CONSTRUCTOR,o=n(80550),s=n(97751),u=n(94901),c=n(36840),l=o&&o.prototype;if(r({target:"Promise",proto:!0,forced:a,real:!0},{catch:function(e){return this.then(void 0,e)}}),!i&&u(o)){var f=s("Promise").prototype.catch;l.catch!==f&&c(l,"catch",f,{unsafe:!0})}},10436:function(e,t,n){"use strict";var r,i,a,o,s=n(46518),u=n(96395),c=n(38574),l=n(44576),f=n(19167),d=n(69565),h=n(36840),g=n(52967),p=n(10687),m=n(87633),E=n(79306),v=n(94901),A=n(20034),y=n(90679),T=n(2293),_=n(59225).set,S=n(91955),I=n(90757),b=n(1103),R=n(18265),N=n(91181),C=n(80550),w=n(10916),D=n(36043),O="Promise",M=w.CONSTRUCTOR,P=w.REJECTION_EVENT,L=w.SUBCLASSING,x=N.getterFor(O),F=N.set,U=C&&C.prototype,k=C,B=U,G=l.TypeError,H=l.document,Y=l.process,V=D.f,q=V,K=!!(H&&H.createEvent&&l.dispatchEvent),j="unhandledrejection",z=function(e){var t;return!(!A(e)||!v(t=e.then))&&t},W=function(e,t){var n,r,i,a=t.value,o=1===t.state,s=o?e.ok:e.fail,u=e.resolve,c=e.reject,l=e.domain;try{s?(o||(2===t.rejection&&J(t),t.rejection=1),!0===s?n=a:(l&&l.enter(),n=s(a),l&&(l.exit(),i=!0)),n===e.promise?c(new G("Promise-chain cycle")):(r=z(n))?d(r,n,u,c):u(n)):c(a)}catch(e){l&&!i&&l.exit(),c(e)}},Q=function(e,t){e.notified||(e.notified=!0,S((function(){for(var n,r=e.reactions;n=r.get();)W(n,e);e.notified=!1,t&&!e.rejection&&$(e)})))},X=function(e,t,n){var r,i;K?((r=H.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),l.dispatchEvent(r)):r={promise:t,reason:n},!P&&(i=l["on"+e])?i(r):e===j&&I("Unhandled promise rejection",n)},$=function(e){d(_,l,(function(){var t,n=e.facade,r=e.value;if(Z(e)&&(t=b((function(){c?Y.emit("unhandledRejection",r,n):X(j,n,r)})),e.rejection=c||Z(e)?2:1,t.error))throw t.value}))},Z=function(e){return 1!==e.rejection&&!e.parent},J=function(e){d(_,l,(function(){var t=e.facade;c?Y.emit("rejectionHandled",t):X("rejectionhandled",t,e.value)}))},ee=function(e,t,n){return function(r){e(t,r,n)}},te=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Q(e,!0))},ne=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw new G("Promise can't be resolved itself");var r=z(t);r?S((function(){var n={done:!1};try{d(r,t,ee(ne,n,e),ee(te,n,e))}catch(t){te(n,t,e)}})):(e.value=t,e.state=1,Q(e,!1))}catch(t){te({done:!1},t,e)}}};if(M&&(B=(k=function(e){y(this,B),E(e),d(r,this);var t=x(this);try{e(ee(ne,t),ee(te,t))}catch(e){te(t,e)}}).prototype,(r=function(e){F(this,{type:O,done:!1,notified:!1,parent:!1,reactions:new R,rejection:!1,state:0,value:null})}).prototype=h(B,"then",(function(e,t){var n=x(this),r=V(T(this,k));return n.parent=!0,r.ok=!v(e)||e,r.fail=v(t)&&t,r.domain=c?Y.domain:void 0,0===n.state?n.reactions.add(r):S((function(){W(r,n)})),r.promise})),i=function(){var e=new r,t=x(e);this.promise=e,this.resolve=ee(ne,t),this.reject=ee(te,t)},D.f=V=function(e){return e===k||e===a?new i(e):q(e)},!u&&v(C)&&U!==Object.prototype)){o=U.then,L||h(U,"then",(function(e,t){var n=this;return new k((function(e,t){d(o,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete U.constructor}catch(e){}g&&g(U,B)}s({global:!0,constructor:!0,wrap:!0,forced:M},{Promise:k}),a=f.Promise,p(k,O,!1,!0),m(O)},3362:function(e,t,n){"use strict";n(10436),n(16499),n(82003),n(7743),n(51481),n(40280)},7743:function(e,t,n){"use strict";var r=n(46518),i=n(69565),a=n(79306),o=n(36043),s=n(1103),u=n(72652);r({target:"Promise",stat:!0,forced:n(90537)},{race:function(e){var t=this,n=o.f(t),r=n.reject,c=s((function(){var o=a(t.resolve);u(e,(function(e){i(o,t,e).then(n.resolve,r)}))}));return c.error&&r(c.value),n.promise}})},51481:function(e,t,n){"use strict";var r=n(46518),i=n(36043);r({target:"Promise",stat:!0,forced:n(10916).CONSTRUCTOR},{reject:function(e){var t=i.f(this);return(0,t.reject)(e),t.promise}})},40280:function(e,t,n){"use strict";var r=n(46518),i=n(97751),a=n(96395),o=n(80550),s=n(10916).CONSTRUCTOR,u=n(93438),c=i("Promise"),l=a&&!s;r({target:"Promise",stat:!0,forced:a||s},{resolve:function(e){return u(l&&this===c?o:this,e)}})},60825:function(e,t,n){"use strict";var r=n(46518),i=n(97751),a=n(18745),o=n(30566),s=n(35548),u=n(28551),c=n(20034),l=n(2360),f=n(79039),d=i("Reflect","construct"),h=Object.prototype,g=[].push,p=f((function(){function e(){}return!(d((function(){}),[],e)instanceof e)})),m=!f((function(){d((function(){}))})),E=p||m;r({target:"Reflect",stat:!0,forced:E,sham:E},{construct:function(e,t){s(e),u(t);var n=arguments.length<3?e:s(arguments[2]);if(m&&!p)return d(e,t,n);if(e===n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return a(g,r,t),new(a(o,e,r))}var i=n.prototype,f=l(c(i)?i:h),E=a(e,f,t);return c(E)?E:f}})},40888:function(e,t,n){"use strict";var r=n(46518),i=n(69565),a=n(20034),o=n(28551),s=n(16575),u=n(77347),c=n(42787);r({target:"Reflect",stat:!0},{get:function e(t,n){var r,l,f=arguments.length<3?t:arguments[2];return o(t)===f?t[n]:(r=u.f(t,n))?s(r)?r.value:void 0===r.get?void 0:i(r.get,f):a(l=c(t))?e(l,n,f):void 0}})},15472:function(e,t,n){"use strict";var r=n(46518),i=n(44576),a=n(10687);r({global:!0},{Reflect:{}}),a(i.Reflect,"Reflect",!0)},84864:function(e,t,n){"use strict";var r=n(43724),i=n(44576),a=n(79504),o=n(92796),s=n(23167),u=n(66699),c=n(2360),l=n(38480).f,f=n(1625),d=n(60788),h=n(655),g=n(61034),p=n(58429),m=n(11056),E=n(36840),v=n(79039),A=n(39297),y=n(91181).enforce,T=n(87633),_=n(78227),S=n(83635),I=n(18814),b=_("match"),R=i.RegExp,N=R.prototype,C=i.SyntaxError,w=a(N.exec),D=a("".charAt),O=a("".replace),M=a("".indexOf),P=a("".slice),L=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,x=/a/g,F=/a/g,U=new R(x)!==x,k=p.MISSED_STICKY,B=p.UNSUPPORTED_Y;if(o("RegExp",r&&(!U||k||S||I||v((function(){return F[b]=!1,R(x)!==x||R(F)===F||"/a/i"!==String(R(x,"i"))}))))){for(var G=function(e,t){var n,r,i,a,o,l,p=f(N,this),m=d(e),E=void 0===t,v=[],T=e;if(!p&&m&&E&&e.constructor===G)return e;if((m||f(N,e))&&(e=e.source,E&&(t=g(T))),e=void 0===e?"":h(e),t=void 0===t?"":h(t),T=e,S&&"dotAll"in x&&(r=!!t&&M(t,"s")>-1)&&(t=O(t,/s/g,"")),n=t,k&&"sticky"in x&&(i=!!t&&M(t,"y")>-1)&&B&&(t=O(t,/y/g,"")),I&&(a=function(e){for(var t,n=e.length,r=0,i="",a=[],o=c(null),s=!1,u=!1,l=0,f="";r<=n;r++){if("\\"===(t=D(e,r)))t+=D(e,++r);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:if(i+=t,"?:"===P(e,r+1,r+3))continue;w(L,P(e,r+1))&&(r+=2,u=!0),l++;continue;case">"===t&&u:if(""===f||A(o,f))throw new C("Invalid capture group name");o[f]=!0,a[a.length]=[f,l],u=!1,f="";continue}u?f+=t:i+=t}return[i,a]}(e),e=a[0],v=a[1]),o=s(R(e,t),p?this:N,G),(r||i||v.length)&&(l=y(o),r&&(l.dotAll=!0,l.raw=G(function(e){for(var t,n=e.length,r=0,i="",a=!1;r<=n;r++)"\\"!==(t=D(e,r))?a||"."!==t?("["===t?a=!0:"]"===t&&(a=!1),i+=t):i+="[\\s\\S]":i+=t+D(e,++r);return i}(e),n)),i&&(l.sticky=!0),v.length&&(l.groups=v)),e!==T)try{u(o,"source",""===T?"(?:)":T)}catch(e){}return o},H=l(R),Y=0;H.length>Y;)m(G,R,H[Y++]);N.constructor=G,G.prototype=N,E(i,"RegExp",G,{constructor:!0})}T("RegExp")},57465:function(e,t,n){"use strict";var r=n(43724),i=n(83635),a=n(22195),o=n(62106),s=n(91181).get,u=RegExp.prototype,c=TypeError;r&&i&&o(u,"dotAll",{configurable:!0,get:function(){if(this!==u){if("RegExp"===a(this))return!!s(this).dotAll;throw new c("Incompatible receiver, RegExp required")}}})},27495:function(e,t,n){"use strict";var r=n(46518),i=n(57323);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},69479:function(e,t,n){"use strict";var r=n(43724),i=n(62106),a=n(65213),o=n(67979);r&&!a.correct&&(i(RegExp.prototype,"flags",{configurable:!0,get:o}),a.correct=!0)},87745:function(e,t,n){"use strict";var r=n(43724),i=n(58429).MISSED_STICKY,a=n(22195),o=n(62106),s=n(91181).get,u=RegExp.prototype,c=TypeError;r&&i&&o(u,"sticky",{configurable:!0,get:function(){if(this!==u){if("RegExp"===a(this))return!!s(this).sticky;throw new c("Incompatible receiver, RegExp required")}}})},90906:function(e,t,n){"use strict";n(27495);var r,i,a=n(46518),o=n(69565),s=n(94901),u=n(28551),c=n(655),l=(r=!1,(i=/[ac]/).exec=function(){return r=!0,/./.exec.apply(this,arguments)},!0===i.test("abc")&&r),f=/./.test;a({target:"RegExp",proto:!0,forced:!l},{test:function(e){var t=u(this),n=c(e),r=t.exec;if(!s(r))return o(f,t,n);var i=o(r,t,n);return null!==i&&(u(i),!0)}})},38781:function(e,t,n){"use strict";var r=n(10350).PROPER,i=n(36840),a=n(28551),o=n(655),s=n(79039),u=n(61034),c="toString",l=RegExp.prototype,f=l[c],d=s((function(){return"/a/b"!==f.call({source:"a",flags:"b"})})),h=r&&f.name!==c;(d||h)&&i(l,c,(function(){var e=a(this);return"/"+o(e.source)+"/"+o(u(e))}),{unsafe:!0})},92405:function(e,t,n){"use strict";n(16468)("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),n(86938))},17642:function(e,t,n){"use strict";var r=n(46518),i=n(83440),a=n(79039);r({target:"Set",proto:!0,real:!0,forced:!n(84916)("difference",(function(e){return 0===e.size}))||a((function(){var e={size:1,has:function(){return!0},keys:function(){var e=0;return{next:function(){var n=e++>1;return t.has(1)&&t.clear(),{done:n,value:2}}}}},t=new Set([1,2,3,4]);return 3!==t.difference(e).size}))},{difference:i})},58004:function(e,t,n){"use strict";var r=n(46518),i=n(79039),a=n(68750);r({target:"Set",proto:!0,real:!0,forced:!n(84916)("intersection",(function(e){return 2===e.size&&e.has(1)&&e.has(2)}))||i((function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))}))},{intersection:a})},33853:function(e,t,n){"use strict";var r=n(46518),i=n(64449);r({target:"Set",proto:!0,real:!0,forced:!n(84916)("isDisjointFrom",(function(e){return!e}))},{isDisjointFrom:i})},45876:function(e,t,n){"use strict";var r=n(46518),i=n(53838);r({target:"Set",proto:!0,real:!0,forced:!n(84916)("isSubsetOf",(function(e){return e}))},{isSubsetOf:i})},32475:function(e,t,n){"use strict";var r=n(46518),i=n(28527);r({target:"Set",proto:!0,real:!0,forced:!n(84916)("isSupersetOf",(function(e){return!e}))},{isSupersetOf:i})},31415:function(e,t,n){"use strict";n(92405)},15024:function(e,t,n){"use strict";var r=n(46518),i=n(83650),a=n(39835);r({target:"Set",proto:!0,real:!0,forced:!n(84916)("symmetricDifference")||!a("symmetricDifference")},{symmetricDifference:i})},31698:function(e,t,n){"use strict";var r=n(46518),i=n(44204),a=n(39835);r({target:"Set",proto:!0,real:!0,forced:!n(84916)("union")||!a("union")},{union:i})},67357:function(e,t,n){"use strict";var r=n(46518),i=n(79504),a=n(67750),o=n(91291),s=n(655),u=n(79039),c=i("".charAt);r({target:"String",proto:!0,forced:u((function(){return"\ud842"!=="𠮷".at(-2)}))},{at:function(e){var t=s(a(this)),n=t.length,r=o(e),i=r>=0?r:n+r;return i<0||i>=n?void 0:c(t,i)}})},99449:function(e,t,n){"use strict";var r,i=n(46518),a=n(27476),o=n(77347).f,s=n(18014),u=n(655),c=n(60511),l=n(67750),f=n(41436),d=n(96395),h=a("".slice),g=Math.min,p=f("endsWith");i({target:"String",proto:!0,forced:!(!d&&!p&&(r=o(String.prototype,"endsWith"),r&&!r.writable)||p)},{endsWith:function(e){var t=u(l(this));c(e);var n=arguments.length>1?arguments[1]:void 0,r=t.length,i=void 0===n?r:g(s(n),r),a=u(e);return h(t,i-a.length,i)===a}})},27337:function(e,t,n){"use strict";var r=n(46518),i=n(79504),a=n(35610),o=RangeError,s=String.fromCharCode,u=String.fromCodePoint,c=i([].join);r({target:"String",stat:!0,arity:1,forced:!!u&&1!==u.length},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,i=0;r>i;){if(t=+arguments[i++],a(t,1114111)!==t)throw new o(t+" is not a valid code point");n[i]=t<65536?s(t):s(55296+((t-=65536)>>10),t%1024+56320)}return c(n,"")}})},21699:function(e,t,n){"use strict";var r=n(46518),i=n(79504),a=n(60511),o=n(67750),s=n(655),u=n(41436),c=i("".indexOf);r({target:"String",proto:!0,forced:!u("includes")},{includes:function(e){return!!~c(s(o(this)),s(a(e)),arguments.length>1?arguments[1]:void 0)}})},47764:function(e,t,n){"use strict";var r=n(68183).charAt,i=n(655),a=n(91181),o=n(51088),s=n(62529),u="String Iterator",c=a.set,l=a.getterFor(u);o(String,"String",(function(e){c(this,{type:u,string:i(e),index:0})}),(function(){var e,t=l(this),n=t.string,i=t.index;return i>=n.length?s(void 0,!0):(e=r(n,i),t.index+=e.length,s(e,!1))}))},71761:function(e,t,n){"use strict";var r=n(69565),i=n(79504),a=n(89228),o=n(28551),s=n(20034),u=n(18014),c=n(655),l=n(67750),f=n(55966),d=n(57829),h=n(61034),g=n(56682),p=i("".indexOf);a("match",(function(e,t,n){return[function(t){var n=l(this),i=s(t)?f(t,e):void 0;return i?r(i,t,n):new RegExp(t)[e](c(n))},function(e){var r=o(this),i=c(e),a=n(t,r,i);if(a.done)return a.value;var s=c(h(r));if(-1===p(s,"g"))return g(r,i);var l=-1!==p(s,"u");r.lastIndex=0;for(var f,m=[],E=0;null!==(f=g(r,i));){var v=c(f[0]);m[E]=v,""===v&&(r.lastIndex=d(i,u(r.lastIndex),l)),E++}return 0===E?null:m}]}))},68156:function(e,t,n){"use strict";var r=n(46518),i=n(60533).start;r({target:"String",proto:!0,forced:n(83063)},{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},25440:function(e,t,n){"use strict";var r=n(18745),i=n(69565),a=n(79504),o=n(89228),s=n(79039),u=n(28551),c=n(94901),l=n(20034),f=n(91291),d=n(18014),h=n(655),g=n(67750),p=n(57829),m=n(55966),E=n(2478),v=n(61034),A=n(56682),y=n(78227)("replace"),T=Math.max,_=Math.min,S=a([].concat),I=a([].push),b=a("".indexOf),R=a("".slice),N="$0"==="a".replace(/./,"$0"),C=!!/./[y]&&""===/./[y]("a","$0");o("replace",(function(e,t,n){var a=C?"$":"$0";return[function(e,n){var r=g(this),a=l(e)?m(e,y):void 0;return a?i(a,e,r,n):i(t,h(r),e,n)},function(e,i){var o=u(this),s=h(e);if("string"==typeof i&&-1===b(i,a)&&-1===b(i,"$<")){var l=n(t,o,s,i);if(l.done)return l.value}var g=c(i);g||(i=h(i));var m,y=h(v(o)),N=-1!==b(y,"g");N&&(m=-1!==b(y,"u"),o.lastIndex=0);for(var C,w=[];null!==(C=A(o,s))&&(I(w,C),N);)""===h(C[0])&&(o.lastIndex=p(s,d(o.lastIndex),m));for(var D,O="",M=0,P=0;P<w.length;P++){for(var L,x=h((C=w[P])[0]),F=T(_(f(C.index),s.length),0),U=[],k=1;k<C.length;k++)I(U,void 0===(D=C[k])?D:String(D));var B=C.groups;if(g){var G=S([x],U,F,s);void 0!==B&&I(G,B),L=h(r(i,void 0,G))}else L=E(x,s,F,U,B,i);F>=M&&(O+=R(s,M,F)+L,M=F+x.length)}return O+R(s,M)}]}),!!s((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!N||C)},5746:function(e,t,n){"use strict";var r=n(69565),i=n(89228),a=n(28551),o=n(20034),s=n(67750),u=n(3470),c=n(655),l=n(55966),f=n(56682);i("search",(function(e,t,n){return[function(t){var n=s(this),i=o(t)?l(t,e):void 0;return i?r(i,t,n):new RegExp(t)[e](c(n))},function(e){var r=a(this),i=c(e),o=n(t,r,i);if(o.done)return o.value;var s=r.lastIndex;u(s,0)||(r.lastIndex=0);var l=f(r,i);return u(r.lastIndex,s)||(r.lastIndex=s),null===l?-1:l.index}]}))},90744:function(e,t,n){"use strict";var r=n(69565),i=n(79504),a=n(89228),o=n(28551),s=n(20034),u=n(67750),c=n(2293),l=n(57829),f=n(18014),d=n(655),h=n(55966),g=n(56682),p=n(58429),m=n(79039),E=p.UNSUPPORTED_Y,v=Math.min,A=i([].push),y=i("".slice),T=!m((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),_="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;a("split",(function(e,t,n){var i="0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:r(t,this,e,n)}:t;return[function(t,n){var a=u(this),o=s(t)?h(t,e):void 0;return o?r(o,t,a,n):r(i,d(a),t,n)},function(e,r){var a=o(this),s=d(e);if(!_){var u=n(i,a,s,r,i!==t);if(u.done)return u.value}var h=c(a,RegExp),p=a.unicode,m=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(E?"g":"y"),T=new h(E?"^(?:"+a.source+")":a,m),S=void 0===r?4294967295:r>>>0;if(0===S)return[];if(0===s.length)return null===g(T,s)?[s]:[];for(var I=0,b=0,R=[];b<s.length;){T.lastIndex=E?0:b;var N,C=g(T,E?y(s,b):s);if(null===C||(N=v(f(T.lastIndex+(E?b:0)),s.length))===I)b=l(s,b,p);else{if(A(R,y(s,I,b)),R.length===S)return R;for(var w=1;w<=C.length-1;w++)if(A(R,C[w]),R.length===S)return R;b=I=N}}return A(R,y(s,I)),R}]}),_||!T,E)},11392:function(e,t,n){"use strict";var r,i=n(46518),a=n(27476),o=n(77347).f,s=n(18014),u=n(655),c=n(60511),l=n(67750),f=n(41436),d=n(96395),h=a("".slice),g=Math.min,p=f("startsWith");i({target:"String",proto:!0,forced:!(!d&&!p&&(r=o(String.prototype,"startsWith"),r&&!r.writable)||p)},{startsWith:function(e){var t=u(l(this));c(e);var n=s(g(arguments.length>1?arguments[1]:void 0,t.length)),r=u(e);return h(t,n,n+r.length)===r}})},42762:function(e,t,n){"use strict";var r=n(46518),i=n(43802).trim;r({target:"String",proto:!0,forced:n(60706)("trim")},{trim:function(){return i(this)}})},66412:function(e,t,n){"use strict";n(70511)("asyncIterator")},6761:function(e,t,n){"use strict";var r=n(46518),i=n(44576),a=n(69565),o=n(79504),s=n(96395),u=n(43724),c=n(4495),l=n(79039),f=n(39297),d=n(1625),h=n(28551),g=n(25397),p=n(56969),m=n(655),E=n(6980),v=n(2360),A=n(71072),y=n(38480),T=n(10298),_=n(33717),S=n(77347),I=n(24913),b=n(96801),R=n(48773),N=n(36840),C=n(62106),w=n(25745),D=n(66119),O=n(30421),M=n(33392),P=n(78227),L=n(1951),x=n(70511),F=n(58242),U=n(10687),k=n(91181),B=n(59213).forEach,G=D("hidden"),H="Symbol",Y="prototype",V=k.set,q=k.getterFor(H),K=Object[Y],j=i.Symbol,z=j&&j[Y],W=i.RangeError,Q=i.TypeError,X=i.QObject,$=S.f,Z=I.f,J=T.f,ee=R.f,te=o([].push),ne=w("symbols"),re=w("op-symbols"),ie=w("wks"),ae=!X||!X[Y]||!X[Y].findChild,oe=function(e,t,n){var r=$(K,t);r&&delete K[t],Z(e,t,n),r&&e!==K&&Z(K,t,r)},se=u&&l((function(){return 7!==v(Z({},"a",{get:function(){return Z(this,"a",{value:7}).a}})).a}))?oe:Z,ue=function(e,t){var n=ne[e]=v(z);return V(n,{type:H,tag:e,description:t}),u||(n.description=t),n},ce=function(e,t,n){e===K&&ce(re,t,n),h(e);var r=p(t);return h(n),f(ne,r)?(n.enumerable?(f(e,G)&&e[G][r]&&(e[G][r]=!1),n=v(n,{enumerable:E(0,!1)})):(f(e,G)||Z(e,G,E(1,v(null))),e[G][r]=!0),se(e,r,n)):Z(e,r,n)},le=function(e,t){h(e);var n=g(t),r=A(n).concat(ge(n));return B(r,(function(t){u&&!a(fe,n,t)||ce(e,t,n[t])})),e},fe=function(e){var t=p(e),n=a(ee,this,t);return!(this===K&&f(ne,t)&&!f(re,t))&&(!(n||!f(this,t)||!f(ne,t)||f(this,G)&&this[G][t])||n)},de=function(e,t){var n=g(e),r=p(t);if(n!==K||!f(ne,r)||f(re,r)){var i=$(n,r);return!i||!f(ne,r)||f(n,G)&&n[G][r]||(i.enumerable=!0),i}},he=function(e){var t=J(g(e)),n=[];return B(t,(function(e){f(ne,e)||f(O,e)||te(n,e)})),n},ge=function(e){var t=e===K,n=J(t?re:g(e)),r=[];return B(n,(function(e){!f(ne,e)||t&&!f(K,e)||te(r,ne[e])})),r};c||(j=function(){if(d(z,this))throw new Q("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?m(arguments[0]):void 0,t=M(e),n=function(e){var r=void 0===this?i:this;r===K&&a(n,re,e),f(r,G)&&f(r[G],t)&&(r[G][t]=!1);var o=E(1,e);try{se(r,t,o)}catch(e){if(!(e instanceof W))throw e;oe(r,t,o)}};return u&&ae&&se(K,t,{configurable:!0,set:n}),ue(t,e)},N(z=j[Y],"toString",(function(){return q(this).tag})),N(j,"withoutSetter",(function(e){return ue(M(e),e)})),R.f=fe,I.f=ce,b.f=le,S.f=de,y.f=T.f=he,_.f=ge,L.f=function(e){return ue(P(e),e)},u&&(C(z,"description",{configurable:!0,get:function(){return q(this).description}}),s||N(K,"propertyIsEnumerable",fe,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:j}),B(A(ie),(function(e){x(e)})),r({target:H,stat:!0,forced:!c},{useSetter:function(){ae=!0},useSimple:function(){ae=!1}}),r({target:"Object",stat:!0,forced:!c,sham:!u},{create:function(e,t){return void 0===t?v(e):le(v(e),t)},defineProperty:ce,defineProperties:le,getOwnPropertyDescriptor:de}),r({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:he}),F(),U(j,H),O[G]=!0},89463:function(e,t,n){"use strict";var r=n(46518),i=n(43724),a=n(44576),o=n(79504),s=n(39297),u=n(94901),c=n(1625),l=n(655),f=n(62106),d=n(77740),h=a.Symbol,g=h&&h.prototype;if(i&&u(h)&&(!("description"in g)||void 0!==h().description)){var p={},m=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),t=c(g,this)?new h(e):void 0===e?h():h(e);return""===e&&(p[t]=!0),t};d(m,h),m.prototype=g,g.constructor=m;var E="Symbol(description detection)"===String(h("description detection")),v=o(g.valueOf),A=o(g.toString),y=/^Symbol\((.*)\)[^)]+$/,T=o("".replace),_=o("".slice);f(g,"description",{configurable:!0,get:function(){var e=v(this);if(s(p,e))return"";var t=A(e),n=E?_(t,7,-1):T(t,y,"$1");return""===n?void 0:n}}),r({global:!0,constructor:!0,forced:!0},{Symbol:m})}},81510:function(e,t,n){"use strict";var r=n(46518),i=n(97751),a=n(39297),o=n(655),s=n(25745),u=n(91296),c=s("string-to-symbol-registry"),l=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!u},{for:function(e){var t=o(e);if(a(c,t))return c[t];var n=i("Symbol")(t);return c[t]=n,l[n]=t,n}})},60193:function(e,t,n){"use strict";n(70511)("hasInstance")},2259:function(e,t,n){"use strict";n(70511)("iterator")},52675:function(e,t,n){"use strict";n(6761),n(81510),n(97812),n(33110),n(49773)},97812:function(e,t,n){"use strict";var r=n(46518),i=n(39297),a=n(10757),o=n(16823),s=n(25745),u=n(91296),c=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!u},{keyFor:function(e){if(!a(e))throw new TypeError(o(e)+" is not a symbol");if(i(c,e))return c[e]}})},45700:function(e,t,n){"use strict";var r=n(70511),i=n(58242);r("toPrimitive"),i()},48140:function(e,t,n){"use strict";var r=n(94644),i=n(26198),a=n(91291),o=r.aTypedArray;(0,r.exportTypedArrayMethod)("at",(function(e){var t=o(this),n=i(t),r=a(e),s=r>=0?r:n+r;return s<0||s>=n?void 0:t[s]}))},81630:function(e,t,n){"use strict";var r=n(79504),i=n(94644),a=r(n(57029)),o=i.aTypedArray;(0,i.exportTypedArrayMethod)("copyWithin",(function(e,t){return a(o(this),e,t,arguments.length>2?arguments[2]:void 0)}))},72170:function(e,t,n){"use strict";var r=n(94644),i=n(59213).every,a=r.aTypedArray;(0,r.exportTypedArrayMethod)("every",(function(e){return i(a(this),e,arguments.length>1?arguments[1]:void 0)}))},75044:function(e,t,n){"use strict";var r=n(94644),i=n(84373),a=n(75854),o=n(36955),s=n(69565),u=n(79504),c=n(79039),l=r.aTypedArray,f=r.exportTypedArrayMethod,d=u("".slice);f("fill",(function(e){var t=arguments.length;l(this);var n="Big"===d(o(this),0,3)?a(e):+e;return s(i,this,n,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),c((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})))},69539:function(e,t,n){"use strict";var r=n(94644),i=n(59213).filter,a=n(29948),o=r.aTypedArray;(0,r.exportTypedArrayMethod)("filter",(function(e){var t=i(o(this),e,arguments.length>1?arguments[1]:void 0);return a(this,t)}))},89955:function(e,t,n){"use strict";var r=n(94644),i=n(59213).findIndex,a=r.aTypedArray;(0,r.exportTypedArrayMethod)("findIndex",(function(e){return i(a(this),e,arguments.length>1?arguments[1]:void 0)}))},91134:function(e,t,n){"use strict";var r=n(94644),i=n(43839).findLastIndex,a=r.aTypedArray;(0,r.exportTypedArrayMethod)("findLastIndex",(function(e){return i(a(this),e,arguments.length>1?arguments[1]:void 0)}))},21903:function(e,t,n){"use strict";var r=n(94644),i=n(43839).findLast,a=r.aTypedArray;(0,r.exportTypedArrayMethod)("findLast",(function(e){return i(a(this),e,arguments.length>1?arguments[1]:void 0)}))},31694:function(e,t,n){"use strict";var r=n(94644),i=n(59213).find,a=r.aTypedArray;(0,r.exportTypedArrayMethod)("find",(function(e){return i(a(this),e,arguments.length>1?arguments[1]:void 0)}))},33206:function(e,t,n){"use strict";var r=n(94644),i=n(59213).forEach,a=r.aTypedArray;(0,r.exportTypedArrayMethod)("forEach",(function(e){i(a(this),e,arguments.length>1?arguments[1]:void 0)}))},44496:function(e,t,n){"use strict";var r=n(94644),i=n(19617).includes,a=r.aTypedArray;(0,r.exportTypedArrayMethod)("includes",(function(e){return i(a(this),e,arguments.length>1?arguments[1]:void 0)}))},66651:function(e,t,n){"use strict";var r=n(94644),i=n(19617).indexOf,a=r.aTypedArray;(0,r.exportTypedArrayMethod)("indexOf",(function(e){return i(a(this),e,arguments.length>1?arguments[1]:void 0)}))},12887:function(e,t,n){"use strict";var r=n(44576),i=n(79039),a=n(79504),o=n(94644),s=n(23792),u=n(78227)("iterator"),c=r.Uint8Array,l=a(s.values),f=a(s.keys),d=a(s.entries),h=o.aTypedArray,g=o.exportTypedArrayMethod,p=c&&c.prototype,m=!i((function(){p[u].call([1])})),E=!!p&&p.values&&p[u]===p.values&&"values"===p.values.name,v=function(){return l(h(this))};g("entries",(function(){return d(h(this))}),m),g("keys",(function(){return f(h(this))}),m),g("values",v,m||!E,{name:"values"}),g(u,v,m||!E,{name:"values"})},19369:function(e,t,n){"use strict";var r=n(94644),i=n(79504),a=r.aTypedArray,o=r.exportTypedArrayMethod,s=i([].join);o("join",(function(e){return s(a(this),e)}))},66812:function(e,t,n){"use strict";var r=n(94644),i=n(18745),a=n(8379),o=r.aTypedArray;(0,r.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return i(a,o(this),t>1?[e,arguments[1]]:[e])}))},8995:function(e,t,n){"use strict";var r=n(94644),i=n(59213).map,a=r.aTypedArray,o=r.getTypedArrayConstructor;(0,r.exportTypedArrayMethod)("map",(function(e){return i(a(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(o(e))(t)}))}))},36072:function(e,t,n){"use strict";var r=n(94644),i=n(80926).right,a=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return i(a(this),e,t,t>1?arguments[1]:void 0)}))},31575:function(e,t,n){"use strict";var r=n(94644),i=n(80926).left,a=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return i(a(this),e,t,t>1?arguments[1]:void 0)}))},88747:function(e,t,n){"use strict";var r=n(94644),i=r.aTypedArray,a=r.exportTypedArrayMethod,o=Math.floor;a("reverse",(function(){for(var e,t=this,n=i(t).length,r=o(n/2),a=0;a<r;)e=t[a],t[a++]=t[--n],t[n]=e;return t}))},28845:function(e,t,n){"use strict";var r=n(44576),i=n(69565),a=n(94644),o=n(26198),s=n(58229),u=n(48981),c=n(79039),l=r.RangeError,f=r.Int8Array,d=f&&f.prototype,h=d&&d.set,g=a.aTypedArray,p=a.exportTypedArrayMethod,m=!c((function(){var e=new Uint8ClampedArray(2);return i(h,e,{length:1,0:3},1),3!==e[1]})),E=m&&a.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var e=new f(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));p("set",(function(e){g(this);var t=s(arguments.length>1?arguments[1]:void 0,1),n=u(e);if(m)return i(h,this,n,t);var r=this.length,a=o(n),c=0;if(a+t>r)throw new l("Wrong length");for(;c<a;)this[t+c]=n[c++]}),!m||E)},29423:function(e,t,n){"use strict";var r=n(94644),i=n(79039),a=n(67680),o=r.aTypedArray,s=r.getTypedArrayConstructor;(0,r.exportTypedArrayMethod)("slice",(function(e,t){for(var n=a(o(this),e,t),r=s(this),i=0,u=n.length,c=new r(u);u>i;)c[i]=n[i++];return c}),i((function(){new Int8Array(1).slice()})))},57301:function(e,t,n){"use strict";var r=n(94644),i=n(59213).some,a=r.aTypedArray;(0,r.exportTypedArrayMethod)("some",(function(e){return i(a(this),e,arguments.length>1?arguments[1]:void 0)}))},373:function(e,t,n){"use strict";var r=n(44576),i=n(27476),a=n(79039),o=n(79306),s=n(74488),u=n(94644),c=n(13709),l=n(13763),f=n(39519),d=n(3607),h=u.aTypedArray,g=u.exportTypedArrayMethod,p=r.Uint16Array,m=p&&i(p.prototype.sort),E=!(!m||a((function(){m(new p(2),null)}))&&a((function(){m(new p(2),{})}))),v=!!m&&!a((function(){if(f)return f<74;if(c)return c<67;if(l)return!0;if(d)return d<602;var e,t,n=new p(516),r=Array(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,r[e]=e-2*t+3;for(m(n,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(n[e]!==r[e])return!0}));g("sort",(function(e){return void 0!==e&&o(e),v?m(this,e):s(h(this),function(e){return function(t,n){return void 0!==e?+e(t,n)||0:n!=n?-1:t!=t?1:0===t&&0===n?1/t>0&&1/n<0?1:-1:t>n}}(e))}),!v||E)},86614:function(e,t,n){"use strict";var r=n(94644),i=n(18014),a=n(35610),o=r.aTypedArray,s=r.getTypedArrayConstructor;(0,r.exportTypedArrayMethod)("subarray",(function(e,t){var n=o(this),r=n.length,u=a(e,r);return new(s(n))(n.buffer,n.byteOffset+u*n.BYTES_PER_ELEMENT,i((void 0===t?r:a(t,r))-u))}))},41405:function(e,t,n){"use strict";var r=n(44576),i=n(18745),a=n(94644),o=n(79039),s=n(67680),u=r.Int8Array,c=a.aTypedArray,l=a.exportTypedArrayMethod,f=[].toLocaleString,d=!!u&&o((function(){f.call(new u(1))}));l("toLocaleString",(function(){return i(f,d?s(c(this)):c(this),s(arguments))}),o((function(){return[1,2].toLocaleString()!==new u([1,2]).toLocaleString()}))||!o((function(){u.prototype.toLocaleString.call([1,2])})))},37467:function(e,t,n){"use strict";var r=n(37628),i=n(94644),a=i.aTypedArray,o=i.exportTypedArrayMethod,s=i.getTypedArrayConstructor;o("toReversed",(function(){return r(a(this),s(this))}))},44732:function(e,t,n){"use strict";var r=n(94644),i=n(79504),a=n(79306),o=n(35370),s=r.aTypedArray,u=r.getTypedArrayConstructor,c=r.exportTypedArrayMethod,l=i(r.TypedArrayPrototype.sort);c("toSorted",(function(e){void 0!==e&&a(e);var t=s(this),n=o(u(t),t);return l(n,e)}))},33684:function(e,t,n){"use strict";var r=n(94644).exportTypedArrayMethod,i=n(79039),a=n(44576),o=n(79504),s=a.Uint8Array,u=s&&s.prototype||{},c=[].toString,l=o([].join);i((function(){c.call({})}))&&(c=function(){return l(this)});var f=u.toString!==c;r("toString",c,f)},3690:function(e,t,n){"use strict";n(15823)("Uint16",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},61740:function(e,t,n){"use strict";n(15823)("Uint32",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},21489:function(e,t,n){"use strict";n(15823)("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},79577:function(e,t,n){"use strict";var r=n(39928),i=n(94644),a=n(18727),o=n(91291),s=n(75854),u=i.aTypedArray,c=i.getTypedArrayConstructor,l=i.exportTypedArrayMethod,f=function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(e){return 8===e}}(),d=f&&function(){try{new Int8Array(1).with(-.5,1)}catch(e){return!0}}();l("with",{with:function(e,t){var n=u(this),i=o(e),l=a(n)?s(t):+t;return r(n,c(n),i,l)}}.with,!f||d)},16632:function(e,t,n){"use strict";var r=n(46518),i=n(44576),a=n(59143),o=n(34154),s=i.Uint8Array,u=!s||!s.prototype.setFromBase64||!function(){var e=new s([255,255,255,255,255]);try{return void e.setFromBase64("",null)}catch(e){}try{return void e.setFromBase64("a")}catch(e){}try{e.setFromBase64("MjYyZg===")}catch(t){return 50===e[0]&&54===e[1]&&50===e[2]&&255===e[3]&&255===e[4]}}();s&&r({target:"Uint8Array",proto:!0,forced:u},{setFromBase64:function(e){o(this);var t=a(e,arguments.length>1?arguments[1]:void 0,this,this.length);return{read:t.read,written:t.written}}})},34226:function(e,t,n){"use strict";var r=n(46518),i=n(44576),a=n(63463),o=n(34154),s=n(55169),u=n(42303);i.Uint8Array&&r({target:"Uint8Array",proto:!0},{setFromHex:function(e){o(this),a(e),s(this.buffer);var t=u(e,this).read;return{read:t,written:t/2}}})},9486:function(e,t,n){"use strict";var r=n(46518),i=n(44576),a=n(79504),o=n(83972),s=n(34154),u=n(55169),c=n(92804),l=n(944),f=c.i2c,d=c.i2cUrl,h=a("".charAt),g=i.Uint8Array,p=!g||!g.prototype.toBase64||!function(){try{(new g).toBase64(null)}catch(e){return!0}}();g&&r({target:"Uint8Array",proto:!0,forced:p},{toBase64:function(){var e=s(this),t=arguments.length?o(arguments[0]):void 0,n="base64"===l(t)?f:d,r=!!t&&!!t.omitPadding;u(this.buffer);for(var i,a="",c=0,g=e.length,p=function(e){return h(n,i>>6*e&63)};c+2<g;c+=3)i=(e[c]<<16)+(e[c+1]<<8)+e[c+2],a+=p(3)+p(2)+p(1)+p(0);return c+2===g?(i=(e[c]<<16)+(e[c+1]<<8),a+=p(3)+p(2)+p(1)+(r?"":"=")):c+1===g&&(i=e[c]<<16,a+=p(3)+p(2)+(r?"":"==")),a}})},20456:function(e,t,n){"use strict";var r=n(46518),i=n(44576),a=n(79504),o=n(34154),s=n(55169),u=a(1.1.toString),c=i.Uint8Array,l=!c||!c.prototype.toHex||!function(){try{return"ffffffffffffffff"===new c([255,255,255,255,255,255,255,255]).toHex()}catch(e){return!1}}();c&&r({target:"Uint8Array",proto:!0,forced:l},{toHex:function(){o(this),s(this.buffer);for(var e="",t=0,n=this.length;t<n;t++){var r=u(this[t],16);e+=1===r.length?"0"+r:r}return e}})},58335:function(e,t,n){"use strict";n(69112)},41549:function(e,t,n){"use strict";n(16632)},49797:function(e,t,n){"use strict";n(34226)},49631:function(e,t,n){"use strict";n(9486)},35623:function(e,t,n){"use strict";n(20456)},2945:function(e,t,n){"use strict";var r=n(46518),i=n(44576),a=n(97751),o=n(79504),s=n(69565),u=n(79039),c=n(655),l=n(22812),f=n(92804).c2i,d=/[^\d+/a-z]/i,h=/[\t\n\f\r ]+/g,g=/[=]{1,2}$/,p=a("atob"),m=String.fromCharCode,E=o("".charAt),v=o("".replace),A=o(d.exec),y=!!p&&!u((function(){return"hi"!==p("aGk=")})),T=y&&u((function(){return""!==p(" ")})),_=y&&!u((function(){p("a")})),S=y&&!u((function(){p()})),I=y&&1!==p.length;r({global:!0,bind:!0,enumerable:!0,forced:!y||T||_||S||I},{atob:function(e){if(l(arguments.length,1),y&&!T&&!_)return s(p,i,e);var t,n,r,o=v(c(e),h,""),u="",S=0,I=0;if(o.length%4==0&&(o=v(o,g,"")),(t=o.length)%4==1||A(d,o))throw new(a("DOMException"))("The string is not correctly encoded","InvalidCharacterError");for(;S<t;)n=E(o,S++),r=I%4?64*r+f[n]:f[n],I++%4&&(u+=m(255&r>>(-2*I&6)));return u}})},42207:function(e,t,n){"use strict";var r=n(46518),i=n(44576),a=n(97751),o=n(79504),s=n(69565),u=n(79039),c=n(655),l=n(22812),f=n(92804).i2c,d=a("btoa"),h=o("".charAt),g=o("".charCodeAt),p=!!d&&!u((function(){return"aGk="!==d("hi")})),m=p&&!u((function(){d()})),E=p&&u((function(){return"bnVsbA=="!==d(null)})),v=p&&1!==d.length;r({global:!0,bind:!0,enumerable:!0,forced:!p||m||E||v},{btoa:function(e){if(l(arguments.length,1),p)return s(d,i,c(e));for(var t,n,r=c(e),o="",u=0,m=f;h(r,u)||(m="=",u%1);){if((n=g(r,u+=3/4))>255)throw new(a("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");o+=h(m,63&(t=t<<8|n)>>8-u%1*8)}return o}})},23500:function(e,t,n){"use strict";var r=n(44576),i=n(67400),a=n(79296),o=n(90235),s=n(66699),u=function(e){if(e&&e.forEach!==o)try{s(e,"forEach",o)}catch(t){e.forEach=o}};for(var c in i)i[c]&&u(r[c]&&r[c].prototype);u(a)},62953:function(e,t,n){"use strict";var r=n(44576),i=n(67400),a=n(79296),o=n(23792),s=n(66699),u=n(10687),c=n(78227)("iterator"),l=o.values,f=function(e,t){if(e){if(e[c]!==l)try{s(e,c,l)}catch(t){e[c]=l}if(u(e,t,!0),i[t])for(var n in o)if(e[n]!==o[n])try{s(e,n,o[n])}catch(t){e[n]=o[n]}}};for(var d in i)f(r[d]&&r[d].prototype,d);f(a,"DOMTokenList")},55815:function(e,t,n){"use strict";var r=n(46518),i=n(97751),a=n(89429),o=n(79039),s=n(2360),u=n(6980),c=n(24913).f,l=n(36840),f=n(62106),d=n(39297),h=n(90679),g=n(28551),p=n(77536),m=n(32603),E=n(55002),v=n(16193),A=n(91181),y=n(43724),T=n(96395),_="DOMException",S="DATA_CLONE_ERR",I=i("Error"),b=i(_)||function(){try{(new(i("MessageChannel")||a("worker_threads").MessageChannel)).port1.postMessage(new WeakMap)}catch(e){if(e.name===S&&25===e.code)return e.constructor}}(),R=b&&b.prototype,N=I.prototype,C=A.set,w=A.getterFor(_),D="stack"in new I(_),O=function(e){return d(E,e)&&E[e].m?E[e].c:0},M=function(){h(this,P);var e=arguments.length,t=m(e<1?void 0:arguments[0]),n=m(e<2?void 0:arguments[1],"Error"),r=O(n);if(C(this,{type:_,name:n,message:t,code:r}),y||(this.name=n,this.message=t,this.code=r),D){var i=new I(t);i.name=_,c(this,"stack",u(1,v(i.stack,1)))}},P=M.prototype=s(N),L=function(e){return{enumerable:!0,configurable:!0,get:e}},x=function(e){return L((function(){return w(this)[e]}))};y&&(f(P,"code",x("code")),f(P,"message",x("message")),f(P,"name",x("name"))),c(P,"constructor",u(1,M));var F=o((function(){return!(new b instanceof I)})),U=F||o((function(){return N.toString!==p||"2: 1"!==String(new b(1,2))})),k=F||o((function(){return 25!==new b(1,"DataCloneError").code})),B=F||25!==b[S]||25!==R[S],G=T?U||k||B:F;r({global:!0,constructor:!0,forced:G},{DOMException:G?M:b});var H=i(_),Y=H.prototype;for(var V in U&&(T||b===H)&&l(Y,"toString",p),k&&y&&b===H&&f(Y,"code",L((function(){return O(g(this).name)}))),E)if(d(E,V)){var q=E[V],K=q.s,j=u(6,q.c);d(H,K)||c(H,K,j),d(Y,K)||c(Y,K,j)}},64979:function(e,t,n){"use strict";var r=n(46518),i=n(44576),a=n(97751),o=n(6980),s=n(24913).f,u=n(39297),c=n(90679),l=n(23167),f=n(32603),d=n(55002),h=n(16193),g=n(43724),p=n(96395),m="DOMException",E=a("Error"),v=a(m),A=function(){c(this,y);var e=arguments.length,t=f(e<1?void 0:arguments[0]),n=f(e<2?void 0:arguments[1],"Error"),r=new v(t,n),i=new E(t);return i.name=m,s(r,"stack",o(1,h(i.stack,1))),l(r,this,A),r},y=A.prototype=v.prototype,T="stack"in new E(m),_="stack"in new v(1,2),S=v&&g&&Object.getOwnPropertyDescriptor(i,m),I=!(!S||S.writable&&S.configurable),b=T&&!I&&!_;r({global:!0,constructor:!0,forced:p||b},{DOMException:b?A:v});var R=a(m),N=R.prototype;if(N.constructor!==R)for(var C in p||s(N,"constructor",o(1,R)),d)if(u(d,C)){var w=d[C],D=w.s;u(R,D)||s(R,D,o(6,w.c))}},79739:function(e,t,n){"use strict";var r=n(97751),i="DOMException";n(10687)(r(i),i)},13611:function(e,t,n){"use strict";var r=n(46518),i=n(44576),a=n(62106),o=n(43724),s=TypeError,u=Object.defineProperty,c=i.self!==i;try{if(o){var l=Object.getOwnPropertyDescriptor(i,"self");!c&&l&&l.get&&l.enumerable||a(i,"self",{get:function(){return i},set:function(e){if(this!==i)throw new s("Illegal invocation");u(i,"self",{value:e,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else r({global:!0,simple:!0,forced:c},{self:i})}catch(e){}},98406:function(e,t,n){"use strict";n(23792),n(27337);var r=n(46518),i=n(44576),a=n(93389),o=n(97751),s=n(69565),u=n(79504),c=n(43724),l=n(67416),f=n(36840),d=n(62106),h=n(56279),g=n(10687),p=n(33994),m=n(91181),E=n(90679),v=n(94901),A=n(39297),y=n(76080),T=n(36955),_=n(28551),S=n(20034),I=n(655),b=n(2360),R=n(6980),N=n(70081),C=n(50851),w=n(62529),D=n(22812),O=n(78227),M=n(74488),P=O("iterator"),L="URLSearchParams",x=L+"Iterator",F=m.set,U=m.getterFor(L),k=m.getterFor(x),B=a("fetch"),G=a("Request"),H=a("Headers"),Y=G&&G.prototype,V=H&&H.prototype,q=i.TypeError,K=i.encodeURIComponent,j=String.fromCharCode,z=o("String","fromCodePoint"),W=parseInt,Q=u("".charAt),X=u([].join),$=u([].push),Z=u("".replace),J=u([].shift),ee=u([].splice),te=u("".split),ne=u("".slice),re=u(/./.exec),ie=/\+/g,ae=/^[0-9a-f]+$/i,oe=function(e,t){var n=ne(e,t,t+2);return re(ae,n)?W(n,16):NaN},se=function(e){for(var t=0,n=128;n>0&&e&n;n>>=1)t++;return t},ue=function(e){var t=null;switch(e.length){case 1:t=e[0];break;case 2:t=(31&e[0])<<6|63&e[1];break;case 3:t=(15&e[0])<<12|(63&e[1])<<6|63&e[2];break;case 4:t=(7&e[0])<<18|(63&e[1])<<12|(63&e[2])<<6|63&e[3]}return t>1114111?null:t},ce=function(e){for(var t=(e=Z(e,ie," ")).length,n="",r=0;r<t;){var i=Q(e,r);if("%"===i){if("%"===Q(e,r+1)||r+3>t){n+="%",r++;continue}var a=oe(e,r+1);if(a!=a){n+=i,r++;continue}r+=2;var o=se(a);if(0===o)i=j(a);else{if(1===o||o>4){n+="�",r++;continue}for(var s=[a],u=1;u<o&&!(3+ ++r>t||"%"!==Q(e,r));){var c=oe(e,r+1);if(c!=c){r+=3;break}if(c>191||c<128)break;$(s,c),r+=2,u++}if(s.length!==o){n+="�";continue}var l=ue(s);null===l?n+="�":i=z(l)}}n+=i,r++}return n},le=/[!'()~]|%20/g,fe={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},de=function(e){return fe[e]},he=function(e){return Z(K(e),le,de)},ge=p((function(e,t){F(this,{type:x,target:U(e).entries,index:0,kind:t})}),L,(function(){var e=k(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,w(void 0,!0);var r=t[n];switch(e.kind){case"keys":return w(r.key,!1);case"values":return w(r.value,!1)}return w([r.key,r.value],!1)}),!0),pe=function(e){this.entries=[],this.url=null,void 0!==e&&(S(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Q(e,0)?ne(e,1):e:I(e)))};pe.prototype={type:L,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,a,o,u,c=this.entries,l=C(e);if(l)for(n=(t=N(e,l)).next;!(r=s(n,t)).done;){if(a=(i=N(_(r.value))).next,(o=s(a,i)).done||(u=s(a,i)).done||!s(a,i).done)throw new q("Expected sequence with length 2");$(c,{key:I(o.value),value:I(u.value)})}else for(var f in e)A(e,f)&&$(c,{key:f,value:I(e[f])})},parseQuery:function(e){if(e)for(var t,n,r=this.entries,i=te(e,"&"),a=0;a<i.length;)(t=i[a++]).length&&(n=te(t,"="),$(r,{key:ce(J(n)),value:ce(X(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],$(n,he(e.key)+"="+he(e.value));return X(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var me=function(){E(this,Ee);var e=F(this,new pe(arguments.length>0?arguments[0]:void 0));c||(this.size=e.entries.length)},Ee=me.prototype;if(h(Ee,{append:function(e,t){var n=U(this);D(arguments.length,2),$(n.entries,{key:I(e),value:I(t)}),c||this.size++,n.updateURL()},delete:function(e){for(var t=U(this),n=D(arguments.length,1),r=t.entries,i=I(e),a=n<2?void 0:arguments[1],o=void 0===a?a:I(a),s=0;s<r.length;){var u=r[s];if(u.key!==i||void 0!==o&&u.value!==o)s++;else if(ee(r,s,1),void 0!==o)break}c||(this.size=r.length),t.updateURL()},get:function(e){var t=U(this).entries;D(arguments.length,1);for(var n=I(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){var t=U(this).entries;D(arguments.length,1);for(var n=I(e),r=[],i=0;i<t.length;i++)t[i].key===n&&$(r,t[i].value);return r},has:function(e){for(var t=U(this).entries,n=D(arguments.length,1),r=I(e),i=n<2?void 0:arguments[1],a=void 0===i?i:I(i),o=0;o<t.length;){var s=t[o++];if(s.key===r&&(void 0===a||s.value===a))return!0}return!1},set:function(e,t){var n=U(this);D(arguments.length,1);for(var r,i=n.entries,a=!1,o=I(e),s=I(t),u=0;u<i.length;u++)(r=i[u]).key===o&&(a?ee(i,u--,1):(a=!0,r.value=s));a||$(i,{key:o,value:s}),c||(this.size=i.length),n.updateURL()},sort:function(){var e=U(this);M(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=U(this).entries,r=y(e,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new ge(this,"keys")},values:function(){return new ge(this,"values")},entries:function(){return new ge(this,"entries")}},{enumerable:!0}),f(Ee,P,Ee.entries,{name:"entries"}),f(Ee,"toString",(function(){return U(this).serialize()}),{enumerable:!0}),c&&d(Ee,"size",{get:function(){return U(this).entries.length},configurable:!0,enumerable:!0}),g(me,L),r({global:!0,constructor:!0,forced:!l},{URLSearchParams:me}),!l&&v(H)){var ve=u(V.has),Ae=u(V.set),ye=function(e){if(S(e)){var t,n=e.body;if(T(n)===L)return t=e.headers?new H(e.headers):new H,ve(t,"content-type")||Ae(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),b(e,{body:R(0,I(n)),headers:R(0,t)})}return e};if(v(B)&&r({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return B(e,arguments.length>1?ye(arguments[1]):{})}}),v(G)){var Te=function(e){return E(this,Y),new G(e,arguments.length>1?ye(arguments[1]):{})};Y.constructor=Te,Te.prototype=Y,r({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Te})}}e.exports={URLSearchParams:me,getState:U}},14603:function(e,t,n){"use strict";var r=n(36840),i=n(79504),a=n(655),o=n(22812),s=URLSearchParams,u=s.prototype,c=i(u.append),l=i(u.delete),f=i(u.forEach),d=i([].push),h=new s("a=1&a=2&b=3");h.delete("a",1),h.delete("b",void 0),h+""!="a=2"&&r(u,"delete",(function(e){var t=arguments.length,n=t<2?void 0:arguments[1];if(t&&void 0===n)return l(this,e);var r=[];f(this,(function(e,t){d(r,{key:t,value:e})})),o(t,1);for(var i,s=a(e),u=a(n),h=0,g=0,p=!1,m=r.length;h<m;)i=r[h++],p||i.key===s?(p=!0,l(this,i.key)):g++;for(;g<m;)(i=r[g++]).key===s&&i.value===u||c(this,i.key,i.value)}),{enumerable:!0,unsafe:!0})},47566:function(e,t,n){"use strict";var r=n(36840),i=n(79504),a=n(655),o=n(22812),s=URLSearchParams,u=s.prototype,c=i(u.getAll),l=i(u.has),f=new s("a=1");!f.has("a",2)&&f.has("a",void 0)||r(u,"has",(function(e){var t=arguments.length,n=t<2?void 0:arguments[1];if(t&&void 0===n)return l(this,e);var r=c(this,e);o(t,1);for(var i=a(n),s=0;s<r.length;)if(r[s++]===i)return!0;return!1}),{enumerable:!0,unsafe:!0})},48408:function(e,t,n){"use strict";n(98406)},98721:function(e,t,n){"use strict";var r=n(43724),i=n(79504),a=n(62106),o=URLSearchParams.prototype,s=i(o.forEach);r&&!("size"in o)&&a(o,"size",{get:function(){var e=0;return s(this,(function(){e++})),e},configurable:!0,enumerable:!0})},45806:function(e,t,n){"use strict";n(47764);var r,i=n(46518),a=n(43724),o=n(67416),s=n(44576),u=n(76080),c=n(79504),l=n(36840),f=n(62106),d=n(90679),h=n(39297),g=n(44213),p=n(97916),m=n(67680),E=n(68183).codeAt,v=n(3717),A=n(655),y=n(10687),T=n(22812),_=n(98406),S=n(91181),I=S.set,b=S.getterFor("URL"),R=_.URLSearchParams,N=_.getState,C=s.URL,w=s.TypeError,D=s.parseInt,O=Math.floor,M=Math.pow,P=c("".charAt),L=c(/./.exec),x=c([].join),F=c(1.1.toString),U=c([].pop),k=c([].push),B=c("".replace),G=c([].shift),H=c("".split),Y=c("".slice),V=c("".toLowerCase),q=c([].unshift),K="Invalid scheme",j="Invalid host",z="Invalid port",W=/[a-z]/i,Q=/[\d+-.a-z]/i,X=/\d/,$=/^0x/i,Z=/^[0-7]+$/,J=/^\d+$/,ee=/^[\da-f]+$/i,te=/[\0\t\n\r #%/:<>?@[\\\]^|]/,ne=/[\0\t\n\r #/:<>?@[\\\]^|]/,re=/^[\u0000-\u0020]+/,ie=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,ae=/[\t\n\r]/g,oe=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)q(t,e%256),e=O(e/256);return x(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,a=0;a<8;a++)0!==e[a]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=a),++i);return i>n?r:t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=F(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},se={},ue=g({},se,{" ":1,'"':1,"<":1,">":1,"`":1}),ce=g({},ue,{"#":1,"?":1,"{":1,"}":1}),le=g({},ce,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),fe=function(e,t){var n=E(e,0);return n>32&&n<127&&!h(t,e)?e:encodeURIComponent(e)},de={ftp:21,file:null,http:80,https:443,ws:80,wss:443},he=function(e,t){var n;return 2===e.length&&L(W,P(e,0))&&(":"===(n=P(e,1))||!t&&"|"===n)},ge=function(e){var t;return e.length>1&&he(Y(e,0,2))&&(2===e.length||"/"===(t=P(e,2))||"\\"===t||"?"===t||"#"===t)},pe=function(e){return"."===e||"%2e"===V(e)},me={},Ee={},ve={},Ae={},ye={},Te={},_e={},Se={},Ie={},be={},Re={},Ne={},Ce={},we={},De={},Oe={},Me={},Pe={},Le={},xe={},Fe={},Ue=function(e,t,n){var r,i,a,o=A(e);if(t){if(i=this.parse(o))throw new w(i);this.searchParams=null}else{if(void 0!==n&&(r=new Ue(n,!0)),i=this.parse(o,null,r))throw new w(i);(a=N(new R)).bindURL(this),this.searchParams=a}};Ue.prototype={type:"URL",parse:function(e,t,n){var i,a,o,s,u,c=this,l=t||me,f=0,d="",g=!1,E=!1,v=!1;for(e=A(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=B(e,re,""),e=B(e,ie,"$1")),e=B(e,ae,""),i=p(e);f<=i.length;){switch(a=i[f],l){case me:if(!a||!L(W,a)){if(t)return K;l=ve;continue}d+=V(a),l=Ee;break;case Ee:if(a&&(L(Q,a)||"+"===a||"-"===a||"."===a))d+=V(a);else{if(":"!==a){if(t)return K;d="",l=ve,f=0;continue}if(t&&(c.isSpecial()!==h(de,d)||"file"===d&&(c.includesCredentials()||null!==c.port)||"file"===c.scheme&&!c.host))return;if(c.scheme=d,t)return void(c.isSpecial()&&de[c.scheme]===c.port&&(c.port=null));d="","file"===c.scheme?l=we:c.isSpecial()&&n&&n.scheme===c.scheme?l=Ae:c.isSpecial()?l=Se:"/"===i[f+1]?(l=ye,f++):(c.cannotBeABaseURL=!0,k(c.path,""),l=Le)}break;case ve:if(!n||n.cannotBeABaseURL&&"#"!==a)return K;if(n.cannotBeABaseURL&&"#"===a){c.scheme=n.scheme,c.path=m(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,l=Fe;break}l="file"===n.scheme?we:Te;continue;case Ae:if("/"!==a||"/"!==i[f+1]){l=Te;continue}l=Ie,f++;break;case ye:if("/"===a){l=be;break}l=Pe;continue;case Te:if(c.scheme=n.scheme,a===r)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=m(n.path),c.query=n.query;else if("/"===a||"\\"===a&&c.isSpecial())l=_e;else if("?"===a)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=m(n.path),c.query="",l=xe;else{if("#"!==a){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=m(n.path),c.path.length--,l=Pe;continue}c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=m(n.path),c.query=n.query,c.fragment="",l=Fe}break;case _e:if(!c.isSpecial()||"/"!==a&&"\\"!==a){if("/"!==a){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,l=Pe;continue}l=be}else l=Ie;break;case Se:if(l=Ie,"/"!==a||"/"!==P(d,f+1))continue;f++;break;case Ie:if("/"!==a&&"\\"!==a){l=be;continue}break;case be:if("@"===a){g&&(d="%40"+d),g=!0,o=p(d);for(var y=0;y<o.length;y++){var T=o[y];if(":"!==T||v){var _=fe(T,le);v?c.password+=_:c.username+=_}else v=!0}d=""}else if(a===r||"/"===a||"?"===a||"#"===a||"\\"===a&&c.isSpecial()){if(g&&""===d)return"Invalid authority";f-=p(d).length+1,d="",l=Re}else d+=a;break;case Re:case Ne:if(t&&"file"===c.scheme){l=Oe;continue}if(":"!==a||E){if(a===r||"/"===a||"?"===a||"#"===a||"\\"===a&&c.isSpecial()){if(c.isSpecial()&&""===d)return j;if(t&&""===d&&(c.includesCredentials()||null!==c.port))return;if(s=c.parseHost(d))return s;if(d="",l=Me,t)return;continue}"["===a?E=!0:"]"===a&&(E=!1),d+=a}else{if(""===d)return j;if(s=c.parseHost(d))return s;if(d="",l=Ce,t===Ne)return}break;case Ce:if(!L(X,a)){if(a===r||"/"===a||"?"===a||"#"===a||"\\"===a&&c.isSpecial()||t){if(""!==d){var S=D(d,10);if(S>65535)return z;c.port=c.isSpecial()&&S===de[c.scheme]?null:S,d=""}if(t)return;l=Me;continue}return z}d+=a;break;case we:if(c.scheme="file","/"===a||"\\"===a)l=De;else{if(!n||"file"!==n.scheme){l=Pe;continue}switch(a){case r:c.host=n.host,c.path=m(n.path),c.query=n.query;break;case"?":c.host=n.host,c.path=m(n.path),c.query="",l=xe;break;case"#":c.host=n.host,c.path=m(n.path),c.query=n.query,c.fragment="",l=Fe;break;default:ge(x(m(i,f),""))||(c.host=n.host,c.path=m(n.path),c.shortenPath()),l=Pe;continue}}break;case De:if("/"===a||"\\"===a){l=Oe;break}n&&"file"===n.scheme&&!ge(x(m(i,f),""))&&(he(n.path[0],!0)?k(c.path,n.path[0]):c.host=n.host),l=Pe;continue;case Oe:if(a===r||"/"===a||"\\"===a||"?"===a||"#"===a){if(!t&&he(d))l=Pe;else if(""===d){if(c.host="",t)return;l=Me}else{if(s=c.parseHost(d))return s;if("localhost"===c.host&&(c.host=""),t)return;d="",l=Me}continue}d+=a;break;case Me:if(c.isSpecial()){if(l=Pe,"/"!==a&&"\\"!==a)continue}else if(t||"?"!==a)if(t||"#"!==a){if(a!==r&&(l=Pe,"/"!==a))continue}else c.fragment="",l=Fe;else c.query="",l=xe;break;case Pe:if(a===r||"/"===a||"\\"===a&&c.isSpecial()||!t&&("?"===a||"#"===a)){if(".."===(u=V(u=d))||"%2e."===u||".%2e"===u||"%2e%2e"===u?(c.shortenPath(),"/"===a||"\\"===a&&c.isSpecial()||k(c.path,"")):pe(d)?"/"===a||"\\"===a&&c.isSpecial()||k(c.path,""):("file"===c.scheme&&!c.path.length&&he(d)&&(c.host&&(c.host=""),d=P(d,0)+":"),k(c.path,d)),d="","file"===c.scheme&&(a===r||"?"===a||"#"===a))for(;c.path.length>1&&""===c.path[0];)G(c.path);"?"===a?(c.query="",l=xe):"#"===a&&(c.fragment="",l=Fe)}else d+=fe(a,ce);break;case Le:"?"===a?(c.query="",l=xe):"#"===a?(c.fragment="",l=Fe):a!==r&&(c.path[0]+=fe(a,se));break;case xe:t||"#"!==a?a!==r&&("'"===a&&c.isSpecial()?c.query+="%27":c.query+="#"===a?"%23":fe(a,se)):(c.fragment="",l=Fe);break;case Fe:a!==r&&(c.fragment+=fe(a,ue))}f++}},parseHost:function(e){var t,n,r;if("["===P(e,0)){if("]"!==P(e,e.length-1))return j;if(t=function(e){var t,n,r,i,a,o,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,f=0,d=function(){return P(e,f)};if(":"===d()){if(":"!==P(e,1))return;f+=2,l=++c}for(;d();){if(8===c)return;if(":"!==d()){for(t=n=0;n<4&&L(ee,d());)t=16*t+D(d(),16),f++,n++;if("."===d()){if(0===n)return;if(f-=n,c>6)return;for(r=0;d();){if(i=null,r>0){if(!("."===d()&&r<4))return;f++}if(!L(X,d()))return;for(;L(X,d());){if(a=D(d(),10),null===i)i=a;else{if(0===i)return;i=10*i+a}if(i>255)return;f++}u[c]=256*u[c]+i,2!=++r&&4!==r||c++}if(4!==r)return;break}if(":"===d()){if(f++,!d())return}else if(d())return;u[c++]=t}else{if(null!==l)return;f++,l=++c}}if(null!==l)for(o=c-l,c=7;0!==c&&o>0;)s=u[c],u[c--]=u[l+o-1],u[l+--o]=s;else if(8!==c)return;return u}(Y(e,1,-1)),!t)return j;this.host=t}else if(this.isSpecial()){if(e=v(e),L(te,e))return j;if(t=function(e){var t,n,r,i,a,o,s,u=H(e,".");if(u.length&&""===u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(n=[],r=0;r<t;r++){if(""===(i=u[r]))return e;if(a=10,i.length>1&&"0"===P(i,0)&&(a=L($,i)?16:8,i=Y(i,8===a?1:2)),""===i)o=0;else{if(!L(10===a?J:8===a?Z:ee,i))return e;o=D(i,a)}k(n,o)}for(r=0;r<t;r++)if(o=n[r],r===t-1){if(o>=M(256,5-t))return null}else if(o>255)return null;for(s=U(n),r=0;r<n.length;r++)s+=n[r]*M(256,3-r);return s}(e),null===t)return j;this.host=t}else{if(L(ne,e))return j;for(t="",n=p(e),r=0;r<n.length;r++)t+=fe(n[r],se);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return h(de,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"===this.scheme&&1===t&&he(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,a=e.port,o=e.path,s=e.query,u=e.fragment,c=t+":";return null!==i?(c+="//",e.includesCredentials()&&(c+=n+(r?":"+r:"")+"@"),c+=oe(i),null!==a&&(c+=":"+a)):"file"===t&&(c+="//"),c+=e.cannotBeABaseURL?o[0]:o.length?"/"+x(o,"/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},setHref:function(e){var t=this.parse(e);if(t)throw new w(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"===e)try{return new ke(e.path[0]).origin}catch(e){return"null"}return"file"!==e&&this.isSpecial()?e+"://"+oe(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(A(e)+":",me)},getUsername:function(){return this.username},setUsername:function(e){var t=p(A(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=fe(t[n],le)}},getPassword:function(){return this.password},setPassword:function(e){var t=p(A(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=fe(t[n],le)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?oe(e):oe(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Re)},getHostname:function(){var e=this.host;return null===e?"":oe(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Ne)},getPort:function(){var e=this.port;return null===e?"":A(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""===(e=A(e))?this.port=null:this.parse(e,Ce))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+x(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Me))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""===(e=A(e))?this.query=null:("?"===P(e,0)&&(e=Y(e,1)),this.query="",this.parse(e,xe)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!==(e=A(e))?("#"===P(e,0)&&(e=Y(e,1)),this.fragment="",this.parse(e,Fe)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var ke=function(e){var t=d(this,Be),n=T(arguments.length,1)>1?arguments[1]:void 0,r=I(t,new Ue(e,!1,n));a||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},Be=ke.prototype,Ge=function(e,t){return{get:function(){return b(this)[e]()},set:t&&function(e){return b(this)[t](e)},configurable:!0,enumerable:!0}};if(a&&(f(Be,"href",Ge("serialize","setHref")),f(Be,"origin",Ge("getOrigin")),f(Be,"protocol",Ge("getProtocol","setProtocol")),f(Be,"username",Ge("getUsername","setUsername")),f(Be,"password",Ge("getPassword","setPassword")),f(Be,"host",Ge("getHost","setHost")),f(Be,"hostname",Ge("getHostname","setHostname")),f(Be,"port",Ge("getPort","setPort")),f(Be,"pathname",Ge("getPathname","setPathname")),f(Be,"search",Ge("getSearch","setSearch")),f(Be,"searchParams",Ge("getSearchParams")),f(Be,"hash",Ge("getHash","setHash"))),l(Be,"toJSON",(function(){return b(this).serialize()}),{enumerable:!0}),l(Be,"toString",(function(){return b(this).serialize()}),{enumerable:!0}),C){var He=C.createObjectURL,Ye=C.revokeObjectURL;He&&l(ke,"createObjectURL",u(He,C)),Ye&&l(ke,"revokeObjectURL",u(Ye,C))}y(ke,"URL"),i({global:!0,constructor:!0,forced:!o,sham:!a},{URL:ke})},3296:function(e,t,n){"use strict";n(45806)},27208:function(e,t,n){"use strict";var r=n(46518),i=n(69565);r({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return i(URL.prototype.toString,this)}})},82845:function(e){e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},79758:function(e,t,n){n(16280),e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},15020:function(e,t,n){n(16280),e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},99730:function(e,t,n){var r=n(38001);function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i)}}e.exports=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},85047:function(e,t,n){function r(t){return e.exports=r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,r(t)}n(40875),e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},19460:function(e,t,n){n(16280);var r=n(55235);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},88665:function(e,t,n){n(16280);var r=n(95429).default,i=n(79758);e.exports=function(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)},e.exports.__esModule=!0,e.exports.default=e.exports},75512:function(e,t,n){n(52675),n(89463),n(16280),n(40875),n(26099);var r=n(60719);function i(){var t,n,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.toStringTag||"@@toStringTag";function u(e,i,a,o){var s=i&&i.prototype instanceof l?i:l,u=Object.create(s.prototype);return r(u,"_invoke",function(e,r,i){var a,o,s,u=0,l=i||[],f=!1,d={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return a=e,o=0,s=t,d.n=n,c}};function h(e,r){for(o=e,s=r,n=0;!f&&u&&!i&&n<l.length;n++){var i,a=l[n],h=d.p,g=a[2];e>3?(i=g===r)&&(s=a[(o=a[4])?5:(o=3,3)],a[4]=a[5]=t):a[0]<=h&&((i=e<2&&h<a[1])?(o=0,d.v=r,d.n=a[1]):h<g&&(i=e<3||a[0]>r||r>g)&&(a[4]=e,a[5]=r,d.n=g,o=0))}if(i||e>1)return c;throw f=!0,r}return function(i,l,g){if(u>1)throw TypeError("Generator is already running");for(f&&1===l&&h(l,g),o=l,s=g;(n=o<2?t:s)||!f;){a||(o?o<3?(o>1&&(d.n=-1),h(o,s)):d.n=s:d.v=s);try{if(u=2,a){if(o||(i="next"),n=a[i]){if(!(n=n.call(a,s)))throw TypeError("iterator result is not an object");if(!n.done)return n;s=n.value,o<2&&(o=0)}else 1===o&&(n=a.return)&&n.call(a),o<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),o=1);a=t}else if((n=(f=d.n<0)?s:e.call(r,d))!==c)break}catch(e){a=t,o=1,s=e}finally{u=1}}return{value:n,done:f}}}(e,a,o),!0),u}var c={};function l(){}function f(){}function d(){}n=Object.getPrototypeOf;var h=[][o]?n(n([][o]())):(r(n={},o,(function(){return this})),n),g=d.prototype=l.prototype=Object.create(h);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,r(e,s,"GeneratorFunction")),e.prototype=Object.create(g),e}return f.prototype=d,r(g,"constructor",d),r(d,"constructor",f),f.displayName="GeneratorFunction",r(d,s,"GeneratorFunction"),r(g),r(g,s,"Generator"),r(g,o,(function(){return this})),r(g,"toString",(function(){return"[object Generator]"})),(e.exports=i=function(){return{w:u,m:p}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},46182:function(e,t,n){var r=n(82118);e.exports=function(e,t,n,i,a){var o=r(e,t,n,i,a);return o.next().then((function(e){return e.done?e.value:o.next()}))},e.exports.__esModule=!0,e.exports.default=e.exports},82118:function(e,t,n){n(26099),n(3362);var r=n(75512),i=n(12508);e.exports=function(e,t,n,a,o){return new i(r().w(e,t,n,a),o||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},12508:function(e,t,n){n(52675),n(89463),n(66412),n(26099);var r=n(82845),i=n(60719);e.exports=function e(t,n){function a(e,i,o,s){try{var u=t[e](i),c=u.value;return c instanceof r?n.resolve(c.v).then((function(e){a("next",e,o,s)}),(function(e){a("throw",e,o,s)})):n.resolve(c).then((function(e){u.value=e,o(u)}),(function(e){return a("throw",e,o,s)}))}catch(e){s(e)}}var o;this.next||(i(e.prototype),i(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",(function(){return this}))),i(this,"_invoke",(function(e,t,r){function i(){return new n((function(t,n){a(e,r,t,n)}))}return o=o?o.then(i,i):i()}),!0)},e.exports.__esModule=!0,e.exports.default=e.exports},60719:function(e){function t(n,r,i,a){var o=Object.defineProperty;try{o({},"",{})}catch(n){o=0}e.exports=t=function(e,n,r,i){function a(n,r){t(e,n,(function(e){return this._invoke(n,r,e)}))}n?o?o(e,n,{value:r,enumerable:!i,configurable:!i,writable:!i}):e[n]=r:(a("next",0),a("throw",1),a("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r,i,a)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4104:function(e){e.exports=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},60006:function(e,t,n){n(62010),n(40875);var r=n(82845),i=n(75512),a=n(46182),o=n(82118),s=n(12508),u=n(4104),c=n(72962);function l(){"use strict";var t=i(),n=t.m(l),f=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function d(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))}var h={throw:1,return:2,break:3,continue:3};function g(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,h[e],t)},delegateYield:function(e,i,a){return t.resultName=i,n(r.d,c(e),a)},finish:function(e){return n(r.f,e)}},n=function(e,n,i){r.p=t.prev,r.n=t.next;try{return e(n,i)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(e.exports=l=function(){return{wrap:function(e,n,r,i){return t.w(g(e),n,r,i&&i.reverse())},isGeneratorFunction:d,mark:t.m,awrap:function(e,t){return new r(e,t)},AsyncIterator:s,async:function(e,t,n,r,i){return(d(t)?o:a)(g(e),t,n,r,i)},keys:u,values:c}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=l,e.exports.__esModule=!0,e.exports.default=e.exports},72962:function(e,t,n){n(52675),n(89463),n(2259),n(16280),n(23792),n(26099),n(47764),n(62953);var r=n(95429).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(r(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},55235:function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},99188:function(e,t,n){n(45700),n(16280),n(89572),n(2892);var r=n(95429).default;e.exports=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},38001:function(e,t,n){var r=n(95429).default,i=n(99188);e.exports=function(e){var t=i(e,"string");return"symbol"==r(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},95429:function(e,t,n){function r(t){return e.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,r(t)}n(52675),n(89463),n(2259),n(23792),n(26099),n(47764),n(62953),e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},95509:function(e,t,n){var r=n(95429);n(55081);var i=n(60006)();e.exports=i;try{regeneratorRuntime=i}catch(e){"object"===("undefined"==typeof globalThis?"undefined":r(globalThis))?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}},95393:function(e,t,n){"use strict";var r=n(19839),i=n(90138),a=n(649),o=n(48986),s="undefined"!=typeof window&&window||global,u=s.dashjs;u||(u=s.dashjs={}),u.MediaPlayer=r.A,u.FactoryMaker=i.A,u.Debug=a.A,u.Version=(0,o.i)()},61238:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{A:function(){return r}})},12166:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,{A:function(){return r}})},42130:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var r=n(61238);function i(e){if(Array.isArray(e))return(0,r.A)(e)}},87056:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{A:function(){return r}}),n(16280)},70720:function(e,t,n){"use strict";function r(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,a){var o=e.apply(t,n);function s(e){r(o,i,a,s,u,"next",e)}function u(e){r(o,i,a,s,u,"throw",e)}s(void 0)}))}}n.d(t,{A:function(){return i}}),n(26099),n(3362)},7718:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{A:function(){return r}}),n(16280)},85952:function(e,t,n){"use strict";n.d(t,{A:function(){return a}});var r=n(27791);function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(0,r.A)(i.key),i)}}function a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},50544:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var r=n(27791);function i(e,t,n){return(t=(0,r.A)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},82048:function(e,t,n){"use strict";n.d(t,{A:function(){return i}}),n(83851),n(26099),n(40888),n(15472);var r=n(29403);function i(){return i="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var i=(0,r.A)(e,t);if(i){var a=Object.getOwnPropertyDescriptor(i,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},i.apply(null,arguments)}},4597:function(e,t,n){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{A:function(){return r}}),n(40875)},18766:function(e,t,n){"use strict";n.d(t,{A:function(){return i}}),n(16280);var r=n(53497);function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,r.A)(e,t)}},53056:function(e,t,n){"use strict";function r(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,{A:function(){return r}}),n(52675),n(89463),n(2259),n(23418),n(23792),n(26099),n(47764),n(62953)},25729:function(e,t,n){"use strict";function r(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],u=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}n.d(t,{A:function(){return r}}),n(52675),n(89463),n(2259),n(23792),n(44114),n(26099),n(47764),n(62953)},74031:function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{A:function(){return r}}),n(16280)},12658:function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{A:function(){return r}}),n(16280)},27168:function(e,t,n){"use strict";n.d(t,{A:function(){return i}}),n(52675);var r=n(93492);function i(e,t){if(null==e)return{};var n,i,a=(0,r.A)(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},93492:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}n.d(t,{A:function(){return r}})},8591:function(e,t,n){"use strict";n.d(t,{A:function(){return a}}),n(16280);var r=n(34299),i=n(87056);function a(e,t){if(t&&("object"==(0,r.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.A)(e)}},53497:function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{A:function(){return r}})},78508:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});var r=n(12166),i=n(25729),a=n(67751),o=n(74031);function s(e,t){return(0,r.A)(e)||(0,i.A)(e,t)||(0,a.A)(e,t)||(0,o.A)()}},29403:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var r=n(4597);function i(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=(0,r.A)(e)););return e}},72958:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});var r=n(12166),i=n(53056),a=n(67751),o=n(74031);function s(e){return(0,r.A)(e)||(0,i.A)(e)||(0,a.A)(e)||(0,o.A)()}},91975:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});var r=n(42130),i=n(53056),a=n(67751),o=n(12658);function s(e){return(0,r.A)(e)||(0,i.A)(e)||(0,a.A)(e)||(0,o.A)()}},36714:function(e,t,n){"use strict";n.d(t,{A:function(){return i}}),n(45700),n(16280),n(89572),n(2892);var r=n(34299);function i(e,t){if("object"!=(0,r.A)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=(0,r.A)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}},27791:function(e,t,n){"use strict";n.d(t,{A:function(){return a}});var r=n(34299),i=n(36714);function a(e){var t=(0,i.A)(e,"string");return"symbol"==(0,r.A)(t)?t:t+""}},34299:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{A:function(){return r}}),n(52675),n(89463),n(2259),n(23792),n(26099),n(47764),n(62953)},67751:function(e,t,n){"use strict";n.d(t,{A:function(){return i}}),n(23418),n(34782),n(62010),n(26099),n(27495),n(90906),n(38781),n(47764);var r=n(61238);function i(e,t){if(e){if("string"==typeof e)return(0,r.A)(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.A)(e,t):void 0}}},18735:function(e,t,n){"use strict";n.d(t,{GM:function(){return se},I$:function(){return he},LA:function(){return P},PX:function(){return ge},WJ:function(){return D},YM:function(){return Te},dp:function(){return pe},gz:function(){return _e},hU:function(){return de},mm:function(){return le},pv:function(){return fe},tt:function(){return Ae},x_:function(){return me},xq:function(){return ye}});var r=n(70720),i=n(91975),a=n(7718),o=n(85952),s=n(27168),u=n(34299),c=n(78508),l=n(50544),f=n(95509),d=(n(16280),n(28706),n(52675),n(89463),n(2259),n(2008),n(50113),n(78350),n(23418),n(74423),n(23792),n(48598),n(62062),n(44114),n(34782),n(26910),n(54554),n(30237),n(62010),n(18111),n(81148),n(22489),n(20116),n(30531),n(7588),n(61701),n(18237),n(36033),n(25428),n(32637),n(69085),n(5506),n(83851),n(81278),n(79432),n(26099),n(3362),n(27495),n(90906),n(38781),n(31415),n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698),n(21699),n(47764),n(25440),n(90744),n(42762),n(23500),n(62953),n(3296),n(27208),n(48408),n(14603),n(47566),n(98721),n(52877)),h=n(9259),g=["url"],p=["version","eventTargets","sid","transmissionMode"],m=["customData","headers"];function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){(0,l.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function A(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return y(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var T=function(e){return e instanceof d.d5?new d.d5(Math.round(e.value),e.params):Math.round(e)},_=function(e){return Array.isArray(e)?e.map(T):T(e)},S=function(e,t){return Array.isArray(e)?e.map((function(e){return S(e,t)})):e instanceof d.d5&&"string"==typeof e.value?new d.d5(S(e.value,t),e.params):(t.baseUrl&&(e=(0,h.gn)(e,(0,h.$_)(t.baseUrl))),1===t.version?encodeURIComponent(e):e)},I=function(e){return e instanceof d.d5?new d.d5(100*Math.round(e.value/100),e.params):100*Math.round(e/100)},b=function(e){return Array.isArray(e)?e.map(I):I(e)},R={br:_,d:_,bl:b,dl:b,mtp:b,nor:function(e,t){var n=e;return t.version>=2&&(e instanceof d.d5&&"string"==typeof e.value?n=new d.d5([e]):"string"==typeof e&&(n=[e])),S(n,t)},rtp:b,tb:_},N=2,C="rr",w="ce",D={BITRATE_CHANGE:"bc",PLAY_STATE:"ps",ERROR:"e",TIME_INTERVAL:"t",CONTENT_ID:"c",BACKGROUNDED_MODE:"b",MUTE:"m",UNMUTE:"um",PLAYER_EXPAND:"pe",PLAYER_COLLAPSE:"pc",RESPONSE_RECEIVED:C,AD_START:"as",AD_END:"ae",AD_BREAK_START:"abs",AD_BREAK_END:"abe",SKIP:"sk",CUSTOM_EVENT:w},O="event",M="request",P={REQUEST:M,EVENT:O},L=["cen","e","h","ts"],x=["ab","bg","bl","br","bs","bsa","bsd","bsda","cdn","cid","cs","d","dfa","dl","ec","lab","lb","ltc","msd","mtp","nor","nr","ot","pb","pr","pt","rtp","sf","sid","sn","st","sta","su","tab","tb","tbl","tpb","v"],F=/^[a-zA-Z0-9-.]+-[a-zA-Z0-9-.]+$/;function U(e){return F.test(e)}var k=new Set(x);function B(e){return k.has(e)||U(e)}var G=["cmsdd","cmsds","rc","smrt","ttfb","ttfbb","ttlb","url"],H=new Set(G);function Y(e){return H.has(e)}var V=new Set(L),q=new Set(["ab","bl","br","bsa","bsd","bsda","lab","lb","mtp","pb","tab","tb","tbl","tpb"]),K=["bl","br","bs","cid","d","dl","mtp","nor","nrr","ot","pr","rtp","sf","sid","st","su","tb","v"],j=new Set(K);function z(e){return j.has(e)||U(e)}var W=new Set(["ot","sf","st","e","sta"]);function Q(e){return W.has(e)}function X(e){return"number"==typeof e?Number.isFinite(e):null!=e&&""!==e&&!1!==e}var $=(0,l.A)((0,l.A)({},O,(function(e){return B(e)||Y(e)||V.has(e)})),M,B);function Z(e,t){var n;return Array.isArray(e)?(t&&(n=e.find((function(e){var n;return(null===(n=e.params)||void 0===n?void 0:n.ot)===t}))),n||(n=e[0]),Z(n)):e instanceof d.d5?e.value:e}function J(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={};if(null==e||"object"!==(0,u.A)(e))return n;var r=t.version||e.v||N,i=t.reportingMode||M,a=1===r?function(e){for(var t={},n=0,r=Object.entries(e);n<r.length;n++){var i=(0,c.A)(r[n],2),a=i[0],o=i[1];if(null!=o)if("nor"===a){var s,u=(Array.isArray(o)?o:[o])[0];u instanceof d.d5?(t.nor=u.value,null!==(s=u.params)&&void 0!==s&&s.r&&(t.nrr=u.params.r)):t.nor=u}else q.has(a)?t[a]=Z(o,e.ot):t[a]=o;else t[a]=o}return t}(e):e,o=1===r?z:$[i],s=Object.keys(a).filter(o);a.e&&a.e!==C&&(s=s.filter((function(e){return!Y(e)})));var l=t.filter;"function"==typeof l&&(s=s.filter(l));var f=i===O;if(f){var h=a.e;s.includes("e")||null==h||s.push("e"),s.includes("ts")||s.push("ts"),s.includes("cen")||null==a.cen||h!==w||s.push("cen")}if(0===s.length)return n;r>1&&!s.includes("v")&&s.push("v");var g={version:r,reportingMode:i,baseUrl:t.baseUrl};s.sort();var p,m=A(s);try{for(m.s();!(p=m.n()).done;){var E,v,y=p.value,T=a[y],_=null!==(E=null===(v=t.formatters)||void 0===v?void 0:v[y])&&void 0!==E?E:R[y];if("function"==typeof _&&(T=_(T,g)),"v"===y){if(1===r)continue;T=r}"pr"===y&&1===T||(f&&"ts"===y&&!Number.isFinite(T)&&(T=Date.now()),X(T)&&(Q(y)&&"string"==typeof T&&(T=new d.P7(T)),n[y]=T))}}catch(e){m.e(e)}finally{m.f()}return n}var ee="CMCD-Object",te="CMCD-Request",ne="CMCD-Session",re="CMCD-Status",ie={OBJECT:ee,REQUEST:te,SESSION:ne,STATUS:re},ae={ab:ee,br:ee,d:ee,lab:ee,lb:ee,ot:ee,tab:ee,tb:ee,tpb:ee,bl:te,cs:te,dfa:te,dl:te,ltc:te,mtp:te,nor:te,nrr:te,pb:te,sn:te,sta:te,su:te,tbl:te,cid:ne,msd:ne,sf:ne,sid:ne,st:ne,v:ne,bg:re,bs:re,bsa:re,bsd:re,bsda:re,cdn:re,ec:re,nr:re,pr:re,pt:re,rtp:re};function oe(e,t){for(var n={},r=function(e,t){var n={};if(!e)return n;for(var r,i=Object.keys(e),a=t?(r=t,Object.keys(r).reduce((function(e,t){var n;return null===(n=r[t])||void 0===n||n.forEach((function(n){return e[n]=t})),e}),{})):{},o=0,s=i;o<s.length;o++){var u,c=s[o],l=ae[c]||a[c]||ie.REQUEST;(null!==(u=n[l])&&void 0!==u?u:n[l]={})[c]=e[c]}return n}(e,t),i=0,a=Object.entries(r);i<a.length;i++){var o=(0,c.A)(a[i],2),s=o[0],u=o[1],l=(0,d.Of)(u,{whitespace:!1});l&&(n[s]=l)}return n}var se="CMCD";function ue(e){return(0,d.Of)(e,{whitespace:!1})}function ce(e){return e?ue(J(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})):""}var le=30,fe=[].concat(K,x,G,L).filter((function(e,t,n){return n.indexOf(e)===t})),de={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"},he={STARTING:"s",PLAYING:"p",SEEKING:"k",REBUFFERING:"r",PAUSED:"a",WAITING:"w",ENDED:"e",FATAL_ERROR:"f",QUIT:"q",PRELOADING:"d"},ge="query",pe="headers",me={JSON:"json",QUERY:ge,HEADERS:pe};function Ee(e,t,n){var r,i=new Set(null!==(r=t.enabledKeys)&&void 0!==r?r:[]);return{version:t.version||N,reportingMode:e,filter:function(e){return i.has(e)},baseUrl:n}}function ve(e){var t=e.url,n=(0,s.A)(e,g);return fetch(t,n)}var Ae=function(){return(0,o.A)((function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ve;(0,a.A)(this,e),this.timeOrigin=performance.timeOrigin||(null===(n=performance.timing)||void 0===n?void 0:n.fetchStart)||Date.now()-performance.now(),this.data={},this.msd=NaN,this.eventTargets=new Map,this.requestTarget={sn:0,msdSent:!1},this.config=function(e){var t=e.version,n=void 0===t?N:t,r=e.eventTargets,i=void 0===r?[]:r,a=e.sid,o=void 0===a?(0,h.uR)():a,u=e.transmissionMode,c=void 0===u?ge:u;return v(v({},(0,s.A)(e,p)),{},{version:n,transmissionMode:c,sid:o,eventTargets:i.reduce((function(e,t){var n,r,i;return null!=t&&t.url&&null!==(n=t.events)&&void 0!==n&&n.length&&e.push({version:t.version||N,enabledKeys:(null===(r=t.enabledKeys)||void 0===r?void 0:r.slice())||[],url:t.url,events:t.events.slice(),interval:null!==(i=t.interval)&&void 0!==i?i:le,batchSize:t.batchSize||1}),e}),[])})}(t),this.data={cid:this.config.cid,sid:this.config.sid,v:this.config.version},this.requester=r;var i,o=A(this.config.eventTargets);try{for(o.s();!(i=o.n()).done;){var u=i.value;this.eventTargets.set(u,{intervalId:void 0,sn:0,msdSent:!1,queue:[]})}}catch(e){o.e(e)}finally{o.f()}}),[{key:"start",value:function(){var e=this;this.eventTargets.forEach((function(t,n){if(e.disarmInterval(t),0!==n.interval&&n.events.includes(D.TIME_INTERVAL)){var r=function(){e.recordTargetEvent(t,n,"t"),e.processEventTargets()};t.intervalId=setInterval(r,1e3*n.interval),r()}}))}},{key:"stop",value:function(){var e=this;arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.flush(),this.eventTargets.forEach((function(t){e.disarmInterval(t)}))}},{key:"flush",value:function(){this.processEventTargets(!0)}},{key:"update",value:function(e){e.sid&&e.sid!==this.data.sid&&this.resetSession(),e.msd&&!isNaN(e.msd)&&(this.msd=e.msd),this.data=v(v(v({},this.data),e),{},{msd:void 0})}},{key:"recordEvent",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.eventTargets.forEach((function(r,i){t.recordTargetEvent(r,i,e,n)})),this.processEventTargets()}},{key:"recordTargetEvent",value:function(e,t,n){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(t.events.includes(n)){var a=v(v(v({},this.data),i),{},{e:n,ts:null!==(r=i.ts)&&void 0!==r?r:Date.now(),sn:e.sn++});isNaN(this.msd)||e.msdSent||(a.msd=this.msd,e.msdSent=!0),e.queue.push(a)}}},{key:"recordResponseReceived",value:function(e){var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=e.request,o=null!==(t=i.url)&&void 0!==t?t:null==a?void 0:a.url;if(o){var s=new URL(o);s.searchParams.delete(se);var u={url:s.toString(),rc:e.status},c=e.resourceTiming;c&&(null!=c.startTime&&(u.ts=Math.round(this.timeOrigin+c.startTime),null!=c.responseStart&&(u.ttfb=Math.round(c.responseStart-c.startTime))),null!=c.duration&&(u.ttlb=Math.round(c.duration)));var l=null!==(n=null===(r=a.customData)||void 0===r?void 0:r.cmcd)&&void 0!==n?n:{};this.recordEvent(C,v(v(v({},l),u),i))}}},{key:"applyRequestReport",value:function(e){var t;return null!==(t=this.createRequestReport(e))&&void 0!==t?t:e}},{key:"isRequestReportingEnabled",value:function(){var e;return!(null===(e=this.config.enabledKeys)||void 0===e||!e.length)}},{key:"createRequestReport",value:function(e,t){var n,r=e.customData,i=void 0===r?{}:r,a=e.headers,o=void 0===a?{}:a,u=v(v({},(0,s.A)(e,m)),{},{headers:v({},o),customData:v(v({},i),{},{cmcd:{}})});if(null===(n=this.config.enabledKeys)||void 0===n||!n.length||!u.url)return u;var c=new URL(u.url),l=v(v(v({},this.data),t),{},{sn:this.requestTarget.sn++}),f=Ee(M,this.config,u.url);isNaN(this.msd)||this.requestTarget.msdSent||(l.msd=this.msd,this.requestTarget.msdSent=!0);var d=u.customData.cmcd=J(l,f);switch(this.config.transmissionMode){case ge:var h=ue(d);h&&(c.searchParams.set(se,h),u.url=c.toString());break;case pe:Object.assign(u.headers,oe(d,f.customHeaderMap))}return u}},{key:"processEventTargets",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=!1;this.eventTargets.forEach((function(r,a){var o=r.queue;if(o.length&&(!(o.length<a.batchSize)||t)){var s=t?o.length:a.batchSize,u=o.splice(0,s);e.sendEventReport(a,u).catch((function(){var e;(e=r.queue).unshift.apply(e,(0,i.A)(u))})),n||(n=o.length>0)}})),n&&this.processEventTargets()}},{key:"sendEventReport",value:(e=(0,r.A)(f.mark((function e(t,n){var r,i,a;return f.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Ee(O,t),e.next=1,this.requester({url:t.url,method:"POST",headers:{"Content-Type":"application/cmcd"},body:n.map((function(e){return ce(e,r)})).join("\n")+"\n"});case 1:if(i=e.sent,410!==(a=i.status)){e.next=2;break}this.disposeEventTarget(t),e.next=3;break;case 2:if(!(429===a||a>499&&a<600)){e.next=3;break}throw new Error("Event report failed with status ".concat(a));case 3:case"end":return e.stop()}}),e,this)}))),function(t,n){return e.apply(this,arguments)})},{key:"disarmInterval",value:function(e){clearInterval(e.intervalId),e.intervalId=void 0}},{key:"disposeEventTarget",value:function(e){var t=this.eventTargets.get(e);t&&(this.disarmInterval(t),this.eventTargets.delete(e))}},{key:"resetSession",value:function(){this.eventTargets.forEach((function(e){return e.sn=0})),this.requestTarget.sn=0}}]);var e}(),ye={DASH:"d",HLS:"h",SMOOTH:"s",OTHER:"o"},Te={VOD:"v",LIVE:"l",LOW_LATENCY:"ll"};function _e(e,t){return new d.d5(e,t)}new Set(K),new Set(fe),new Set(["bl","dl","mtp","rtp","tbl"]),new Set(["br","d","tb"])},11103:function(e,t,n){"use strict";n.d(t,{Nw:function(){return c},Pb:function(){return u},aD:function(){return f},nt:function(){return l},uu:function(){return s}});var r=n(34299),i=n(78508),a=(n(18111),n(7588),n(18237),n(5506),n(79432),n(26099),n(23500),n(56390)),o=n(52877),s="CMSD-Dynamic",u="CMSD-Static",c=a.QA;function l(e){return e?(0,o.Ov)(e):[]}function f(e){return e?Object.entries((0,o.A2)(e)).reduce((function(e,t){var n=(0,i.A)(t,2),a=n[0],s=n[1].value;return e[a]="symbol"===(0,r.A)(s)?(0,o.rI)(s):s,e}),{}):{}}},56390:function(e,t,n){"use strict";n.d(t,{QA:function(){return r}}),n(74423),n(25428);var r={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"}},52877:function(e,t,n){"use strict";n.d(t,{A2:function(){return P},Of:function(){return q},Ov:function(){return x},P7:function(){return b},d5:function(){return u},rI:function(){return k}});var r=n(78508),i=n(34299),a=n(85952),o=n(7718),s=(n(52675),n(89463),n(16280),n(28706),n(23418),n(74423),n(23792),n(48598),n(62062),n(44114),n(34782),n(54743),n(16573),n(78100),n(77936),n(18111),n(61701),n(33110),n(36033),n(25428),n(32637),n(5506),n(26099),n(27495),n(90906),n(38781),n(31415),n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698),n(21699),n(47764),n(25440),n(42762),n(21489),n(48140),n(81630),n(72170),n(75044),n(69539),n(31694),n(89955),n(21903),n(91134),n(33206),n(44496),n(66651),n(12887),n(19369),n(66812),n(8995),n(31575),n(36072),n(88747),n(28845),n(29423),n(57301),n(373),n(86614),n(41405),n(37467),n(44732),n(33684),n(79577),n(41549),n(49797),n(49631),n(35623),n(62953),n(9259)),u=(0,a.A)((function e(t,n){(0,o.A)(this,e),Array.isArray(t)&&(t=t.map((function(t){return t instanceof e?t:new e(t)}))),this.value=t,this.params=n})),c="Dict";function l(e,t){return{value:e,src:t}}function f(e,t,n,r){return new Error("failed to ".concat(e,' "').concat((a=t,Array.isArray(a)?JSON.stringify(a):a instanceof Map?"Map{}":a instanceof Set?"Set{}":"object"===(0,i.A)(a)?JSON.stringify(a):String(a)),'" as ').concat(n),{cause:r});var a}function d(e,t,n){return f("parse",e,t,n)}var h="Inner List",g="Bare Item",p="Boolean",m="Byte Sequence",E="Date",v="Decimal",A="Integer",y="".concat(A," or ").concat(v);function T(e){return e<-999999999999999||999999999999999<e}function _(e){var t,n=1,r="",i=d(e,y);if("-"===e[0]&&(n=-1,e=e.substring(1)),e.length<=0)throw i;var a=/^(\d+)?/g,o=a.exec(e);if(0===o[0].length)throw i;if(r+=o[1],"."===(e=e.substring(a.lastIndex))[0]){if(r.length>12)throw i;var s=/^(\.\d+)?/g,u=s.exec(e);if(e=e.substring(s.lastIndex),0===u[0].length||u[1].length>4)throw i;if((r+=u[1]).length>16)throw i;t=parseFloat(r)*n}else{if(r.length>15)throw i;if(T(t=parseInt(r)*n))throw d(r,y)}return l(t,e)}var S="String",I=/[\x00-\x1f\x7f]+/,b=(0,a.A)((function e(t){(0,o.A)(this,e),this.description=t})),R="Token";function N(e,t){var n=e[0];if('"'===n)return function(e){var t="",n=0;if('"'!==e[n])throw d(e,S);for(n++;e.length>n;){if("\\"===e[n]){if(e.length<=n+1)throw d(e,S);if('"'!==e[++n]&&"\\"!==e[n])throw d(e,S);t+=e[n]}else{if('"'===e[n])return l(t,e.substring(++n));if(I.test(e[n]))throw d(e,S);t+=e[n]}n++}throw d(e,S)}(e);if(/^[-0-9]/.test(n))return _(e);if("?"===n)return function(e){var t=0;if("?"!==e[t])throw d(e,p);if("1"===e[++t])return l(!0,e.substring(++t));if("0"===e[t])return l(!1,e.substring(++t));throw d(e,p)}(e);if(":"===n)return function(e){if(":"!==e[0])throw d(e,m);if(!1===(e=e.substring(1)).includes(":"))throw d(e,m);var t=/(^.*?)(:)/g,n=t.exec(e)[1];return e=e.substring(t.lastIndex),l((0,s.y4)(n),e)}(e);if(/^[a-zA-Z*]/.test(n))return function(e,t){if(!1===/^[a-zA-Z*]$/.test(e[0]))throw d(e,R);var n=/^([!#$%&'*+\-.^_`|~\w:/]+)/g,r=n.exec(e)[1];return e=e.substring(n.lastIndex),l(!1===(null==t?void 0:t.useSymbol)?new b(r):Symbol.for(r),e)}(e,t);if("@"===n)return function(e){var t=0;if("@"!==e[t])throw d(e,E);t++;var n=_(e.substring(t));if(!1===Number.isInteger(n.value))throw d(e,E);return l(new Date(1e3*n.value),n.src)}(e);throw d(e,g)}var C="Key";function w(e){var t=0;if(!1===/^[a-z*]$/.test(e[t]))throw d(e,C);for(var n="";e.length>t;){if(!1===/^[a-z0-9_\-.*]$/.test(e[t]))return l(n,e.substring(t));n+=e[t],t++}return l(n,e.substring(t))}function D(e,t){for(var n=void 0;e.length>0&&";"===e[0];){var r=w(e=e.substring(1).trim()),i=r.value,a=!0;if("="===(e=r.src)[0]){var o=N(e=e.substring(1),t);a=o.value,e=o.src}null==n&&(n={}),n[i]=a}return l(n,e)}function O(e,t){var n=N(e,t),r=D(e=n.src,t);return e=r.src,l(new u(n.value,r.value),e)}function M(e,t){return"("===e[0]?function(e,t){if("("!==e[0])throw d(e,h);e=e.substring(1);for(var n=[];e.length>0;){if(")"===(e=e.trim())[0]){var r=D(e=e.substring(1),t);return l(new u(n,r.value),r.src)}var i=O(e,t);if(n.push(i.value)," "!==(e=i.src)[0]&&")"!==e[0])throw d(e,h)}throw d(e,h)}(e,t):O(e,t)}function P(e,t){try{var n=function(e,t){for(var n={};e.length>0;){var r=void 0,i=w(e),a=i.value;if("="===(e=i.src)[0]){var o=M(e.substring(1),t);r=o.value,e=o.src}else{var s=D(e,t);r=new u(!0,s.value),e=s.src}if(n[a]=r,0===(e=e.trim()).length)return l(n,e);if(","!==e[0])throw d(e,c);if(0===(e=e.substring(1).trim()).length||","===e[0])throw d(e,c)}return l(n,e)}(e.trim(),t),r=n.src,i=n.value;if(""!==r)throw d(r,c);return i}catch(t){throw d(e,c,t)}}var L="List";function x(e,t){try{var n=function(e,t){for(var n=[];e.length>0;){var r=M(e,t);if(n.push(r.value),0===(e=r.src.trim()).length)return l(n,e);if(","!==e[0])throw d(e,L);if(0===(e=e.substring(1).trim()).length||","===e[0])throw d(e,L)}return l(n,e)}(e.trim(),t),r=n.src,i=n.value;if(""!==r)throw d(r,L);return i}catch(t){throw d(e,L,t)}}function F(e,t,n){return f("serialize",e,t,n)}function U(e){if(T(e))throw F(e,A);return e.toString()}function k(e){return e.description||e.toString().slice(7,-1)}function B(e){var t=k(e);if(!1===/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(t))throw F(t,R);return t}function G(e){switch((0,i.A)(e)){case"number":if(!Number.isFinite(e))throw F(e,g);return Number.isInteger(e)?U(e):function(e){var t=(0,s.ut)(e,3);if(Math.floor(Math.abs(t)).toString().length>12)throw F(e,v);var n=t.toString();return n.includes(".")?n:"".concat(n,".0")}(e);case"string":return function(e){if(I.test(e))throw F(e,S);return'"'.concat(e.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),'"')}(e);case"symbol":return B(e);case"boolean":return function(e){if("boolean"!=typeof e)throw F(e,p);return e?"?1":"?0"}(e);case"object":if(e instanceof Date)return function(e){return"@".concat(U(e.getTime()/1e3))}(e);if(e instanceof Uint8Array)return function(e){if(!1===ArrayBuffer.isView(e))throw F(e,m);return":".concat((0,s.WG)(e),":")}(e);if(e instanceof b)return B(e);default:throw F(e,g)}}function H(e){if(!1===/^[a-z*][a-z0-9\-_.*]*$/.test(e))throw F(e,C);return e}function Y(e){return null==e?"":Object.entries(e).map((function(e){var t=(0,r.A)(e,2),n=t[0],i=t[1];return!0===i?";".concat(H(n)):";".concat(H(n),"=").concat(G(i))})).join("")}function V(e){return e instanceof u?"".concat(G(e.value)).concat(Y(e.params)):G(e)}function q(e,t){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{whitespace:!0};if("object"!==(0,i.A)(e)||null==e)throw F(e,c);var n=e instanceof Map?e.entries():Object.entries(e),a=null!=t&&t.whitespace?" ":"";return Array.from(n).map((function(e){var t=(0,r.A)(e,2),n=t[0],i=t[1];i instanceof u==0&&(i=new u(i));var a=H(n);return!0===i.value?a+=Y(i.params):(a+="=",Array.isArray(i.value)?a+=function(e){return"(".concat(e.value.map(V).join(" "),")").concat(Y(e.params))}(i):a+=V(i)),a})).join(",".concat(a))}(e,t)}},9259:function(e,t,n){"use strict";n.d(t,{$_:function(){return d},B1:function(){return o},Uh:function(){return p},WG:function(){return a},g7:function(){return f},gn:function(){return m},lS:function(){return l},uR:function(){return E},ut:function(){return h},y4:function(){return i}});var r=n(91975);function i(e){return new Uint8Array((0,r.A)(atob(e)).map((function(e){return e.charCodeAt(0)})))}function a(e){return btoa(String.fromCharCode.apply(String,(0,r.A)(e)))}function o(e){return e instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer}n(23792),n(48598),n(62062),n(34782),n(54743),n(16573),n(78100),n(77936),n(18111),n(18237),n(45374),n(26099),n(27495),n(38781),n(27337),n(47764),n(68156),n(25440),n(5746),n(21489),n(3690),n(48140),n(81630),n(72170),n(75044),n(69539),n(31694),n(89955),n(21903),n(91134),n(33206),n(44496),n(66651),n(12887),n(19369),n(66812),n(8995),n(31575),n(36072),n(88747),n(28845),n(29423),n(57301),n(373),n(86614),n(41405),n(37467),n(44732),n(33684),n(79577),n(41549),n(49797),n(49631),n(35623),n(2945),n(42207),n(62953),n(55815),n(64979),n(79739),n(3296),n(27208),n(48408),n(14603),n(47566),n(98721);var s="utf-16",u="utf-16be",c="utf-16le",l="utf-8";function f(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=o(e)?new DataView(e):new DataView(e.buffer,e.byteOffset,e.byteLength);var r=0,i=n.encoding;if(!i){var a=t.getUint8(0),f=t.getUint8(1);239==a&&187==f&&191==t.getUint8(2)?(i=l,r=3):254==a&&255==f?(i=u,r=2):255==a&&254==f?(i=c,r=2):i=l}if("undefined"!=typeof TextDecoder)return new TextDecoder(i).decode(t);for(var d,h=t.byteLength,g=i!==u,p="";r<h;){switch(i){case l:if((d=t.getUint8(r))<128)r++;else if(d>=194&&d<=223)if(r+1<h){var m=t.getUint8(r+1);m>=128&&m<=191?(d=(31&d)<<6|63&m,r+=2):r++}else r++;else if(d>=224&&d<=239)if(r+2<=h-1){var E=t.getUint8(r+1),v=t.getUint8(r+2);E>=128&&E<=191&&v>=128&&v<=191?(d=(15&d)<<12|(63&E)<<6|63&v,r+=3):r++}else r++;else if(d>=240&&d<=244)if(r+3<=h-1){var A=t.getUint8(r+1),y=t.getUint8(r+2),T=t.getUint8(r+3);A>=128&&A<=191&&y>=128&&y<=191&&T>=128&&T<=191?(d=(7&d)<<18|(63&A)<<12|(63&y)<<6|63&T,r+=4):r++}else r++;else r++;break;case u:case s:case c:d=t.getUint16(r,g),r+=2}p+=String.fromCodePoint(d)}return p}function d(e){var t="string"==typeof e?new URL(e):e;return t.origin+t.pathname.substring(0,t.pathname.lastIndexOf("/")+1)}function h(e,t){if(e<0)return-h(-e,t);var n=Math.pow(10,t);if(Math.abs(e*n%1-.5)<Number.EPSILON){var r=Math.floor(e*n);return(r%2==0?r:r+1)/n}return Math.round(e*n)/n}var g=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g;function p(e){return-1===e.indexOf("&")?e:e.replace(g,(function(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'";case" ":return" ";case"‎":return"";case"‏":return"";default:if("#"===e[1]){var t="x"===e[2]||"X"===e[2]?parseInt(e.slice(3),16):parseInt(e.slice(2),10);return String.fromCodePoint(t)}return e}}))}function m(e,t){var n;try{n=new URL(e)}catch(t){return e}var r=new URL(t);if(n.origin!==r.origin)return e;for(var i=n.pathname.split("/").slice(1),a=r.pathname.split("/").slice(1,-1),o=Math.min(i.length,a.length),s=0;s<o&&i[s]===a[s];s++)i.shift(),a.shift();for(;a.length;)a.shift(),i.unshift("..");return i.join("/")+n.search+n.hash}function E(){try{return crypto.randomUUID()}catch(r){try{var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}catch(e){var n=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"==e?t:3&t|8).toString(16)}))}}}},649:function(e,t,n){"use strict";n(28706),n(18111),n(7588),n(26099),n(23500);var r=n(78850),i=n(43621),a=n(90138),o=1,s=2,u=3,c=4,l=5;function f(e){e=e||{};var t,n,a,f,d=this.context,h=(0,r.A)(d).getInstance(),g=e.settings,p=[];function m(e){return e&&e.bind?e.bind(window.console):window.console.log.bind(window.console)}function E(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];_.apply(void 0,[o,this].concat(t))}function v(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];_.apply(void 0,[s,this].concat(t))}function A(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];_.apply(void 0,[u,this].concat(t))}function y(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];_.apply(void 0,[c,this].concat(t))}function T(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];_.apply(void 0,[l,this].concat(t))}function _(e,t){var r="",o=null;n&&(o=(new Date).getTime(),r+="["+(o-f)+"]"),a&&t&&t.getClassName&&(r+="["+t.getClassName()+"]",t.getType&&(r+="["+t.getType()+"]")),r.length>0&&(r+=" ");for(var s=arguments.length,u=new Array(s>2?s-2:0),c=2;c<s;c++)u[c-2]=arguments[c];Array.apply(null,u).forEach((function(e){r+=e+" "})),p[e]&&g&&g.get().debug.logLevel>=e&&p[e](r),g&&g.get().debug.dispatchEvent&&h.trigger(i.A.LOG,{message:r,level:e})}return t={getLogger:function(e){return{fatal:E.bind(e),error:v.bind(e),warn:A.bind(e),info:y.bind(e),debug:T.bind(e)}},setLogTimestampVisible:function(e){n=e},setCalleeNameVisible:function(e){a=e}},n=!0,a=!0,f=(new Date).getTime(),"undefined"!=typeof window&&window.console&&(p[o]=m(window.console.error),p[s]=m(window.console.error),p[u]=m(window.console.warn),p[c]=m(window.console.info),p[l]=m(window.console.debug)),t}f.__dashjs_factory_name="Debug";var d=a.A.getSingletonFactory(f);d.LOG_LEVEL_NONE=0,d.LOG_LEVEL_FATAL=o,d.LOG_LEVEL_ERROR=s,d.LOG_LEVEL_WARNING=u,d.LOG_LEVEL_INFO=c,d.LOG_LEVEL_DEBUG=l,a.A.updateSingletonFactory(f.__dashjs_factory_name,d),t.A=d},78850:function(e,t,n){"use strict";n(16280),n(2008),n(44114),n(54554),n(18111),n(22489),n(7588),n(13579),n(26099),n(23500);var r=n(90138),i=n(21191);function a(){var e={};function t(t,n,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(!t)throw new Error("event type cannot be null or undefined");if(!n||"function"!=typeof n)throw new Error("listener must be a function: "+n);var s=a.priority||0;if(!(r(t,n,i)>=0)){e[t]=e[t]||[];var u={callback:n,scope:i,priority:s,executeOnlyOnce:o};i&&i.getStreamId&&(u.streamId=i.getStreamId()),i&&i.getType&&(u.mediaType=i.getType()),a&&a.mode&&(u.mode=a.mode),e[t].some((function(n,r){if(n&&s>n.priority)return e[t].splice(r,0,u),!0}))||e[t].push(u)}}function n(t,n,i){if(t&&n&&e[t]){var a=r(t,n,i);a<0||e[t].splice(a,1)}}function r(t,n,r){var i=-1;return e[t]?(e[t].some((function(e,t){if(e&&e.callback===n&&(!r||r===e.scope))return i=t,!0})),i):i}var a={on:function(e,n,r){t(e,n,r,arguments.length>3&&void 0!==arguments[3]?arguments[3]:{})},once:function(e,n,r){t(e,n,r,arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},!0)},off:n,trigger:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t&&e[t]){if((r=r||{}).hasOwnProperty("type"))throw new Error("'type' is a reserved word for event dispatching");r.type=t,a.streamId&&(r.streamId=a.streamId),a.mediaType&&(r.mediaType=a.mediaType);var o=[];e[t].filter((function(e){return!(!e||a.streamId&&e.streamId&&e.streamId!==a.streamId||a.mediaType&&e.mediaType&&e.mediaType!==a.mediaType||a.mode&&e.mode&&e.mode!==a.mode||!e.mode&&a.mode&&a.mode===i.A.EVENT_MODE_ON_RECEIVE)})).forEach((function(e){e&&e.callback.call(e.scope,r),e.executeOnlyOnce&&o.push(e)})),o.forEach((function(e){n(t,e.callback,e.scope)}))}},reset:function(){e={}}};return a}a.__dashjs_factory_name="EventBus";var o=r.A.getSingletonFactory(a);o.EVENT_PRIORITY_LOW=0,o.EVENT_PRIORITY_HIGH=5e3,r.A.updateSingletonFactory(a.__dashjs_factory_name,o),t.A=o},90138:function(e,t,n){"use strict";n(2008),n(44114),n(62010),n(18111),n(22489),n(26099);var r=function(){var e,t=[],n={},r={};function i(e,n){for(var r in t){var i=t[r];if(i.context===e&&i.name===n)return i.instance}return null}function a(e,t){return t[e]}function o(e,t,n){e in n&&(n[e]=t)}function s(t,n,r){var i,a=t.__dashjs_factory_name,o=n[a];if(o){var s=o.instance;if(!o.override)return s.apply({context:n,factory:e},r);for(var u in i=t.apply({context:n},r),s=s.apply({context:n,factory:e,parent:i},r))i.hasOwnProperty(u)&&(i[u]=s[u])}else i=t.apply({context:n},r);return i.getClassName=function(){return a},i}return e={deleteSingletonInstances:function(e){t=t.filter((function(t){return t.context!==e}))},extend:function(e,t,n,r){!r[e]&&t&&(r[e]={instance:t,override:n})},getClassFactory:function(e){var t=a(e.__dashjs_factory_name,r);return t||(t=function(t){return void 0===t&&(t={}),{create:function(){return s(e,t,arguments)}}},r[e.__dashjs_factory_name]=t),t},getClassFactoryByName:function(e){return a(e,r)},getSingletonFactory:function(e){var r=a(e.__dashjs_factory_name,n);return r||(r=function(n){var r;return void 0===n&&(n={}),{getInstance:function(){return r||(r=i(n,e.__dashjs_factory_name)),r||(r=s(e,n,arguments),t.push({name:e.__dashjs_factory_name,context:n,instance:r})),r}}},n[e.__dashjs_factory_name]=r),r},getSingletonFactoryByName:function(e){return a(e,n)},getSingletonInstance:i,setSingletonInstance:function(e,n,r){for(var i in t){var a=t[i];if(a.context===e&&a.name===n)return void(t[i].instance=r)}t.push({name:n,context:e,instance:r})},updateClassFactory:function(e,t){o(e,t,r)},updateSingletonFactory:function(e,t){o(e,t,n)}},e}();t.A=r},78261:function(e,t,n){"use strict";var r=n(34299),i=n(50544),a=n(91975),o=(n(28706),n(62062),n(34782),n(18111),n(61701),n(26099),n(84864),n(57465),n(27495),n(87745),n(38781),n(90138)),s=n(47263),u=n(649),c=n(35212),l=n(87568),f=n(78850),d=n(43621),h=n(94246);function g(){var e,t,n=this.context,o=(0,f.A)(n).getInstance(),g={"streaming.delay.liveDelay":d.A.SETTING_UPDATED_LIVE_DELAY,"streaming.delay.liveDelayFragmentCount":d.A.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,"streaming.liveCatchup.enabled":d.A.SETTING_UPDATED_CATCHUP_ENABLED,"streaming.liveCatchup.playbackRate.min":d.A.SETTING_UPDATED_PLAYBACK_RATE_MIN,"streaming.liveCatchup.playbackRate.max":d.A.SETTING_UPDATED_PLAYBACK_RATE_MAX,"streaming.abr.rules.throughputRule.active":d.A.SETTING_UPDATED_ABR_ACTIVE_RULES,"streaming.abr.rules.bolaRule.active":d.A.SETTING_UPDATED_ABR_ACTIVE_RULES,"streaming.abr.rules.insufficientBufferRule.active":d.A.SETTING_UPDATED_ABR_ACTIVE_RULES,"streaming.abr.rules.switchHistoryRule.active":d.A.SETTING_UPDATED_ABR_ACTIVE_RULES,"streaming.abr.rules.droppedFramesRule.active":d.A.SETTING_UPDATED_ABR_ACTIVE_RULES,"streaming.abr.rules.abandonRequestsRule.active":d.A.SETTING_UPDATED_ABR_ACTIVE_RULES,"streaming.abr.rules.l2ARule.active":d.A.SETTING_UPDATED_ABR_ACTIVE_RULES,"streaming.abr.rules.loLPRule.active":d.A.SETTING_UPDATED_ABR_ACTIVE_RULES,"streaming.abr.maxBitrate.video":d.A.SETTING_UPDATED_MAX_BITRATE,"streaming.abr.maxBitrate.audio":d.A.SETTING_UPDATED_MAX_BITRATE,"streaming.abr.minBitrate.video":d.A.SETTING_UPDATED_MIN_BITRATE,"streaming.abr.minBitrate.audio":d.A.SETTING_UPDATED_MIN_BITRATE},p={debug:{logLevel:u.A.LOG_LEVEL_WARNING,dispatchEvent:!1},streaming:{abandonLoadTimeout:1e4,wallclockTimeUpdateInterval:100,manifestUpdateRetryInterval:100,liveUpdateTimeThresholdInMilliseconds:0,cacheInitSegments:!1,cacheInitSegmentsLimit:50,applyServiceDescription:!0,applyProducerReferenceTime:!0,applyContentSteering:!0,enableManifestDurationMismatchFix:!0,parseInbandPrft:!1,enableManifestTimescaleMismatchFix:!1,capabilities:{filterUnsupportedEssentialProperties:!0,supportedEssentialProperties:[{schemeIdUri:c.A.FONT_DOWNLOAD_DVB_SCHEME},{schemeIdUri:c.A.COLOUR_PRIMARIES_SCHEME_ID_URI,value:/1|5|6|7/},{schemeIdUri:c.A.URL_QUERY_INFO_SCHEME},{schemeIdUri:c.A.EXT_URL_QUERY_INFO_SCHEME},{schemeIdUri:c.A.MATRIX_COEFFICIENTS_SCHEME_ID_URI,value:/0|1|5|6/},{schemeIdUri:c.A.TRANSFER_CHARACTERISTICS_SCHEME_ID_URI,value:/1|6|13|14|15/},{schemeIdUri:c.A.SEGMENT_SEQUENCE_REPRESENTATION_SCHEME_ID_URI}].concat((0,a.A)(c.A.THUMBNAILS_SCHEME_ID_URIS.map((function(e){return{schemeIdUri:e}})))),useMediaCapabilitiesApi:!0,filterVideoColorimetryEssentialProperties:!0,filterHDRMetadataFormatEssentialProperties:!0,filterAudioChannelConfiguration:!1},events:{eventControllerRefreshDelay:100,deleteEventMessageDataTimeout:1e4},timeShiftBuffer:{calcFromSegmentTimeline:!1,fallbackToSegmentTimeline:!0},metrics:{maxListDepth:100},delay:{liveDelayFragmentCount:NaN,liveDelay:NaN,useSuggestedPresentationDelay:!0},protection:{keepProtectionMediaKeys:!1,keepProtectionMediaKeysMaximumOpenSessions:-1,ignoreEmeEncryptedEvent:!1,detectPlayreadyMessageFormat:!0,ignoreKeyStatuses:!1},buffer:{enableSeekDecorrelationFix:!1,fastSwitchEnabled:null,flushBufferAtTrackSwitch:!1,reuseExistingSourceBuffers:!0,bufferPruningInterval:10,bufferToKeep:20,bufferTimeAtTopQuality:30,bufferTimeAtTopQualityLongForm:60,initialBufferLevel:NaN,bufferTimeDefault:18,longFormContentDurationThreshold:600,stallThreshold:.3,lowLatencyStallThreshold:.3,useAppendWindow:!0,setStallState:!0,avoidCurrentTimeRangePruning:!1,useChangeType:!0,mediaSourceDurationInfinity:!0,resetSourceBuffersForTrackSwitch:!1,syntheticStallEvents:{enabled:!1,ignoreReadyState:!1}},gaps:{jumpGaps:!0,jumpLargeGaps:!0,smallGapLimit:1.5,threshold:.3,enableSeekFix:!0,enableStallFix:!1,stallSeek:.1,seekOffset:0,checkInterval:250},utcSynchronization:{enabled:!0,useManifestDateHeaderTimeSource:!0,backgroundAttempts:2,timeBetweenSyncAttempts:30,maximumTimeBetweenSyncAttempts:600,minimumTimeBetweenSyncAttempts:2,timeBetweenSyncAttemptsAdjustmentFactor:2,maximumAllowedDrift:100,enableBackgroundSyncAfterSegmentDownloadError:!0,defaultTimingSource:{scheme:"urn:mpeg:dash:utc:http-xsdate:2014",value:"https://time.akamai.com/?iso&ms"},artificialTimeOffsetToApply:0},scheduling:{defaultTimeout:500,lowLatencyTimeout:0,scheduleWhilePaused:!0},text:{defaultEnabled:!0,dispatchForManualRendering:!1,extendSegmentedCues:!0,imsc:{displayForcedOnlyMode:!1,enableRollUp:!0},webvtt:{customRenderingEnabled:!1}},liveCatchup:{maxDrift:NaN,playbackRate:{min:NaN,max:NaN},step:{start:{min:NaN,max:NaN},stop:{min:NaN,max:NaN}},liveThreshold:-1,playbackBufferMin:.5,enabled:null,mode:c.A.LIVE_CATCHUP_MODE_DEFAULT},lastBitrateCachingInfo:{enabled:!0,ttl:36e4},lastMediaSettingsCachingInfo:{enabled:!0,ttl:36e4},saveLastMediaSettingsForCurrentStreamingSession:!0,cacheLoadThresholds:{video:10,audio:5},trackSwitchMode:{audio:c.A.TRACK_SWITCH_MODE_ALWAYS_REPLACE,video:c.A.TRACK_SWITCH_MODE_NEVER_REPLACE},includePreselectionsInMediainfoArray:!0,includePreselectionsForInitialTrackSelection:!1,ignoreSelectionPriority:!1,prioritizeRoleMain:!0,assumeDefaultRoleAsMain:!0,selectionModeForInitialTrack:c.A.TRACK_SELECTION_MODE_LOWEST_STARTUP_DELAY,blacklistExpiryTime:-1,fragmentRequestTimeout:2e4,fragmentRequestProgressTimeout:-1,manifestRequestTimeout:1e4,retryIntervals:(e={},(0,i.A)((0,i.A)((0,i.A)((0,i.A)((0,i.A)((0,i.A)((0,i.A)((0,i.A)((0,i.A)((0,i.A)(e,l.G.MPD_TYPE,500),l.G.XLINK_EXPANSION_TYPE,500),l.G.MEDIA_SEGMENT_TYPE,1e3),l.G.INIT_SEGMENT_TYPE,1e3),l.G.BITSTREAM_SWITCHING_SEGMENT_TYPE,1e3),l.G.INDEX_SEGMENT_TYPE,1e3),l.G.MSS_FRAGMENT_INFO_SEGMENT_TYPE,1e3),l.G.LICENSE,1e3),l.G.LICENSE_CERTIFICATE,1e3),l.G.OTHER_TYPE,1e3),(0,i.A)(e,"lowLatencyReductionFactor",10)),retryAttempts:(t={},(0,i.A)((0,i.A)((0,i.A)((0,i.A)((0,i.A)((0,i.A)((0,i.A)((0,i.A)((0,i.A)((0,i.A)(t,l.G.MPD_TYPE,3),l.G.XLINK_EXPANSION_TYPE,1),l.G.MEDIA_SEGMENT_TYPE,3),l.G.INIT_SEGMENT_TYPE,3),l.G.BITSTREAM_SWITCHING_SEGMENT_TYPE,3),l.G.INDEX_SEGMENT_TYPE,3),l.G.MSS_FRAGMENT_INFO_SEGMENT_TYPE,3),l.G.LICENSE,3),l.G.LICENSE_CERTIFICATE,3),l.G.OTHER_TYPE,3),(0,i.A)(t,"lowLatencyMultiplyFactor",5)),abr:{limitBitrateByPortal:!1,usePixelRatioInLimitBitrateByPortal:!1,limitBitrateByPortalMinimum:0,enableSupplementalPropertyAdaptationSetSwitching:!0,rules:{throughputRule:{active:!0,priority:h.A.PRIORITY.DEFAULT},bolaRule:{active:!0,priority:h.A.PRIORITY.DEFAULT},insufficientBufferRule:{active:!0,priority:h.A.PRIORITY.DEFAULT,parameters:{throughputSafetyFactor:.7,segmentIgnoreCount:2}},switchHistoryRule:{active:!0,priority:h.A.PRIORITY.DEFAULT,parameters:{sampleSize:8,switchPercentageThreshold:.075}},droppedFramesRule:{active:!1,priority:h.A.PRIORITY.DEFAULT,parameters:{minimumSampleSize:375,droppedFramesPercentageThreshold:.15}},abandonRequestsRule:{active:!0,priority:h.A.PRIORITY.DEFAULT,parameters:{abandonDurationMultiplier:1.8,minSegmentDownloadTimeThresholdInMs:500,minThroughputSamplesThreshold:6}},l2ARule:{active:!1,priority:h.A.PRIORITY.DEFAULT},loLPRule:{active:!1,priority:h.A.PRIORITY.DEFAULT}},throughput:{averageCalculationMode:c.A.THROUGHPUT_CALCULATION_MODES.EWMA,lowLatencyDownloadTimeCalculationMode:c.A.LOW_LATENCY_DOWNLOAD_TIME_CALCULATION_MODE.MOOF_PARSING,useResourceTimingApi:!0,useNetworkInformationApi:{xhr:!1,fetch:!1},useDeadTimeLatency:!0,bandwidthSafetyFactor:.9,sampleSettings:{live:3,vod:4,enableSampleSizeAdjustment:!0,decreaseScale:.7,increaseScale:1.3,maxMeasurementsToKeep:20,averageLatencySampleAmount:4},ewma:{throughputSlowHalfLifeSeconds:8,throughputFastHalfLifeSeconds:3,latencySlowHalfLifeCount:2,latencyFastHalfLifeCount:1,weightDownloadTimeMultiplicationFactor:.0015}},maxBitrate:{audio:-1,video:-1},minBitrate:{audio:-1,video:-1},initialBitrate:{audio:-1,video:-1},autoSwitchBitrate:{audio:!0,video:!0}},cmcd:{applyParametersFromMpd:!0,enabled:!1,sid:null,cid:null,rtp:null,rtpSafetyFactor:5,mode:c.A.CMCD_MODE_QUERY,enabledKeys:c.A.CMCD_KEYS,includeInRequests:["segment","mpd"],version:1,eventTargets:[]},cmsd:{enabled:!1,abr:{applyMb:!1,etpWeightRatio:0}},enhancement:{enabled:!1,codecs:["lvc1"]},defaultSchemeIdUri:{viewpoint:"",audioChannelConfiguration:"urn:mpeg:mpegB:cicp:ChannelConfiguration",role:"urn:mpeg:dash:role:2011",accessibility:"urn:mpeg:dash:role:2011"},dvbReporting:{reportingUrl:null}},errors:{recoverAttempts:{mediaErrorDecode:5}}},m=s.A.clone(p);function E(e,t,n){for(var i in e)e.hasOwnProperty(i)&&(t.hasOwnProperty(i)?"object"!==(0,r.A)(e[i])||e[i]instanceof RegExp||e[i]instanceof Array||null===e[i]?(t[i]=s.A.clone(e[i]),g[n+i]&&o.trigger(g[n+i])):E(e[i],t[i],n.slice()+i+"."):console.error("Settings parameter "+n+i+" is not supported"))}return{get:function(){return m},update:function(e){"object"===(0,r.A)(e)&&E(e,m,"")},reset:function(){m=s.A.clone(p)}}}g.__dashjs_factory_name="Settings";var p=o.A.getSingletonFactory(g);t.A=p},47263:function(e,t,n){"use strict";var r=n(72958),i=n(78508),a=n(34299),o=n(7718),s=n(85952),u=(n(52675),n(89463),n(2259),n(16280),n(28706),n(23418),n(74423),n(23792),n(48598),n(62062),n(44114),n(34782),n(54743),n(16573),n(78100),n(77936),n(62010),n(18111),n(7588),n(61701),n(26099),n(84864),n(57465),n(27495),n(87745),n(90906),n(38781),n(21699),n(47764),n(25440),n(5746),n(42762),n(21489),n(48140),n(81630),n(72170),n(75044),n(69539),n(31694),n(89955),n(21903),n(91134),n(33206),n(44496),n(66651),n(12887),n(19369),n(66812),n(8995),n(31575),n(36072),n(88747),n(28845),n(29423),n(57301),n(373),n(86614),n(41405),n(37467),n(44732),n(33684),n(79577),n(41549),n(49797),n(49631),n(35623),n(23500),n(62953),n(3296),n(27208),n(48408),n(14603),n(47566),n(98721),n(93282)),c=n(35212);function l(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return f(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var d=function(){function e(){(0,o.A)(this,e)}return(0,s.A)(e,null,[{key:"mixin",value:function(t,n,r){var i,o={};if(t)for(var s in n)n.hasOwnProperty(s)&&(i=n[s],s in t&&(t[s]===i||s in o&&o[s]===i)||("object"===(0,a.A)(t[s])&&null!==t[s]?t[s]=e.mixin(t[s],i,r):t[s]=r(i)));return t}},{key:"clone",value:function(t){if(!t||"object"!==(0,a.A)(t))return t;if(t instanceof RegExp)return new RegExp(t);var n;if(t instanceof Array){n=[];for(var r=0,i=t.length;r<i;++r)r in t&&n.push(e.clone(t[r]))}else n={};return e.mixin(n,t,e.clone)}},{key:"addAdditionalQueryParameterToUrl",value:function(e,t){try{if(!t||0===t.length)return e;var n=e;return t.forEach((function(e){var t=e.key,r=e.value,i=n.includes("?")?"&":"?";n+="".concat(i).concat(encodeURIComponent(t),"=").concat(encodeURIComponent(r))})),n}catch(t){return e}}},{key:"removeQueryParameterFromUrl",value:function(e,t){if(!e||!t)return e;var n=new URL(e),r=new URLSearchParams(n.search);if(!r||0===r.size||!r.has(t))return e;r.delete(t);var a=Array.from(r.entries()).map((function(e){var t=(0,i.A)(e,2),n=t[0],r=t[1];return"".concat(n,"=").concat(r)})).join("&"),o="".concat(n.origin).concat(n.pathname);return a?"".concat(o,"?").concat(a):o}},{key:"parseHttpHeaders",value:function(e){var t={};if(!e)return t;for(var n=e.trim().split("\r\n"),r=0,i=n.length;r<i;r++){var a=n[r],o=a.indexOf(": ");o>0&&(t[a.substring(0,o)]=a.substring(o+2))}return t}},{key:"parseQueryParams",value:function(e){var t,n=[],r=l(new URLSearchParams(e).entries());try{for(r.s();!(t=r.n()).done;){var a=(0,i.A)(t.value,2),o=a[0],s=a[1];n.push({key:decodeURIComponent(o),value:decodeURIComponent(s)})}}catch(e){r.e(e)}finally{r.f()}return n}},{key:"generateUuid",value:function(){var e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?n:3&n|8).toString(16)}))}},{key:"generateHashCode",value:function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}},{key:"getRelativeUrl",value:function(e,t){try{var n=new URL(e),r=new URL(t);if(n.protocol=r.protocol,n.origin!==r.origin)return t;var i=u.relative(n.pathname.substr(0,n.pathname.lastIndexOf("/")),r.pathname.substr(0,r.pathname.lastIndexOf("/"))),a=0===i.length?1:0;return i+=r.pathname.substr(r.pathname.lastIndexOf("/")+a,r.pathname.length-1),r.pathname.length<i.length?r.pathname:i}catch(e){return t}}},{key:"getHostFromUrl",value:function(e){try{return new URL(e).host}catch(e){return null}}},{key:"parseUserAgent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;try{var t="string"==typeof e?e.toLowerCase():"undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",n={name:""};return/edg/.test(t)?n.name="edge":/opr|opios/.test(t)?n.name="opera":/chrome|crios/.test(t)?n.name="chrome":/firefox|fxios/.test(t)?n.name="firefox":/safari/.test(t)&&(n.name="safari"),{browser:n}}catch(e){return{}}}},{key:"stringHasProtocol",value:function(e){return/(http(s?)):\/\//i.test(e)}},{key:"bufferSourceToDataView",value:function(t){return e.toDataView(t,DataView)}},{key:"bufferSourceToInt8",value:function(t){return e.toDataView(t,Uint8Array)}},{key:"uint8ArrayToString",value:function(e){return new TextDecoder("utf-8").decode(e)}},{key:"bufferSourceToHex",value:function(t){var n,r="",i=l(e.bufferSourceToInt8(t));try{for(i.s();!(n=i.n()).done;){var a=n.value;1===(a=a.toString(16)).length&&(a="0"+a),r+=a}}catch(e){i.e(e)}finally{i.f()}return r}},{key:"toDataView",value:function(t,n){var r=e.getArrayBuffer(t),i=1;"BYTES_PER_ELEMENT"in DataView&&(i=DataView.BYTES_PER_ELEMENT);var a=((t.byteOffset||0)+t.byteLength)/i,o=(t.byteOffset||0)/i,s=Math.floor(Math.max(0,Math.min(o,a)));return new n(r,s,Math.floor(Math.min(s+Math.max(1/0,0),a))-s)}},{key:"getArrayBuffer",value:function(e){return e instanceof ArrayBuffer?e:e.buffer}},{key:"getCodecFamily",value:function(t){var n=e._getCodecParts(t),r=n.base,i=n.profile;switch(r){case"mp4a":switch(i){case"69":case"6b":case"40.34":return c.A.CODEC_FAMILIES.MP3;case"66":case"67":case"68":case"40.2":case"40.02":case"40.5":case"40.05":case"40.29":case"40.42":return c.A.CODEC_FAMILIES.AAC;case"a5":return c.A.CODEC_FAMILIES.AC3;case"e6":return c.A.CODEC_FAMILIES.EC3;case"b2":return c.A.CODEC_FAMILIES.DTSX;case"a9":return c.A.CODEC_FAMILIES.DTSC}break;case"avc1":case"avc3":return c.A.CODEC_FAMILIES.AVC;case"hvc1":case"hvc3":return c.A.CODEC_FAMILIES.HEVC;default:return r}return r}},{key:"_getCodecParts",value:function(e){var t=e.split("."),n=(0,r.A)(t);return{base:n[0],profile:f(n).slice(1).join(".")}}}])}();t.A=d},48986:function(e,t,n){"use strict";n.d(t,{i:function(){return i}});var r="5.2.0";function i(){return r}},70893:function(e,t,n){"use strict";n(60825);var r=n(85952),i=n(7718),a=n(8591),o=n(4597),s=n(18766);function u(e,t,n){return t=(0,o.A)(t),(0,a.A)(e,c()?Reflect.construct(t,n||[],(0,o.A)(e).constructor):t.apply(e,n))}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}var l=new(function(e){function t(){var e;return(0,i.A)(this,t),(e=u(this,t)).MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE=10,e.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE=11,e.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE=12,e.SEGMENT_BASE_LOADER_ERROR_CODE=15,e.TIME_SYNC_FAILED_ERROR_CODE=16,e.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE=17,e.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE=18,e.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE=19,e.APPEND_ERROR_CODE=20,e.REMOVE_ERROR_CODE=21,e.DATA_UPDATE_FAILED_ERROR_CODE=22,e.CAPABILITY_MEDIASOURCE_ERROR_CODE=23,e.CAPABILITY_MEDIAKEYS_ERROR_CODE=24,e.DOWNLOAD_ERROR_ID_MANIFEST_CODE=25,e.DOWNLOAD_ERROR_ID_SIDX_CODE=26,e.DOWNLOAD_ERROR_ID_CONTENT_CODE=27,e.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE=28,e.DOWNLOAD_ERROR_ID_XLINK_CODE=29,e.MANIFEST_ERROR_ID_PARSE_CODE=31,e.MANIFEST_ERROR_ID_NOSTREAMS_CODE=32,e.TIMED_TEXT_ERROR_ID_PARSE_CODE=33,e.MANIFEST_ERROR_ID_MULTIPLEXED_CODE=34,e.MEDIASOURCE_TYPE_UNSUPPORTED_CODE=35,e.NO_SUPPORTED_KEY_IDS=36,e.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE="parsing failed for ",e.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE="Failed loading manifest: ",e.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE="Failed loading Xlink element: ",e.SEGMENTS_UPDATE_FAILED_ERROR_MESSAGE="Segments update failed",e.SEGMENTS_UNAVAILABLE_ERROR_MESSAGE="no segments are available yet",e.SEGMENT_BASE_LOADER_ERROR_MESSAGE="error loading segment ranges from sidx",e.TIME_SYNC_FAILED_ERROR_MESSAGE="Failed to synchronize client and server time",e.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE="request is null",e.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE="Failed to resolve a valid URL",e.APPEND_ERROR_MESSAGE="chunk is not defined",e.REMOVE_ERROR_MESSAGE="Removing data from the SourceBuffer",e.DATA_UPDATE_FAILED_ERROR_MESSAGE="Data update failed",e.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE="mediasource is not supported",e.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE="mediakeys is not supported",e.TIMED_TEXT_ERROR_MESSAGE_PARSE="parsing error :",e.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE="Error creating source buffer of type : ",e.NO_SUPPORTED_KEY_IDS_MESSAGE="All possible Adaptation Sets have an invalid key status",e}return(0,s.A)(t,e),(0,r.A)(t)}(n(78748).A));t.A=l},78748:function(e,t,n){"use strict";var r=n(7718),i=n(85952),a=function(){return(0,i.A)((function e(){(0,r.A)(this,e)}),[{key:"extend",value:function(e,t){if(e){var n=!!t&&t.override,r=!!t&&t.publicOnly;for(var i in e)!e.hasOwnProperty(i)||this[i]&&!n||r&&-1===e[i].indexOf("public_")||(this[i]=e[i])}}}])}();t.A=a},75734:function(e,t,n){"use strict";n(60825);var r=n(85952),i=n(7718),a=n(8591),o=n(4597),s=n(18766);function u(e,t,n){return t=(0,o.A)(t),(0,a.A)(e,c()?Reflect.construct(t,n||[],(0,o.A)(e).constructor):t.apply(e,n))}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}var l=function(e){function t(){var e;return(0,i.A)(this,t),(e=u(this,t)).ATTEMPT_BACKGROUND_SYNC="attemptBackgroundSync",e.BUFFERING_COMPLETED="bufferingCompleted",e.BUFFER_CLEARED="bufferCleared",e.BUFFER_REPLACEMENT_STARTED="bufferReplacementStarted",e.BYTES_APPENDED_END_FRAGMENT="bytesAppendedEndFragment",e.CHECK_FOR_EXISTENCE_COMPLETED="checkForExistenceCompleted",e.CMSD_STATIC_HEADER="cmsdStaticHeader",e.CURRENT_TRACK_CHANGED="currentTrackChanged",e.DATA_UPDATE_COMPLETED="dataUpdateCompleted",e.INBAND_EVENTS="inbandEvents",e.INITIAL_STREAM_SWITCH="initialStreamSwitch",e.INIT_FRAGMENT_LOADED="initFragmentLoaded",e.INIT_FRAGMENT_NEEDED="initFragmentNeeded",e.INTERNAL_MANIFEST_LOADED="internalManifestLoaded",e.LOADING_ABANDONED="loadingAborted",e.LOADING_COMPLETED="loadingCompleted",e.LOADING_DATA_PROGRESS="loadingDataProgress",e.LOADING_PROGRESS="loadingProgress",e.MANIFEST_UPDATED="manifestUpdated",e.MEDIAINFO_UPDATED="mediaInfoUpdated",e.MEDIA_FRAGMENT_LOADED="mediaFragmentLoaded",e.MEDIA_FRAGMENT_NEEDED="mediaFragmentNeeded",e.ORIGINAL_MANIFEST_LOADED="originalManifestLoaded",e.QUOTA_EXCEEDED="quotaExceeded",e.SEEK_TARGET="seekTarget",e.SEGMENT_LOCATION_BLACKLIST_ADD="segmentLocationBlacklistAdd",e.SEGMENT_LOCATION_BLACKLIST_CHANGED="segmentLocationBlacklistChanged",e.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD="serviceLocationBlacklistAdd",e.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED="serviceLocationBlacklistChanged",e.SERVICE_LOCATION_LOCATION_BLACKLIST_ADD="serviceLocationLocationBlacklistAdd",e.SERVICE_LOCATION_LOCATION_BLACKLIST_CHANGED="serviceLocationLocationBlacklistChanged",e.SETTING_UPDATED_ABR_ACTIVE_RULES="settingUpdatedAbrActiveRules",e.SETTING_UPDATED_CATCHUP_ENABLED="settingUpdatedCatchupEnabled",e.SETTING_UPDATED_LIVE_DELAY="settingUpdatedLiveDelay",e.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT="settingUpdatedLiveDelayFragmentCount",e.SETTING_UPDATED_MAX_BITRATE="settingUpdatedMaxBitrate",e.SETTING_UPDATED_MIN_BITRATE="settingUpdatedMinBitrate",e.SETTING_UPDATED_PLAYBACK_RATE_MAX="settingUpdatedPlaybackRateMax",e.SETTING_UPDATED_PLAYBACK_RATE_MIN="settingUpdatedPlaybackRateMin",e.SET_FRAGMENTED_TEXT_AFTER_DISABLED="setFragmentedTextAfterDisabled",e.SET_NON_FRAGMENTED_TEXT="setNonFragmentedText",e.SOURCE_BUFFER_ERROR="sourceBufferError",e.STREAMS_COMPOSED="streamsComposed",e.STREAM_BUFFERING_COMPLETED="streamBufferingCompleted",e.STREAM_REQUESTING_COMPLETED="streamRequestingCompleted",e.TEXT_TRACKS_QUEUE_INITIALIZED="textTracksQueueInitialized",e.TIME_SYNCHRONIZATION_COMPLETED="timeSynchronizationComplete",e.UPDATE_TIME_SYNC_OFFSET="updateTimeSyncOffset",e.URL_RESOLUTION_FAILED="urlResolutionFailed",e.VIDEO_CHUNK_RECEIVED="videoChunkReceived",e.VIDEO_ELEMENT_RESIZED="videoElementResized",e.WALLCLOCK_TIME_UPDATED="wallclockTimeUpdated",e.XLINK_ELEMENT_LOADED="xlinkElementLoaded",e.XLINK_READY="xlinkReady",e}return(0,s.A)(t,e),(0,r.A)(t)}(n(47252).A);t.A=l},43621:function(e,t,n){"use strict";n(60825);var r=n(85952),i=n(7718),a=n(8591),o=n(4597),s=n(18766);function u(e,t,n){return t=(0,o.A)(t),(0,a.A)(e,c()?Reflect.construct(t,n||[],(0,o.A)(e).constructor):t.apply(e,n))}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}var l=function(e){function t(){return(0,i.A)(this,t),u(this,t,arguments)}return(0,s.A)(t,e),(0,r.A)(t)}(n(75734).A),f=new l;t.A=f},47252:function(e,t,n){"use strict";var r=n(7718),i=n(85952),a=function(){return(0,i.A)((function e(){(0,r.A)(this,e)}),[{key:"extend",value:function(e,t){if(e){var n=!!t&&t.override,r=!!t&&t.publicOnly;for(var i in e)!e.hasOwnProperty(i)||this[i]&&!n||r&&-1===e[i].indexOf("public_")||(this[i]=e[i])}}}])}();t.A=a},98854:function(e,t){"use strict";t.A={ACCESSIBILITY:"Accessibility",ADAPTATION_SET:"AdaptationSet",ADAPTATION_SETS:"adaptationSets",ADAPTATION_SET_SWITCHING_SCHEME_ID_URI:"urn:mpeg:dash:adaptation-set-switching:2016",ADD:"add",ASSET_IDENTIFIER:"AssetIdentifier",AUDIO_CHANNEL_CONFIGURATION:"AudioChannelConfiguration",AUDIO_SAMPLING_RATE:"audioSamplingRate",AVAILABILITY_END_TIME:"availabilityEndTime",AVAILABILITY_START_TIME:"availabilityStartTime",AVAILABILITY_TIME_COMPLETE:"availabilityTimeComplete",AVAILABILITY_TIME_OFFSET:"availabilityTimeOffset",BANDWITH:"bandwidth",BASE_URL:"BaseURL",BITSTREAM_SWITCHING:"BitstreamSwitching",BITSTREAM_SWITCHING_MINUS:"bitstreamSwitching",BYTE_RANGE:"byteRange",CAPTION:"caption",CENC_DEFAULT_KID:"cenc:default_KID",CLIENT_DATA_REPORTING:"ClientDataReporting",CLIENT_REQUIREMENT:"clientRequirement",CMCD_PARAMETERS:"CMCDParameters",CODECS:"codecs",CODEC_PRIVATE_DATA:"codecPrivateData",CODING_DEPENDENCY:"codingDependency",CONTENT_COMPONENT:"ContentComponent",CONTENT_PROTECTION:"ContentProtection",CONTENT_STEERING:"ContentSteering",CONTENT_STEERING_RESPONSE:{VERSION:"VERSION",TTL:"TTL",RELOAD_URI:"RELOAD-URI",PATHWAY_PRIORITY:"PATHWAY-PRIORITY",PATHWAY_CLONES:"PATHWAY-CLONES",BASE_ID:"BASE-ID",ID:"ID",URI_REPLACEMENT:"URI-REPLACEMENT",HOST:"HOST",PARAMS:"PARAMS"},CONTENT_TYPE:"contentType",DEFAULT_SERVICE_LOCATION:"defaultServiceLocation",DEPENDENCY_ID:"dependencyId",DURATION:"duration",DVB_PRIORITY:"dvb:priority",DVB_WEIGHT:"dvb:weight",DVB_URL:"dvb:url",DVB_MIMETYPE:"dvb:mimeType",DVB_FONTFAMILY:"dvb:fontFamily",DYNAMIC:"dynamic",END_NUMBER:"endNumber",ESSENTIAL_PROPERTY:"EssentialProperty",EVENT:"Event",EVENT_STREAM:"EventStream",FORCED_SUBTITLE:"forced-subtitle",FRAMERATE:"frameRate",FRAME_PACKING:"FramePacking",GROUP_LABEL:"GroupLabel",HEIGHT:"height",ID:"id",INBAND:"inband",INBAND_EVENT_STREAM:"InbandEventStream",INDEX:"index",INDEX_RANGE:"indexRange",INITIALIZATION:"Initialization",INITIALIZATION_MINUS:"initialization",K:"k",LA_URL:"Laurl",LA_URL_LOWER_CASE:"laurl",CERT_URL:"Certurl",LABEL:"Label",LANG:"lang",LOCATION:"Location",MAIN:"main",MAXIMUM_SAP_PERIOD:"maximumSAPPeriod",MAX_PLAYOUT_RATE:"maxPlayoutRate",MAX_SEGMENT_DURATION:"maxSegmentDuration",MAX_SUBSEGMENT_DURATION:"maxSubsegmentDuration",MEDIA:"media",MEDIA_PRESENTATION_DURATION:"mediaPresentationDuration",MEDIA_RANGE:"mediaRange",MEDIA_STREAM_STRUCTURE_ID:"mediaStreamStructureId",METRICS:"Metrics",METRICS_MINUS:"metrics",MIME_TYPE:"mimeType",MINIMUM_UPDATE_PERIOD:"minimumUpdatePeriod",MIN_BUFFER_TIME:"minBufferTime",MP4_PROTECTION_SCHEME:"urn:mpeg:dash:mp4protection:2011",MPD:"MPD",MPD_TYPE:"mpd",MPD_PATCH_TYPE:"mpdpatch",ORDER:"order",ORIGINAL_MPD_ID:"mpdId",ORIGINAL_PUBLISH_TIME:"originalPublishTime",PATCH_LOCATION:"PatchLocation",PERIOD:"Period",PRESELECTION:"Preselection",PRESELECTION_COMPONENTS:"preselectionComponents",PRESENTATION_TIME:"presentationTime",PRESENTATION_TIME_OFFSET:"presentationTimeOffset",PRO:"pro",PRODUCER_REFERENCE_TIME:"ProducerReferenceTime",PRODUCER_REFERENCE_TIME_TYPE:{ENCODER:"encoder",CAPTURED:"captured",APPLICATION:"application"},PROFILES:"profiles",PSSH:"pssh",PUBLISH_TIME:"publishTime",QUALITY_RANKING:"qualityRanking",QUERY_BEFORE_START:"queryBeforeStart",QUERY_PART:"$querypart$",RANGE:"range",RATING:"Rating",REF:"ref",REF_ID:"refId",REMOVE:"remove",REPLACE:"replace",REPORTING:"Reporting",REPRESENTATION:"Representation",REPRESENTATION_INDEX:"RepresentationIndex",ROBUSTNESS:"robustness",ROLE:"Role",S:"S",SAR:"sar",SCAN_TYPE:"scanType",SEGMENT_ALIGNMENT:"segmentAlignment",SEGMENT_BASE:"SegmentBase",SEGMENT_LIST:"SegmentList",SEGMENT_PROFILES:"segmentProfiles",SEGMENT_SEQUENCE_PROPERTIES:"SegmentSequenceProperties",SEGMENT_TEMPLATE:"SegmentTemplate",SEGMENT_TIMELINE:"SegmentTimeline",SEGMENT_TYPE:"segment",SEGMENT_URL:"SegmentURL",SERVICE_DESCRIPTION:"ServiceDescription",SERVICE_DESCRIPTION_LATENCY:"Latency",SERVICE_DESCRIPTION_OPERATING_BANDWIDTH:"OperatingBandwidth",SERVICE_DESCRIPTION_OPERATING_QUALITY:"OperatingQuality",SERVICE_DESCRIPTION_PLAYBACK_RATE:"PlaybackRate",SERVICE_DESCRIPTION_SCOPE:"Scope",SERVICE_LOCATION:"serviceLocation",SERVICE_LOCATIONS:"serviceLocations",SOURCE_URL:"sourceURL",START:"start",START_NUMBER:"startNumber",START_WITH_SAP:"startWithSAP",STATIC:"static",STEERING_TYPE:"steering",SUBSET:"Subset",SUBTITLE:"subtitle",SUB_REPRESENTATION:"SubRepresentation",SUB_SEGMENT_ALIGNMENT:"subsegmentAlignment",SUGGESTED_PRESENTATION_DELAY:"suggestedPresentationDelay",SUPPLEMENTAL_PROPERTY:"SupplementalProperty",SUPPLEMENTAL_CODECS:"scte214:supplementalCodecs",TAG:"tag",TIMESCALE:"timescale",TIMESHIFT_BUFFER_DEPTH:"timeShiftBufferDepth",TTL:"ttl",TYPE:"type",UTC_TIMING:"UTCTiming",VALUE:"value",VIEWPOINT:"Viewpoint",WALL_CLOCK_TIME:"wallClockTime",WIDTH:"width"}},79302:function(e,t,n){"use strict";var r=n(78508),i=n(91975),a=(n(52675),n(89463),n(2259),n(16280),n(18107),n(28706),n(2008),n(50113),n(23418),n(74423),n(23792),n(48598),n(62062),n(44114),n(34782),n(26910),n(62010),n(18111),n(81148),n(22489),n(20116),n(7588),n(61701),n(13579),n(2892),n(32637),n(64601),n(9868),n(26099),n(84864),n(57465),n(27495),n(87745),n(90906),n(38781),n(67357),n(21699),n(47764),n(25440),n(23500),n(62953),n(18062)),o=n(99415),s=n(99578),u=n(84770),c=n(35212),l=n(65915),f=n(26455),d=n(98854),h=n(11944),g=n(649),p=n(1036),m=n(70893),E=n(31465),v=n(7153),A=n(90138),y=n(15274),T=n(56517),_=n(7393),S=n(94740),I=n(47408),b=n(42436),R=n(2655),N=n(25876),C=n(46503),w=n(5717),D=n(47263),O=n(7356);function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function P(){var e,t,n,A,P=this.context,L=(0,C.A)(P).getInstance(),x=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e};function F(e,t){if(!e)throw new Error("adaptation is not defined");if(!t)throw new Error("type is not defined");if(e.Representation&&e.Representation.length){var n=X(e.Representation[0]);if(n&&n.some((function(e){return c.A.THUMBNAILS_SCHEME_ID_URIS.indexOf(e.schemeIdUri)>=0})))return t===c.A.IMAGE}if(e.ContentComponent&&e.ContentComponent.length>0){if(e.ContentComponent.length>1)return t===c.A.MUXED;if(e.ContentComponent[0].contentType===t)return!0}var r=t===c.A.TEXT?new RegExp("(ttml|vtt|wvtt|stpp)"):new RegExp(t);if(e.Representation&&e.Representation.length){var i=e.Representation[0].codecs;if(r.test(i))return!0}if(e.hasOwnProperty(d.A.MIME_TYPE))return r.test(e.mimeType);if(e.Representation)for(var a,o=0;o<e.Representation.length;o++)if((a=e.Representation[o]).hasOwnProperty(d.A.MIME_TYPE))return r.test(a.mimeType);return!1}function U(e){if(!e)throw new Error("adaptation is not defined");if(e.hasOwnProperty(d.A.SEGMENT_TEMPLATE)||e.hasOwnProperty(d.A.SEGMENT_TIMELINE)||e.hasOwnProperty(d.A.SEGMENT_LIST)||e.hasOwnProperty(d.A.SEGMENT_BASE))return!0;if(e.Representation&&e.Representation.length>0){var t=e.Representation[0];if(t.hasOwnProperty(d.A.SEGMENT_TEMPLATE)||t.hasOwnProperty(d.A.SEGMENT_TIMELINE)||t.hasOwnProperty(d.A.SEGMENT_LIST)||t.hasOwnProperty(d.A.SEGMENT_BASE))return!0}return!1}function k(e){return F(e,c.A.TEXT)}function B(e){return e&&e.Representation&&e.Representation.sort((function(e,t){return e.bandwidth-t.bandwidth})),e}function G(e,t){return e&&e.Period&&x(t)&&e.Period[t]?e.Period[t].AdaptationSet:[]}function H(e){return e&&e.Period?e.Period:[]}function Y(e,t,n){var r=null;if(e&&e.Representation&&e.Representation.length>0){var i=x(t)&&t>=0&&t<e.Representation.length?e.Representation[t]:e.Representation[0];i&&(r=i.mimeType+';codecs="'+i.codecs+'"',n&&void 0!==i.width&&(r+=';width="'+i.width+'";height="'+i.height+'"'))}return r&&(r=r.replace(/\sprofiles=[^;]*/g,"")),r}function V(e){var t=q(e);return t&&t.length>0}function q(e){var t=[];if(!e)return t;var n=K(e);return t=t.concat(n),e.hasOwnProperty(d.A.ADAPTATION_SET)&&e[d.A.ADAPTATION_SET].length>0&&e[d.A.ADAPTATION_SET].forEach((function(e){var n=K(e);t=t.concat(n)})),t}function K(e){return e&&e.hasOwnProperty(d.A.CONTENT_PROTECTION)&&0!==e.ContentProtection.length?e[d.A.CONTENT_PROTECTION].map((function(e){var t=new l.A;return t.init(e),t})):[]}function j(e){var t=!1;return e&&e.hasOwnProperty("type")&&(t=e.type===d.A.DYNAMIC),t}function z(e){if(!e)return null;var t=e[d.A.FRAMERATE];if(!t)return null;if("string"==typeof t&&t.includes("/")){var n=t.split("/").map((function(e){return parseInt(e,10)})),i=(0,r.A)(n,2),a=i[0],o=i[1];if(!isNaN(a)&&!isNaN(o)&&0!==o)return a/o}return parseInt(t)}function W(e,t){return t&&t.hasOwnProperty(e)&&t[e].length?t[e].map((function(e){var t=new p.A;return t.init(e),t})):[]}function Q(e,t){if(!t)return[];var n=function(e,t){if(!t||!t.length)return[];var n=t[0][e]||[];return 0===n.length?[]:1===t.length?n:n.filter((function(n){return t.slice(1).every((function(t){return t.hasOwnProperty(e)&&t[e].some((function(e){return e.schemeIdUri===n.schemeIdUri&&e.value===n.value}))}))}))}(e,t[d.A.REPRESENTATION]);return t.hasOwnProperty(e)&&t[e].length&&t[e].forEach((function(e){n.some((function(t){return t.schemeIdUri===e.schemeIdUri&&t.value===e.value}))||n.push(e)})),n.map((function(e){var t=new p.A;return t.init(e),t}))}function X(e){return W(d.A.ESSENTIAL_PROPERTY,e)}function $(e){return W(d.A.SUPPLEMENTAL_PROPERTY,e)}function Z(e){return e&&e.hasOwnProperty(d.A.SEGMENT_SEQUENCE_PROPERTIES)&&e[d.A.SEGMENT_SEQUENCE_PROPERTIES].length?e[d.A.SEGMENT_SEQUENCE_PROPERTIES].map((function(e){var t=new O.A(e);return t.init(e),t})):[]}function J(e,t,n,r,i,a){var o=new N.A;!function(e,t,n,r,i){if(e.index=i,e.adaptation=n,e.mediaInfo=r,t.hasOwnProperty(d.A.ID)&&(e.id=t.id),t.hasOwnProperty(d.A.CODECS)&&(e.codecs=t.codecs,e.codecFamily=D.A.getCodecFamily(e.codecs)),t.hasOwnProperty(d.A.DEPENDENCY_ID)){var a=t[d.A.DEPENDENCY_ID].toString().split(" ")[0];e.dependencyId=a,e.dependentRepresentation=new N.A,e.dependentRepresentation.id=a}t.hasOwnProperty(d.A.MIME_TYPE)&&(e.mimeType=t[d.A.MIME_TYPE]),t.hasOwnProperty(d.A.CODEC_PRIVATE_DATA)&&(e.codecPrivateData=t.codecPrivateData),t.hasOwnProperty(d.A.BANDWITH)&&(e.bandwidth=t.bandwidth,e.bitrateInKbit=t.bandwidth/1e3),t.hasOwnProperty(d.A.WIDTH)&&(e.width=t.width),t.hasOwnProperty(d.A.HEIGHT)&&(e.height=t.height),t.hasOwnProperty(d.A.SCAN_TYPE)&&(e.scanType=t.scanType),t.hasOwnProperty(d.A.FRAMERATE)&&(e.frameRate=z(t)),t.hasOwnProperty(d.A.QUALITY_RANKING)&&(e.qualityRanking=t[d.A.QUALITY_RANKING]),t.hasOwnProperty(d.A.MAX_PLAYOUT_RATE)&&(e.maxPlayoutRate=t.maxPlayoutRate),e.essentialProperties=X(t),e.supplementalProperties=$(t),e.segmentSequenceProperties=Z(t),e.path=[n.period.index,n.index,i]}(o,t,n,e,a);var s=function(e){var t,n;return e.hasOwnProperty(d.A.SEGMENT_BASE)?(t=e.SegmentBase,n=d.A.SEGMENT_BASE):n=e.hasOwnProperty(d.A.SEGMENT_LIST)?(t=e.SegmentList).hasOwnProperty(d.A.SEGMENT_TIMELINE)?d.A.SEGMENT_TIMELINE:d.A.SEGMENT_LIST:e.hasOwnProperty(d.A.SEGMENT_TEMPLATE)?(t=e.SegmentTemplate).hasOwnProperty(d.A.SEGMENT_TIMELINE)?d.A.SEGMENT_TIMELINE:d.A.SEGMENT_TEMPLATE:d.A.BASE_URL,{segmentInfo:t,segmentInfoType:n}}(t),u=s.segmentInfo,c=s.segmentInfoType;return o.segmentInfoType=c,function(e,t,n,r,i,a){if(e){if(e.hasOwnProperty(d.A.INITIALIZATION_MINUS)&&(n.initialization=e.initialization.split("$Bandwidth$").join(i.bandwidth).split("$RepresentationID$").join(i.id)),e.hasOwnProperty(d.A.INITIALIZATION)){var o=e.Initialization;o.hasOwnProperty(d.A.SOURCE_URL)&&(n.initialization=o.sourceURL),o.hasOwnProperty(d.A.RANGE)&&(n.range=o.range)}else k(r)&&U(r)&&r.mimeType&&-1===r.mimeType.indexOf("application/mp4")&&(n.range=0);var s,u;e.hasOwnProperty(d.A.TIMESCALE)&&(n.timescale=e.timescale),e.hasOwnProperty(d.A.DURATION)?n.segmentDuration=e.duration/n.timescale:t===d.A.SEGMENT_TIMELINE&&(n.segmentDuration=function(e){if(!e||!e.S)return NaN;var t=e.S[0],n=e.S[1];return t.hasOwnProperty("d")?t.d:n.t-t.t}(e.SegmentTimeline)/n.timescale,n.k=function(e){if(!e||!e.S)return 1;var t=e.S[0];return t.hasOwnProperty(d.A.K)?t.k:1}(e.SegmentTimeline)),e.hasOwnProperty(d.A.MEDIA)&&(n.media=e.media),e.hasOwnProperty(d.A.K)&&(n.k=e.k||1),e.hasOwnProperty(d.A.START_NUMBER)&&(n.startNumber=parseInt(e.startNumber)),e.hasOwnProperty(d.A.INDEX_RANGE)&&(n.indexRange=e.indexRange),e.hasOwnProperty(d.A.PRESENTATION_TIME_OFFSET)&&(n.presentationTimeOffset=e.presentationTimeOffset/n.timescale),e.hasOwnProperty(d.A.AVAILABILITY_TIME_OFFSET)?n.availabilityTimeOffset=e.availabilityTimeOffset:a&&void 0!==a.availabilityTimeOffset&&(n.availabilityTimeOffset=a.availabilityTimeOffset),e.hasOwnProperty(d.A.AVAILABILITY_TIME_COMPLETE)?n.availabilityTimeComplete="false"!==e.availabilityTimeComplete:a&&void 0!==a.availabilityTimeComplete&&(n.availabilityTimeComplete=a.availabilityTimeComplete),e.hasOwnProperty(d.A.END_NUMBER)&&(n.endNumber=e[d.A.END_NUMBER]),n.mseTimeOffset=(u=(s=n).presentationTimeOffset,s.adaptation.period.start-u)}}(u,c,o,r,t,i),function(e){isNaN(e.width)||isNaN(e.height)||isNaN(e.frameRate)||(e.pixelsPerSecond=Math.max(1,e.width*e.height*e.frameRate),isNaN(e.bandwidth)||(e.bitsPerPixel=e.bandwidth/e.pixelsPerSecond))}(o),o}function ee(e){return F(e,c.A.MUXED)?c.A.MUXED:F(e,c.A.AUDIO)?c.A.AUDIO:function(e){return F(e,c.A.VIDEO)}(e)?c.A.VIDEO:k(e)?c.A.TEXT:function(e){return F(e,c.A.IMAGE)}(e)?c.A.IMAGE:(t.warn("Unknown Preselection stream type"),null)}function te(e,t){if(e&&e.hasOwnProperty(d.A.PRESELECTION_COMPONENTS)&&Array.isArray(t))return String(e.preselectionComponents).split(" ").map((function(e){return t.find((function(t){return t.id===e}))}))}function ne(e,t){if(e&&e.hasOwnProperty(d.A.PRESELECTION_COMPONENTS)&&Array.isArray(t)){var n=String(e.preselectionComponents).split(" ");return t.find((function(e){return e.id===n[0]}))}}function re(e,t){if(!e)throw new Error("Period cannot be null or undefined");var n=I.A.DEFAULT_ID+"_"+t;return e.hasOwnProperty(d.A.ID)&&e.id.toString().length>0&&"__proto__"!==e.id&&(n=e.id.toString()),n}function ie(e,t,n){var r,i=[];if(!e)return i;for(r=0;r<e.length;r++){var a=new v.A;if(a.timescale=1,a.representation=t,!e[r].hasOwnProperty(c.A.SCHEME_ID_URI))throw new Error("Invalid EventStream. SchemeIdUri has to be set");a.schemeIdUri=e[r].schemeIdUri,e[r].hasOwnProperty(d.A.TIMESCALE)&&(a.timescale=e[r].timescale),e[r].hasOwnProperty(d.A.VALUE)&&(a.value=e[r].value),i.push(a),a.period=n}return i}function ae(e){var t=[],n=e.BaseURL||[e.baseUri],r=!1;return n.some((function(n){if(n){var i=new o.A,a=n.__text||n;return L.isRelative(a)&&(r=!0,e.baseUri&&(a=L.resolve(a,e.baseUri))),i.url=a,n.hasOwnProperty(d.A.SERVICE_LOCATION)&&n.serviceLocation.length?i.serviceLocation=n.serviceLocation:i.serviceLocation=a,n.hasOwnProperty(d.A.DVB_PRIORITY)&&(i.dvbPriority=n[d.A.DVB_PRIORITY]),n.hasOwnProperty(d.A.DVB_WEIGHT)&&(i.dvbWeight=n[d.A.DVB_WEIGHT]),n.hasOwnProperty(d.A.AVAILABILITY_TIME_OFFSET)&&(i.availabilityTimeOffset=n[d.A.AVAILABILITY_TIME_OFFSET]),n.hasOwnProperty(d.A.AVAILABILITY_TIME_COMPLETE)&&(i.availabilityTimeComplete="false"!==n[d.A.AVAILABILITY_TIME_COMPLETE]),t.push(i),r}})),t}function oe(e){var t=new f.A;return t.serverUrl=e.__text,e.hasOwnProperty(d.A.DEFAULT_SERVICE_LOCATION)&&(t.defaultServiceLocation=e[d.A.DEFAULT_SERVICE_LOCATION],t.defaultServiceLocationArray=t.defaultServiceLocation.split(" ")),e.hasOwnProperty(d.A.QUERY_BEFORE_START)&&(t.queryBeforeStart="true"===e[d.A.QUERY_BEFORE_START].toLowerCase()),e.hasOwnProperty(d.A.CLIENT_REQUIREMENT)&&(t.clientRequirement="false"!==e[d.A.CLIENT_REQUIREMENT].toLowerCase()),t}function se(e){var t,n=new u.A,r=e.schemeIdUri||(null===(t=e[d.A.CMCD_PARAMETERS])||void 0===t?void 0:t.schemeIdUri),i=[c.A.CTA_5004_2023_SCHEME,c.A.CTA_5004_2025_SCHEME].includes(r);return e.hasOwnProperty(d.A.CMCD_PARAMETERS)&&i&&(n.cmcdParameters=new s.A,n.cmcdParameters.init(e[d.A.CMCD_PARAMETERS])),e.hasOwnProperty(d.A.SERVICE_LOCATIONS)&&""!==e[d.A.SERVICE_LOCATIONS]&&(n.serviceLocations=e[d.A.SERVICE_LOCATIONS],n.serviceLocationsArray=n.serviceLocations.toString().split(" ")),e.hasOwnProperty(d.A.ADAPTATION_SETS)&&""!==e[d.A.ADAPTATION_SETS]&&(n.adaptationSets=e[d.A.ADAPTATION_SETS],n.adaptationSetsArray=n.adaptationSets.toString().split(" ")),n}return e={getAccessibilityForAdaptation:function(e){return e&&e.hasOwnProperty(d.A.ACCESSIBILITY)&&e[d.A.ACCESSIBILITY].length?e[d.A.ACCESSIBILITY].map((function(e){var t=new p.A;return t.init(e),t})):[]},getAdaptationForId:function(e,t,n){var r,i,a=G(t,n);for(r=0,i=a.length;r<i;r++)if(a[r].hasOwnProperty(d.A.ID)&&a[r].id===e)return a[r];return null},getAdaptationForIndex:function(e,t,n){var r=G(t,n);return r.length>0&&x(e)?r[e]:null},getAdaptationsForPeriod:function(e){var t,n,r,i=e&&x(e.index)?e.mpd.manifest.Period[e.index]:null,o=[];if(i&&i.AdaptationSet)for(r=0;r<i.AdaptationSet.length;r++)n=i.AdaptationSet[r],t=new a.A,n.hasOwnProperty(d.A.ID)&&(t.id=n.id),t.index=r,t.period=e,t.type=ee(n),o.push(t);return o},getAdaptationsForType:function(e,t,n){var r,i,a=G(e,t),o=[];for(r=0,i=a.length;r<i;r++)F(a[r],n)&&o.push(B(a[r]));return o},getAudioChannelConfigurationForAdaptation:function(e){return e&&e.hasOwnProperty(d.A.AUDIO_CHANNEL_CONFIGURATION)&&e[d.A.AUDIO_CHANNEL_CONFIGURATION].length?e[d.A.AUDIO_CHANNEL_CONFIGURATION].map((function(e){var t=new p.A;return t.init(e),t})):[]},getAudioChannelConfigurationForRepresentation:function(e){return e&&e.hasOwnProperty(d.A.AUDIO_CHANNEL_CONFIGURATION)&&e[d.A.AUDIO_CHANNEL_CONFIGURATION].length?e[d.A.AUDIO_CHANNEL_CONFIGURATION].map((function(e){var t=new p.A;return t.init(e),t})):[]},getAvailabilityStartTime:function(e){return e&&e.hasOwnProperty(d.A.AVAILABILITY_START_TIME)&&null!==e.availabilityStartTime?e.availabilityStartTime.getTime():null},getBandwidth:function(e){return e&&e.bandwidth?e.bandwidth:NaN},getBaseURLsFromElement:ae,getBitrateListForAdaptation:function(e){var t=B(e);return(t&&t.Representation?t.Representation:[]).map((function(e){return{bandwidth:e.bandwidth,width:e.width||0,height:e.height||0,scanType:e.scanType||null,id:e.id||null}}))},getCodec:Y,getCodecForPreselection:function(e,n,r){var i=null;if(e&&n){var a=Y(ne(e,n),0,r);if(e.hasOwnProperty(d.A.CODECS)){var o=e.codecs;i=a.replace(/(codecs=")[^"]*(")/,"$1".concat(o,"$2")),t.info("Preselection has own codecs-attribute: replacing in MainAdaptationSet (was: "+a+"), new Preselection codec is: "+i)}else i=a}return i},getCombinedEssentialPropertiesForAdaptationSet:function(e){return Q(d.A.ESSENTIAL_PROPERTY,e)},getCombinedSupplementalPropertiesForAdaptationSet:function(e){return Q(d.A.SUPPLEMENTAL_PROPERTY,e)},getContentProtectionByAdaptation:function(e){return K(e)},getContentProtectionByManifest:function(e){var t=[];if(!e)return t;var n=K(e);return t=t.concat(n),e.hasOwnProperty(d.A.PERIOD)&&e[d.A.PERIOD].length>0&&e[d.A.PERIOD].forEach((function(e){var n=q(e);t=t.concat(n)})),t},getContentProtectionByPeriod:q,getContentSteering:function(e){if(e&&e.hasOwnProperty(d.A.CONTENT_STEERING))return oe(e[d.A.CONTENT_STEERING][0])},getDuration:function(e){return e&&e.hasOwnProperty(d.A.MEDIA_PRESENTATION_DURATION)?e.mediaPresentationDuration:e&&"dynamic"===e.type?Number.POSITIVE_INFINITY:Number.MAX_SAFE_INTEGER||Number.MAX_VALUE},getEssentialProperties:X,getEventStreamForAdaptationSet:function(e,t,n){var r,i,a;return e&&e.Period&&t&&t.period&&x(t.period.index)&&(i=e.Period[t.period.index])&&i.AdaptationSet&&x(t.index)&&(a=i.AdaptationSet[t.index])&&(r=a.InbandEventStream),ie(r,null,n)},getEventStreamForRepresentation:function(e,t,n){var r,i,a,o;return e&&e.Period&&t&&t.adaptation&&t.adaptation.period&&x(t.adaptation.period.index)&&(i=e.Period[t.adaptation.period.index])&&i.AdaptationSet&&x(t.adaptation.index)&&(a=i.AdaptationSet[t.adaptation.index])&&a.Representation&&x(t.index)&&(o=a.Representation[t.index])&&(r=o.InbandEventStream),ie(r,t,n)},getEventsForPeriod:function(e){var t,n,r=e&&e.mpd&&e.mpd.manifest?e.mpd.manifest:null,i=r?r.Period:null,a=i&&e&&x(e.index)?i[e.index].EventStream:null,o=[];if(a)for(t=0;t<a.length;t++){var s=new v.A;if(s.period=e,s.timescale=1,!a[t].hasOwnProperty(c.A.SCHEME_ID_URI))throw new Error("Invalid EventStream. SchemeIdUri has to be set");for(s.schemeIdUri=a[t][c.A.SCHEME_ID_URI],a[t].hasOwnProperty(d.A.TIMESCALE)&&(s.timescale=a[t][d.A.TIMESCALE]),a[t].hasOwnProperty(d.A.VALUE)&&(s.value=a[t][d.A.VALUE]),a[t].hasOwnProperty(d.A.PRESENTATION_TIME_OFFSET)&&(s.presentationTimeOffset=a[t][d.A.PRESENTATION_TIME_OFFSET]),n=0;a[t].Event&&n<a[t].Event.length;n++){var u=a[t].Event[n],l=new E.A;l.presentationTime=0,l.eventStream=s,u.hasOwnProperty(d.A.PRESENTATION_TIME)&&(l.presentationTime=u.presentationTime);var f=s.presentationTimeOffset?s.presentationTimeOffset/s.timescale:0;l.calculatedPresentationTime=l.presentationTime/s.timescale+e.start-f,u.hasOwnProperty(d.A.DURATION)&&(l.duration=u.duration/s.timescale),u.hasOwnProperty(d.A.ID)?l.id=parseInt(u.id):l.id=null,u.Signal&&u.Signal.Binary&&u.Signal.Binary.__text?l.messageData=A.decodeArray(u.Signal.Binary.__text.toString()):l.messageData=u.messageData||u.__cdata||u.__text,o.push(l)}}return o},getFramerate:z,getId:function(e){return e&&e[d.A.ID]||null},getIndexForAdaptation:function(e,t,n){if(!e)return-1;for(var r=G(t,n),i=0;i<r.length;i++)if((0,_.A)(P).getInstance().areEqual(r[i],e))return i;return-1},getIsDynamic:j,getIsFragmented:U,getIsText:k,getIsTypeOf:F,getLabelsForAdaptation:function(e){if(!e||!e.Label)return[];for(var t=[],n=0;n<e.Label.length;n++)t.push({lang:e.Label[n].lang,text:e.Label[n].__text||e.Label[n]});return t},getLanguageForAdaptation:function(e){var t="";return e&&e.hasOwnProperty(d.A.LANG)&&(t=e.lang),t},getLocation:function(e){return e&&e.hasOwnProperty(d.A.LOCATION)?e[d.A.LOCATION].map((function(e){var t=e.__text||e,n=e.hasOwnProperty(d.A.SERVICE_LOCATION)?e[d.A.SERVICE_LOCATION]:null;return new T.A(t,n)})):[]},getMainAdaptationSetForPreselection:ne,getCommonRepresentationForPreselection:function(e,t){if(e&&Array.isArray(t)){var n=ne(e,t);return n?n.Representation[0]:void 0}},getManifestUpdatePeriod:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=NaN;return e&&e.hasOwnProperty(d.A.MINIMUM_UPDATE_PERIOD)&&(n=e.minimumUpdatePeriod),isNaN(n)?n:Math.max(n-t,1)},getMimeType:function(e){return e&&e.Representation&&e.Representation.length>0?e.Representation[0].mimeType:null},getMpd:function(e){var t=new y.A;return e&&(t.manifest=e,e.hasOwnProperty(d.A.AVAILABILITY_START_TIME)?t.availabilityStartTime=new Date(e.availabilityStartTime.getTime()):e.loadedTime&&(t.availabilityStartTime=new Date(e.loadedTime.getTime())),e.hasOwnProperty(d.A.AVAILABILITY_END_TIME)&&(t.availabilityEndTime=new Date(e.availabilityEndTime.getTime())),e.hasOwnProperty(d.A.MINIMUM_UPDATE_PERIOD)&&(t.minimumUpdatePeriod=e.minimumUpdatePeriod),e.hasOwnProperty(d.A.MEDIA_PRESENTATION_DURATION)&&(t.mediaPresentationDuration=e.mediaPresentationDuration),e.hasOwnProperty(d.A.SUGGESTED_PRESENTATION_DELAY)&&(t.suggestedPresentationDelay=e.suggestedPresentationDelay),e.hasOwnProperty(d.A.TIMESHIFT_BUFFER_DEPTH)&&(t.timeShiftBufferDepth=e.timeShiftBufferDepth),e.hasOwnProperty(d.A.MAX_SEGMENT_DURATION)&&(t.maxSegmentDuration=e.maxSegmentDuration),e.hasOwnProperty(d.A.PUBLISH_TIME)&&(t.publishTime=new Date(e.publishTime))),t},getPatchLocation:function(e){return e&&e.hasOwnProperty(d.A.PATCH_LOCATION)?e[d.A.PATCH_LOCATION].map((function(e){var t=e.__text||e,n=e.hasOwnProperty(d.A.SERVICE_LOCATION)?e[d.A.SERVICE_LOCATION]:null,r=e.hasOwnProperty(d.A.TTL)?1e3*parseFloat(e[d.A.TTL]):NaN;return new S.A(t,n,r)})):[]},getPreselectionIsTypeOf:function(e,t,n){if(!e)throw new Error("preselection is not defined");if(!t)throw new Error("adaptations is not defined");if(!n)throw new Error("type is not defined");var r=ne(e,t);return!!r&&F(r,n)},getPreselectionsForPeriod:function(e){var n,r,i,a=e&&x(e.index)?e.mpd.manifest.Period[e.index]:null,o=[];if(a&&a.Preselection)for(i=0;i<a.Preselection.length;i++){r=a.Preselection[i],n=new b.A;var s=te(r,a.AdaptationSet);s.every((function(e){return!!e}))&&1===s.length?(r.hasOwnProperty(d.A.ID)&&(n.id=r.id),n.index=i,n.period=e,r.hasOwnProperty(d.A.TAG)&&(n.tag=r.tag),r.hasOwnProperty(d.A.PRESELECTION_COMPONENTS)?n.preselectionComponents=s:t.warn("Preselection (index: "+n.index+") missing component(s)"),r.hasOwnProperty(d.A.ORDER)&&(n.order=r.order),n.type=ee(s[0]),o.push(n)):t.warn("Preselection removed because we don't support multi-representation preselections or not all components available.")}return o},getProducerReferenceTimesForAdaptation:function(e){var t=e&&e.hasOwnProperty(d.A.PRODUCER_REFERENCE_TIME)?e[d.A.PRODUCER_REFERENCE_TIME]:[];(e&&e.hasOwnProperty(d.A.REPRESENTATION)?e[d.A.REPRESENTATION]:[]).forEach((function(e){e.hasOwnProperty(d.A.PRODUCER_REFERENCE_TIME)&&t.push.apply(t,(0,i.A)(e[d.A.PRODUCER_REFERENCE_TIME]))}));var n=[];return t.forEach((function(e){var t=new R.A;e.hasOwnProperty(d.A.ID)&&(t[d.A.ID]=parseInt(e[d.A.ID]),e.hasOwnProperty(d.A.WALL_CLOCK_TIME)&&(t[d.A.WALL_CLOCK_TIME]=e[d.A.WALL_CLOCK_TIME],e.hasOwnProperty(d.A.PRESENTATION_TIME)&&(t[d.A.PRESENTATION_TIME]=e[d.A.PRESENTATION_TIME],e.hasOwnProperty(d.A.INBAND)&&(t[d.A.INBAND]="false"!==e[d.A.INBAND]),e.hasOwnProperty(d.A.TYPE)&&(t[d.A.TYPE]=e[d.A.TYPE]),n.push(t))))})),n},getPublishTime:function(e){return e&&e.hasOwnProperty(d.A.PUBLISH_TIME)?new Date(e[d.A.PUBLISH_TIME]):null},getRealPeriodForIndex:function(e,t){var n=H(t);return n.length>0&&x(e)?n[e]:null},getRealPeriods:H,getRegularPeriods:function(e){var r,i,a=!!e&&j(e.manifest),o=[],s=null,u=null,l=null,f=null;for(i=0,r=e&&e.manifest&&e.manifest.Period?e.manifest.Period.length:0;i<r;i++)(u=e.manifest.Period[i]).hasOwnProperty(d.A.START)?(f=new I.A).start=u.start:null!==s&&s.hasOwnProperty(d.A.DURATION)&&null!==l?(f=new I.A).start=parseFloat((l.start+l.duration).toFixed(5)):0!==i||a||((f=new I.A).start=0),null!==l&&isNaN(l.duration)&&(null!==f?l.duration=parseFloat((f.start-l.start).toFixed(5)):t.warn("First period duration could not be calculated because lack of start and duration period properties. This will cause timing issues during playback")),null!==f&&(f.id=re(u,i),f.index=i,f.mpd=e,f.isEncrypted=V(u),u.hasOwnProperty(d.A.DURATION)&&(f.duration=u.duration),l&&(l.nextPeriodId=f.id),o.push(f),s=u,l=f),u=null,f=null;return 0===o.length||null!==l&&isNaN(l.duration)&&(l.duration=parseFloat((function(e){!function(){if(!n||!n.hasOwnProperty("error"))throw new Error(c.A.MISSING_CONFIG_ERROR)}();var t,r=j(e.mpd.manifest);return e.mpd.manifest.mediaPresentationDuration?t=e.mpd.manifest.mediaPresentationDuration:e.duration?t=e.duration:r?t=Number.POSITIVE_INFINITY:n.error(new h.A(m.A.MANIFEST_ERROR_ID_PARSE_CODE,"Must have @mediaPresentationDuration on MPD or an explicit @duration on the last period.",e)),t}(l)-l.start).toFixed(5))),o},getRepresentationCount:function(e){return e&&e.Representation?e.Representation.length:0},getRepresentationFor:function(e,t){return t&&t.Representation&&t.Representation.length>0&&x(e)?t.Representation[e]:null},getRepresentationSortFunction:function(){return function(e,t){return e.bandwidth-t.bandwidth}},getRepresentationsForAdaptation:function(e,t){var n,r=[],i=function(e){if(e&&e.period&&x(e.period.index)){var t=e.period.mpd.manifest.Period[e.period.index];if(t&&t.AdaptationSet&&x(e.index))return B(t.AdaptationSet[e.index])}}(e);if(i&&i.Representation){if(e&&e.period&&x(e.period.index)){var a=ae(e.period.mpd.manifest);a&&(n=a[0])}for(var o=0,s=i.Representation.length;o<s;++o){var u=J(t,i.Representation[o],e,i,n,o);r.push(u)}}return r},getRolesForAdaptation:function(e){return e&&e.hasOwnProperty(d.A.ROLE)&&e[d.A.ROLE].length?e[d.A.ROLE].map((function(e){e.schemeIdUri===c.A.DASH_ROLE_SCHEME_ID&&"Main"===e.value&&(e.value=d.A.MAIN);var t=new p.A;return t.init(e),t})):[]},getSegmentAlignment:function(e){return!(!e||!e.hasOwnProperty(d.A.SEGMENT_ALIGNMENT))&&"true"===e[d.A.SEGMENT_ALIGNMENT]},getSegmentSequencePropertiesForAdaptationSet:function(e){var t=[];return e?(t.push.apply(t,(0,i.A)(Z(e))),e.Representation&&e.Representation.length&&e.Representation.forEach((function(e){t.push.apply(t,(0,i.A)(Z(e)))})),t):t},getSelectionPriority:function(e){try{var t=e&&void 0!==e.selectionPriority?parseInt(e.selectionPriority):1;return isNaN(t)?1:t}catch(e){return 1}},getServiceDescriptions:function(e){var t=[];if(e&&e.hasOwnProperty(d.A.SERVICE_DESCRIPTION)){var n,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return M(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}(e.ServiceDescription);try{for(r.s();!(n=r.n()).done;){var i=n.value,a=null,o=null,s=null,u=null,c=null,l=null,f=null,h=null;for(var g in i)if(i.hasOwnProperty(g))if(g===d.A.ID)a=i[g];else if(g===d.A.SERVICE_DESCRIPTION_SCOPE)o=i[g].schemeIdUri;else if(g===d.A.SERVICE_DESCRIPTION_LATENCY)s={target:parseInt(i[g].target),max:parseInt(i[g].max),min:parseInt(i[g].min),referenceId:parseInt(i[g].referenceId)};else if(g===d.A.SERVICE_DESCRIPTION_PLAYBACK_RATE)u={max:parseFloat(i[g].max),min:parseFloat(i[g].min)};else if(g===d.A.SERVICE_DESCRIPTION_OPERATING_QUALITY)c={mediaType:i[g].mediaType,max:parseInt(i[g].max),min:parseInt(i[g].min),target:parseInt(i[g].target),type:i[g].type,maxQualityDifference:parseInt(i[g].maxQualityDifference)};else if(g===d.A.SERVICE_DESCRIPTION_OPERATING_BANDWIDTH)l={mediaType:i[g].mediaType,max:parseInt(i[g].max),min:parseInt(i[g].min),target:parseInt(i[g].target)};else if(g===d.A.CONTENT_STEERING){var p=i[g];f=oe(p=Array.isArray(p)?p.at(p.length-1):p)}else g===d.A.CLIENT_DATA_REPORTING&&(h=se(i[g]));t.push({id:a,schemeIdUri:o,latency:s,playbackRate:u,operatingQuality:c,operatingBandwidth:l,contentSteering:f,clientDataReporting:h})}}catch(e){r.e(e)}finally{r.f()}}return t},getSubSegmentAlignment:function(e){return!(!e||!e.hasOwnProperty(d.A.SUB_SEGMENT_ALIGNMENT))&&"true"===e[d.A.SUB_SEGMENT_ALIGNMENT]},getSuggestedPresentationDelay:function(e){return e&&e.hasOwnProperty(d.A.SUGGESTED_PRESENTATION_DELAY)?e.suggestedPresentationDelay:null},getSupplementalProperties:$,getUTCTimingSources:function(e){var t=j(e),n=!!e&&e.hasOwnProperty(d.A.AVAILABILITY_START_TIME),r=e?e.UTCTiming:null,i=[];return(t||n)&&r&&r.forEach((function(e){var t=new w.A;e.hasOwnProperty(c.A.SCHEME_ID_URI)&&(t.schemeIdUri=e.schemeIdUri,e.hasOwnProperty(d.A.VALUE)&&(t.value=e.value.toString(),i.push(t)))})),i},getViewpointForAdaptation:function(e){return e&&e.hasOwnProperty(d.A.VIEWPOINT)&&e[d.A.VIEWPOINT].length?e[d.A.VIEWPOINT].map((function(e){var t=new p.A;return t.init(e),t})):[]},hasProfile:function(e,t){var n=!1;return e&&e.profiles&&e.profiles.length>0&&(n=-1!==e.profiles.indexOf(t)),n},isPeriodEncrypted:V,setConfig:function(e){e&&(e.errHandler&&(n=e.errHandler),e.BASE64&&(A=e.BASE64))}},t=(0,g.A)(P).getInstance().getLogger(e),e}P.__dashjs_factory_name="DashManifestModel",t.A=A.A.getSingletonFactory(P)},18062:function(e,t,n){"use strict";var r=n(85952),i=n(7718),a=(0,r.A)((function e(){(0,i.A)(this,e),this.period=null,this.index=-1,this.id=null,this.type=null}));t.A=a},99415:function(e,t,n){"use strict";var r=n(85952),i=n(7718),a=(0,r.A)((function e(t,n,r,a){(0,i.A)(this,e),this.url=t||"",this.serviceLocation=n||t||"",this.dvbPriority=r||1,this.dvbWeight=a||1,this.availabilityTimeOffset=0,this.availabilityTimeComplete=!0,this.queryParams={}}));a.DEFAULT_DVB_PRIORITY=1,a.DEFAULT_DVB_WEIGHT=1,t.A=a},99578:function(e,t,n){"use strict";n(60825);var r=n(7718),i=n(85952),a=n(8591),o=n(4597),s=n(82048),u=n(18766),c=(n(23792),n(26099),n(62953),n(1036)),l=n(35212);function f(e,t,n){return t=(0,o.A)(t),(0,a.A)(e,d()?Reflect.construct(t,n||[],(0,o.A)(e).constructor):t.apply(e,n))}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}var h=function(e){function t(){var e;return(0,r.A)(this,t),(e=f(this,t)).version=null,e.sessionID=null,e.contentID=null,e.mode=null,e.keys=null,e.includeInRequests=null,e}return(0,u.A)(t,e),(0,i.A)(t,[{key:"init",value:function(e){var n,r,i,a;(n=t,r=this,"function"==typeof(i=(0,s.A)((0,o.A)(n.prototype),"init",r))?function(e){return i.apply(r,e)}:i)([e]),e&&(this.version=e.version?parseInt(e.version):null,this.sessionID=e.sessionID,this.contentID=e.contentID,this.mode=null!==(a=e.mode)&&void 0!==a?a:"query",this.keys=e.keys?e.keys.split(" "):null,this.includeInRequests=e.includeInRequests?e.includeInRequests.split(" "):[l.A.CMCD_DEFAULT_INCLUDE_IN_REQUESTS],this.schemeIdUri=e.schemeIdUri)}}])}(c.A);t.A=h},84770:function(e,t,n){"use strict";var r=n(85952),i=n(7718),a=(0,r.A)((function e(){(0,i.A)(this,e),this.adaptationSets=null,this.adaptationSetsArray=[],this.cmcdParameters=null,this.serviceLocations=null,this.serviceLocationsArray=[]}));t.A=a},65915:function(e,t,n){"use strict";n(60825);var r=n(7718),i=n(85952),a=n(8591),o=n(4597),s=n(82048),u=n(18766),c=(n(28706),n(50113),n(23792),n(62062),n(44114),n(18111),n(20116),n(7588),n(61701),n(79432),n(26099),n(31415),n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698),n(47764),n(23500),n(62953),n(41349)),l=n(1036),f=n(98854);function d(e,t,n){return t=(0,o.A)(t),(0,a.A)(e,h()?Reflect.construct(t,n||[],(0,o.A)(e).constructor):t.apply(e,n))}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}var g=function(e){function t(){var e;return(0,r.A)(this,t),(e=d(this,t)).ref=null,e.refId=null,e.robustness=null,e.keyId=null,e.cencDefaultKid=null,e.pssh=null,e.pro=null,e.laUrl=null,e.certUrls=[],e}return(0,u.A)(t,e),(0,i.A)(t,[{key:"init",value:function(e){var n,r,i;if((n=t,r=this,"function"==typeof(i=(0,s.A)((0,o.A)(n.prototype),"init",r))?function(e){return i.apply(r,e)}:i)([e]),e){this.ref=e.hasOwnProperty(f.A.REF)?e[f.A.REF]:null,this.refId=e.hasOwnProperty(f.A.REF_ID)?e[f.A.REF_ID]:null,this.robustness=e.hasOwnProperty(f.A.ROBUSTNESS)?e[f.A.ROBUSTNESS]:null,this.cencDefaultKid=e.hasOwnProperty(f.A.CENC_DEFAULT_KID)?e[f.A.CENC_DEFAULT_KID]:null,this.pssh=e.hasOwnProperty(f.A.PSSH)?e[f.A.PSSH]:null,this.pro=e.hasOwnProperty(f.A.PRO)?e[f.A.PRO]:null,this.laUrl=e.hasOwnProperty(f.A.LA_URL)?e[f.A.LA_URL]:e.hasOwnProperty(f.A.LA_URL_LOWER_CASE)?e[f.A.LA_URL_LOWER_CASE]:null;var a=Object.keys(e).find((function(e){return e.toLowerCase()===f.A.CERT_URL.toLowerCase()})),u=a?e[a]:null;this.certUrls=c.A.normalizeCertUrls(u)}}},{key:"mergeAttributesFromReference",value:function(e){var t=this;if(["schemeIdUri","value","id","robustness","cencDefaultKid","pro","pssh","laUrl"].forEach((function(n){null===t[n]&&(t[n]=e[n])})),e.certUrls&&e.certUrls.length){var n=new Set(this.certUrls.map((function(e){return"".concat(e.url,"||").concat(e.certType||"")})));e.certUrls.forEach((function(e){var r="".concat(e.url,"||").concat(e.certType||"");n.has(r)||t.certUrls.push({url:e.url,certType:e.certType||null})}))}}}])}(l.A);t.A=g},26455:function(e,t,n){"use strict";var r=n(85952),i=n(7718),a=(0,r.A)((function e(){(0,i.A)(this,e),this.defaultServiceLocation=null,this.defaultServiceLocationArray=[],this.queryBeforeStart=!1,this.serverUrl=null,this.clientRequirement=!0}));t.A=a},1036:function(e,t,n){"use strict";var r=n(7718),i=n(85952),a=(n(18111),n(13579),n(26099),n(27495),n(38781),n(71761),n(98854)),o=function(){return(0,i.A)((function e(){(0,r.A)(this,e),this.schemeIdUri=null,this.value=null,this.id=null}),[{key:"init",value:function(e){e&&(this.schemeIdUri=e.schemeIdUri?e.schemeIdUri:null,this.value=null!==e.value&&void 0!==e.value?e.value.toString():null,this.id=e.id?e.id:null,e[a.A.DVB_URL]&&(this.dvbUrl=e[a.A.DVB_URL]),e[a.A.DVB_MIMETYPE]&&(this.dvbMimeType=e[a.A.DVB_MIMETYPE]),e[a.A.DVB_FONTFAMILY]&&(this.dvbFontFamily=e[a.A.DVB_FONTFAMILY]))}},{key:"inArray",value:function(e){var t=this;return!!e&&e.some((function(e){return t.schemeIdUri===e.schemeIdUri&&(t.value?t.value.toString().match(e.value):"".match(e.value))}))}}])}();t.A=o},31465:function(e,t,n){"use strict";var r=n(85952),i=n(7718),a=(0,r.A)((function e(){(0,i.A)(this,e),this.type="",this.duration=NaN,this.presentationTime=NaN,this.id=NaN,this.messageData="",this.eventStream=null,this.presentationTimeDelta=NaN,this.parsedMessageData=null}));t.A=a},7153:function(e,t,n){"use strict";var r=n(85952),i=n(7718),a=(0,r.A)((function e(){(0,i.A)(this,e),this.adaptionSet=null,this.representation=null,this.period=null,this.timescale=1,this.value="",this.schemeIdUri="",this.presentationTimeOffset=0}));t.A=a},15274:function(e,t,n){"use strict";var r=n(85952),i=n(7718),a=(n(2892),(0,r.A)((function e(){(0,i.A)(this,e),this.availabilityEndTime=Number.POSITIVE_INFINITY,this.availabilityStartTime=null,this.manifest=null,this.maxSegmentDuration=Number.POSITIVE_INFINITY,this.mediaPresentationDuration=NaN,this.minimumUpdatePeriod=NaN,this.publishTime=null,this.suggestedPresentationDelay=0,this.timeShiftBufferDepth=Number.POSITIVE_INFINITY})));t.A=a},56517:function(e,t,n){"use strict";var r=n(85952),i=n(7718),a=(0,r.A)((function e(t,n){(0,i.A)(this,e),this.url=t||"",this.serviceLocation=n||null,this.queryParams={}}));t.A=a},94740:function(e,t,n){"use strict";var r=n(85952),i=n(7718),a=(0,r.A)((function e(t,n,r){(0,i.A)(this,e),this.url=t||"",this.serviceLocation=n||null,this.ttl=r||NaN,this.queryParams={}}));t.A=a},47408:function(e,t,n){"use strict";var r=n(85952),i=n(7718),a=(0,r.A)((function e(){(0,i.A)(this,e),this.id=null,this.index=-1,this.duration=NaN,this.start=NaN,this.mpd=null,this.nextPeriodId=null,this.isEncrypted=!1}));a.DEFAULT_ID="defaultId",t.A=a},42436:function(e,t,n){"use strict";var r=n(85952),i=n(7718),a=(0,r.A)((function e(){(0,i.A)(this,e),this.period=null,this.index=-1,this.id=1,this.type=null,this.tag=null,this.order="undefined",this.preselectionComponents=[]}));t.A=a},2655:function(e,t,n){"use strict";var r=n(85952),i=n(7718),a=(0,r.A)((function e(){(0,i.A)(this,e),this.id=null,this.inband=!1,this.type="encoder",this.applicationScheme=null,this.wallClockTime=null,this.presentationTime=NaN,this.UTCTiming=null}));t.A=a},25876:function(e,t,n){"use strict";var r=n(7718),i=n(85952),a=(n(18111),n(13579),n(26099),n(98854)),o=function(){return(0,i.A)((function e(){(0,r.A)(this,e),this.absoluteIndex=NaN,this.adaptation=null,this.availabilityTimeComplete=!0,this.availabilityTimeOffset=0,this.bandwidth=NaN,this.bitrateInKbit=NaN,this.bitsPerPixel=NaN,this.codecFamily=null,this.codecPrivateData=null,this.codecs=null,this.dependencyId=null,this.dependentRepresentation=null,this.endNumber=null,this.essentialProperties=[],this.fragmentDuration=null,this.frameRate=null,this.height=NaN,this.id=null,this.indexRange=null,this.initialization=null,this.k=1,this.maxPlayoutRate=NaN,this.mediaFinishedInformation={numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN},this.mediaInfo=null,this.mimeType=null,this.mseTimeOffset=NaN,this.pixelsPerSecond=NaN,this.presentationTimeOffset=0,this.qualityRanking=NaN,this.range=null,this.scanType=null,this.segments=null,this.segmentDuration=NaN,this.segmentInfoType=null,this.segmentSequenceProperties=[],this.supplementalProperties=[],this.startNumber=1,this.timescale=1,this.width=NaN}),[{key:"hasInitialization",value:function(){return null!==this.initialization||null!==this.range}},{key:"hasSegments",value:function(){return this.segmentInfoType!==a.A.BASE_URL&&this.segmentInfoType!==a.A.SEGMENT_BASE&&!this.indexRange}},{key:"isBootstrapRepresentation",value:function(){return!(!this.segmentSequenceProperties||0===this.segmentSequenceProperties.length)&&this.segmentSequenceProperties.some((function(e){return e.isBootstrapConfiguration()}))}}])}();t.A=o},7356:function(e,t,n){"use strict";var r=n(7718),i=n(85952),a=function(){return(0,i.A)((function e(){(0,r.A)(this,e),this.cadence=1,this.sapType=0,this.event=!0,this.alignment=null}),[{key:"init",value:function(e){e&&(this.cadence=void 0===e.cadence||isNaN(e.cadence)?1:e.cadence,this.sapType=void 0===e.sapType||isNaN(e.sapType)?0:e.sapType,this.event=void 0===e.event||e.event,this.alignment=void 0!==e.alignment?e.alignment:null)}},{key:"isBootstrapConfiguration",value:function(){return 1===this.cadence&&(0===this.sapType||1===this.sapType)}}])}();t.A=a},5717:function(e,t,n){"use strict";var r=n(85952),i=n(7718),a=(0,r.A)((function e(){(0,i.A)(this,e),this.schemeIdUri="",this.value=""}));t.A=a},19839:function(e,t,n){"use strict";n.d(t,{A:function(){return us}}),n(28706),n(2008),n(62062),n(18111),n(22489),n(18237),n(2892),n(26099),n(38781),n(50113),n(74423),n(23792),n(44114),n(26910),n(20116),n(7588),n(13579),n(33110),n(36033),n(9868),n(21699),n(47764),n(23500),n(62953),n(34782),n(61701),n(16034);var r=n(90138),i=n(94246),o={TCP_CONNECTION:"TcpList",HTTP_REQUEST:"HttpList",TRACK_SWITCH:"RepSwitchList",BUFFER_LEVEL:"BufferLevel",BUFFER_LOADED:"bufferLoaded",ABANDON_LOAD:"abandonload",ALLOW_LOAD:"allowload",BUFFER_EMPTY:"bufferStalled",BUFFER_STATE:"BufferState",DVR_INFO:"DVRInfo",DROPPED_FRAMES:"DroppedFrames",SCHEDULING_INFO:"SchedulingInfo",REQUESTS_QUEUE:"RequestsQueue",MANIFEST_UPDATE:"ManifestUpdate",MANIFEST_UPDATE_STREAM_INFO:"ManifestUpdatePeriodInfo",MANIFEST_UPDATE_TRACK_INFO:"ManifestUpdateRepresentationInfo",PLAY_LIST:"PlayList",DVB_ERRORS:"DVBErrors",HTTP_REQUEST_DVB_REPORTING_TYPE:"DVBReporting"},u=n(649),c=n(78261);function l(e){e=e||{};var t,n,r,a=this.context,s=e.dashMetrics;return t={getSwitchRequest:function(e){try{var t=(0,i.A)(a).create();t.rule=this.getClassName();var u=e.getMediaInfo(),c=e.getMediaType(),l=s.getCurrentBufferState(c),f=e.getScheduleController(),d=e.getAbrController(),h=e.getStreamInfo(),g=h?h.id:null,p=h&&h.manifestInfo?h.manifestInfo.isDynamic:null,m=e.getThroughputController(),E=m.getSafeAverageThroughput(c),v=m.getAverageLatency(c);return isNaN(E)||!l||d.getAbandonmentStateFor(g,c)===o.ALLOW_LOAD&&(l.state===o.BUFFER_LOADED||p)&&(t.representation=d.getOptimalRepresentationForBitrate(u,E,!0),t.priority=n.get().streaming.abr.rules.throughputRule.priority,t.reason={throughput:E,latency:v,message:"[ThroughputRule]: Switching to Representation with bitrate ".concat(t.representation?t.representation.bitrateInKbit:"n/a"," kbit/s. Throughput: ").concat(E)},f.setTimeToLoadDelay(0)),t}catch(e){return r.error(e),(0,i.A)(a).create()}},reset:function(){}},r=(0,u.A)(a).getInstance().getLogger(t),n=(0,c.A)(a).getInstance(),t}l.__dashjs_factory_name="ThroughputRule";var f=r.A.getClassFactory(l),d=n(78850),h=n(43621),g=n(35212),p=n(21191);function m(e){e=e||{};var t,n,r,a=this.context,s=(0,d.A)(a).getInstance(),l=e.dashMetrics,f=(0,c.A)(a).getInstance();function m(){var e=f.get().streaming.abr.rules.insufficientBufferRule.parameters.segmentIgnoreCount;(r={})[g.A.VIDEO]={ignoreCount:e},r[g.A.AUDIO]={ignoreCount:e},r[g.A.ENHANCEMENT]={ignoreCount:e}}function E(){m()}function v(e){isNaN(e.startTime)||e.mediaType!==g.A.AUDIO&&e.mediaType!==g.A.VIDEO||r[e.mediaType].ignoreCount>0&&r[e.mediaType].ignoreCount--}return t={getSwitchRequest:function(e){var t=(0,i.A)(a).create();if(t.rule=this.getClassName(),!e||!e.hasOwnProperty("getMediaType"))return t;var s=e.getMediaType(),u=l.getCurrentBufferState(s),c=e.getRepresentation().fragmentDuration;if(!function(e,t,n){return!e.getLowLatencyModeEnabled()&&r[t].ignoreCount<=0&&n}(e.getScheduleController().getPlaybackController(),s,c))return t;var d=e.getMediaInfo(),h=e.getAbrController();if(u&&u.state===o.BUFFER_EMPTY)n.debug("["+s+"] Switch to index 0; buffer is empty."),t.representation=h.getOptimalRepresentationForBitrate(d,0,!0),t.reason={message:"[InsufficientBufferRule]: Switching to lowest Representation because buffer is empty"};else{var g=e.getThroughputController(),p=l.getCurrentBufferLevel(s),m=g.getAverageThroughput(s,null,NaN)*f.get().streaming.abr.rules.insufficientBufferRule.parameters.throughputSafetyFactor*p/c;if(isNaN(m)||m<=0)return t;t.representation=h.getOptimalRepresentationForBitrate(d,m,!0),t.priority=f.get().streaming.abr.rules.insufficientBufferRule.priority,t.reason={message:"[InsufficientBufferRule]: Limiting maximum bitrate to avoid a buffer underrun.",bitrate:m}}return t},reset:function(){m(),s.off(p.A.PLAYBACK_SEEKING,E,t),s.off(h.A.BYTES_APPENDED_END_FRAGMENT,v,t)}},n=(0,u.A)(a).getInstance().getLogger(t),m(),s.on(p.A.PLAYBACK_SEEKING,E,t),s.on(h.A.BYTES_APPENDED_END_FRAGMENT,v,t),t}m.__dashjs_factory_name="InsufficientBufferRule";var E=r.A.getClassFactory(m);function v(e){var t,n,r,a=(e=e||{}).mediaPlayerModel,o=e.dashMetrics,s=this.context,l=(0,c.A)(s).getInstance();function f(){r={}}return t={shouldAbandon:function(e){var t=(0,i.A)(s).create();t.rule=this.getClassName();try{if(!e)return t;var u=e.getCurrentRequest();if(!isNaN(u.index)){if(null===u.firstByteDate||r.hasOwnProperty(u.index))return t;var c=a.getBufferTimeDefault(),f=e.getMediaType();if(o.getCurrentBufferLevel(f)>c)return t;var d=Date.now()-u.firstByteDate.getTime();if(u.traces.length>=l.get().streaming.abr.rules.abandonRequestsRule.parameters.minThroughputSamplesThreshold&&d>l.get().streaming.abr.rules.abandonRequestsRule.parameters.minSegmentDownloadTimeThresholdInMs&&u.bytesLoaded<u.bytesTotal)return function(e,t,n){var i=e.getMediaInfo(),a=e.getMediaType(),o=t.traces.reduce((function(e,t){return e+t.b[0]}),0)-t.traces[0].b[0],s=Math.max(t.traces.reduce((function(e,t){return e+t.d}),0)-t.traces[0].d,1),u=Math.round(8*o/s),c=Number(8*t.bytesTotal/u/1e3).toFixed(2),f=e.getRepresentation(),d=e.getAbrController();if(c<t.duration*l.get().streaming.abr.rules.abandonRequestsRule.parameters.abandonDurationMultiplier||d.isPlayingAtLowestQuality(f))return n;if(!r.hasOwnProperty(t.index)){var h=e.getAbrController(),g=t.bytesTotal-t.bytesLoaded,p=h.getOptimalRepresentationForBitrate(i,u,!0),m=t.representation;g>t.bytesTotal*p.bitrateInKbit/m.bitrateInKbit&&(n.representation=p,n.priority=l.get().streaming.abr.rules.abandonRequestsRule.priority,n.reason={throughputInKbit:u,message:"[AbandonRequestRule][".concat(a," is asking to abandon and switch to quality to ").concat(p.absoluteIndex,". The measured bandwidth was ").concat(u," kbit/s")},r[t.index]=!0)}return n}(e,u,t)}return t}catch(e){return n.error(e),t}},reset:f},n=(0,u.A)(s).getInstance().getLogger(t),f(),t}v.__dashjs_factory_name="AbandonRequestsRule";var A=r.A.getClassFactory(v);function y(){var e=this.context,t=(0,c.A)(e).getInstance();return{getSwitchRequest:function(n){var r=(0,i.A)(e).create();if(r.rule=this.getClassName(),!n||!n.hasOwnProperty("getDroppedFramesHistory"))return r;var a=n.getDroppedFramesHistory();if(!a)return r;var o=n.getStreamInfo().id,s=n.getMediaInfo(),u=n.getAbrController(),c=a.getFrameHistory(o);if(!c||0===Object.keys(c).length)return r;for(var l=0,f=0,d=u.getPossibleVoRepresentationsFilteredBySettings(s,!0),h=null,g=1;g<d.length;g++){var p=d[g];if(p&&c[p.id]&&(l=c[p.id].droppedVideoFrames,(f=c[p.id].totalVideoFrames)>t.get().streaming.abr.rules.droppedFramesRule.parameters.minimumSampleSize&&l/f>t.get().streaming.abr.rules.droppedFramesRule.parameters.droppedFramesPercentageThreshold)){h=d[g-1];break}}return h&&(r.representation=h,r.priority=t.get().streaming.abr.rules.droppedFramesRule.priority,r.reason={droppedFrames:l,message:"[DroppedFramesRule]: Switching to index ".concat(h.absoluteIndex,". Dropped Frames: ").concat(l,", Total Frames: ").concat(f)}),r}}}n(79432),y.__dashjs_factory_name="DroppedFramesRule";var T=r.A.getClassFactory(y);function _(){var e=this.context,t=(0,c.A)(e).getInstance();return{getSwitchRequest:function(n){var r=(0,i.A)(e).create();if(r.rule=this.getClassName(),!n)return r;for(var a=n.getStreamInfo().id,o=n.getMediaType(),s=n?n.getSwitchRequestHistory():null,u=s?s.getSwitchRequests(a,o):{},c=n.getAbrController(),l=n.getMediaInfo(),f=c.getPossibleVoRepresentationsFilteredBySettings(l,!0),d=0,h=0,g=0;g<f.length;g++){var p=f[g];if(p&&u[p.id]&&(d+=u[p.id].drops)+(h+=u[p.id].noDrops)>=t.get().streaming.abr.rules.switchHistoryRule.parameters.sampleSize&&d/h>t.get().streaming.abr.rules.switchHistoryRule.parameters.switchPercentageThreshold){r.representation=g>0&&u[p.id].drops>0?f[g-1]:p,r.priority=t.get().streaming.abr.rules.switchHistoryRule.priority,r.reason={drops:d,noDrops:h,message:"[SwitchHistoryRule]: Switch to index: ".concat(r.representation.absoluteIndex," samples: ").concat(d+h," drops: ").concat(d)};break}}return r}}}_.__dashjs_factory_name="SwitchHistoryRule";var S=r.A.getClassFactory(_),I=n(87568),b="BOLA_STATE_ONE_BITRATE",R="BOLA_STATE_STARTUP",N="BOLA_STATE_STEADY",C=10;function w(e){e=e||{};var t,n,r,a,s=this.context,l=e.dashMetrics,f=e.mediaPlayerModel,m=(0,d.A)(s).getInstance(),E=Ae(s).getInstance();function v(e){var t=e.mediaType,n=e.streamId,r=t===g.A.AUDIO?[g.A.AUDIO]:a[n];for(var i in r)a[n]&&a[n].hasOwnProperty(i)&&a[n][i].state===N&&(a[n][i].placeholderBuffer=0)}function A(e){var t=e.streamId;for(var n in a[t])if(a[t].hasOwnProperty(n)){var r=a[t][n];r.state!==b&&(r.state=R,y(r))}}function y(e){e.placeholderBuffer=0,e.mostAdvancedSegmentStart=NaN,e.lastSegmentWasReplacement=!1,e.lastSegmentStart=NaN,e.lastSegmentDurationS=NaN,e.lastSegmentRequestTimeMs=NaN,e.lastSegmentFinishTimeMs=NaN}function T(e){try{if(e&&e.metric===o.HTTP_REQUEST&&e.value&&e.value.type===I.G.MEDIA_SEGMENT_TYPE&&e.value.trace&&e.value.trace.length){var t=a[e.value._streamId]&&a[e.value._streamId][e.mediaType]?a[e.value._streamId][e.mediaType]:null;t&&t.state!==b&&(t.lastSegmentRequestTimeMs=e.value.trequest.getTime(),t.lastSegmentFinishTimeMs=e.value._tfinish.getTime(),_(t,e.mediaType))}}catch(e){n.error(e)}}function _(e,t){if(!isNaN(e.lastSegmentStart)&&!isNaN(e.lastSegmentRequestTimeMs)&&!isNaN(e.placeholderBuffer)){if(e.placeholderBuffer*=.99,!isNaN(e.lastSegmentFinishTimeMs)){var n=l.getCurrentBufferLevel(t)+.001*(e.lastSegmentFinishTimeMs-e.lastSegmentRequestTimeMs),r=O(e,e.currentRepresentation),i=Math.max(0,r-n);e.placeholderBuffer=Math.min(i,e.placeholderBuffer)}e.lastSegmentWasReplacement&&!isNaN(e.lastSegmentDurationS)&&(e.placeholderBuffer+=e.lastSegmentDurationS),e.lastSegmentStart=NaN,e.lastSegmentRequestTimeMs=NaN}}function S(e){if(e&&a[e.streamId]&&a[e.streamId][e.mediaType]){var t=a[e.streamId][e.mediaType];t&&t.state!==b&&(t.currentRepresentation=e.newRepresentation)}}function w(e,t,n){var r=n.reduce((function(e,t,r){return t>n[e]?r:e}),0);if(0===r)return null;var i=Math.max(e,C+2*t.length),a=(n[r]-1)/(i/C-1);return{gp:a,Vp:C/a}}function D(e,t){var n=f.getBufferTimeDefault();if(e.bufferTimeDefault!==n){var r=w(n,e.representations,e.utilities);if(r.Vp!==e.Vp||r.gp!==e.gp){var i=l.getCurrentBufferLevel(t),a=i+e.placeholderBuffer;a-=C,a*=r.Vp/e.Vp,a+=C,e.bufferTimeDefault=n,e.Vp=r.Vp,e.gp=r.gp,e.placeholderBuffer=Math.max(0,a-i)}}}function O(e,t){return e.Vp*(e.utilities[t.absoluteIndex]+e.gp)}function M(e){if(e&&e.chunk&&e.chunk.representation.mediaInfo&&a[e.streamId]){var t=a[e.streamId][e.chunk.representation.mediaInfo.type];if(t&&t.state!==b){var n=e.chunk.start;isNaN(t.mostAdvancedSegmentStart)||n>t.mostAdvancedSegmentStart?(t.mostAdvancedSegmentStart=n,t.lastSegmentWasReplacement=!1):t.lastSegmentWasReplacement=!0,t.lastSegmentStart=n,t.lastSegmentDurationS=e.chunk.duration,t.currentRepresentation=e.chunk.representation,_(t,e.chunk.representation.mediaInfo.type)}}}function P(){U()}function L(){r.get().streaming.abr.limitBitrateByPortal&&U()}function x(e,t){for(var n=t.absoluteIndex,r=t.bandwidth,i=e.utilities[n],a=0,o=n-1;o>=0;--o)if(e.utilities[o]<e.utilities[n]){var s=e.representations[o].bandwidth,u=e.utilities[o],c=e.Vp*(e.gp+(r*u-s*i)/(r-s));a=Math.max(a,c)}return a}function F(e){if(e&&a[e.streamId]){var t=a[e.streamId][e.mediaType];if(t&&t.state!==b){var n,r=l.getCurrentBufferLevel(e.mediaType);n=t.currentRepresentation.absoluteIndex>0?x(t,t.currentRepresentation):C;var i=Math.max(0,n-r);t.placeholderBuffer=Math.min(t.placeholderBuffer,i)}}}function U(){a={}}return t={getSwitchRequest:function(e){try{var t=(0,i.A)(s).create();e.getScheduleController().setTimeToLoadDelay(0),t.rule=this.getClassName(),t.reason=t.reason||{};var o=function(e){var t=e.getMediaType(),n=e.getStreamInfo().id;a[n]||((a={})[n]={});var r=a[n][t];return r?r.state!==b&&D(r,t):(r=function(e){var t={},n=e.getMediaInfo(),r=E.getPossibleVoRepresentationsFilteredBySettings(n,!0),i=r.map((function(e){return e.bandwidth})).map((function(e){return Math.log(e)}));i=i.map((function(e){return e-i[0]+1}));var a=f.getBufferTimeDefault(),o=w(a,r,i);return o?(t.state=R,t.representations=r,t.utilities=i,t.bufferTimeDefault=a,t.Vp=o.Vp,t.gp=o.gp,t.currentRepresentation=null,y(t)):t.state=b,t}(e),a[n][t]=r),r}(e);switch(t.reason.state=o.state,o.state){case b:break;case R:!function(e,t,n){var r=t.getMediaType(),i=t.getThroughputController().getSafeAverageThroughput(r);if(!isNaN(i)){var a=t.getMediaInfo(),o=E.getOptimalRepresentationForBitrate(a,i,!0),s=l.getCurrentBufferLevel(r);e.representation=o,e.reason.throughput=i,n.placeholderBuffer=Math.max(0,x(n,o)-s),n.currentRepresentation=o,!isNaN(n.lastSegmentDurationS)&&s>=n.lastSegmentDurationS&&(n.state=N)}}(t,e,o);break;case N:!function(e,t,n){var r=t.getMediaType(),i=t.getThroughputController(),a=t.getMediaInfo(),o=i.getSafeAverageThroughput(r),s=t.getScheduleController();!function(e,t){var n=Date.now();if(isNaN(e.lastSegmentFinishTimeMs)){if(!isNaN(e.lastCallTimeMs)){var r=.001*(n-e.lastCallTimeMs);e.placeholderBuffer+=Math.max(0,r)}}else{var i=.001*(n-e.lastSegmentFinishTimeMs);e.placeholderBuffer+=Math.max(0,i)}e.lastCallTimeMs=n,e.lastSegmentStart=NaN,e.lastSegmentRequestTimeMs=NaN,e.lastSegmentFinishTimeMs=NaN,D(e,t)}(n,r);var u=l.getCurrentBufferLevel(r),c=function(e,t){for(var n=e.representations.length,r=NaN,i=NaN,a=0;a<n;++a){var o=(e.Vp*(e.utilities[a]-1+e.gp)-t)/e.representations[a].bandwidth;(isNaN(i)||o>=i)&&(i=o,r=a)}return e.representations[r]}(n,u+n.placeholderBuffer),f=E.getOptimalRepresentationForBitrate(a,o,!0);c.absoluteIndex>n.currentRepresentation.absoluteIndex&&c.absoluteIndex>f.absoluteIndex&&(c=f.absoluteIndex>n.currentRepresentation.absoluteIndex?f:n.currentRepresentation);var d=Math.max(0,u+n.placeholderBuffer-O(n,c));d<=n.placeholderBuffer?(n.placeholderBuffer-=d,d=0):(d-=n.placeholderBuffer,n.placeholderBuffer=0,E.isPlayingAtTopQuality(c)?d=0:s.setTimeToLoadDelay(1e3*d)),e.representation=c,e.reason.throughput=o,e.reason.bufferLevel=u,e.reason.placeholderBuffer=n.placeholderBuffer,e.reason.delay=d,n.currentRepresentation=c}(t,e,o);break;default:!function(e,t,r){n.debug("BOLA ABR rule invoked in bad state.");var i=t.getMediaInfo(),a=t.getMediaType(),o=t.getThroughputController().getSafeAverageThroughput(a);e.representation=E.getOptimalRepresentationForBitrate(i,o,!0),e.reason.state=r.state,e.reason.throughput=o,r.state=R,y(r)}(t,e,o)}return t.priority=r.get().streaming.abr.rules.bolaRule.priority,t}catch(e){return n.error(e),(0,i.A)(s).create()}},handleNewMediaInfo:function(e){e&&e.streamInfo&&e.type&&a[e.streamInfo.id]&&a[e.streamInfo.id][e.type]&&delete a[e.streamInfo.id][e.type]},reset:function(){U(),m.off(p.A.BUFFER_EMPTY,v,t),m.off(p.A.PLAYBACK_SEEKING,A,t),m.off(p.A.METRIC_ADDED,T,t),m.off(p.A.QUALITY_CHANGE_REQUESTED,S,t),m.off(p.A.FRAGMENT_LOADING_ABANDONED,F,t),m.off(h.A.MEDIA_FRAGMENT_LOADED,M,t),m.off(h.A.SETTING_UPDATED_MAX_BITRATE,P,t),m.off(h.A.SETTING_UPDATED_MIN_BITRATE,P,t),m.off(h.A.VIDEO_ELEMENT_RESIZED,L,t)}},n=(0,u.A)(s).getInstance().getLogger(t),r=(0,c.A)(s).getInstance(),U(),m.on(p.A.BUFFER_EMPTY,v,t),m.on(p.A.PLAYBACK_SEEKING,A,t),m.on(p.A.METRIC_ADDED,T,t),m.on(p.A.QUALITY_CHANGE_REQUESTED,S,t),m.on(p.A.FRAGMENT_LOADING_ABANDONED,F,t),m.on(h.A.MEDIA_FRAGMENT_LOADED,M,t),m.on(h.A.SETTING_UPDATED_MAX_BITRATE,P,t),m.on(h.A.SETTING_UPDATED_MIN_BITRATE,P,t),m.on(h.A.VIDEO_ELEMENT_RESIZED,L,t),t}w.__dashjs_factory_name="BolaRule";var D=r.A.getClassFactory(w),O="L2A_STATE_ONE_BITRATE",M="L2A_STATE_STARTUP",P="L2A_STATE_STEADY",L=Math.pow(4,.99);function x(e){e=e||{};var t,n,r,a,s=this.context,l=e.dashMetrics,f=(0,d.A)(s).getInstance(),p=(0,c.A)(s).getInstance();function m(e){e.placeholderBuffer=0,e.mostAdvancedSegmentStart=NaN,e.lastSegmentWasReplacement=!1,e.lastSegmentStart=NaN,e.lastSegmentDurationS=NaN,e.lastSegmentRequestTimeMs=NaN,e.lastSegmentFinishTimeMs=NaN,e.lastSegmentUrl=""}function E(){for(var e in n)if(n.hasOwnProperty(e)){var t=n[e];t.state!==O&&(t.state=M,m(t))}}function v(e){if(e&&e.chunk&&e.chunk.representation&&e.chunk.representation.mediaInfo){var t=n[e.chunk.representation.mediaInfo.type],i=r[e.chunk.representation.mediaInfo.type];if(t&&t.state!==O){var a=e.chunk.start;isNaN(t.mostAdvancedSegmentStart)||a>t.mostAdvancedSegmentStart?(t.mostAdvancedSegmentStart=a,t.lastSegmentWasReplacement=!1):t.lastSegmentWasReplacement=!0,t.lastSegmentStart=a,t.lastSegmentDurationS=e.chunk.duration,t.currentRepresentation=e.chunk.representation,y(t,i)}}}function A(e){if(e&&e.metric===o.HTTP_REQUEST&&e.value&&e.value.type===I.G.MEDIA_SEGMENT_TYPE&&e.value.trace&&e.value.trace.length){var t=n[e.mediaType],i=r[e.mediaType];t&&t.state!==O&&(t.lastSegmentRequestTimeMs=e.value.trequest.getTime(),t.lastSegmentFinishTimeMs=e.value._tfinish.getTime(),y(t,i))}}function y(e,t){isNaN(e.lastSegmentStart)||isNaN(e.lastSegmentRequestTimeMs)||(t.segment_request_start_s=.001*e.lastSegmentRequestTimeMs,t.segment_download_finish_s=.001*e.lastSegmentFinishTimeMs,e.lastSegmentStart=NaN,e.lastSegmentRequestTimeMs=NaN)}function T(e,t){if(e.length!==t.length)return-1;for(var n=0,r=0;r<e.length;r++)n+=e[r]*t[r];return n}function _(){n={},r={}}return t={getSwitchRequest:function(e){try{var t=(0,i.A)(s).create();t.rule=this.getClassName();var o=e.getMediaType(),u=e.getScheduleController();if(t.reason=t.reason||{},o===g.A.AUDIO)return t;u.setTimeToLoadDelay(0);var c=function(e){var t=e.getMediaType(),i=n[t];return i||(i=function(e){var t={},n=e.getMediaInfo();return t.state=M,t.currentRepresentation=null,function(e){e&&e.type&&(r[e.type]={},r[e.type].w=[],r[e.type].prev_w=[],r[e.type].Q=0,r[e.type].segment_request_start_s=0,r[e.type].segment_download_finish_s=0,r[e.type].B_target=1.5)}(n),m(t),t}(e),n[t]=i),i}(e);if(!r[o])return t;switch(t.reason.state=c.state,c.state){case O:break;case M:!function(e,t,n){var i=e.getMediaInfo(),a=e.getMediaType(),o=e.getThroughputController().getSafeAverageThroughput(a);if(isNaN(o))return t;var s=e.getAbrController(),u=s.getOptimalRepresentationForBitrate(i,o,!0),c=l.getCurrentBufferLevel(a,!0),f=r[a],d=s.getPossibleVoRepresentationsFilteredBySettings(i,!0);if(t.representation=u,t.reason.throughput=o,n.currentRepresentation=u,!isNaN(n.lastSegmentDurationS)&&c>=f.B_target){n.state=P,f.Q=L;for(var h=0;h<d.length;++h)d[h].id===n.currentRepresentation.id?f.prev_w[h]=1:f.prev_w[h]=0}}(e,t,c);break;case P:!function(e,t,n){var i=[],a=e.getThroughputController(),o=e.getMediaType(),s=a.getAverageThroughput(o,g.A.THROUGHPUT_CALCULATION_MODES.ARITHMETIC_MEAN,1),u=l.getCurrentHttpRequest(o),c=null,f=r[o];if(s<1&&(s=1),u.url===n.lastSegmentUrl||u.type===I.G.INIT_SEGMENT_TYPE)c=n.currentRepresentation;else{for(var d=n.lastSegmentDurationS,h=1,p=e.getAbrController(),m=e.getMediaInfo(),E=p.getPossibleVoRepresentationsFilteredBySettings(m,!0),v=e.getVideoModel().getPlaybackRate(),A=Math.max(Math.pow(4,1),L*Math.sqrt(4)),y=0;y<E.length;++y){var _=E[y];v*_.bitrateInKbit>s&&(h=-1),f.w[y]=f.prev_w[y]+h*(d/(2*A))*((f.Q+L)*(v*_.bitrateInKbit/s))}f.w=function(e){for(var t=e.length,n=!1,r=[],i=0;i<t;++i)r[i]=e[i];for(var a=e.sort((function(e,t){return t-e})),o=0,s=0,u=[],c=0;c<t-1;++c)if((s=((o+=a[c])-1)/(c+1))>=a[c+1]){n=!0;break}n||(s=(o+a[t-1]-1)/t);for(var l=0;l<t;++l)u[l]=Math.max(r[l]-s,0);return u}(f.w);for(var S=0;S<E.length;++S)i[S]=f.w[S]-f.prev_w[S],f.prev_w[S]=f.w[S];var b=E.map((function(e){return e.bandwidth}));f.Q=Math.max(0,f.Q-d+d*v*((T(b,f.prev_w)+T(b,i))/s));for(var R=[],N=0;N<b.length;++N)R[N]=Math.abs(b[N]-T(f.w,b));var C=R.indexOf(Math.min.apply(Math,R));(c=p.getRepresentationByAbsoluteIndex(C,m,!0)).absoluteIndex>n.currentRepresentation.absoluteIndex&&b[n.currentRepresentation.absoluteIndex+1]<=s&&(c=p.getRepresentationByAbsoluteIndex(n.currentRepresentation.absoluteIndex+1,m,!0)),c.bitrateInKbit>=s&&(f.Q=2*Math.max(L,f.Q)),n.lastSegmentUrl=u.url}t.representation=c,n.currentRepresentation=t.representation}(e,t,c);break;default:!function(e,t,n){var r=e.getAbrController(),i=e.getMediaInfo(),a=e.getMediaType(),o=e.getThroughputController().getSafeAverageThroughput(a);t.representation=r.getOptimalRepresentationForBitrate(i,o,!0),t.reason.throughput=o,n.state=M,m(n)}(e,t,c)}return t.priority=p.get().streaming.abr.rules.l2ARule.priority,t}catch(e){return a.error(e),(0,i.A)(s).create()}},reset:function(){_(),f.off(h.A.PLAYBACK_SEEKING,E,t),f.off(h.A.MEDIA_FRAGMENT_LOADED,v,t),f.off(h.A.METRIC_ADDED,A,t)}},a=(0,u.A)(s).getInstance().getLogger(t),_(),f.on(h.A.PLAYBACK_SEEKING,E,t),f.on(h.A.MEDIA_FRAGMENT_LOADED,v,t),f.on(h.A.METRIC_ADDED,A,t),t}x.__dashjs_factory_name="L2ARule";var F=r.A.getClassFactory(x),U=n(91975),k=(n(54554),"manual_weight_selection");function B(){var e,t,n,r,i,a,o,s,c,l=this.context;function f(){n=null,r=1,i=100,a=0,o=null,s=null,c="dynamic_weight_selection"}function d(){var e=0;if(n)for(var t=0;t<n.length;t++){var r=n[t];r.state.throughput>e&&(e=r.state.throughput)}return e}function h(e,t,n){var r=e.map((function(e,r){return n[r]*Math.pow(e-t[r],2)})).reduce((function(e,t){return e+t}));return(r<0?-1:1)*Math.sqrt(Math.abs(r))}function g(e,t){return h([e.state.throughput,e.state.latency,e.state.rebuffer,e.state.switch],[t.state.throughput,t.state.latency,t.state.rebuffer,t.state.switch],[1,1,1,1])}function p(e,t){for(var r=0;r<n.length;r++){var i=n[r],a=g(i,e);m(i,t,Math.exp(-1*Math.pow(a,2)/(2*Math.pow(.1,2))))}}function m(e,t,n){var r=e.state,i=[.01,.01,.01,.01];r.throughput=r.throughput+(t[0]-r.throughput)*i[0]*n,r.latency=r.latency+(t[1]-r.latency)*i[1]*n,r.rebuffer=r.rebuffer+(t[2]-r.rebuffer)*i[2]*n,r.switch=r.switch+(t[3]-r.switch)*i[3]*n}return e={getNextQuality:function(e,u,l,f,g,m,E,v){var A=f,y=l;!function(e,t){if(!n){n=[];var i=t.getPossibleVoRepresentationsFilteredBySettings(e,!0),o=i.map((function(e){return e.bandwidth}));a=Math.min.apply(Math,(0,U.A)(o)),u=o.map((function(e){return Math.pow(e,2)})).reduce((function(e,t){return e+t})),r=Math.sqrt(u),i.forEach((function(e){var t={representation:e,state:{throughput:e.bandwidth/r,latency:0,rebuffer:0,switch:0}};n.push(t)})),s=function(e){var t=[],n=function(e){for(var t=[],n=0;n<e;n++){var r=[Math.random()*d(),Math.random(),Math.random(),Math.random()];t.push(r)}return t}(Math.pow(e.length,2));t.push(n[0]);for(var r=[1,1,1,1],i=1;i<e.length;i++){for(var a=null,o=null,s=0;s<n.length;s++){for(var u=n[s],c=null,l=0;l<t.length;l++){var f=h(u,t[l],r);(null===c||f<c)&&(c=f)}(null===o||c>o)&&(a=u,o=c)}t.push(a)}for(var g=null,p=null,m=0;m<t.length;m++){for(var E=0,v=0;v<t.length;v++)m!==v&&(E+=h(t[m],t[v],r));(null===g||E>g)&&(g=E,p=m)}var A=[];for(A.push(t[p]),t.splice(p,1);t.length>0;){for(var y=null,T=null,_=0;_<t.length;_++){var S=h(A[0],t[_],r);(null===y||S<y)&&(y=S,T=_)}A.push(t[T]),t.splice(T,1)}return A}(n)}var u}(u,e);var T=l/r;T>1&&(T=d()),f/=i;var _=n.find((function(e){return e.representation.id===E.id})),S=_.representation.bandwidth*v.getSegmentDuration()/y,I=Math.max(0,S-g);if(g-S<v.getMinBuffer())return t.debug("Buffer is low for bitrate= ".concat(_.representation.bandwidth," downloadTime=").concat(S," currentBuffer=").concat(g," rebuffer=").concat(I)),function(e,t){var r=0,i=e;if(n)for(var a=0;a<n.length;a++){var o=n[a];o.representation.bandwidth<e.representation.bandwidth&&o.representation.bandwidth>r&&t>o.representation.bandwidth&&(r=o.representation.bandwidth,i=o)}return i}(_,y).representation;switch(c){case k:o=[.4,.4,.4,.4];break;case"random_weight_selection":o=function(e){for(var t=[],n=Math.sqrt(2/e),r=0;r<4;r++)t.push(Math.random()*n);return o=t}(n.length);break;default:!function(e,t,r,i,a,u){o||(o=s[s.length-1]);var c=e.findWeightVector(n,t,r,i,a,u);null!==c&&-1!==c&&(o=c)}(v,A,g,I,y,m)}for(var b=null,R=null,N=null,C=0;C<n.length;C++){var w=n[C],D=w.state,O=[D.throughput,D.latency,D.rebuffer,D.switch],M=o.slice(),P=v.getNextBufferWithBitrate(w.representation.bandwidth,g,y),L=P<v.getMinBuffer();L&&t.debug("Buffer is low for bitrate=".concat(w.representation.bandwidth," downloadTime=").concat(S," currentBuffer=").concat(g," nextBuffer=").concat(P)),(w.representation.bandwidth>l-1e4||L)&&w.representation.bandwidth!==a&&(M[0]=100);var x=h(O,[T,0,0,0],M);(null===b||x<b)&&(b=x,R=w.representation,N=w)}var F=Math.abs(_.representation.bandwidth-N.representation.bandwidth)/r;return p(_,[T,f,I,F]),p(N,[T,0,0,F]),R},reset:function(){f()}},t=(0,u.A)(l).getInstance().getLogger(e),f(),e}B.__dashjs_factory_name="LearningAbrController";var G=r.A.getClassFactory(B),H=n(85952),Y=n(7718),V=(0,H.A)((function e(){(0,Y.A)(this,e),this.type=null,this.lastBitrate=null,this.weights={},this.weights.bitrateReward=null,this.weights.bitrateSwitchPenalty=null,this.weights.rebufferPenalty=null,this.weights.latencyPenalty=null,this.weights.playbackSpeedPenalty=null,this.bitrateWSum=0,this.bitrateSwitchWSum=0,this.rebufferWSum=0,this.latencyWSum=0,this.playbackSpeedWSum=0,this.totalQoe=0}));function q(){var e,t,n,r,i;function a(){t=null,n=null,r=null,i=null}function o(e,t,n,r){var i=new V;return i.type=e,i.weights.bitrateReward=t||1,i.weights.bitrateSwitchPenalty=1,i.weights.rebufferPenalty=n||1e3,i.weights.latencyPenalty=[],i.weights.latencyPenalty.push({threshold:1.1,penalty:.05*r}),i.weights.latencyPenalty.push({threshold:1e8,penalty:.1*n}),i.weights.playbackSpeedPenalty=r||200,i}function s(e,t,n,r,i){i.bitrateWSum+=i.weights.bitrateReward*e,i.lastBitrate&&(i.bitrateSwitchWSum+=i.weights.bitrateSwitchPenalty*Math.abs(e-i.lastBitrate)),i.lastBitrate=e,i.rebufferWSum+=i.weights.rebufferPenalty*t;for(var a=0;a<i.weights.latencyPenalty.length;a++){var o=i.weights.latencyPenalty[a];if(n<=o.threshold){i.latencyWSum+=o.penalty*n;break}}i.playbackSpeedWSum+=i.weights.playbackSpeedPenalty*Math.abs(1-r),i.totalQoe=i.bitrateWSum-i.bitrateSwitchWSum-i.rebufferWSum-i.latencyWSum-i.playbackSpeedWSum}return e={setupPerSegmentQoe:function(e,a,s){t=o("segment",e,a,s),n=e,r=a,i=s},logSegmentMetrics:function(e,n,r,i){t&&s(e,n,r,i,t)},getPerSegmentQoe:function(){return t},calculateSingleUseQoe:function(e,t,a,u){var c=null;return n&&r&&i&&(c=o("segment",n,r,i)),c?(s(e,t,a,u,c),c.totalQoe):0},reset:function(){a()}},a(),e}q.__dashjs_factory_name="LoLpQoeEvaluator";var K=r.A.getClassFactory(q);function j(e){var t,n,r,i,a,o,s=e.targetLatency,u=e.bufferMin,c=e.segmentDuration,l=e.qoeEvaluator;function f(){return c}function d(e,t){var n=f();return t>n?e-n:e+n-t}return t={getMinBuffer:function(){return u},getSegmentDuration:f,getNextBufferWithBitrate:function(e,t,n){return d(t,e*c/n)},getNextBuffer:d,findWeightVector:function(e,t,i,a,o,f){var h=null,g=null,p=null,m=Math.abs(t-r);return e.forEach((function(e){n.forEach((function(n){n[0];var r=n[1],a=n[2],E=(n[3],e.representation.bandwidth*c/o),v=d(i,E),A=(0===a?10:1/a)*Math.max(1e-5,E-v),y=(0===r?10:1/r)*e.state.latency,T=l.calculateSingleUseQoe(e.representation.bandwidth,A,y,f);(null===h||T>h)&&function(e,t,n){return!(e>s+n)&&t>=u}(t,v,m)&&(h=T,g=n,p=e.representation.bandwidth)}))})),null===g&&null===p&&(g=-1),r=t,g}},a=(i=[.2,.4,.6,.8,1]).map((function(e){return[e]})),n=(o=function(e,t,n){if(n===t)return e;for(var r=e.length,a=0;a<r;a++)for(var s=e.shift(),u=0;u<i.length;u++)e.push(s.concat(i[u]));return o(e,t,n+1)})(a,4,1),r=0,t}j.__dashjs_factory_name="LoLpWeightSelector";var z=r.A.getClassFactory(j);function W(e){var t,n,r,a,s,l=(e=e||{}).dashMetrics,f=this.context;return r={getSwitchRequest:function(e){try{var r=(0,i.A)(f).create();r.rule=this.getClassName();var u=e.getMediaInfo().type,c=e.getAbrController(),d=e.getStreamInfo(),h=e.getRepresentation(),p=e.getMediaInfo(),m=l.getCurrentBufferState(u),E=e.getScheduleController(),v=l.getCurrentBufferLevel(u,!0),A=E.getPlaybackController(),y=A.getCurrentLiveLatency();if(u===g.A.AUDIO)return r;y||(y=0);var T=A.getPlaybackRate(),_=e.getThroughputController().getSafeAverageThroughput(u);if(t.debug("Throughput ".concat(Math.round(_)," kbps")),isNaN(_)||!m)return r;if(c.getAbandonmentStateFor(d.id,u)===o.ABANDON_LOAD)return r;var S=c.getPossibleVoRepresentationsFilteredBySettings(p,!0).map((function(e){return e.bandwidth})),I=e.getRepresentation().fragmentDuration,b=Math.min.apply(Math,(0,U.A)(S))/1e3,R=Math.max.apply(Math,(0,U.A)(S))/1e3,N=h.bandwidth/1e3,C=l.getCurrentHttpRequest(u,!0),w=(C.tresponse.getTime()-C.trequest.getTime())/1e3,D=w>I?w-I:0;s.setupPerSegmentQoe(I,R,b),s.logSegmentMetrics(N,D,y,T);var O=z(f).create({targetLatency:1.5,bufferMin:.3,segmentDuration:I,qoeEvaluator:s});return r.representation=a.getNextQuality(c,p,1e3*_,y,v,T,h,O),r.reason={throughput:_,latency:y},r.priority=n.get().streaming.abr.rules.loLPRule.priority,E.setTimeToLoadDelay(0),r}catch(e){throw e}},reset:function(){a.reset(),s.reset()}},t=(0,u.A)(f).getInstance().getLogger(r),a=G(f).create(),s=K(f).create(),n=(0,c.A)(f).getInstance(),r}W.__dashjs_factory_name="LoLPRule";var Q=r.A.getClassFactory(W);function X(e){e=e||{};var t,n,r,a,o=this.context,s=e.mediaPlayerModel,u=e.customParametersModel,c=e.dashMetrics,l=e.settings,p=(0,d.A)(o).getInstance();function m(){Object.values(g.A.QUALITY_SWITCH_RULES).forEach((function(e){n=v(e,n)})),Object.values(g.A.ABANDON_FRAGMENT_RULES).forEach((function(e){r=v(e,r)})),u.getAbrCustomRules().forEach((function(e){e.type===g.A.RULES_TYPES.QUALITY_SWITCH_RULES&&n.push(e.rule(o).create()),e.type===g.A.RULES_TYPES.ABANDON_FRAGMENT_RULES&&r.push(e.rule(o).create())})),0===n.length&&(n.push(D(o).create({dashMetrics:c,mediaPlayerModel:s,settings:l})),n.push(f(o).create({dashMetrics:c})))}function v(e,t){var n=e.charAt(0).toLowerCase()+e.slice(1);return l.get().streaming.abr.rules[n].active&&!function(e,t){return e.filter((function(e){return e.getClassName()===t})).length>0}(t,e)?(t.push(function(e){switch(e){case g.A.QUALITY_SWITCH_RULES.BOLA_RULE:return D(o).create({dashMetrics:c,mediaPlayerModel:s,settings:l});case g.A.QUALITY_SWITCH_RULES.THROUGHPUT_RULE:return f(o).create({dashMetrics:c});case g.A.QUALITY_SWITCH_RULES.INSUFFICIENT_BUFFER_RULE:return E(o).create({dashMetrics:c,settings:l});case g.A.QUALITY_SWITCH_RULES.SWITCH_HISTORY_RULE:return S(o).create();case g.A.QUALITY_SWITCH_RULES.DROPPED_FRAMES_RULE:return T(o).create();case g.A.QUALITY_SWITCH_RULES.LEARN_TO_ADAPT_RULE:return F(o).create({dashMetrics:c,settings:l});case g.A.QUALITY_SWITCH_RULES.LOL_PLUS_RULE:return Q(o).create({dashMetrics:c});case g.A.ABANDON_FRAGMENT_RULES.ABANDON_REQUEST_RULE:return A(o).create({dashMetrics:c,mediaPlayerModel:s,settings:l})}}(e)),t):l.get().streaming.abr.rules[n].active?t:function(e,t){return e.filter((function(e){return e.getClassName()!==t}))}(t,e)}function y(e){return e.filter((function(e){return e.representation!==i.A.NO_CHANGE}))}function _(e){var t,n,r,a={},o=null;if(0!==e.length){for(a[i.A.PRIORITY.STRONG]=null,a[i.A.PRIORITY.WEAK]=null,a[i.A.PRIORITY.DEFAULT]=null,t=0,n=e.length;t<n;t+=1)(r=e[t]).representation!==i.A.NO_CHANGE&&(null===a[r.priority]||a[r.priority].representation!==i.A.NO_CHANGE&&r.representation.bitrateInKbit<a[r.priority].representation.bitrateInKbit)&&(a[r.priority]=r);return a[i.A.PRIORITY.WEAK]&&a[i.A.PRIORITY.WEAK].representation!==i.A.NO_CHANGE&&(o=a[i.A.PRIORITY.WEAK]),a[i.A.PRIORITY.DEFAULT]&&a[i.A.PRIORITY.DEFAULT].representation!==i.A.NO_CHANGE&&(o=a[i.A.PRIORITY.DEFAULT]),a[i.A.PRIORITY.STRONG]&&a[i.A.PRIORITY.STRONG].representation!==i.A.NO_CHANGE&&(o=a[i.A.PRIORITY.STRONG]),o}}function I(){m()}return t={clearDataForStream:function(e){[n,r].forEach((function(t){t&&t.length&&t.forEach((function(t){return t.clearDataForStream&&"function"==typeof t.clearDataForStream&&t.clearDataForStream(e)}))}))},getAbandonFragmentRules:function(){return r},getBestPossibleSwitchRequest:function(e){return e&&_(y(n.filter((function(t){var n=t.getClassName();if(n!==g.A.QUALITY_SWITCH_RULES.BOLA_RULE&&n!==g.A.QUALITY_SWITCH_RULES.THROUGHPUT_RULE)return!0;var r=e.getMediaType();return a[r]&&n===g.A.QUALITY_SWITCH_RULES.BOLA_RULE||!a[r]&&n===g.A.QUALITY_SWITCH_RULES.THROUGHPUT_RULE})).map((function(t){return t.getSwitchRequest(e)}))))||(0,i.A)(o).create()},getBolaState:function(e){return a[e]},getMinSwitchRequest:_,getQualitySwitchRules:function(){return n},handleNewMediaInfo:function(e){n.forEach((function(t){return t.handleNewMediaInfo&&t.handleNewMediaInfo(e)})),r.forEach((function(t){return t.handleNewMediaInfo&&t.handleNewMediaInfo(e)}))},initialize:function(){n=[],r=[],a={},m(),p.on(h.A.SETTING_UPDATED_ABR_ACTIVE_RULES,I,t)},reset:function(){[n,r].forEach((function(e){e&&e.length&&e.forEach((function(e){return e.reset&&e.reset()}))})),n=[],r=[],a={},p.off(h.A.SETTING_UPDATED_ABR_ACTIVE_RULES,I,t)},setBolaState:function(e,t){a[e]=t},shouldAbandonFragment:function(e){if(!e)return(0,i.A)(o).create();var t=_(y(r.map((function(t){return t.shouldAbandon(e)}))));return t&&t.reason&&(t.reason.forceAbandon=!0),t||(0,i.A)(o).create()}}}X.__dashjs_factory_name="ABRRulesCollection";var $=r.A.getClassFactory(X);r.A.updateSingletonFactory(X.__dashjs_factory_name,$);var Z=$,J=n(72842),ee="loading",te="executed",ne="failed";function re(e){var t,n,r,i,a=(e=e||{}).eventBus,o=e.events,s=e.dashMetrics,u=e.fragmentLoader,c=e.debug,l=e.streamInfo,f=e.type;function d(e){var t;return!!e&&(t=!1,r.some((function(n){if(r=e,i=n,!isNaN(r.index)&&r.startTime===i.startTime&&r.adaptationIndex===i.adaptationIndex&&r.type===i.type||function(e,t){return e.representation.id===t.representation.id}(e,n)||function(e,t){return e.action===J.A.ACTION_COMPLETE&&e.action===t.action}(e,n))return t=!0;var r,i})),t)}function h(e){return isNaN(e.duration)?.25:Math.min(e.duration/8,.5)}function g(e){r=r.filter((function(t){var n=h(t);return isNaN(t.startTime)||void 0!==e&&t.startTime>=e-n}))}function p(e,t){t<=e+.5||(r=r.filter((function(n){var r=h(n);return isNaN(n.startTime)||n.startTime>=t-r||isNaN(n.duration)||n.startTime+n.duration<=e+r})))}function m(e,t,n){for(var r=e.length-1;r>=0;r--){var i=e[r],a=i.startTime,o=a+i.duration;if(n=isNaN(n)?h(i):n,!isNaN(a)&&!isNaN(o)&&t+n>=a&&t-n<o||isNaN(a)&&isNaN(t))return i}return null}function E(e,t){s.addSchedulingInfo(e,t),s.addRequestsQueue(e.mediaType,i,r)}function v(e){e.sender===u&&(i.splice(i.indexOf(e.request),1),e.response&&!e.error&&r.push(e.request),E(e.request,e.error?ne:te),a.trigger(o.FRAGMENT_LOADING_COMPLETED,{request:e.request,response:e.response,error:e.error,sender:this},{streamId:l.id,mediaType:f}))}function A(e){e.sender===u&&a.trigger(o.FRAGMENT_LOADING_PROGRESS,{request:e.request,response:e.response,error:e.error,sender:this},{streamId:l.id,mediaType:f})}function y(e){e.sender===u&&a.trigger(o.FRAGMENT_LOADING_ABANDONED,{request:e.request},{streamId:l.id,mediaType:f})}function T(){r=[],i=[],u&&u.resetInitialSettings()}return t={abortRequests:function(){n.debug("abort requests"),u.abort(),i=[]},executeRequest:function(e){e.action===J.A.ACTION_DOWNLOAD?(E(e,ee),i.push(e),function(e){a.trigger(o.FRAGMENT_LOADING_STARTED,{request:e},{streamId:l.id,mediaType:f}),u.load(e)}(e)):n.warn("Unknown request action.")},getRequests:function(e){var t=e?e.state instanceof Array?e.state:[e.state]:[],n=[];return t.forEach((function(t){var a=function(e){var t;switch(e){case ee:t=i;break;case te:t=r;break;default:t=[]}return t}(t);n=n.concat(function(e,t){return t.hasOwnProperty("time")?[m(e,t.time,t.threshold)]:e.filter((function(e){for(var n in t)if("state"!==n&&t.hasOwnProperty(n)&&e[n]!=t[n])return!1;return!0}))}(a,e))})),n},getStreamId:function(){return l.id},getType:function(){return f},isFragmentLoaded:d,isFragmentLoadedOrPending:function(e){var t,n=!1,r=0;if(!(n=d(e)))for(r=0;r<i.length;r++)t=i[r],e.url===t.url&&e.startTime===t.startTime&&(n=!0);return n},removeExecutedRequestsAfterTime:function(e){r=r.filter((function(t){return isNaN(t.startTime)||void 0!==e&&t.startTime<e}))},removeExecutedRequestsBeforeTime:g,reset:function(){a.off(o.LOADING_COMPLETED,v,this),a.off(o.LOADING_DATA_PROGRESS,A,this),a.off(o.LOADING_ABANDONED,y,this),u&&u.reset(),T()},resetInitialSettings:T,syncExecutedRequestsWithBufferedRange:function(e,t){if(e&&0!==e.length){for(var n=0,r=0,i=e.length;r<i;r++)p(n,e.start(r)),n=e.end(r);t>0&&p(n,t)}else g()}},n=c.getLogger(t),T(),a.on(o.LOADING_COMPLETED,v,t),a.on(o.LOADING_DATA_PROGRESS,A,t),a.on(o.LOADING_ABANDONED,y,t),t}re.__dashjs_factory_name="FragmentModel";var ie=r.A.getClassFactory(re);ie.FRAGMENT_MODEL_LOADING=ee,ie.FRAGMENT_MODEL_EXECUTED=te,ie.FRAGMENT_MODEL_CANCELED="canceled",ie.FRAGMENT_MODEL_FAILED=ne,r.A.updateClassFactory(re.__dashjs_factory_name,ie);var ae=ie;function oe(e){var t=(e=e||{}).abrController,n=e.throughputController,r=e.switchRequestHistory,i=e.droppedFramesHistory,a=e.currentRequest,o=e.streamProcessor?e.streamProcessor.getScheduleController():null,s=e.streamProcessor?e.streamProcessor.getRepresentation():null,u=e.videoModel?e.videoModel:null;function c(){return s?s.mediaInfo:null}return{getAbrController:function(){return t},getCurrentRequest:function(){return a},getDroppedFramesHistory:function(){return i},getMediaInfo:c,getMediaType:function(){var e=c();return e?e.type:null},getRepresentation:function(){return s},getScheduleController:function(){return o},getStreamInfo:function(){var e=c();return e?e.streamInfo:null},getSwitchRequestHistory:function(){return r},getThroughputController:function(){return n},getVideoModel:function(){return u}}}oe.__dashjs_factory_name="RulesContext";var se=r.A.getClassFactory(oe);function ue(){var e={},t={},n=this.context,r=(0,c.A)(n).getInstance();return{clearForStream:function(n){delete e[n],delete t[n]},getSwitchRequests:function(t,n){return null!=t&&null!=n&&e[t]&&e[t][n]?e[t][n]:{}},push:function(n){var i=n.currentRepresentation,a=n.newRepresentation;if(i.mediaInfo.streamInfo.id===a.mediaInfo.streamInfo.id&&a.mediaInfo.id===i.mediaInfo.id){var o=i.mediaInfo.streamInfo.id;e[o]||function(n){e[n]={},t[n]={}}(o);var s=i.mediaInfo.type;e[o][s]||function(n,r){e[n][r]={},t[n][r]=[]}(o,s);var u=n.currentRepresentation.id;e[o][s][u]||function(t,n,r){e[t][n][r]={noDrops:0,drops:0,dropSize:0}}(o,s,u);var c=n.newRepresentation.absoluteIndex-n.currentRepresentation.absoluteIndex,l=c<0?1:0,f=l?-c:0,d=l?0:1;e[o][s][n.currentRepresentation.id].drops+=l,e[o][s][n.currentRepresentation.id].dropSize+=f,e[o][s][n.currentRepresentation.id].noDrops+=d,t[o][s].push({id:n.currentRepresentation.id,noDrop:d,drop:l,dropSize:f});var h=function(e,n){return t[e][n].length>r.get().streaming.abr.rules.switchHistoryRule.parameters.sampleSize?t[e][n].shift():null}(o,s);h&&function(t,n,r){e[t][n][r.id].drops-=r.drop,e[t][n][r.id].dropSize-=r.dropSize,e[t][n][r.id].noDrops-=r.noDrop}(o,s,h)}},reset:function(){e={},t={}}}}n(29314),n(3362),ue.__dashjs_factory_name="SwitchRequestHistory";var ce=r.A.getClassFactory(ue);function le(){var e={},t={},n={};return{clearForStream:function(r){delete e[r],delete t[r],delete n[r]},getFrameHistory:function(t){return e[t]},push:function(r,i,a){if(i){e[r]||function(r){e[r]=[],t[r]=0,n[r]=0}(r);var o=a&&a.droppedVideoFrames?a.droppedVideoFrames:0,s=a&&a.totalVideoFrames?a.totalVideoFrames:0,u=o-t[r];t[r]=o;var c=s-n[r];n[r]=s;var l=e[r];l[i]?(l[i].droppedVideoFrames+=u,l[i].totalVideoFrames+=c):l[i]={droppedVideoFrames:u,totalVideoFrames:c}}},reset:function(){e={},t={},n={}}}}le.__dashjs_factory_name="DroppedFramesHistory";var fe=r.A.getClassFactory(le);function de(){var e,t,n,r,a,s,c,l,f,m,E,v,A,y,T,_,S,I,b,R,N,C=this.context,w=(0,u.A)(C).getInstance(),D=(0,d.A)(C).getInstance();function O(){e={},I={},T=new Map,E&&E.reset(),b&&b.reset(),c=void 0,E=void 0,b=void 0,clearTimeout(t),t=null}function M(e){var t=P(e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1]);return function(e){try{return function(e){try{if(!_.get().streaming.cmsd.enabled||!_.get().streaming.cmsd.abr.applyMb)return e;var t=e.filter((function(e){var t=e.mediaInfo.type,n=s.getMaxBitrate(t);if(t!==g.A.VIDEO||n<0)return!0;var r=e.mediaInfo.streamInfo.id;return n-=I[r][g.A.AUDIO].getRepresentation().bitrateInKbit||0,e.bitrateInKbit<=n}));return t.length>0?t:e}catch(t){return A.error(t),e}}(e=function(e){try{if(!_.get().streaming.abr.limitBitrateByPortal)return e;var t=1e3*_.get().streaming.abr.limitBitrateByPortalMinimum||0,n=N.getVideoElementSize().elementWidth,r=e.filter((function(e){return e.mediaInfo.type!==g.A.VIDEO||e.width<=n||e.bandwidth<=t}));return r.length>0?r:e}catch(t){return A.error(t),e}}(e=function(e){try{var t=e.filter((function(e){var t=e.mediaInfo.type,n=e.bitrateInKbit,r=y.getAbrBitrateParameter("maxBitrate",t),i=y.getAbrBitrateParameter("minBitrate",t);return!(r>-1&&n>r||i>-1&&n<i)}));return t.length>0?t:e}catch(t){return A.error(t),e}}(e)))}catch(t){return A.error(t),e}}(t)}function P(e,t){var n=[];if(!e)return n;var i=function(e){try{var t=[];if(e&&t.push(e),!_.get().streaming.abr.enableSupplementalPropertyAdaptationSetSwitching||!e.adaptationSetSwitchingCompatibleIds||0===e.adaptationSetSwitchingCompatibleIds.length)return t;var n=I[e.streamInfo.id][e.type].getAllMediaInfos().filter((function(t){return e.adaptationSetSwitchingCompatibleIds.includes(t.id)}));return t.concat(n)}catch(t){return[e]}}(e);return i.forEach((function(e){var t=r.getVoRepresentations(e);t&&t.length>0&&(n=n.concat(t))})),(n=function(e){return e=function(e){var t=null;return e.filter((function(e){return t||(t=e.mediaInfo),!isNaN(e.qualityRanking)&&r.areMediaInfosEqual(t,e.mediaInfo)})).length===e.length}(e)?function(e){return e.sort((function(e,t){return t.qualityRanking-e.qualityRanking})),e}(e):function(e){return e.sort((function(e,t){return r.areMediaInfosEqual(e.mediaInfo,t.mediaInfo)?function(e,t){if(!isNaN(e.pixelsPerSecond)&&!isNaN(t.pixelsPerSecond)&&e.pixelsPerSecond!==t.pixelsPerSecond)return e.pixelsPerSecond-t.pixelsPerSecond;var n=e.bandwidth-t.bandwidth;return 0!==n?n:L(e,t)}(e,t):function(e,t){if(!isNaN(e.pixelsPerSecond)&&!isNaN(t.pixelsPerSecond)&&e.pixelsPerSecond!==t.pixelsPerSecond)return e.pixelsPerSecond-t.pixelsPerSecond;if(!isNaN(e.bitsPerPixel)&&!isNaN(t.bitsPerPixel)&&e.bitsPerPixel!==t.bitsPerPixel)return t.bitsPerPixel-e.bitsPerPixel;var n=e.bandwidth-t.bandwidth;return 0!==n?n:L(e,t)}(e,t)})),e}(e)}(n=function(e){return e.forEach((function(t){if(t.dependentRepresentation&&null===t.dependentRepresentation.mediaInfo){var n=t.dependentRepresentation.id,r=e.find((function(e){return e.id===n}));r&&(t.dependentRepresentation=r)}})),e}(n))).forEach((function(e,t){e.absoluteIndex=t})),n=n.filter((function(n){var i=!!t||r.areMediaInfosEqual(n.mediaInfo,e),o=!n||!n.mediaInfo||a.areKeyIdsUsable(n.mediaInfo);return i&&o}))}function L(e,t){var n=e.isBootstrapRepresentation();return n!==t.isBootstrapRepresentation()?n?-1:1:t.k-e.k}function x(r){var a,s=r.request.mediaType,u=r.streamId;if(s&&u&&I[u]&&_.get().streaming.abr.autoSwitchBitrate[s]){var c=I[u][s];if(c)if(!((a=c.getLastSegment())&&a.isPartialSegment&&!isNaN(a.totalNumberOfPartialSegments)&&!isNaN(a.replacementSubNumber))||0===a.replacementSubNumber){var l=U(c,r.request),f=n.shouldAbandonFragment(l);f&&f.representation!==i.A.NO_CHANGE&&function(n,r,i,a,s){if(a.getFragmentModel().getRequests({state:ae.FRAGMENT_MODEL_LOADING,index:n.request.index})[0]){var u=function(t,n){return e[t]&&e[t][n]?e[t][n]:null}(r,i);u&&(u.state=o.ABANDON_LOAD),b.reset(),V(i,S.getActiveStreamInfo(),s.representation,s.reason),clearTimeout(t),t=setTimeout((function(){u&&(e[r][i].state=o.ALLOW_LOAD),t=null}),_.get().streaming.abandonLoadTimeout)}}(r,u,s,c,f)}}}function F(){if(_.get().streaming.abr.limitBitrateByPortal)for(var e in I)for(var t in I[e])G(t,e)}function U(e,t){return se(C).create({abrController:v,adapter:r,currentRequest:t,droppedFramesHistory:E,streamProcessor:e,switchRequestHistory:b,throughputController:R,videoModel:N})}function k(e){e.mediaType===g.A.VIDEO&&(Y(e.streamId),c=e.newRepresentation.id)}function B(e){!j()||e.metric!==o.BUFFER_LEVEL||e.mediaType!==g.A.AUDIO&&e.mediaType!==g.A.VIDEO||function(e,t){try{var r=y.getBufferTimeDefault(),i=r,a=.5*r,o=n.getBolaState(e),s=t>=(o?a:i);n.setBolaState(e,s),s!==o&&(s?A.info("["+e+"] switching from throughput to buffer occupancy ABR rule (buffer: "+t.toFixed(3)+")."):A.info("["+e+"] switching from buffer occupancy to throughput ABR rule (buffer: "+t.toFixed(3)+")."))}catch(e){A.error(e)}}(e.mediaType,.001*e.value.level)}function G(t,r){try{var i;if(!(t&&I&&I[r]&&I[r][t]))return!1;Y(r);var a=I[r][t],s=a.getLastSegment(),u=null===(i=a.getRepresentationController())||void 0===i?void 0:i.getCurrentCompositeRepresentation(),c=H(s,u);if(!_.get().streaming.abr.autoSwitchBitrate[t]||!c)return!1;var l=U(a),f=n.getBestPossibleSwitchRequest(l);if(!f||!f.representation)return!1;var d=f.representation;return function(e,t){b.push({currentRepresentation:e,newRepresentation:t})}(u,d),d.id!==u.id&&(e[r][t].state===o.ALLOW_LOAD||d.absoluteIndex<u.absoluteIndex)&&(K(t,u,d,f.reason),!0)}catch(e){return A.error(e),!1}}function H(e,t){return!(e&&e.isPartialSegment&&!isNaN(e.totalNumberOfPartialSegments)&&!isNaN(e.replacementSubNumber))||e.replacementSubNumber===e.totalNumberOfPartialSegments-1||function(e,t){if(!t||!t.segmentSequenceProperties||t.segmentSequenceProperties.length<=0)return!1;if(t&&t.mediaInfo&&t.mediaInfo.adaptationSetSwitchingCompatibleIds&&t.mediaInfo.adaptationSetSwitchingCompatibleIds.length>0)return!1;var n=t.segmentSequenceProperties.filter((function(e){return!isNaN(e.sapType)&&e.sapType<=1}));if(0===n.length)return!1;var r=(e.replacementSubNumber+1)%e.totalNumberOfPartialSegments;return n.some((function(e){return r%e.cadence==0}))}(e,t)}function Y(e){if(E){var t=N.getPlaybackQuality();t&&E.push(e,c,t)}}function V(e,t,n){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!(t&&t.id&&e&&I&&I[t.id]&&I[t.id][e]&&n))return!1;var a=null===(r=I[t.id][e].getRepresentationController())||void 0===r?void 0:r.getCurrentCompositeRepresentation();return(!a||n.id!==a.id)&&K(e,a,n,i)}function q(e,t){return"".concat(e,"-").concat(t)}function K(e,t,n,i){var a=n.mediaInfo.streamInfo.id;if(!e||!I[a]||!I[a][e])return!1;var o=I[a][e].getStreamInfo(),s=f.getCurrentBufferLevel(e),u=null!==t&&!r.areMediaInfosEqual(t.mediaInfo,n.mediaInfo),c=t?t.bitrateInKbit:0;return A.info("[AbrController]: Switching quality in period ".concat(a," for media type ").concat(e,". Switch from bitrate ").concat(c," to bitrate ").concat(n.bitrateInKbit,". Current buffer level: ").concat(s,". Reason:")+(i?JSON.stringify(i):"/")),D.trigger(p.A.QUALITY_CHANGE_REQUESTED,{isAdaptationSetSwitch:u,mediaType:e,newRepresentation:n,oldRepresentation:t,reason:i,streamInfo:o},{streamId:o.id,mediaType:e}),function(e){var t=R.getAverageThroughput(e);isNaN(t)||m.setSavedBitrateSettings(e,t)}(e),!0}function j(){return _.get().streaming.abr.rules.bolaRule.active&&_.get().streaming.abr.rules.throughputRule.active}return v={canPerformQualitySwitch:H,checkPlaybackQuality:G,clearDataForStream:function(t){E&&E.clearForStream(t),I[t]&&delete I[t],b&&b.clearForStream(t),e[t]&&delete e[t],n.clearDataForStream(t)},getAbandonmentStateFor:function(t,n){return e[t]&&e[t][n]?e[t][n].state:null},getInitialBitrateFor:function(e){if(e===g.A.TEXT)return NaN;var t=y.getAbrBitrateParameter("initialBitrate",e);if(t>0)return t;var n=NaN;if(m&&m.hasOwnProperty("getSavedBitrateSettings")&&(n=m.getSavedBitrateSettings(e)),!isNaN(n))return n;var r=R.getAverageThroughput(e);return!isNaN(r)&&r>0?r:e===g.A.VIDEO?1e3:100},getOptimalRepresentationForBitrate:function(e,t){var n=M(e,!(arguments.length>2&&void 0!==arguments[2])||arguments[2]);if(!n||0===n.length)return null;var r=n.reduce((function(e,t){return e.bandwidth<t.bandwidth?e:t}));if(t<=0)return r;var i=n.filter((function(e){return e.bitrateInKbit<=t}));return i&&0!==i.length?i.reduce((function(e,t){return t.absoluteIndex>e.absoluteIndex?t:e})):r},getPossibleVoRepresentations:function(e){return P(e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1])},getPossibleVoRepresentationsFilteredBySettings:M,getRepresentationByAbsoluteIndex:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return isNaN(e)||e<0?null:M(t,n).find((function(t){return t.absoluteIndex===e}))},handleNewMediaInfo:function(e){n.handleNewMediaInfo(e)},handlePendingManualQualitySwitch:function(e,t){try{var n=q(e,t),r=null;if(T.has(n)&&(r=T.get(n)),!r)return!1;var i=I[e][t];if(!H(i.getLastSegment(),i.getRepresentation()))return!1;var a=r,o=a.type,s=a.streamInfo,u=a.representation,c=a.reason;return T.delete(n),V(o,s,u,c),!0}catch(e){A.error("Can not handle pending manual quality switch: ".concat(e))}},initialize:function(){E=fe(C).create(),b=ce(C).create(),(n=Z(C).create({dashMetrics:f,customParametersModel:l,mediaPlayerModel:y,settings:_})).initialize(),D.on(p.A.QUALITY_CHANGE_RENDERED,k,v),D.on(p.A.METRIC_ADDED,B,v),D.on(h.A.LOADING_PROGRESS,x,v),D.on(h.A.VIDEO_ELEMENT_RESIZED,F,v)},isPlayingAtLowestQuality:function(e){return M(e.mediaInfo,!0)[0].id===e.id},isPlayingAtTopQuality:function(e){if(!e)return!0;var t=M(e.mediaInfo,!0);return t[t.length-1].id===e.id},manuallySetPlaybackQuality:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=I[t.id][e];if(H(i.getLastSegment(),i.getRepresentation()))return V(e,t,n,r);!function(e,t,n,r){try{A.debug("[AbrController] Queuing manual quality switch for stream ".concat(t.id," and type ").concat(e," to representation ").concat(n.id));var i=q(t.id,e);T.set(i,{type:e,streamInfo:t,representation:n,reason:r})}catch(e){A.error("Can not queue manual quality switch: ".concat(e))}}(e,t,n,r)},registerStreamType:function(t,r){var i=r.getStreamInfo().id;I[i]||(I[i]={}),I[i][t]=r,e[i]||(e[i]={}),e[i][t]={},e[i][t].state=o.ALLOW_LOAD,void 0===n.getBolaState(t)&&n.setBolaState(t,_.get().streaming.abr.rules.bolaRule.active&&!j())},reset:function(){O(),D.off(p.A.QUALITY_CHANGE_RENDERED,k,v),D.off(p.A.METRIC_ADDED,B,v),D.off(h.A.LOADING_PROGRESS,x,v),D.off(h.A.VIDEO_ELEMENT_RESIZED,F,v),n&&n.reset()},setConfig:function(e){e&&(e.streamController&&(S=e.streamController),e.throughputController&&(R=e.throughputController),e.domStorage&&(m=e.domStorage),e.mediaPlayerModel&&(y=e.mediaPlayerModel),e.customParametersModel&&(l=e.customParametersModel),e.cmsdModel&&(s=e.cmsdModel),e.dashMetrics&&(f=e.dashMetrics),e.adapter&&(r=e.adapter),e.videoModel&&(N=e.videoModel),e.settings&&(_=e.settings),e.capabilities&&(a=e.capabilities))},setPlaybackQuality:V,unRegisterStreamType:function(t,n){try{I[t]&&I[t][n]&&delete I[t][n],e[t]&&e[t][n]&&delete e[t][n]}catch(e){}}},A=w.getLogger(v),O(),v}de.__dashjs_factory_name="AbrController";var he=r.A.getSingletonFactory(de);r.A.updateSingletonFactory(de.__dashjs_factory_name,he);var ge,pe,me,Ee,ve,Ae=he,ye=(n(48598),n(54743),n(16573),n(78100),n(77936),n(21489),n(48140),n(81630),n(72170),n(75044),n(69539),n(31694),n(89955),n(21903),n(91134),n(33206),n(44496),n(66651),n(12887),n(19369),n(66812),n(8995),n(31575),n(36072),n(88747),n(28845),n(29423),n(57301),n(373),n(86614),n(41405),n(37467),n(44732),n(33684),n(79577),n(41549),n(49797),n(49631),n(35623),{encode:function(e){for(var t=[],n=0;n<e.length;++n){var r=e.charCodeAt(n);r<128?t.push(r):r<2048?(t.push(192|r>>6),t.push(128|63&r)):r<65536?(t.push(224|r>>12),t.push(128|63&r>>6),t.push(128|63&r)):(t.push(240|r>>18),t.push(128|63&r>>12),t.push(128|63&r>>6),t.push(128|63&r))}return t},decode:function(e){for(var t=[],n=0;n<e.length;){var r=e[n++];r<128||(r<224?(r=(31&r)<<6,r|=63&e[n++]):r<240?(r=(15&r)<<12,r|=(63&e[n++])<<6,r|=63&e[n++]):(r=(7&r)<<18,r|=(63&e[n++])<<12,r|=(63&e[n++])<<6,r|=63&e[n++])),t.push(String.fromCharCode(r))}return t.join("")}}),Te={};ge="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",pe=function(e){for(var t=0,n=[],r=0|e.length/3;0<r--;){var i=(e[t]<<16)+(e[t+1]<<8)+e[t+2];t+=3,n.push(ge.charAt(63&i>>18)),n.push(ge.charAt(63&i>>12)),n.push(ge.charAt(63&i>>6)),n.push(ge.charAt(63&i))}return 2==e.length-t?(i=(e[t]<<16)+(e[t+1]<<8),n.push(ge.charAt(63&i>>18)),n.push(ge.charAt(63&i>>12)),n.push(ge.charAt(63&i>>6)),n.push("=")):1==e.length-t&&(i=e[t]<<16,n.push(ge.charAt(63&i>>18)),n.push(ge.charAt(63&i>>12)),n.push("==")),n.join("")},me=function(){for(var e=[],t=0;t<64;++t)e[ge.charCodeAt(t)]=t;return e["=".charCodeAt(0)]=0,e}(),Ee=function(e){for(var t=0,n=[],r=0|e.length/4;0<r--;){var i=(me[e.charCodeAt(t)]<<18)+(me[e.charCodeAt(t+1)]<<12)+(me[e.charCodeAt(t+2)]<<6)+me[e.charCodeAt(t+3)];n.push(255&i>>16),n.push(255&i>>8),n.push(255&i),t+=4}return n&&("="==e.charAt(t-2)?(n.pop(),n.pop()):"="==e.charAt(t-1)&&n.pop()),n},ve={encode:function(e){for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t},decode:function(e){for(var t=0;t<s.length;++t)a[t]=String.fromCharCode(a[t]);return a.join("")}},Te.decodeArray=function(e){var t=Ee(e);return new Uint8Array(t)},Te.encodeASCII=function(e){var t=ve.encode(e);return pe(t)},Te.decodeASCII=function(e){var t=Ee(e);return ve.decode(t)},Te.encode=function(e){var t=ye.encode(e);return pe(t)},Te.decode=function(e){var t=Ee(e);return ye.decode(t)},"undefined"!=typeof exports&&(exports.decode=Te.decode,exports.decodeArray=Te.decodeArray,exports.encode=Te.encode,exports.encodeASCII=Te.encodeASCII);var _e=Te,Se=(n(16280),n(48980),n(7393)),Ie=NaN,be=(0,H.A)((function e(t,n){(0,Y.A)(this,e),this.data={baseUrls:t||null,selectedIdx:n||Ie},this.children=[]}));function Re(){var e,t,n,r,i=this.context,a=(0,Se.A)(i).getInstance();function o(e,t,n){var r=s(n);e[t]?a.areEqual(r,e[t].data.baseUrls)||(e[t].data.baseUrls=r,e[t].data.selectedIdx=Ie):e[t]=new be(r)}function s(e){var t=n.getBaseURLsFromElement(e),i=r.getSynthesizedBaseUrlElements(t);return i&&i.length>0&&i.forEach((function(e){var n=t.findIndex((function(t){return t.serviceLocation===e.serviceLocation}));-1!==n?t[n]=e:t.push(e)})),t}function u(e,n){var r=n||t;e(r.data),r.children&&r.children.forEach((function(t){return u(e,t)}))}function c(){t=new be}return e={reset:c,update:function(e){!function(e){!function(){if(!n||!n.hasOwnProperty("getBaseURLsFromElement")||!n.hasOwnProperty("getRepresentationSortFunction"))throw new Error("setConfig function has to be called previously")}();var r=s(e);a.areEqual(r,t.data.baseUrls)||(t.data.baseUrls=r,t.data.selectedIdx=Ie),e&&e.Period&&e.Period.forEach((function(e,r){o(t.children,r,e),e.AdaptationSet&&e.AdaptationSet.forEach((function(e,i){o(t.children[r].children,i,e),e.Representation&&e.Representation.sort(n.getRepresentationSortFunction()).forEach((function(e,n){o(t.children[r].children[i].children,n,e)}))}))}))}(e)},getForPath:function(e){var n=t,r=[n.data];return e&&e.forEach((function(e){(n=n.children[e])&&r.push(n.data)})),r.filter((function(e){return e.baseUrls.length}))},invalidateSelectedIndexes:function(e){u((function(t){isNaN(t.selectedIdx)||e===t.baseUrls[t.selectedIdx].serviceLocation&&(t.selectedIdx=Ie)}))},setConfig:function(e){e.adapter&&(n=e.adapter),e.contentSteeringController&&(r=e.contentSteeringController)},getBaseUrls:function(e){return s(e)}},c(),e}Re.__dashjs_factory_name="BaseURLTreeModel";var Ne=r.A.getClassFactory(Re),Ce=n(70893),we=(n(52675),n(89463),n(2259),n(23418),n(62010),n(25428),n(27495),n(90906),n(3296),n(27208),n(48408),n(14603),n(47566),n(98721),n(63773)),De=(0,H.A)((function e(t){(0,Y.A)(this,e),this.url=t||null,this.type=I.G.CONTENT_STEERING_TYPE,this.responseType="json"})),Oe=(0,H.A)((function e(){(0,Y.A)(this,e),this.version=null,this.ttl=300,this.reloadUri=null,this.pathwayPriority=[],this.pathwayClones=[]})),Me=n(98854),Pe=n(46503),Le=n(99415),xe=n(56517),Fe=n(47263);function Ue(){var e,t,n,r,i,a,o,s,c,l,f,d,h,g,m,E,v=this.context,A=(0,Pe.A)(v).getInstance();function y(e){S(e,"baseUrl")}function T(e){S(e,"location")}function _(e){var t,n;e&&e.throughputValues&&e.throughputValues.serviceLocation&&(t=e.throughputValues.serviceLocation,n=e.throughputValues,g[t]||(g[t]=[]),g[t].push(n),g[t].length>4&&g[t].shift())}function S(e,t){if(e&&e.request&&e.request.serviceLocation){var n=e.request.serviceLocation;-1===d[t].all.indexOf(n)&&d[t].all.push(n),d[t].current=n}}function I(){var n=s.getValue(),r=e.getContentSteering(n);return r||(r=f.getServiceDescriptionSettings().contentSteering),!r&&t&&(r=t),t=r,r}function b(){return new Promise((function(e){try{var r=I();if(!r||!r.serverUrl)return void e();var i=function(e){var t=e.serverUrl;n&&n.reloadUri&&(t=A.isRelative(n.reloadUri)?A.resolve(n.reloadUri,e.serverUrl):n.reloadUri);var r=[],i=d.baseUrl.all.concat(d.location.all);if(i.length>0){var a=i.map((function(e){var t=function(e){if(!e||!g[e]||0===g[e].length)return-1;var t=h.getArithmeticMean(g[e],g[e].length,!0);return parseInt(1e3*t)}(e);return{serviceLocation:e,throughput:t}})),o="",s="";a.forEach((function(e,t){0!==t&&(o+=",",s+=","),o+=e.serviceLocation,s+=e.throughput>-1?e.throughput:""})),r.push({key:"_DASH_pathway",value:'"'.concat(o,'"')}),r.push({key:"_DASH_throughput",value:s})}return t=Fe.A.addAdditionalQueryParameterToUrl(t,r)}(r),s=new De(i);m.load({request:s,success:function(t){!function(e){e&&e[Me.A.CONTENT_STEERING_RESPONSE.VERSION]&&1===parseInt(e[Me.A.CONTENT_STEERING_RESPONSE.VERSION])&&((n=new Oe).version=e[Me.A.CONTENT_STEERING_RESPONSE.VERSION],e[Me.A.CONTENT_STEERING_RESPONSE.TTL]&&!isNaN(e[Me.A.CONTENT_STEERING_RESPONSE.TTL])&&(n.ttl=e[Me.A.CONTENT_STEERING_RESPONSE.TTL]),e[Me.A.CONTENT_STEERING_RESPONSE.RELOAD_URI]&&(n.reloadUri=e[Me.A.CONTENT_STEERING_RESPONSE.RELOAD_URI]),e[Me.A.CONTENT_STEERING_RESPONSE.PATHWAY_PRIORITY]&&(n.pathwayPriority=e[Me.A.CONTENT_STEERING_RESPONSE.PATHWAY_PRIORITY]),e[Me.A.CONTENT_STEERING_RESPONSE.PATHWAY_CLONES]&&(n.pathwayClones=e[Me.A.CONTENT_STEERING_RESPONSE.PATHWAY_CLONES],n.pathwayClones=n.pathwayClones.filter((function(e){return function(e){return e[Me.A.CONTENT_STEERING_RESPONSE.BASE_ID]&&e[Me.A.CONTENT_STEERING_RESPONSE.ID]&&e[Me.A.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT]&&e[Me.A.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][Me.A.CONTENT_STEERING_RESPONSE.HOST]}(e)}))),C())}(t),a.trigger(p.A.CONTENT_STEERING_REQUEST_COMPLETED,{currentSteeringResponseData:n,url:i}),e()},error:function(r,i,a,s){!function(e,r){try{switch(o.warn("Error fetching data from content steering server",e),r.status){case 404:case 410:t=null;break;case 429:var i=r&&r.headers&&r.headers["retry-after"];null!==i&&(n||(n={}),n.ttl=parseInt(i)),C();break;default:C()}}catch(e){o.error(e)}}(r,s),e(r)},complete:function(){d.baseUrl.all=R(d.baseUrl),d.location.all=R(d.location)}})}catch(t){e(t)}}))}function R(e){return e.all&&0!==e.all.length&&e.current?e.all.filter((function(t){return t===e.current})):[]}function N(e){try{var t=[];return e&&0!==e.length&&n&&n.pathwayClones&&0!==n.pathwayClones.length?(n.pathwayClones.forEach((function(n){var r=e.filter((function(e){return n[Me.A.CONTENT_STEERING_RESPONSE.BASE_ID]===e.serviceLocation})),i=null;if(r&&r.length>0&&(i=r[0]),i){var a=new URL(i.url),o=n[Me.A.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][Me.A.CONTENT_STEERING_RESPONSE.HOST];o=Fe.A.stringHasProtocol(o)?o:"".concat(a.protocol,"//").concat(o);var s={synthesizedUrl:"".concat(o).concat(a.pathname),serviceLocation:n[Me.A.CONTENT_STEERING_RESPONSE.ID],queryParams:n[Me.A.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][Me.A.CONTENT_STEERING_RESPONSE.PARAMS],reference:i};t.push(s)}})),t):t}catch(e){return o.error(e),[]}}function C(){n&&n.ttl&&!isNaN(n.ttl)&&(l&&clearTimeout(l),l=setTimeout((function(){b()}),1e3*n.ttl))}function w(){l&&clearTimeout(l),l=null}function D(){n=null,t=null,g={},d={baseUrl:{current:null,all:[]},location:{current:null,all:[]}},w()}return E={reset:function(){D(),a.off(p.A.FRAGMENT_LOADING_STARTED,y,E),a.off(p.A.MANIFEST_LOADING_STARTED,T,E),a.off(p.A.THROUGHPUT_MEASUREMENT_STORED,_,E)},setConfig:function(t){t&&(t.adapter&&(e=t.adapter),t.errHandler&&(i=t.errHandler),t.dashMetrics&&(r=t.dashMetrics),t.mediaPlayerModel&&(c=t.mediaPlayerModel),t.manifestModel&&(s=t.manifestModel),t.serviceDescriptionController&&(f=t.serviceDescriptionController),t.throughputController&&(h=t.throughputController),t.eventBus&&(a=t.eventBus))},loadSteeringData:b,getCurrentSteeringResponseData:function(){return n},shouldQueryBeforeStart:function(){var e=I();return!!e&&e.queryBeforeStart},getSteeringDataFromManifest:I,stopSteeringRequestTimer:w,getSynthesizedBaseUrlElements:function(e){try{return N(e).map((function(e){var t=new Le.A(e.synthesizedUrl,e.serviceLocation);return t.queryParams=e.queryParams,t.dvbPriority=e.reference.dvbPriority,t.dvbWeight=e.reference.dvbWeight,t.availabilityTimeOffset=e.reference.availabilityTimeOffset,t.availabilityTimeComplete=e.reference.availabilityTimeComplete,t}))}catch(e){return o.error(e),[]}},getSynthesizedLocationElements:function(e){try{return N(e).map((function(e){var t=new xe.A(e.synthesizedUrl,e.serviceLocation);return t.queryParams=e.queryParams,t}))}catch(e){return o.error(e),[]}},initialize:function(){m=(0,we.A)(v).create({errHandler:i,dashMetrics:r,mediaPlayerModel:c,errors:Ce.A}),a.on(p.A.FRAGMENT_LOADING_STARTED,y,E),a.on(p.A.MANIFEST_LOADING_STARTED,T,E),a.on(p.A.THROUGHPUT_MEASUREMENT_STORED,_,E)}},o=(0,u.A)(v).getInstance().getLogger(E),D(),E}Ue.__dashjs_factory_name="ContentSteeringController";var ke=r.A.getSingletonFactory(Ue);function Be(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ge(e){var t;e=e||{};var n=[],r=(0,d.A)(this.context).getInstance(),i=(0,c.A)(this.context).getInstance(),a=ke(this.context).getInstance(),o=e.updateEventName,s=e.addBlacklistEventName;function u(t){if(-1===n.findIndex((function(e){return e.entry===t}))){var s=e.enableExpiry?(c=a?a.getCurrentSteeringResponseData():null)&&Number.isFinite(c.ttl)?c.ttl:i.get().streaming.blacklistExpiryTime:NaN;if(e.enableExpiry&&s&&s>0){var u=setTimeout((function(){l(t)}),1e3*s);n.push({entry:t,timeoutId:u})}else n.push({entry:t});r.trigger(o,{entry:t})}var c}function l(e){var t=n.findIndex((function(t){return t.entry===e}));-1!==t&&n.splice(t,1)}function f(e){u(e.entry)}return t={add:u,remove:l,contains:function(e){return!!(n.length&&e&&e.length)&&-1!==n.findIndex((function(t){return t.entry===e}))},reset:function(){s&&r.off(s,f,t);var e,i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Be(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Be(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}(n);try{for(i.s();!(e=i.n()).done;){var a=e.value;a.timeoutId&&clearTimeout(a.timeoutId)}}catch(e){i.e(e)}finally{i.f()}n=[]}},s&&r.on(s,f,t),t}Ge.__dashjs_factory_name="BlackListController";var He=r.A.getClassFactory(Ge);function Ye(e){var t=(e=e||{}).blacklistController;return{select:function(e){return e&&function(e){var t,n,r=0,i=[],a=0;if((n=e.sort((function(e,t){var n=e.dvbPriority-t.dvbPriority;return isNaN(n)?0:n})).filter((function(e,t,n){return!t||n[0].dvbPriority&&e.dvbPriority&&n[0].dvbPriority===e.dvbPriority}))).length)return n.length>1&&(n.forEach((function(e){r+=e.dvbWeight,i.push(r)})),t=Math.floor(Math.random()*r),i.every((function(e,n){return a=n,!(t<e)}))),n[a]}((n=[],e.filter((function(e){return!t.contains(e.serviceLocation)||(e.dvbPriority&&n.push(e.dvbPriority),!1)})).filter((function(e){return!n.length||!e.dvbPriority||-1===n.indexOf(e.dvbPriority)}))));var n}}}Ye.__dashjs_factory_name="DVBSelector";var Ve=r.A.getClassFactory(Ye);function qe(e){var t=(e=e||{}).blacklistController;return{select:function(e){var n,r=0;return e&&e.some((function(e,n){return r=n,!t.contains(e.serviceLocation)}))&&(n=e[r]),n}}}qe.__dashjs_factory_name="BasicSelector";var Ke=r.A.getClassFactory(qe),je=n(11944),ze=n(70656);function We(){var e,t,n,r=this.context;function i(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=0,i=NaN,a=function(){var a=e[r],o=t.findIndex((function(e){return e.serviceLocation&&e.serviceLocation===a}));if(-1!==o&&!n.contains(t[o].serviceLocation))return i=o,1;r+=1};r<e.length&&!a(););return i}return e={selectBaseUrlIndex:function(e){var n=NaN;if(isNaN(e.selectedIdx)){var r=t.getSteeringDataFromManifest();r&&r.defaultServiceLocationArray.length>0&&(n=i(r.defaultServiceLocationArray,e.baseUrls))}var a=t.getCurrentSteeringResponseData();return e.baseUrls&&e.baseUrls.length&&a&&a.pathwayPriority&&a.pathwayPriority.length&&(n=i(a.pathwayPriority,e.baseUrls)),n},setConfig:function(e){e.blacklistController&&(n=e.blacklistController),e.contentSteeringController&&(t=e.contentSteeringController)}},t=ke(r).getInstance(),e}We.__dashjs_factory_name="ContentSteeringSelector";var Qe=r.A.getClassFactory(We);function Xe(){var e,t,n,r,i,a,o=this.context,s=(0,d.A)(o).getInstance(),u=(0,c.A)(o).getInstance();function l(){t.reset()}return e={chooseSelector:function(e){(0,ze.sq)(e,"boolean"),a=e?r:n},select:function(e){if(e){if(u.get().streaming.applyContentSteering){var t=i.selectBaseUrlIndex(e);isNaN(t)||-1===t||(e.selectedIdx=t)}if(!isNaN(e.selectedIdx))return e.baseUrls[e.selectedIdx];var r=a.select(e.baseUrls);return r?(e.selectedIdx=e.baseUrls.indexOf(r),r):(s.trigger(h.A.URL_RESOLUTION_FAILED,{error:new je.A(Ce.A.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE,Ce.A.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE)}),void(a===n&&l()))}},reset:l,setConfig:function(e){e.selector&&(a=e.selector),e.contentSteeringSelector&&(i=e.contentSteeringSelector)}},t=He(o).create({updateEventName:h.A.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,addBlacklistEventName:h.A.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD,enableExpiry:!0}),n=Ke(o).create({blacklistController:t}),r=Ve(o).create({blacklistController:t}),(i=Qe(o).create()).setConfig({blacklistController:t,addBlacklistEventName:h.A.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD}),a=n,e}Xe.__dashjs_factory_name="BaseURLSelector";var $e=r.A.getClassFactory(Xe);function Ze(){var e,t,n,r,i,a=this.context,o=(0,d.A)(a).getInstance(),s=(0,Pe.A)(a).getInstance();function u(e){n.update(e),r.chooseSelector(t.getIsDVB(e)),o.trigger(p.A.BASE_URLS_UPDATED,{baseUrls:c(e)})}function c(e){return n.getBaseUrls(e)}return e={reset:function(){n.reset(),r.reset()},initialize:function(e){n.setConfig({adapter:t,contentSteeringController:i}),u(e)},resolve:function(e){var t=n.getForPath(e).reduce((function(e,t){var n=r.select(t);return n?(s.isRelative(n.url)?e.url=s.resolve(n.url,e.url):(e.url=n.url,e.serviceLocation=n.serviceLocation),e.availabilityTimeOffset=n.availabilityTimeOffset,e.availabilityTimeComplete=n.availabilityTimeComplete,e.queryParams=n.queryParams,e):new Le.A}),new Le.A);if(!s.isRelative(t.url))return t},setConfig:function(e){e.baseURLTreeModel&&(n=e.baseURLTreeModel),e.baseURLSelector&&(r=e.baseURLSelector),e.adapter&&(t=e.adapter),e.contentSteeringController&&(i=e.contentSteeringController)},getBaseUrls:c,update:u},n=Ne(a).create(),r=$e(a).create(),o.on(h.A.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,(function(e){n.invalidateSelectedIndexes(e.entry)}),e),e}Ze.__dashjs_factory_name="BaseURLController";var Je=r.A.getClassFactory(Ze),et=(n(69479),function(){return(0,H.A)((function e(t){if((0,Y.A)(this,e),this.offset=t._offset,this.type=t.type,this.size=t.size,this.boxes=[],t.boxes)for(var n=0;n<t.boxes.length;n++)this.boxes.push(new e(t.boxes[n]));switch(this.isComplete=!0,t.type){case"sidx":if(this.timescale=t.timescale,this.earliest_presentation_time=t.earliest_presentation_time,this.first_offset=t.first_offset,this.references=t.references,t.references){this.references=[];for(var r=0;r<t.references.length;r++){var i={reference_type:t.references[r].reference_type,referenced_size:t.references[r].referenced_size,subsegment_duration:t.references[r].subsegment_duration};this.references.push(i)}}break;case"emsg":this.id=t.id,this.version=1===t.version?1:0,this.value=t.value,this.timescale=t.timescale,this.scheme_id_uri=t.scheme_id_uri,this.presentation_time_delta=1===t.version?t.presentation_time:t.presentation_time_delta,this.event_duration=t.event_duration,this.message_data=t.message_data;break;case"mdhd":this.timescale=t.timescale;break;case"mfhd":this.sequence_number=t.sequence_number;break;case"subs":this.entry_count=t.entry_count,this.entries=t.entries;break;case"tfhd":this.base_data_offset=t.base_data_offset,this.sample_description_index=t.sample_description_index,this.default_sample_duration=t.default_sample_duration,this.default_sample_size=t.default_sample_size,this.default_sample_flags=t.default_sample_flags,this.flags=t.flags;break;case"tfdt":this.version=t.version,this.baseMediaDecodeTime=t.baseMediaDecodeTime,this.flags=t.flags;break;case"trun":if(this.sample_count=t.sample_count,this.first_sample_flags=t.first_sample_flags,this.data_offset=t.data_offset,this.flags=t.flags,this.samples=t.samples,t.samples){this.samples=[];for(var a=0,o=t.samples.length;a<o;a++){var s={sample_size:t.samples[a].sample_size,sample_duration:t.samples[a].sample_duration,sample_composition_time_offset:t.samples[a].sample_composition_time_offset};this.samples.push(s)}}break;case"prft":this.version=t.version,this.reference_track_ID=t.reference_track_ID,this.ntp_timestamp_sec=t.ntp_timestamp_sec,this.ntp_timestamp_frac=t.ntp_timestamp_frac,this.media_time=t.media_time,this.flags=t.flags}}),[{key:"getChildBox",value:function(e){for(var t=0;t<this.boxes.length;t++)if(this.boxes[t].type===e)return this.boxes[t]}},{key:"getChildBoxes",value:function(e){for(var t=[],n=0;n<this.boxes.length;n++)this.boxes[n].type===e&&t.push(this.boxes[n]);return t}}])}());function tt(){var e;function t(t){var r=[];if(!t||!e||"function"!=typeof e.fetchAll)return r;for(var i,a=e.fetchAll(t),o=0,s=a.length;o<s;o++)(i=n(a[o]))&&r.push(i);return r}function n(e){if(!e)return null;var t=new et(e);return e.hasOwnProperty("_incomplete")&&(t.isComplete=!e._incomplete),t}return{getBox:function(t){return t&&e&&e.boxes&&0!==e.boxes.length&&"function"==typeof e.fetch?n(e.fetch(t)):null},getBoxes:t,setData:function(t){e=t},getLastBox:function(){if(!e||!e.boxes||!e.boxes.length)return null;var n=t(e.boxes[e.boxes.length-1].type);return n.length>0?n[n.length-1]:null}}}tt.__dashjs_factory_name="IsoFile";var nt=r.A.getClassFactory(tt),rt=n(96877),it=(0,H.A)((function e(t){var n=t.found,r=t.sizeOfLastCompletedBox,i=t.sizeOfLastFoundTargetBox,a=t.startOffsetOfLastCompletedBox,o=t.startOffsetOfLastFoundTargetBox,s=t.typeOfLastCompletedBox,u=t.typeOfLastTargetBox;(0,Y.A)(this,e),this.found=void 0!==n&&n,this.sizeOfLastCompletedBox=void 0!==r?r:0,this.sizeOfLastFoundTargetBox=void 0!==i?i:0,this.startOffsetOfLastCompletedBox=void 0!==a?a:0,this.startOffsetOfLastFoundTargetBox=void 0!==o?o:0,this.typeOfLastCompletedBox=void 0!==s?s:null,this.typeOfLastTargetBox=void 0!==u?u:null}));function at(){var e,t,n=this.context;function r(e){if(!e)return null;void 0===e.fileStart&&(e.fileStart=0);var t=rt.parseBuffer(e),r=nt(n).create();return r.setData(t),r}function i(e,t){return e[t+3]>>>0|e[t+2]<<8>>>0|e[t+1]<<16>>>0|e[t]<<24>>>0}function a(e,t){return String.fromCharCode(e[t++])+String.fromCharCode(e[t++])+String.fromCharCode(e[t++])+String.fromCharCode(e[t])}return t={findInitRange:function(t){var n=null,i=r(t);if(!i)return n;var a=i.getBox("ftyp"),o=i.getBox("moov");return e.debug("Searching for initialization."),o&&o.isComplete&&(n=(a?a.offset:o.offset)+"-"+(o.offset+o.size-1),e.debug("Found the initialization. Range: "+n)),n},findLastTopIsoBoxCompleted:function(e,t,n){if(void 0===n&&(n=0),!t||n+8>=t.byteLength)return new it({found:!1});for(var r,o=t instanceof ArrayBuffer?new Uint8Array(t):t,s=0,u=0,c=null;n<o.byteLength;){var l=i(o,n),f=a(o,n+4);if(0===l)break;n+l<=o.byteLength&&(e.indexOf(f)>=0?r=new it({found:!0,startOffsetOfLastFoundTargetBox:n,sizeOfLastFoundTargetBox:l,typeOfLastTargetBox:f}):(s=n,u=l,c=f)),n+=l}return r||new it({found:!1,startOffsetOfLastCompletedBox:s,sizeOfLastCompletedBox:u,typeOfLastCompletedBox:c})},getMediaTimescaleFromMoov:function(e){var t=r(e),n=t?t.getBox("mdhd"):void 0;return n?n.timescale:NaN},getSamplesInfo:function(e){if(!e||0===e.byteLength)return{sampleList:[],lastSequenceNumber:NaN,totalDuration:NaN,numSequences:NaN};var t,n,i,a,o,s,u,c,l,f,d,h,g,p,m,E,v=r(e),A=v.getBoxes("moof"),y=v.getBoxes("mfhd");m=v.getBoxes("moof").length,p=y[y.length-1].sequence_number,n=0,o=[];var T=-1,_=-1;for(f=0;f<A.length;f++){var S=A[f],I=S.getChildBoxes("traf");for(c=0;c<I.length;c++){var b=I[c],R=b.getChildBox("tfhd"),N=b.getChildBox("tfdt");a=N.baseMediaDecodeTime;var C=b.getChildBoxes("trun"),w=b.getChildBoxes("subs");for(l=0;l<C.length;l++){var D=C[l];for(n=D.sample_count,g=(R.base_data_offset||0)+(D.data_offset||0),u=0;u<n;u++){t=void 0!==(s=D.samples[u]).sample_duration?s.sample_duration:R.default_sample_duration,i=void 0!==s.sample_size?s.sample_size:R.default_sample_size;var O={dts:a,cts:a+(void 0!==s.sample_composition_time_offset?s.sample_composition_time_offset:0),duration:t,offset:S.offset+g,size:i,subSizes:[i]};if(w)for(d=0;d<w.length;d++){var M=w[d];if(T<M.entry_count-1&&u>_&&(T++,_+=M.entries[T].sample_delta),u==_){O.subSizes=[];var P=M.entries[T];for(h=0;h<P.subsample_count;h++)O.subSizes.push(P.subsamples[h].subsample_size)}}o.push(O),g+=i,a+=t}}E=a-N.baseMediaDecodeTime}}return{sampleList:o,lastSequenceNumber:p,totalDuration:E,numSequences:m}},parse:r},e=(0,u.A)(n).getInstance().getLogger(t),t}at.__dashjs_factory_name="BoxParser";var ot=r.A.getSingletonFactory(at),st=n(30559),ut=(n(81148),n(69085),n(96167),n(31415),n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698),n(71761),{0:void 0,1:{channels:1,lfe:0},2:{channels:2,lfe:0},3:{channels:3,lfe:0},4:{channels:4,lfe:0},5:{channels:5,lfe:0},6:{channels:5,lfe:1},7:{channels:7,lfe:1},8:{channels:2,lfe:0},9:{channels:3,lfe:0},10:{channels:4,lfe:0},11:{channels:6,lfe:1},12:{channels:7,lfe:1},13:{channels:22,lfe:2},14:{channels:7,lfe:1},15:{channels:10,lfe:2},16:{channels:9,lfe:1},17:{channels:11,lfe:1},18:{channels:13,lfe:1},19:{channels:11,lfe:1},20:{channels:13,lfe:1}});function ct(e){return 0==e?0:e.toString(2).match(/1/g).length}function lt(e,t){var n=parseInt("0x"+e,16),r=n&t[0],i=n&t[1];return ct(r)+2*ct(i)}var ft=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=void 0;if(e&&e.schemeIdUri&&e.value){var r=e.schemeIdUri,i=e.value;return"urn:mpeg:dash:23003:3:audio_channel_configuration:2011"===r||"urn:mpeg:mpegB:cicp:ChannelConfiguration"===r?n=ut[i]&&ut[i].channels+(t?ut[i].lfe:0):"tag:dolby.com,2014:dash:audio_channel_configuration:2011"===r?n=function(e,t){if(4===e.length)return lt(e,[63880+(t?6:0),1648])}(i,t):"tag:dolby.com,2015:dash:audio_channel_configuration:2015"===r?n=function(e,t){if(6===e.length)return"800000"===e?24:lt(e,[56834+(t?4160:0),205245])}(i,t):"tag:dts.com,2014:dash:audio_channel_configuration:2012"===r?n=parseInt(i):"tag:dts.com,2018:uhd:audio_channel_configuration"===r&&(n=function(e,t){if(!(e.length>8))return lt(e,[4294901727+(t?65568:0),0])}(i,t)),n}};function dt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ht(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ht(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function ht(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function gt(){var e,t,n,r,i,a,o,s=this.context,c=(0,d.A)(s).getInstance();function l(e,t,r){var i=p(e,t,r,arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0);return n.isCodecSupportedBasedOnTestedConfigurations(i,e)}function f(e,t,n,r,i){var a=p(e,t,n,arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0),o=JSON.stringify(a);r.has(o)||(r.add(o),i.push(a))}function p(e,n,i,a){var o=null;switch(e){case g.A.VIDEO:o=function(e,n,i){var a={codec:n,width:e&&e.width||null,height:e&&e.height||null,framerate:t.getFramerate(e)||null,bitrate:e&&e.bandwidth||null,isSupported:!0};if(e.tagName===Me.A.PRESELECTION&&i&&(a.width||(a.width=i.width||null),a.height||(a.height=i.height||null),a.bitrate||(a.bitrate=i.bandwidth||null),a.framerate||(a.framerate=t.getFramerate(i)||null)),r.get().streaming.capabilities.filterVideoColorimetryEssentialProperties&&(Object.assign(a,E(e)),e.tagName===Me.A.PRESELECTION&&i)){var o=E(i),s=o.isSupported;delete o.isSupported,a.isSupported=a.isSupported&&s,m(a,o)}var u=a.isSupported;if(r.get().streaming.capabilities.filterHDRMetadataFormatEssentialProperties&&(Object.assign(a,v(e)),e.tagName===Me.A.PRESELECTION&&i)){var c=v(i),l=c.isSupported;delete c.isSupported,a.isSupported=a.isSupported&&l,m(a,c)}var f=a.isSupported;return u&&f||(a.isSupported=!1),a}(n,i,a);break;case g.A.AUDIO:o=function(e,t,n){var i={codec:t,samplerate:e&&e.audioSamplingRate||null,bitrate:e&&e.bandwidth||null,isSupported:!0};return e.tagName===Me.A.PRESELECTION&&n&&(i.samplerate||(i.samplerate=n.audioSamplingRate||null),i.bitrate||(i.bitrate=n.bandwidth||null)),r.get().streaming.capabilities.filterAudioChannelConfiguration&&Object.assign(i,function(e,t){var n=e[Me.A.AUDIO_CHANNEL_CONFIGURATION]||[],r=null;0==n.length&&t&&(n=t[Me.A.AUDIO_CHANNEL_CONFIGURATION]||[]);var i=n.map((function(e){return ft(e,!0)}));return i.every((function(e){return e==i[0]}))&&(r=i[0]),{channels:r}}(e,n)),i}(n,i,a);break;default:return o}return a&&(o=A(a,o)),A(n,o)}function m(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&!(n in e)&&(e[n]=t[n]);return e}function E(e){var t,n={colorGamut:null,transferFunction:null,isSupported:!0},r=dt(e.EssentialProperty||[]);try{for(r.s();!(t=r.n()).done;){var i=t.value;i.schemeIdUri===g.A.COLOUR_PRIMARIES_SCHEME_ID_URI&&["1","5","6","7"].includes(i.value.toString())?n.colorGamut=g.A.MEDIA_CAPABILITIES_API.COLORGAMUT.SRGB:i.schemeIdUri===g.A.COLOUR_PRIMARIES_SCHEME_ID_URI&&["11","12"].includes(i.value.toString())?n.colorGamut=g.A.MEDIA_CAPABILITIES_API.COLORGAMUT.P3:i.schemeIdUri===g.A.COLOUR_PRIMARIES_SCHEME_ID_URI&&["9"].includes(i.value.toString())?n.colorGamut=g.A.MEDIA_CAPABILITIES_API.COLORGAMUT.REC2020:i.schemeIdUri===g.A.COLOUR_PRIMARIES_SCHEME_ID_URI&&["2"].includes(i.value.toString())?n.colorGamut=null:i.schemeIdUri===g.A.COLOUR_PRIMARIES_SCHEME_ID_URI&&(n.isSupported=!1),i.schemeIdUri===g.A.TRANSFER_CHARACTERISTICS_SCHEME_ID_URI&&["1","6","13","14","15"].includes(i.value.toString())?n.transferFunction=g.A.MEDIA_CAPABILITIES_API.TRANSFERFUNCTION.SRGB:i.schemeIdUri===g.A.TRANSFER_CHARACTERISTICS_SCHEME_ID_URI&&["16"].includes(i.value.toString())?n.transferFunction=g.A.MEDIA_CAPABILITIES_API.TRANSFERFUNCTION.PQ:i.schemeIdUri===g.A.TRANSFER_CHARACTERISTICS_SCHEME_ID_URI&&["18"].includes(i.value.toString())?n.transferFunction=g.A.MEDIA_CAPABILITIES_API.TRANSFERFUNCTION.HLG:i.schemeIdUri===g.A.TRANSFER_CHARACTERISTICS_SCHEME_ID_URI&&["2"].includes(i.value.toString())?n.transferFunction=null:i.schemeIdUri===g.A.TRANSFER_CHARACTERISTICS_SCHEME_ID_URI&&(n.isSupported=!1)}}catch(e){r.e(e)}finally{r.f()}return n}function v(e){var t,n={isSupported:!0,hdrMetadataType:null},r=dt(e.EssentialProperty||[]);try{for(r.s();!(t=r.n()).done;){var i=t.value;i.schemeIdUri===g.A.HDR_METADATA_FORMAT_SCHEME_ID_URI&&i.value===g.A.HDR_METADATA_FORMAT_VALUES.ST2094_10?n.hdrMetadataType=g.A.MEDIA_CAPABILITIES_API.HDR_METADATATYPE.SMPTE_ST_2094_10:i.schemeIdUri===g.A.HDR_METADATA_FORMAT_SCHEME_ID_URI&&i.value===g.A.HDR_METADATA_FORMAT_VALUES.SL_HDR2?n.hdrMetadataType=g.A.MEDIA_CAPABILITIES_API.HDR_METADATATYPE.SLHDR2:i.schemeIdUri===g.A.HDR_METADATA_FORMAT_SCHEME_ID_URI&&i.value===g.A.HDR_METADATA_FORMAT_VALUES.ST2094_40?n.hdrMetadataType=g.A.MEDIA_CAPABILITIES_API.HDR_METADATATYPE.SMPTE_ST_2094_40:i.schemeIdUri===g.A.HDR_METADATA_FORMAT_SCHEME_ID_URI&&(n.isSupported=!1)}}catch(e){r.e(e)}finally{r.f()}return n}function A(e,t){return a&&e&&e[Me.A.CONTENT_PROTECTION]&&e[Me.A.CONTENT_PROTECTION].length>0&&(t.keySystemsMetadata=a.getSupportedKeySystemMetadataFromContentProtection(e[Me.A.CONTENT_PROTECTION])),t}function y(e){if(!e||0===e.length)return!0;for(var t=0;t<e.length;){if(!n.supportsEssentialProperty(e[t]))return o.debug("[Stream] EssentialProperty not supported: "+e[t].schemeIdUri),!1;t+=1}return!0}return e={setConfig:function(e){e&&(e.adapter&&(t=e.adapter),e.capabilities&&(n=e.capabilities),e.settings&&(r=e.settings),e.protectionController&&(a=e.protectionController),e.customParametersModel&&(i=e.customParametersModel))},filterUnsupportedFeatures:function(e){return new Promise((function(a){var s=[g.A.VIDEO,g.A.AUDIO],u=[];s.forEach((function(r){var i=function(e,n){if(!e||!e.Period||0===e.Period.length)return[];var r=new Set,i=[];return e.Period.forEach((function(e){e.AdaptationSet.forEach((function(e){t.getIsTypeOf(e,n)&&e.Representation.forEach((function(a,o){var s=t.getCodec(e,o,!1);f(n,a,s,r,i);var u=t.getSupplementalCodecs(a);u.length>0&&f(n,a,u[0],r,i)}))})),e.Preselection&&e.Preselection.length&&e.Preselection.forEach((function(a){if(t.getPreselectionIsTypeOf(a,e.AdaptationSet,n)){var o=t.getCodecForPreselection(a,e.AdaptationSet),s=t.getCommonRepresentationForPreselection(a,e.AdaptationSet);f(n,a,o,r,i,s)}}))})),i}(e,r);i.forEach((function(e){u.push(n.runCodecSupportCheck(e,r))}))})),Promise.allSettled(u).then((function(){return s.forEach((function(n){!function(e,n){n&&n.Period&&0!==n.Period.length&&n.Period.forEach((function(n){!function(e,n){e&&e.AdaptationSet&&0!==e.AdaptationSet.length&&(e.AdaptationSet=e.AdaptationSet.filter((function(e){t.getIsTypeOf(e,n)&&function(e,n){e.Representation&&0!==e.Representation.length&&(e.Representation=e.Representation.filter((function(r,i){var a=t.getCodec(e,i,!1),s=l(n,r,a),u=function(e,n){var r=!1,i=t.getSupplementalCodecs(e);return i.length>0&&(i.length>1&&o.warn("[CapabilitiesFilter] Multiple supplemental codecs not supported; using the first in list"),r=l(n,e,i[0])),r}(r,n);return u&&(o.debug("[CapabilitiesFilter] Codec supported. Upgrading codecs string of Representation with ID ".concat(r.id)),r.codecs=r[Me.A.SUPPLEMENTAL_CODECS]),s||u||o.warn("[CapabilitiesFilter] Codec ".concat(a," not supported. Removing Representation with ID ").concat(r.id)),s||u})))}(e,n);var r=e.Representation&&e.Representation.length>0;return r||(c.trigger(h.A.ADAPTATION_SET_REMOVED_NO_CAPABILITIES,{adaptationSet:e}),o.warn("[CapabilitiesFilter] AdaptationSet with ID ".concat(e.id?e.id:"undefined"," and codec ").concat(e.codecs?e.codecs:"undefined"," has been removed because of no supported Representation"))),r})))}(n,e),function(e,n){e&&e.Preselection&&0!==e.Preselection.length&&(e.Preselection=e.Preselection.filter((function(r){if(t.getPreselectionIsTypeOf(r,e.AdaptationSet,n)){var i=t.getCodecForPreselection(r,e.AdaptationSet),a=!0;if(i){var s=t.getCommonRepresentationForPreselection(r,e.AdaptationSet);a=l(n,r,i,s)}return a||o.warn("[CapabilitiesFilter] Preselection@codecs ".concat(i," not supported. Removing Preselection with ID ").concat(r.id)),a}return!0})))}(n,e)}))}(n,e)})),r.get().streaming.capabilities.filterUnsupportedEssentialProperties&&function(e){e&&e.Period&&0!==e.Period.length&&e.Period.forEach((function(e){e.AdaptationSet=e.AdaptationSet.filter((function(e){if(!e.Representation||0===e.Representation.length)return!0;if(!y(t.getEssentialProperties(e)))return o.warn("[CapabilitiesFilter] removed AdaptationSet (id: ".concat(e.id,") with unsupported EssentialProperty")),!1;e.Representation=e.Representation.filter((function(e){return y(t.getEssentialProperties(e))}));var n=e.Representation&&e.Representation.length>0;return n||o.warn("[CapabilitiesFilter] removed AdaptationSet (id: ".concat(e.id,") with unsupported EssentialProperty on all Representations")),n})),e.Preselection&&e.Preselection.length&&(e.Preselection=e.Preselection.filter((function(e){return!!y(t.getEssentialProperties(e))||(o.warn("[CapabilitiesFilter] removed Preselection (id: ".concat(e.id,") with unsupported EssentialProperty")),!1)})))}))}(e),function(e){e&&e.Period&&0!==e.Period.length&&e.Period.forEach((function(e){e.Preselection&&(e.Preselection=e.Preselection.filter((function(e){var t=String(e.preselectionComponents).split(" ").length;return 1!==t&&o.warn("Multi-Representation Preselection (id: ".concat(e.id,") removed as not supported.")),1===t})))}))}(e),function(e){e&&e.Period&&0!==e.Period.length&&e.Period.forEach((function(e){e.Preselection&&(e.Preselection=e.Preselection.filter((function(t){var n=String(t.preselectionComponents).split(" "),r=e.AdaptationSet.map((function(e){return e.id}));return n.every((function(e){return r.includes(e)}))})))}))}(e),function(e){if(!e||!e.Period||0===e.Period.length)return Promise.resolve();var t=[];return e.Period.forEach((function(e){t.push(function(e){return new Promise((function(t){if(e&&e.AdaptationSet&&0!==e.AdaptationSet.length){var n=[];e.AdaptationSet.forEach((function(e){n.push(function(e){return new Promise((function(t){if(e.Representation&&0!==e.Representation.length){var n=[];e.Representation.forEach((function(e){n.push(function(e){var t=[],n=i.getCustomCapabilitiesFilters();return n&&0!==n.length?n.forEach((function(n){t.push(new Promise((function(t){return t(n(e))})))})):t.push(Promise.resolve(!0)),Promise.all(t)}(e))})),Promise.all(n).then((function(n){e.Representation=e.Representation.filter((function(e,t){var r=n[t].every((function(e){return e}));return r||o.debug("[Stream] Representation "+e.id+" has been removed because of unsupported CustomFilter"),r})),t()})).catch((function(e){o.warn("[Stream] at least one promise rejected in CustomFilter with error: ",e),t()}))}else t()}))}(e))})),Promise.all(n).then((function(){e.AdaptationSet=e.AdaptationSet.filter((function(e){return e.Representation&&e.Representation.length>0})),t()})).catch((function(){t()}))}else t()}))}(e))})),Promise.all(t)}(e)})).then((function(){a()})).catch((function(e){o.error(e),a()}))}))}},o=(0,u.A)(s).getInstance().getLogger(e),e}gt.__dashjs_factory_name="CapabilitiesFilter";var pt=r.A.getSingletonFactory(gt),mt=n(1234);function Et(){var e,t,n,r,i,a,s,c,l,f,m=this.context,E=(0,d.A)(m).getInstance();function v(){t=!1;var e=Fe.A.parseUserAgent();n=e&&e.browser&&e.browser.name&&"safari"===e.browser.name.toLowerCase()}function A(){t=!1}function y(e){if(e.streamId===a.getActiveStreamInfo().id&&l){var t=s.getLiveDelay();s.getBufferLevel()>t/2&&(l=!1)}}function T(e){e.streamId===a.getActiveStreamInfo().id&&(l=e.state===o.BUFFER_EMPTY)}function _(){c.getCatchupModeEnabled()||r.setPlaybackRate(1)}function S(){s.getIsDynamic()&&c.getCatchupModeEnabled()&&(c.getCatchupPlaybackRates().max>0||c.getCatchupPlaybackRates().min<0)&&!s.isPaused()&&!s.isSeeking()&&function(){try{if(s.getTime()<=0||t)return!1;if(l&&0===r.getPlaybackRate())return!1;var e=R();return e===g.A.LIVE_CATCHUP_MODE_LOLP?function(e,t){try{return Math.abs(I())>0||e<t}catch(e){return!1}}(s.getBufferLevel(),i.get().streaming.liveCatchup.playbackBufferMin):e===g.A.LIVE_CATCHUP_MODE_STEP?function(){try{var e=c.getCatchupStepSettings(),t=b();if(t<-1*e.start.min||t>e.start.max)return f.debug("[_stepNeedToCatchUp] latency offset ".concat(t)),!0;if(1!==s.getPlaybackRate())return!0}catch(e){return!1}}():function(){try{return Math.abs(I())>0}catch(e){return!1}}()}catch(e){return!1}}()&&function(){if(!t&&r){var e,a=r.getPlaybackRate(),o=c.getCatchupPlaybackRates(),u=s.getBufferLevel(),d=I(),h=b(),p=i.get().streaming.liveCatchup.liveThreshold,m=c.getCatchupMaxDrift();if(!isNaN(m)&&m>0&&d>m)f.info("[CatchupController]: Low Latency catchup mechanism. Latency too high, doing a seek to live point"),t=!0,s.seekToCurrentLive(!0,!1);else if(!isNaN(p)&&p>0&&h>p)a>1&&(f.info("[CatchupController]: Past live threshold, setting playback rate to 1.0"),r.setPlaybackRate(1));else{var E=s.getCurrentLiveLatency(),v=s.getLiveDelay();e=R()===g.A.LIVE_CATCHUP_MODE_LOLP?function(e,t,n,r,i){var a;if(i<r){var o=Math.abs(e.min),s=5*(i-r);a=1-o+2*o/(1+Math.pow(Math.E,-s)),f.debug("[LoL+ playback control_buffer-based] bufferLevel: "+i+", newRate: "+a)}else{if(Math.abs(t-n)<=.02*n)a=1;else{var u=t-n,c=u<0?Math.abs(e.min):e.max,l=5*u;a=1-c+2*c/(1+Math.pow(Math.E,-l))}f.debug("[LoL+ playback control_latency-based] latency: "+t+", newRate: "+a)}return a}(o,E,v,i.get().streaming.liveCatchup.playbackBufferMin,u):R()===g.A.LIVE_CATCHUP_MODE_STEP?function(e,t,n){var r=1,i=c.getCatchupStepSettings();if(!l){var a=b();a>i.stop.max&&a>0?r=1+e.max:a<-1*i.stop.min&&a<0&&(r=1+e.min),(a>-1*i.stop.min&&a<0||a<i.stop.max&&a>0||0===a)&&(r=1),s.getPlaybackStalled()&&n<=t/2&&a>0&&(r=1)}return f.debug("[_calculateNewPlaybackRateStep] rate should be ".concat(r)),r}(o,v,u):function(e,t,n,r){if(l)return 1;var i=t-n,a=i<0?Math.abs(e.min):e.max,o=5*i,u=1-a+2*a/(1+Math.pow(Math.E,-o));return s.getPlaybackStalled()&&r<=n/2&&i>0&&(u=1),u}(o,E,v,u);var A=n?.25:.02/(.5/o.max);(e&&Math.abs(a-e)>=A||1==e)&&(f.debug("[CatchupController]: Setting playback rate to ".concat(e)),r.setPlaybackRate(e))}}}()}function I(){return s.getCurrentLiveLatency()-s.getLiveDelay()}function b(){return s.getCurrentLiveLatency()-s.getOriginalLiveDelay()}function R(){var e=i.get().streaming.liveCatchup.playbackBufferMin,t=g.A.LIVE_CATCHUP_MODE_DEFAULT;return i.get().streaming.liveCatchup.mode===g.A.LIVE_CATCHUP_MODE_STEP?t=g.A.LIVE_CATCHUP_MODE_STEP:i.get().streaming.liveCatchup.mode!==g.A.LIVE_CATCHUP_MODE_LOLP||null===e||isNaN(e)||(t=g.A.LIVE_CATCHUP_MODE_LOLP),t}function N(){c.getCatchupPlaybackRates(!0)}return e={reset:function(){E.off(p.A.BUFFER_LEVEL_UPDATED,y,e),E.off(p.A.BUFFER_LEVEL_STATE_CHANGED,T,e),E.off(p.A.PLAYBACK_PROGRESS,S,e),E.off(p.A.PLAYBACK_TIME_UPDATED,S,e),E.off(p.A.PLAYBACK_SEEKED,A,e),E.off(h.A.SETTING_UPDATED_CATCHUP_ENABLED,_,e),E.off(h.A.SETTING_UPDATED_PLAYBACK_RATE_MIN,N,e),E.off(h.A.SETTING_UPDATED_PLAYBACK_RATE_MAX,N,e),E.off(p.A.STREAM_INITIALIZED,N,e),v(),r.setPlaybackRate(1,!0)},setConfig:function(e){e&&(e.settings&&(i=e.settings),e.videoModel&&(r=e.videoModel),e.streamController&&(a=e.streamController),e.playbackController&&(s=e.playbackController),e.mediaPlayerModel&&(c=e.mediaPlayerModel))},initialize:function(){E.on(p.A.BUFFER_LEVEL_UPDATED,y,e),E.on(p.A.BUFFER_LEVEL_STATE_CHANGED,T,e),E.on(p.A.PLAYBACK_PROGRESS,S,e),E.on(p.A.PLAYBACK_TIME_UPDATED,S,e),E.on(p.A.PLAYBACK_SEEKED,A,e),E.on(h.A.SETTING_UPDATED_CATCHUP_ENABLED,_,e),E.on(h.A.SETTING_UPDATED_PLAYBACK_RATE_MIN,N,e),E.on(h.A.SETTING_UPDATED_PLAYBACK_RATE_MAX,N,e),E.on(p.A.STREAM_INITIALIZED,N,e),N()}},f=(0,u.A)(m).getInstance().getLogger(e),v(),e}Et.__dashjs_factory_name="CatchupController";var vt=r.A.getSingletonFactory(Et);function At(){var e;return{setConfig:function(t){t&&t.serviceDescriptionController&&(e=t.serviceDescriptionController)},isAdaptationsIncluded:function(t){var n,r,i=(null!==(n=null===(r=e)||void 0===r||null===(r=r.getServiceDescriptionSettings())||void 0===r?void 0:r.clientDataReporting)&&void 0!==n?n:{}).adaptationSetsArray;return!i||0===(null==i?void 0:i.length)||i.includes(t)},isServiceLocationIncluded:function(t,n){var r,i;if(t===I.G.CONTENT_STEERING_TYPE)return!0;var a=(null!==(r=null===(i=e)||void 0===i||null===(i=i.getServiceDescriptionSettings())||void 0===i?void 0:i.clientDataReporting)&&void 0!==r?r:{}).serviceLocationsArray;return!a||0===(null==a?void 0:a.length)||a.includes(n)}}}At.__dashjs_factory_name="ClientDataReportingController";var yt=r.A.getSingletonFactory(At),Tt=n(6066),_t=n(51926),St=(n(25440),n(58335),[{oldKey:"dashjs_vbitrate",newKey:"dashjs_video_bitrate"},{oldKey:"dashjs_abitrate",newKey:"dashjs_audio_bitrate"},{oldKey:"dashjs_vsettings",newKey:"dashjs_video_settings"},{oldKey:"dashjs_asettings",newKey:"dashjs_audio_settings"}]),It="dashjs_?_bitrate",bt="dashjs_?_settings",Rt="localStorage",Nt="lastBitrate",Ct="lastMediaSettings";function wt(e){e=e||{};var t,n,r,i=this.context,a=e.settings;function o(e){if(void 0!==r)return r;var t;r=!1;try{"undefined"!=typeof window&&(t=window[e])}catch(e){return n.warn("DOMStorage access denied: "+e.message),r}if(!t||e!==Rt&&"sessionStorage"!==e)return r;try{t.setItem("1","1"),t.removeItem("1"),r=!0}catch(e){n.warn("DOMStorage is supported, but cannot be used: "+e.message)}return r}function s(){var e=6e5;return Math.round((new Date).getTime()/e)*e}function c(e,t){return o(e)&&a.get().streaming[t+"CachingInfo"].enabled}function l(){if(!a)throw new Error(g.A.MISSING_CONFIG_ERROR)}return t={getSavedBitrateSettings:function(e){if(l(),!a.get().streaming.lastBitrateCachingInfo.enabled)return NaN;var t=NaN;if(c(Rt,Nt)){var r=It.replace(/\?/,e);try{var i=JSON.parse(localStorage.getItem(r))||{},o=(new Date).getTime()-parseInt(i.timestamp,10)>=a.get().streaming.lastBitrateCachingInfo.ttl||!1,s=parseFloat(i.bitrate);isNaN(s)||o?o&&localStorage.removeItem(r):(t=s,n.debug("Last saved bitrate for "+e+" was "+s))}catch(e){return null}}return t},setSavedBitrateSettings:function(e,t){if(c(Rt,Nt)&&t){var r=It.replace(/\?/,e);try{localStorage.setItem(r,JSON.stringify({bitrate:t.toFixed(3),timestamp:s()}))}catch(e){n.error(e.message)}}},getSavedMediaSettings:function(e){if(l(),!a.get().streaming.lastMediaSettingsCachingInfo.enabled)return null;var t=null;if(c(Rt,Ct)){var n=bt.replace(/\?/,e);try{var r=JSON.parse(localStorage.getItem(n))||{},i=(new Date).getTime()-parseInt(r.timestamp,10)>=a.get().streaming.lastMediaSettingsCachingInfo.ttl||!1;t=r.settings,i&&(localStorage.removeItem(n),t=null)}catch(e){return null}}return t},setSavedMediaSettings:function(e,t){if(c(Rt,Ct)){var r=bt.replace(/\?/,e);try{localStorage.setItem(r,JSON.stringify({settings:t,timestamp:s()}))}catch(e){n.error(e.message)}}}},n=(0,u.A)(i).getInstance().getLogger(t),o(Rt)&&St.forEach((function(e){var t=localStorage.getItem(e.oldKey);if(t){localStorage.removeItem(e.oldKey);try{localStorage.setItem(e.newKey,t)}catch(e){n.error(e.message)}}})),t}wt.__dashjs_factory_name="DOMStorage";var Dt=r.A.getSingletonFactory(wt);function Ot(){var e=this.context,t=(0,c.A)(e).getInstance(),n={},r=[];return{save:function(e){var i=e.streamId,a=e.representation.id;n[i]=n[i]||{};var o=!n[i][a];n[i][a]=e,o&&(r.push({streamId:i,representationId:a}),function(){for(var e=t.get().streaming.cacheInitSegmentsLimit;r.length>e;){var i=r.shift();n[i.streamId]&&n[i.streamId][i.representationId]&&(delete n[i.streamId][i.representationId],0===Object.keys(n[i.streamId]).length&&delete n[i.streamId])}}())},extract:function(e,t){return n&&n[e]&&n[e][t]?n[e][t]:null},reset:function(){n={},r=[]},getStats:function(){var e=Object.keys(n).length,i=0;for(var a in n)i+=Object.keys(n[a]).length;return{entryCount:i,streamCount:e,maxSize:t.get().streaming.cacheInitSegmentsLimit,accessOrderLength:r.length}}}}Ot.__dashjs_factory_name="InitCache";var Mt=r.A.getSingletonFactory(Ot),Pt=(n(5746),(0,H.A)((function e(){(0,Y.A)(this,e),this.accessibility=null,this.adaptationSetSwitchingCompatibleIds=[],this.audioChannelConfiguration=null,this.bitrateList=null,this.codec=null,this.contentProtection=null,this.essentialProperties=[],this.id=null,this.index=null,this.isEmbedded=null,this.isFragmented=null,this.isPreselection=!1,this.isText=!1,this.labels=null,this.lang=null,this.mimeType=null,this.normalizedKeyIds=new Set,this.representationCount=0,this.roles=null,this.segmentAlignment=!1,this.segmentSequenceProperties=[],this.selectionPriority=1,this.streamInfo=null,this.subSegmentAlignment=!1,this.supplementalProperties=[],this.type=null,this.viewpoint=null}))),Lt=(0,H.A)((function e(){(0,Y.A)(this,e),this.id=null,this.index=null,this.start=NaN,this.duration=NaN,this.manifestInfo=null,this.isLast=!0,this.isEncrypted=!1})),xt=(0,H.A)((function e(){(0,Y.A)(this,e),this.availableFrom=null,this.duration=NaN,this.dvrWindowSize=NaN,this.isDynamic=!1,this.loadedTime=null,this.maxFragmentDuration=null,this.minBufferTime=NaN,this.protocol=null,this.serviceDescriptions=[]})),Ft=n(31465),Ut=n(79302),kt=(n(11392),function(){return(0,H.A)((function e(t){var n=this;(0,Y.A)(this,e),this.valid="/"==t[0],this.path=t.split("/").filter((function(e){return 0!==e.length})).map((function(e){var t={name:e},r=e.indexOf("[");if(-1!=r){t.name=e.substring(0,r);var i=e.substring(r+1,e.length-1);n.valid=n.valid&&-1==i.indexOf("[");var a=i.indexOf("=");-1!=a?(t.attribute={name:i.substring(1,a),value:i.substring(a+1)},-1!=["'",'"'].indexOf(t.attribute.value[0])&&(t.attribute.value=t.attribute.value.substring(1,t.attribute.value.length-1))):t.position=parseInt(i,10)-1}return t}))}),[{key:"isValid",value:function(){return this.valid}},{key:"findsElement",value:function(){return!this.findsAttribute()}},{key:"findsAttribute",value:function(){return this.path[this.path.length-1].name.startsWith("@")}},{key:"findsTextReplace",value:function(){return"text()"===this.path[this.path.length-1].name}},{key:"getMpdTarget",value:function(e,t){for(var n=this,r=null,i=e,a=1,o="MPD",s=function(){r=i;var e=n.path[a];if(o=e.name,a!==n.path.length-1||!o.startsWith("@")&&"text()"!==o){var t=r[o]||[];if(0===t.length&&r[o]&&t.push(r[o]),e.position)i=t[e.position]||null;else if(e.attribute){var s=e.attribute;i=t.filter((function(e){return e[s.name]==s.value}))[0]||null}else i=Array.isArray(t)?t[0]:t}a++};a<this.path.length&&null!==i;)s();return null===i?null:o.startsWith("@")?{name:o.substring(1),leaf:i,target:i}:"text()"===o?{name:"__text",leaf:i,target:i}:{name:o,leaf:i,target:t?r:i}}}])}()),Bt=function(){return(0,H.A)((function e(t,n,r){(0,Y.A)(this,e),this.action=t,this.xpath=n,this.value=r,this.position=null}),[{key:"getMpdTarget",value:function(e){var t="remove"===this.action||"replace"===this.action||"before"===this.position||"after"===this.position;return this.xpath.getMpdTarget(e,t)}}])}();function Gt(){var e,t,n=this.context;return e={getIsPatch:function(e){return e&&e.hasOwnProperty(Me.A.ORIGINAL_MPD_ID)||!1},getMpdId:function(e){return e&&e[Me.A.ORIGINAL_MPD_ID]||null},getOriginalPublishTime:function(e){return e&&e.hasOwnProperty(Me.A.ORIGINAL_PUBLISH_TIME)?new Date(e[Me.A.ORIGINAL_PUBLISH_TIME]):null},getPatchOperations:function(e){return e?(e.__children||[]).map((function(e){var n=e.tagName;if("add"!==n&&"remove"!==n&&"replace"!==n)return t.warn("Ignoring node of invalid action: ".concat(n)),null;var r=e.sel;if("add"===n&&e.type){if(!e.type.startsWith("@"))return t.warn("Ignoring add action for prefixed namespace declaration: ".concat(e.type,"=").concat(e.__text)),null;r="".concat(r,"/").concat(e.type)}var i=new kt(r);if(!i.isValid())return t.warn("Ignoring action with invalid selector: ".concat(n," - ").concat(r)),null;var a=null;i.findsAttribute()||i.findsTextReplace()?a=e.__text||"":"remove"!==n&&(a=e.__children.reduce((function(e,t){var n=t.tagName;return"#text"!==n&&(e[n]=e[n]||[],e[n].push(t)),e}),{}));var o=new Bt(n,i,a);return"add"===n&&(o.position=e.pos),o})).filter((function(e){return!!e})):[]},getPublishTime:function(e){return e&&e.hasOwnProperty(Me.A.PUBLISH_TIME)?new Date(e[Me.A.PUBLISH_TIME]):null}},t=(0,u.A)(n).getInstance().getLogger(e),e}Gt.__dashjs_factory_name="PatchManifestModel";var Ht=r.A.getSingletonFactory(Gt),Yt=n(25876),Vt=(n(81278),Object.create(null,Object.getOwnPropertyDescriptors({aar:"aa",abk:"ab",afr:"af",aka:"ak",alb:"sq",amh:"am",ara:"ar",arg:"an",arm:"hy",asm:"as",ava:"av",ave:"ae",aym:"ay",aze:"az",bak:"ba",bam:"bm",baq:"eu",bel:"be",ben:"bn",bis:"bi",bod:"bo",bos:"bs",bre:"br",bul:"bg",bur:"my",cat:"ca",ces:"cs",cha:"ch",che:"ce",chi:"zh",chu:"cu",chv:"cv",cor:"kw",cos:"co",cre:"cr",cym:"cy",cze:"cs",dan:"da",deu:"de",div:"dv",dut:"nl",dzo:"dz",ell:"el",eng:"en",epo:"eo",est:"et",eus:"eu",ewe:"ee",fao:"fo",fas:"fa",fij:"fj",fin:"fi",fra:"fr",fre:"fr",fry:"fy",ful:"ff",geo:"ka",ger:"de",gla:"gd",gle:"ga",glg:"gl",glv:"gv",gre:"el",grn:"gn",guj:"gu",hat:"ht",hau:"ha",heb:"he",her:"hz",hin:"hi",hmo:"ho",hrv:"hr",hun:"hu",hye:"hy",ibo:"ig",ice:"is",ido:"io",iii:"ii",iku:"iu",ile:"ie",ina:"ia",ind:"id",ipk:"ik",isl:"is",ita:"it",jav:"jv",jpn:"ja",kal:"kl",kan:"kn",kas:"ks",kat:"ka",kau:"kr",kaz:"kk",khm:"km",kik:"ki",kin:"rw",kir:"ky",kom:"kv",kon:"kg",kor:"ko",kua:"kj",kur:"ku",lao:"lo",lat:"la",lav:"lv",lim:"li",lin:"ln",lit:"lt",ltz:"lb",lub:"lu",lug:"lg",mac:"mk",mah:"mh",mal:"ml",mao:"mi",mar:"mr",may:"ms",mkd:"mk",mlg:"mg",mlt:"mt",mon:"mn",mri:"mi",msa:"ms",mya:"my",nau:"na",nav:"nv",nbl:"nr",nde:"nd",ndo:"ng",nep:"ne",nld:"nl",nno:"nn",nob:"nb",nor:"no",nya:"ny",oci:"oc",oji:"oj",ori:"or",orm:"om",oss:"os",pan:"pa",per:"fa",pli:"pi",pol:"pl",por:"pt",pus:"ps",que:"qu",roh:"rm",ron:"ro",rum:"ro",run:"rn",rus:"ru",sag:"sg",san:"sa",sin:"si",slk:"sk",slo:"sk",slv:"sl",sme:"se",smo:"sm",sna:"sn",snd:"sd",som:"so",sot:"st",spa:"es",sqi:"sq",srd:"sc",srp:"sr",ssw:"ss",sun:"su",swa:"sw",swe:"sv",tah:"ty",tam:"ta",tat:"tt",tel:"te",tgk:"tg",tgl:"tl",tha:"th",tir:"ti",ton:"to",tsn:"tn",tso:"ts",tuk:"tk",tur:"tr",twi:"tw",uig:"ug",ukr:"uk",urd:"ur",uzb:"uz",ven:"ve",vie:"vi",vol:"vo",wel:"cy",wln:"wa",wol:"wo",xho:"xh",yid:"yi",yor:"yo",zha:"za",zho:"zh",zul:"zu"})));function qt(e){if(!e||"string"!=typeof e)return e;var t=e.split("-");t[0]=t[0].toLowerCase(),t[0]=Vt[t[0]]||t[0];for(var n=1;n<t.length;n++)4===t[n].length?t[n]=t[n].charAt(0).toUpperCase()+t[n].slice(1).toLowerCase():2===t[n].length&&/^[a-zA-Z]+$/.test(t[n])&&(t[n]=t[n].toUpperCase());return t.join("-")}var Kt=n(9259);function jt(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128}function zt(e,t){var n=0;return n=(127&e[t])<<21,n|=(127&e[t+1])<<14,(n|=(127&e[t+2])<<7)|127&e[t+3]}function Wt(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128}function Qt(e){return function(e,t,n,r){var i,a=(i=e,(0,Kt.B1)(i)?i:i.buffer),o=1;"BYTES_PER_ELEMENT"in r&&(o=r.BYTES_PER_ELEMENT);var s,u=(s=e)&&(0,Kt.B1)(s.buffer)&&void 0!==s.byteLength&&void 0!==s.byteOffset?e.byteOffset:0,c=(u+e.byteLength)/o,l=(u+t)/o,f=Math.floor(Math.max(0,Math.min(l,c)));return new r(a,f,Math.floor(Math.min(f+Math.max(n,0),c))-f)}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,Uint8Array)}function Xt(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t?e.indexOf(0):e.length,r=(0,Kt.g7)(new DataView(e.buffer,e.byteOffset,n),{encoding:Kt.lS});return t?r:r.replace(/\0/g,"")}function $t(e){return"PRIV"===e.type?function(e){if(!(e.size<2)){var t=Xt(e.data,!0),n=new Uint8Array(e.data.subarray(t.length+1));return{key:e.type,info:t,data:n.buffer}}}(e):"W"===e.type[0]?function(e){if("WXXX"===e.type){if(e.size<2)return;var t=1,n=Xt(e.data.subarray(t),!0);t+=n.length+1;var r=Xt(e.data.subarray(t));return{key:e.type,info:n,data:r}}var i=Xt(e.data);return{key:e.type,info:"",data:i}}(e):"APIC"===e.type?function(e){var t={key:e.type,description:"",data:"",mimeType:null,pictureType:null};if(!(e.size<2))if(3===e.data[0]){var n=e.data.subarray(1).indexOf(0);if(-1!==n){var r=Xt(Qt(e.data,1,n)),i=e.data[2+n],a=e.data.subarray(3+n).indexOf(0);if(-1!==a){var o,s,u=Xt(Qt(e.data,3+n,a));return"--\x3e"===r?o=Xt(Qt(e.data,4+n+a)):(s=e.data.subarray(4+n+a),o=(0,Kt.B1)(s)?s:0==s.byteOffset&&s.byteLength==s.buffer.byteLength?s.buffer:new Uint8Array(s).buffer),t.mimeType=r,t.pictureType=i,t.description=u,t.data=o,t}}}else console.log("Ignore frame with unrecognized character encoding")}(e):function(e){if(!(e.size<2)){if("TXXX"===e.type){var t=1,n=e.data,r=Xt(n.subarray(t),!0);t+=r.length+1;var i=Xt(n.subarray(t));return{key:e.type,info:r,data:i}}var a=Xt(e.data.subarray(1));return{key:e.type,info:"",data:a}}}(e)}function Zt(e){var t=String.fromCharCode(e[0],e[1],e[2],e[3]),n=zt(e,4);return{type:t,size:n,data:e.subarray(10,10+n)}}var Jt=10,en=10;function tn(){var e,t,n,r,i,a,o,s=this.context;function u(e,n){var r,a=n?n.index:0,o=t.getAdaptationsForType(i[a].mpd.manifest,a,e);if(!o||0===o.length)return null;if(o.length>1&&n)for(var s=0,u=o.length;s<u;s++)if(r=o[s],t.getRolesForAdaptation(r).filter((function(e){return e.schemeIdUri===g.A.DASH_ROLE_SCHEME_ID&&e.value===Me.A.MAIN}))[0])return o[s];return o[0]}function l(e,n,i,o,s,u){var c,l,f,d,h,g,p=[];if(!o||0===o.length)return[];var m=t.getAdaptationsForPeriod(n);for(d=0,g=o.length;d<g;d++)if(c=o[d],l=v(m[f=t.getIndexForAdaptation(c,e,i.index)]))if(u){var E=l.accessibility.length;for(h=0;h<E;h++)if(l){var T=l.accessibility[h];if(T.schemeIdUri===a.ACCESSIBILITY_CEA608_SCHEME)if(T.value&&""!==T.value){var _=T.value.split(";");if("CC"===_[0].substring(0,2))for(h=0;h<_.length;h++)l||(l=v.call(this,m[f])),y(l,_[h].substring(0,3),_[h].substring(4)),p.push(l),l=null;else for(h=0;h<_.length;h++)l||(l=v.call(this,m[f])),y(l,"CC"+(h+1),_[h]),p.push(l),l=null}else y(l,a.CC1,"eng"),p.push(l),l=null}}else s===a.IMAGE?(l.type=a.IMAGE,p.push(l),l=null):l&&p.push(l);if(r.get().streaming.includePreselectionsInMediainfoArray){var S=t.getPreselectionsForPeriod(n);for(d=0,g=S.length;d<g;d++){var I=S[d];I.hasOwnProperty("type")&&I.type===s&&(l=A(S[d]))&&p.push(l)}}return p}function f(e){var n=d(e);return t.getRegularPeriods(n)}function d(e){var n=p(e);return t.getMpd(n)}function h(){i=[]}function p(e){return e||(i.length>0?i[0].mpd.manifest:null)}function m(e){try{var n=E(e.streamInfo,i),r=t.getAdaptationsForPeriod(n);return e&&e.streamInfo&&void 0!==e.streamInfo.id&&r?r[e.index]:null}catch(e){return null}}function E(e,t){for(var n=t.length,r=0;r<n;r++){var i=t[r];if(e&&e.id===i.id)return i}return null}function v(e){if(!e)return null;var n=new Pt,i=e.period.mpd.manifest.Period[e.period.index].AdaptationSet[e.index];n.id=e.id,n.index=e.index,n.codec=t.getCodec(i);var a,s,u=r.get().streaming.enhancement.codecs;return n.type=u.some((function(e){var t;return null===(t=n.codec)||void 0===t?void 0:t.includes(e)}))?g.A.ENHANCEMENT:e.type,n.streamInfo=T(e.period),n.representationCount=t.getRepresentationCount(i),n.labels=t.getLabelsForAdaptation(i),n.lang=t.getLanguageForAdaptation(i),n.segmentAlignment=t.getSegmentAlignment(i),n.subSegmentAlignment=t.getSubSegmentAlignment(i),n.viewpoint=t.getViewpointForAdaptation(i),n.accessibility=t.getAccessibilityForAdaptation(i),n.accessibility.filter((function(e){if(e.schemeIdUri&&e.schemeIdUri.search("cea-608")>=0&&void 0!==o)return!0}))[0]&&(n.embeddedCaptions=!0),n.audioChannelConfiguration=t.getAudioChannelConfigurationForAdaptation(i),0===n.audioChannelConfiguration.length&&i.Representation&&i.Representation.length>0&&(n.audioChannelConfiguration=t.getAudioChannelConfigurationForRepresentation(i.Representation[0])),n.roles=t.getRolesForAdaptation(i),n.mimeType=t.getMimeType(i),n.contentProtection=t.getContentProtectionByAdaptation(i),n.bitrateList=t.getBitrateListForAdaptation(i),n.selectionPriority=t.getSelectionPriority(i),n.contentProtection&&n.contentProtection.length>0&&(n.contentProtection=function(e,n){if(!e||!e.length||!n)return e;var r=t.getContentProtectionByManifest(n);if(!r||!r.length)return e;var i=r.reduce((function(e,t){return t.refId&&e.set(t.refId,t),e}),new Map);return e.map((function(e){if(e.ref){var t=i.get(e.ref);t&&e.mergeAttributesFromReference(t)}return e}))}(n.contentProtection,e.period.mpd.manifest),n.contentProtection=function(e){var t=e.map((function(e){return e.cencDefaultKid})).filter((function(e){return null!==e}));if(t.length){var n=t[0];e.forEach((function(e){e.keyId=n}))}return e}(n.contentProtection),n.normalizedKeyIds=(a=n.contentProtection,s=new Set,a.forEach((function(e){e.cencDefaultKid&&"string"==typeof e.cencDefaultKid&&s.add(e.cencDefaultKid.replace(/-/g,"").toLowerCase())})),s)),n.isText=t.getIsText(i),n.essentialProperties=t.getCombinedEssentialPropertiesForAdaptationSet(i),n.supplementalProperties=t.getCombinedSupplementalPropertiesForAdaptationSet(i),n.isFragmented=t.getIsFragmented(i),n.isEmbedded=!1,n.adaptationSetSwitchingCompatibleIds=function(e){if(!e||!e.supplementalProperties)return[];var t=[],n=e.supplementalProperties.filter((function(e){return e.schemeIdUri===Me.A.ADAPTATION_SET_SWITCHING_SCHEME_ID_URI}));return n&&n.length>0&&(t=n[0].value.toString().split(",").filter((function(t){return t!==e.id}))),t}(n),n.segmentSequenceProperties=t.getSegmentSequencePropertiesForAdaptationSet(i),n}function A(e){if(!e)return null;var n=new Pt,r=e.period.mpd.manifest.Period[e.period.index].Preselection[e.index],i=e.period.mpd.manifest.Period[e.period.index].AdaptationSet,a=t.getAdaptationsForPeriod(e.period);return(n=v(t.getMainAdaptationSetForPreselection(r,a)))&&(n.isPreselection=!0,n.tag=e.tag,n.id=e.id,n.codec=t.getCodecForPreselection(r,i),n.selectionPriority=t.getSelectionPriority(r),n.labels=t.getLabelsForAdaptation(r),n.lang=t.getLanguageForAdaptation(r),n.viewpoint=t.getViewpointForAdaptation(r),n.accessibility=t.getAccessibilityForAdaptation(r),n.audioChannelConfiguration=t.getAudioChannelConfigurationForAdaptation(r),n.roles=t.getRolesForAdaptation(r),n.essentialProperties=t.getCombinedEssentialPropertiesForAdaptationSet(r),n.supplementalProperties=t.getCombinedSupplementalPropertiesForAdaptationSet(r)),n}function y(e,t,n){e.id=t,e.index=100+parseInt(t.substring(2,3)),e.type=a.TEXT,e.codec="cea-608-in-SEI",e.isEmbedded=!0,e.isFragmented=!1,e.lang=qt(n),e.roles=[{schemeIdUri:"urn:mpeg:dash:role:2011",value:"caption"}]}function T(e){var n,r,i=new Lt;return i.id=e.id,i.index=e.index,i.start=e.start,i.duration=e.duration,i.manifestInfo=(n=e.mpd,(r=new xt).dvrWindowSize=n.timeShiftBufferDepth,r.loadedTime=n.manifest.loadedTime,r.availableFrom=n.availabilityStartTime,r.minBufferTime=n.manifest.minBufferTime,r.maxFragmentDuration=n.maxSegmentDuration,r.duration=t.getDuration(n.manifest),r.isDynamic=t.getIsDynamic(n.manifest),r.serviceDescriptions=t.getServiceDescriptions(n.manifest),r.protocol=n.manifest.protocol,r),i.isLast=1===e.mpd.manifest.Period.length||Math.abs(i.start+i.duration-i.manifestInfo.duration)<1,i.isEncrypted=e.isEncrypted,i}function _(){if(!a)throw new Error("setConfig function has to be called previously")}function S(e){return i.length>0?i[0].mpd.manifest.Period[e]:null}function I(e,t,n){var r,i,a,o,s;if(e)for(r=e.AdaptationSet,o=0;o<r.length;o+=1)for(a=r[o].Representation,s=0;s<a.length;s+=1)if(t===(i=a[s]).id)return n?s:i;return null}return e={applyPatchToManifest:function(e,t){n.getPatchOperations(t).forEach((function(t){var n=t.getMpdTarget(e);if(null!==n){var r=n.name,i=n.target,a=n.leaf;if(t.xpath.findsAttribute()||"__text"===r)switch(t.action){case"add":case"replace":i[r]=t.value;break;case"remove":delete i[r]}else{var o=(i[r]||[]).indexOf(a),s="prepend"===t.position||"before"===t.position;if("remove"===t.action||"replace"===t.action)if(Array.isArray(i[r])){if(-1!=o){var u=i[r];u.splice(o,1),u.length>0?i[r]=u:delete i[r]}}else delete i[r];"add"!==t.action&&"replace"!==t.action||Object.keys(t.value).forEach((function(e){var n=t.value[e],a=i[e]||[];if(0===a.length&&i[e]&&a.push(i[e]),0===a.length)a=n;else{var u=a.length;u=e==r&&-1!=o?o+(s?0:1)+("replace"===t.action?-1:0):s?0:a.length,a.splice.apply(a,[u,0].concat(n))}i[e]=a}))}}}))},areMediaInfosEqual:function(e,t){if(!e||!t)return!1;var n=e.id===t.id,r=e.codec===t.codec,i=JSON.stringify(e.viewpoint)===JSON.stringify(t.viewpoint),a=e.lang===t.lang,o=JSON.stringify(e.roles)===JSON.stringify(t.roles),s=JSON.stringify(e.accessibility)===JSON.stringify(t.accessibility),u=JSON.stringify(e.audioChannelConfiguration)===JSON.stringify(t.audioChannelConfiguration);return n&&r&&i&&a&&o&&s&&u},convertAdaptationToMediaInfo:v,getAllMediaInfoForType:function(e,n,r){var o=i,s=r,u=[];if(s)_(),o=f(s);else{if(!(i.length>0))return u;s=i[0].mpd.manifest}var c=E(e,o),d=t.getAdaptationsForType(s,e?e.index:null,n);return u=l(s,c,e,d,n),n===a.TEXT&&(d=t.getAdaptationsForType(s,e?e.index:null,a.VIDEO),u=u.concat(l(s,c,e,d,n,!0))),u},getAvailabilityStartTime:function(e){var n=d(e);return t.getAvailabilityStartTime(n)},getBandwidthForRepresentation:function(e,t){var n;return(n=I(S(t),e))?n.bandwidth:null},getBaseURLsFromElement:function(e){return t.getBaseURLsFromElement(e)},getCodec:function(e,n,r){return t.getCodec(e,n,r)},getCodecForPreselection:function(e,n){return t.getCodecForPreselection(e,n)},getContentSteering:function(e){return t.getContentSteering(e)},getDuration:function(e){var n=p(e);return t.getDuration(n)},getEssentialProperties:function(e){try{return t.getEssentialProperties(e)}catch(e){return[]}},getEvent:function(e,t,n,r){try{if(!e||!t||isNaN(n)||!r)return null;var i=e.scheme_id_uri,a=e.value;if(!t[i+"/"+a])return null;var o,s=new Ft.A,u=e.timescale||1,c=r.adaptation.period.start,l=t[i+"/"+a],f=isNaN(r.presentationTimeOffset)?isNaN(l.presentationTimeOffset)?0:l.presentationTimeOffset:r.presentationTimeOffset,d=e.presentation_time_delta/u;o=0===e.version?c+n-f+d:c-f+d;var h=e.event_duration/u,p=e.id,m=e.message_data;return s.eventStream=l,s.eventStream.value=a,s.eventStream.timescale=u,s.duration=h,s.id=p,s.calculatedPresentationTime=o,s.messageData=m,s.presentationTimeDelta=d,s.parsedMessageData=i===g.A.ID3_SCHEME_ID_URI?function(e){for(var t=0,n=[];jt(e,t);){var r=zt(e,t+6);e[t+5]>>6&1&&(t+=Jt);for(var i=(t+=Jt)+r;t+en<i;){var a=Zt(e.subarray(t)),o=$t(a);o&&n.push(o),t+=a.size+Jt}Wt(e,t)&&(t+=Jt)}return n}(m):null,s}catch(e){return null}},getEventsFor:function(e,n,r){var a=[];if(i.length>0){var o=i[0].mpd.manifest;if(e instanceof Lt){var s=E(e,i);a=t.getEventsForPeriod(s)}else if(e instanceof Pt){var u=E(r,i);a=t.getEventStreamForAdaptationSet(o,m(e),u)}else if(e instanceof Yt.A){var c=E(r,i);a=t.getEventStreamForRepresentation(o,n,c)}}return a},getFramerate:function(e){return t.getFramerate(e)},getIndexForRepresentation:function(e,t){return function(e,t){var n=I(e,t,!0);return null!==n?n:-1}(S(t),e)},getIsDVB:function(e){return t.hasProfile(e,"urn:dvb:dash:profile:dvb-dash:2014")},getIsDynamic:function(e){var n=p(e);return t.getIsDynamic(n)},getIsPatch:function(e){return n.getIsPatch(e)},getIsTextTrack:function(e){return t.getIsText(e)},getIsTypeOf:function(e,n){return t.getIsTypeOf(e,n)},getLocation:function(e){return t.getLocation(e)},getMainAdaptationForType:u,getMainAdaptationSetForPreselection:function(e,n){return t.getMainAdaptationSetForPreselection(e,n)},getCommonRepresentationForPreselection:function(e,n){return t.getCommonRepresentationForPreselection(e,n)},getManifestUpdatePeriod:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.getManifestUpdatePeriod(e,n)},getMediaInfoForType:function(e,n){if(0===i.length||!e)return null;var r=E(e,i);if(!r)return null;var a=t.getAdaptationsForPeriod(r),o=u(n,e);return o?v(a[t.getIndexForAdaptation(o,i[0].mpd.manifest,e.index)]):null},getMpd:d,getPatchLocation:function(e){var n=t.getPatchLocation(e),r=t.getPublishTime(e);return n&&0!==n.length&&r?n.filter((function(e){return isNaN(e.ttl)||r.getTime()+e.ttl>(new Date).getTime()})):[]},getPeriodById:function(e){if(!e||0===i.length)return null;var t=i.filter((function(t){return t.id===e}));return t&&t.length>0?t[0]:null},getPreselectionIsTypeOf:function(e,n,r){return t.getPreselectionIsTypeOf(e,n,r)},getProducerReferenceTimes:function(e,n){var r,a,o=E(e,i);return r=n?n.id:null,i.length>0&&o&&(a=r?t.getAdaptationForId(r,i[0].mpd.manifest,o.index):t.getAdaptationForIndex(n?n.index:null,i[0].mpd.manifest,o.index)),a?t.getProducerReferenceTimesForAdaptation(a):[]},getPublishTime:function(e){return t.getPublishTime(e)},getRealAdaptation:function(e,n){var r,a,o=E(e,i);return r=n?n.id:null,i.length>0&&o&&(a=r?t.getAdaptationForId(r,i[0].mpd.manifest,o.index):t.getAdaptationForIndex(n?n.index:null,i[0].mpd.manifest,o.index)),a},getRealPeriodByIndex:function(e){return t.getRealPeriodForIndex(e,i[0].mpd.manifest)},getRegularPeriods:f,getRepresentationSortFunction:function(){return t.getRepresentationSortFunction()},getStreamsInfo:function(e,t){var n=[],r=i;if(e&&(_(),r=f(e)),r.length>0){(!t||t>r.length)&&(t=r.length);for(var a=0;a<t;a++)n.push(T(r[a]))}return n},getSuggestedPresentationDelay:function(){var e=i.length>0?i[0].mpd:null;return t.getSuggestedPresentationDelay(e)},getSupplementalCodecs:function(e){var t=e[Me.A.SUPPLEMENTAL_CODECS];return t?t.split(" ").map((function(t){return e.mimeType+';codecs="'+t+'"'})):[]},getUTCTimingSources:function(){var e=p();return t.getUTCTimingSources(e)},getVoRepresentations:function(e){var n=m(e);return t.getRepresentationsForAdaptation(n,e)},isPatchValid:function(e,r){var i=t.getId(e),a=n.getMpdId(r),o=t.getPublishTime(e),s=n.getPublishTime(r),u=n.getOriginalPublishTime(r);return!!(i&&a&&i==a&&o&&u&&o.getTime()==u.getTime()&&s&&o.getTime()<s.getTime())},reset:h,setConfig:function(e){e&&(e.constants&&(a=e.constants),e.cea608parser&&(o=e.cea608parser),e.errHandler&&t.setConfig({errHandler:e.errHandler}),e.BASE64&&t.setConfig({BASE64:e.BASE64}))},updatePeriods:function(e){if(!e)return null;_(),i=f(e)}},t=(0,Ut.A)(s).getInstance(),n=Ht(s).getInstance(),r=(0,c.A)(s).getInstance(),h(),e}tn.__dashjs_factory_name="DashAdapter";var nn=r.A.getSingletonFactory(tn),rn=function(){return(0,H.A)((function e(){(0,Y.A)(this,e)}),null,[{key:"round10",value:function(e,t){return function(e,t,n){return void 0===n||0==+n?Math[e](t):(n=+n,null===(t=+t)||isNaN(t)||"number"!=typeof n||n%1!=0?NaN:(t=t.toString().split("e"),+((t=(t=Math[e](+(t[0]+"e"+(t[1]?+t[1]-n:-n)))).toString().split("e"))[0]+"e"+(t[1]?+t[1]+n:n))))}("round",e,t)}}])}(),an=(0,H.A)((function e(){(0,Y.A)(this,e),this.TcpList=[],this.HttpList=[],this.RepSwitchList=[],this.BufferLevel=[],this.BufferState=[],this.PlayList=[],this.DroppedFrames=[],this.SchedulingInfo=[],this.DVRInfo=[],this.ManifestUpdate=[],this.RequestsQueue=null,this.DVBErrors=[]})),on=(0,H.A)((function e(){(0,Y.A)(this,e),this.t=null,this.mt=null,this.to=null,this.lto=null})),sn=(0,H.A)((function e(){(0,Y.A)(this,e),this.t=null,this.level=null})),un=(0,H.A)((function e(){(0,Y.A)(this,e),this.target=null,this.state=o.BUFFER_EMPTY})),cn=(0,H.A)((function e(){(0,Y.A)(this,e),this.time=null,this.range=null,this.manifestInfo=null})),ln=(0,H.A)((function e(){(0,Y.A)(this,e),this.time=null,this.droppedFrames=null})),fn=(0,H.A)((function e(){(0,Y.A)(this,e),this.mediaType=null,this.type=null,this.requestTime=null,this.fetchTime=null,this.availabilityStartTime=null,this.presentationStartTime=0,this.clientTimeOffset=0,this.currentTime=null,this.buffered=null,this.latency=0,this.streamInfo=[],this.representationInfo=[]})),dn=(0,H.A)((function e(){(0,Y.A)(this,e),this.id=null,this.index=null,this.start=null,this.duration=null})),hn=(0,H.A)((function e(){(0,Y.A)(this,e),this.id=null,this.index=null,this.mediaType=null,this.presentationTimeOffset=null,this.startNumber=null})),gn=(0,H.A)((function e(){(0,Y.A)(this,e),this.mediaType=null,this.t=null,this.type=null,this.startTime=null,this.availabilityStartTime=null,this.duration=null,this.bandwidth=null,this.range=null,this.state=null})),pn=(0,H.A)((function e(){(0,Y.A)(this,e),this.loadingRequests=[],this.executedRequests=[]}));function mn(e){var t,n,r=(e=e||{}).settings,i=this.context,a=(0,d.A)(i).getInstance();function s(){a.trigger(h.A.METRICS_CHANGED)}function u(e){a.trigger(h.A.METRIC_CHANGED,{mediaType:e}),s()}function c(e,t,n){a.trigger(h.A.METRIC_UPDATED,{mediaType:e,metric:t,value:n}),u(e)}function l(e,t,n){a.trigger(h.A.METRIC_ADDED,{mediaType:e,metric:t,value:n}),u(e)}function f(e,t){var r=null;return e?(n.hasOwnProperty(e)?r=n[e]:t||(r=new an,n[e]=r),r):r}function p(e,t,n){var i=f(e);null!==i&&(i[t].push(n),i[t].length>r.get().streaming.metrics.maxListDepth&&i[t].shift())}function m(e,t,n){p(e,t,n),l(e,t,n)}return t={addBufferLevel:function(e,t,n){var r=new sn;r.t=t,r.level=n,m(e,o.BUFFER_LEVEL,r)},addBufferState:function(e,t,n){var r=new un;r.target=n,r.state=t,m(e,o.BUFFER_STATE,r)},addDVBErrors:function(e){m(g.A.STREAM,o.DVB_ERRORS,e)},addDVRInfo:function(e,t,n,r){var i=new cn;i.time=t,i.range=r,i.manifestInfo=n,m(e,o.DVR_INFO,i)},addDroppedFrames:function(e,t){var n=new ln,r=f(e).DroppedFrames;t&&(n.time=t.creationTime,n.droppedFrames=t.droppedVideoFrames,r.length>0&&r[r.length-1]==n||m(e,o.DROPPED_FRAMES,n))},addHttpRequest:function e(t,n,r,i){var a=new I.G;for(var s in n.url&&n.url!==t.url&&(e({mediaType:t.mediaType,type:t.type,url:t.url,serviceLocation:null,range:t.range,startDate:t.startDate,firstByteDate:null,endDate:null,duration:t.duration,fileLoaderType:t.fileLoaderType,resourceTimingValues:t.resourceTimingValues},{url:null,status:null,headers:null},null,i),a.actualurl=n.url),a.tcpid=null,a.type=t.type,a.url=t.url,a.range=t.range||null,a.trequest=t.startDate,a.tresponse=t.firstByteDate,a.responsecode=n.status,a.cmsd=i,a._tfinish=t.endDate,a._stream=t.mediaType,a._mediaduration=t.duration,a._responseHeaders="",n.headers)a._responseHeaders+=s+": "+n.headers[s]+"\r\n";a._serviceLocation=t.serviceLocation||null,a._fileLoaderType=t.fileLoaderType,a._resourceTimingValues=t.resourceTimingValues,a._streamId=t&&t.representation&&t.representation.mediaInfo&&t.representation.mediaInfo.streamInfo?t.representation.mediaInfo.streamInfo.id:null,r?r.forEach((function(e){!function(e,t,n,r){var i=new I.N;i.s=t,i.d=n,i.b=r,e.trace.push(i),e.interval||(e.interval=0),e.interval+=n}(a,e.s,e.d,e.b,e.t)})):(delete a.interval,delete a.trace),m(t.mediaType,o.HTTP_REQUEST,a)},addManifestUpdate:function(e,t,n,r){var i=new fn;i.mediaType=e,i.type=t,i.requestTime=n,i.fetchTime=r,p(g.A.STREAM,o.MANIFEST_UPDATE,i),l(e,o.MANIFEST_UPDATE,i)},addManifestUpdateRepresentationInfo:function(e,t,n){if(e&&e.representationInfo){var r=new hn;r.id=t?t.id:null,r.index=t?t.index:null,r.mediaType=n,r.startNumber=t?t.startNumber:null,r.presentationTimeOffset=t?t.presentationTimeOffset:null,e.representationInfo.push(r),c(e.mediaType,o.MANIFEST_UPDATE_TRACK_INFO,e)}},addManifestUpdateStreamInfo:function(e,t,n,r,i){if(e){var a=new dn;a.id=t,a.index=n,a.start=r,a.duration=i,e.streamInfo.push(a),c(e.mediaType,o.MANIFEST_UPDATE_STREAM_INFO,e)}},addPlayList:function(e){e.trace&&Array.isArray(e.trace)?e.trace.forEach((function(e){e.hasOwnProperty("subreplevel")&&!e.subreplevel&&delete e.subreplevel})):delete e.trace,m(g.A.STREAM,o.PLAY_LIST,e)},addRepresentationSwitch:function(e,t,n,r,i){var a=new on;a.t=t,a.mt=n,a.to=r,i?a.lto=i:delete a.lto,m(e,o.TRACK_SWITCH,a)},addRequestsQueue:function(e,t,n){var r=new pn;r.loadingRequests=t,r.executedRequests=n,f(e).RequestsQueue=r,l(e,o.REQUESTS_QUEUE,r)},addSchedulingInfo:function(e,t,n,r,i,a,s,u,c){var l=new gn;l.mediaType=e,l.t=t,l.type=n,l.startTime=r,l.availabilityStartTime=i,l.duration=a,l.bandwidth=s,l.range=u,l.state=c,m(e,o.SCHEDULING_INFO,l)},clearAllCurrentMetrics:function(){n={},s()},clearCurrentMetricsForType:function(e){delete n[e],u(e)},getMetricsFor:f,updateManifestUpdateInfo:function(e,t){if(e){for(var n in t)e[n]=t[n];c(e.mediaType,o.MANIFEST_UPDATE,e)}}},n={},t}mn.__dashjs_factory_name="MetricsModel";var En=r.A.getSingletonFactory(mn),vn=(0,H.A)((function e(){(0,Y.A)(this,e),this.start=null,this.mstart=null,this.starttype=null,this.trace=[]}));vn.INITIAL_PLAYOUT_START_REASON="initial_playout",vn.SEEK_START_REASON="seek",vn.RESUME_FROM_PAUSE_START_REASON="resume",vn.METRICS_COLLECTION_START_REASON="metrics_collection_start";var An=(0,H.A)((function e(){(0,Y.A)(this,e),this.representationid=null,this.subreplevel=null,this.start=null,this.mstart=null,this.duration=null,this.playbackspeed=null,this.stopreason=null}));function yn(e){e=e||{};var t,n,r,i,a=this.context,s=e.metricsModel;function u(e){var t=s.getMetricsFor(e,!0);if(!t)return null;var n,r=t.HttpList,i=null;if(!r||r.length<=0)return null;for(n=r.length-1;n>=0;){if(r[n].responsecode){i=r[n];break}n--}return i}function c(e){var t=s.getMetricsFor(e,!0);return t&&t.HttpList?t.HttpList:[]}function l(e,t){if(!e)return null;var n=e[t];return n&&0!==n.length?n[n.length-1]:null}return t={addBufferLevel:function(e,t,n){s.addBufferLevel(e,t,n)},addBufferState:function(e,t,n){s.addBufferState(e,t,n)},addDVBErrors:function(e){s.addDVBErrors(e)},addDVRInfo:function(e,t,n,r){s.addDVRInfo(e,t,n,r)},addDroppedFrames:function(e){s.addDroppedFrames(g.A.VIDEO,e)},addHttpRequest:function(e,t,n,r,i,a){var o={status:n,headers:r,url:t};s.addHttpRequest(e,o,i,a)},addManifestUpdate:function(e){s.addManifestUpdate(g.A.STREAM,e.type,e.startDate,e.endDate)},addManifestUpdateRepresentationInfo:function(e,t){if(e){var n=this.getCurrentManifestUpdate();s.addManifestUpdateRepresentationInfo(n,e,t)}},addManifestUpdateStreamInfo:function(e){if(e){var t=this.getCurrentManifestUpdate();s.addManifestUpdateStreamInfo(t,e.id,e.index,e.start,e.duration)}},addPlayList:function(){i&&(s.addPlayList(i),i=null)},addRepresentationSwitch:function(e,t,n,r,i){s.addRepresentationSwitch(e,t,n,r,i)},addRequestsQueue:function(e,t,n){s.addRequestsQueue(e,t,n)},addSchedulingInfo:function(e,t){s.addSchedulingInfo(e.mediaType,new Date,e.type,e.startTime,e.availabilityStartTime,e.duration,e.bandwidth,e.range,t)},clearAllCurrentMetrics:function(){s.clearAllCurrentMetrics()},createPlaylistMetrics:function(e,t){(i=new vn).start=new Date,i.mstart=e,i.starttype=t},createPlaylistTraceMetrics:function(e,t,i){!0===n&&(n=!1,(r=new An).representationid=e,r.start=new Date,r.mstart=t,r.playbackspeed=null!==i?i.toString():null)},getCurrentBufferLevel:function(e){var t=l(s.getMetricsFor(e,!0),o.BUFFER_LEVEL);return t?rn.round10(t.level/1e3,-3):0},getCurrentBufferState:function(e){return l(s.getMetricsFor(e,!0),o.BUFFER_STATE)},getCurrentDVRInfo:function(e){return l(e?s.getMetricsFor(e,!0):s.getMetricsFor(g.A.VIDEO,!0)||s.getMetricsFor(g.A.AUDIO,!0),o.DVR_INFO)},getCurrentDroppedFrames:function(){return l(s.getMetricsFor(g.A.VIDEO,!0),o.DROPPED_FRAMES)},getCurrentHttpRequest:u,getCurrentManifestUpdate:function(){return l(s.getMetricsFor(g.A.STREAM),o.MANIFEST_UPDATE)},getCurrentRepresentationSwitch:function(e){return l(s.getMetricsFor(e,!0),o.TRACK_SWITCH)},getCurrentSchedulingInfo:function(e){return l(s.getMetricsFor(e,!0),o.SCHEDULING_INFO)},getHttpRequests:c,getLatestFragmentRequestHeaderValueByID:function(e,t){if(!t)return null;var n={},r=u(e);r&&(n=Fe.A.parseHttpHeaders(r._responseHeaders));var i=n[t.toLowerCase()];return void 0===i?null:i},getLatestMPDRequestHeaderValueByID:function(e){if(!e)return null;var t,n,r,i={};for(r=(t=c(g.A.STREAM)).length-1;r>=0;r--)if((n=t[r]).type===I.G.MPD_TYPE){i=Fe.A.parseHttpHeaders(n._responseHeaders);break}var a=i[e.toLowerCase()];return void 0===a?null:a},pushPlayListTraceMetrics:function(e,t){if(!1===n&&i&&r&&r.start){var a=r.start;r.duration=e.getTime()-a.getTime(),r.stopreason=t,i.trace.push(r),n=!0}},updateManifestUpdateInfo:function(e){var t=this.getCurrentManifestUpdate();s.updateManifestUpdateInfo(t,e)},updatePlayListTraceMetrics:function(e){if(r)for(var t in r)r[t]=e[t]}},s=s||En(a).getInstance({settings:e.settings}),n=!0,r=null,i=null,t}An.REPRESENTATION_SWITCH_STOP_REASON="representation_switch",An.REBUFFERING_REASON="rebuffering",An.USER_REQUEST_STOP_REASON="user_request",An.END_OF_PERIOD_STOP_REASON="end_of_period",An.END_OF_CONTENT_STOP_REASON="end_of_content",An.METRICS_COLLECTION_STOP_REASON="metrics_collection_end",An.FAILURE_STOP_REASON="failure",yn.__dashjs_factory_name="DashMetrics";var Tn=r.A.getSingletonFactory(yn);function _n(){var e=this.context,t=(0,d.A)(e).getInstance();return{error:function(e){t.trigger(h.A.ERROR,{error:e})}}}_n.__dashjs_factory_name="ErrorHandler";var Sn=r.A.getSingletonFactory(_n),In=n(15560);function bn(){var e,t,n,r,i,a,o,s,c,l,f,p,m=this.context,E=(0,d.A)(m).getInstance();function v(){p.debug("Stopping the gap controller"),i&&(clearInterval(i),i=null),function(){E.off(h.A.WALLCLOCK_TIME_UPDATED,S,this),E.off(h.A.INITIAL_STREAM_SWITCH,_,this),E.off(h.A.PLAYBACK_SEEKING,A,this),E.off(h.A.BUFFER_REPLACEMENT_STARTED,y,e),E.off(h.A.TRACK_CHANGE_RENDERED,T,e)}(),i=null,a=NaN,r=0,l=null,f={}}function A(){l&&(clearTimeout(l),l=null)}function y(e){try{if(e.streamId!==s.getActiveStreamInfo().id||e.mediaType!==g.A.VIDEO&&e.mediaType!==g.A.AUDIO)return;e.streamId===s.getActiveStreamInfo().id&&(f[e.mediaType]=!0)}catch(e){p.error(e)}}function T(e){e&&e.mediaType&&(f[e.mediaType]=!1)}function _(){i||function(){try{i||(p.debug("Starting the gap controller"),i=setInterval((function(){I()&&b(o.getTime())}),n.get().streaming.gaps.checkInterval))}catch(e){}}()}function S(){if(I(n.get().streaming.gaps.enableSeekFix)&&++r>=10){var e=o.getTime();t===e?b(e,!0):(t=e,a=NaN),r=0}}function I(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!s.getActiveStream())return!1;var t=!1;for(var r in f)if(f[r]){t=!0;break}var i,a,u=!!e&&(i=s.getActiveStream(),a=parseFloat((i.getStartTime()+i.getDuration()).toFixed(5)),o.getTime()+n.get().streaming.gaps.threshold>=a);return!t&&n.get().streaming.gaps.jumpGaps&&s.getActiveStreamProcessors().length>0&&(!o.isSeeking()||u)&&!o.isPaused()&&!s.getIsStreamSwitchInProgress()&&!s.getHasMediaOrInitialisationError()}function b(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=n.get().streaming.gaps,u=i.enableStallFix,f=i.stallSeek,d=i.smallGapLimit,h=i.jumpLargeGaps,g=i.seekOffset,m=c.getBufferRange(),E=NaN,v=!1;if(t=function(e,t){try{if(!e||e.length<=1&&t>0)return NaN;for(var r=NaN,i=0;isNaN(r)&&i<e.length;){var a=i>0?e.end(i-1):0;t<e.start(i)&&a-t<n.get().streaming.gaps.threshold&&(r=i),i+=1}return r}catch(e){return null}}(m,e),!isNaN(t)){var A=m.start(t),y=A-e;y>0&&(y<=d||h)&&(E=A)}var T=o.getTimeToStreamEnd();if(isNaN(E)&&r&&isFinite(T)&&!isNaN(T)&&T<d&&(E=parseFloat(o.getStreamEndTime().toFixed(5)),v=!0),u&&isNaN(E)&&r&&isNaN(t)&&function(e,t){for(var n=0,r=e.length;n<r;n++)if(t>=e.start(n)&&t<=e.end(n))return!0;return!1}(m,e)&&(0===f?(p.warn("Toggle play pause to break stall"),c.pause(),c.play()):(p.warn("Jumping ".concat(f,"s to break stall")),E=e+f)),E>0&&a!==E&&E>e&&!l){var _=E-e;if(v){var S=s.getStreamForTime(E),I=S&&!!S.getPreloaded();p.warn("Jumping to end of stream because of gap from ".concat(e," to ").concat(E,". Gap duration: ").concat(_)),o.seek(E+g,!0,I)}else{var b=o.getIsDynamic(),R=t>0?m.end(t-1):e,N=b?1e3*Math.max(0,_-.1):0;l=window.setTimeout((function(){o.seek(E+g,!0,!0);var e=s.getActiveStream();e&&p.warn("Jumping gap occuring in period ".concat(e.getStreamId()," starting at ").concat(R," and ending at ").concat(E,". Jumping by: ").concat(E+g-R)),l=null}),N)}a=E}}return e={reset:v,setConfig:function(e){e&&(e.settings&&(n=e.settings),e.playbackController&&(o=e.playbackController),e.streamController&&(s=e.streamController),e.videoModel&&(c=e.videoModel))},initialize:function(){!function(){E.on(h.A.WALLCLOCK_TIME_UPDATED,S,this),E.on(h.A.INITIAL_STREAM_SWITCH,_,this),E.on(h.A.PLAYBACK_SEEKING,A,this),E.on(h.A.BUFFER_REPLACEMENT_STARTED,y,e),E.on(h.A.TRACK_CHANGE_RENDERED,T,e)}()}},p=(0,u.A)(m).getInstance().getLogger(e),v(),e}bn.__dashjs_factory_name="GapController";var Rn=r.A.getSingletonFactory(bn),Nn=(n(60825),n(8591)),Cn=n(4597),wn=n(18766);function Dn(e,t,n){return t=(0,Cn.A)(t),(0,Nn.A)(e,On()?Reflect.construct(t,n||[],(0,Cn.A)(e).constructor):t.apply(e,n))}function On(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(On=function(){return!!e})()}var Mn=function(e){function t(e,n){var r;return(0,Y.A)(this,t),(r=Dn(this,t)).url=e||null,r.type=n||null,r.mediaType=g.A.STREAM,r.responseType="",r}return(0,wn.A)(t,e),(0,H.A)(t)}(J.A);function Pn(e){e=e||{};var t=this.context,n=(0,d.A)(t).getInstance(),r=(0,we.A)(t).create({errHandler:e.errHandler,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,errors:Ce.A});return{load:function(e,t,i){var a=function(r,a){t.resolved=!0,t.resolvedContent=r||null,n.trigger(h.A.XLINK_ELEMENT_LOADED,{element:t,resolveObject:i,error:r||a?null:new je.A(Ce.A.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE,Ce.A.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE+e)})};if("urn:mpeg:dash:resolve-to-zero:2013"===e)a(null,!0);else{var o=new Mn(e,I.G.XLINK_EXPANSION_TYPE);r.load({request:o,success:function(e){a(e)},error:function(){a(null)}})}},reset:function(){r&&(r.abort(),r=null)}}}Pn.__dashjs_factory_name="XlinkLoader";var Ln=r.A.getClassFactory(Pn),xn="onLoad";function Fn(e){e=e||{};var t,n,r,i,a=this.context,o=(0,d.A)(a).getInstance(),s=(0,Pe.A)(a).getInstance();function u(e,t,n){var r,a,o={};o.elements=e,o.type=t,o.resolveType=n,0===o.elements.length&&l(o);for(var u=0;u<o.elements.length;u++)r=o.elements[u],a=s.isHTTPURL(r.url)?r.url:r.originalContent.BaseURL+r.url,i.load(a,r,o)}function c(e){var t,r,i="";if(t=e.element,r=e.resolveObject,t.resolvedContent){var a=0;0===t.resolvedContent.indexOf("<?xml")&&(a=t.resolvedContent.indexOf("?>")+2),i=t.resolvedContent.substr(0,a)+"<response>"+t.resolvedContent.substr(a)+"</response>",t.resolvedContent=n.parseXml(i).response}(function(e){var t;for(t=0;t<e.elements.length;t++)if(!1===e.elements[t].resolved)return!1;return!0})(r)&&l(r)}function l(e){var t,i,a=[];if(function(e){var t,i,a,o,s,u,c=[];for(o=e.elements.length-1;o>=0;o--){if(i=(t=e.elements[o]).type,t.resolvedContent){if(t.resolvedContent)for(s=0;s<t.resolvedContent[i].length;s++)a=t.resolvedContent[i][s],c.push(a)}else delete t.originalContent["xlink:actuate"],delete t.originalContent["xlink:href"],c.push(t.originalContent);for(t.parentElement[i].splice(t.index,1),u=0;u<c.length;u++)t.parentElement[i].splice(t.index+u,0,c[u]);c=[]}e.elements.length>0&&n.getIron().run(r)}(e),"onActuate"===e.resolveType&&o.trigger(h.A.XLINK_READY,{manifest:r}),e.resolveType===xn)switch(e.type){case Me.A.PERIOD:for(t=0;t<r[Me.A.PERIOD].length;t++)(i=r[Me.A.PERIOD][t]).hasOwnProperty(Me.A.ADAPTATION_SET)&&(a=a.concat(f(i[Me.A.ADAPTATION_SET],i,Me.A.ADAPTATION_SET,xn))),i.hasOwnProperty(Me.A.EVENT_STREAM)&&(a=a.concat(f(i[Me.A.EVENT_STREAM],i,Me.A.EVENT_STREAM,xn)));u(a,Me.A.ADAPTATION_SET,xn);break;case Me.A.ADAPTATION_SET:o.trigger(h.A.XLINK_READY,{manifest:r})}}function f(e,t,n,r){var i,a,o,s=[];for(a=e.length-1;a>=0;a--)(i=e[a]).hasOwnProperty("xlink:href")&&"urn:mpeg:dash:resolve-to-zero:2013"===i["xlink:href"]&&e.splice(a,1);for(a=0;a<e.length;a++)(i=e[a]).hasOwnProperty("xlink:href")&&i.hasOwnProperty("xlink:actuate")&&i["xlink:actuate"]===r&&(o=g(i["xlink:href"],t,n,a,r,i),s.push(o));return s}function g(e,t,n,r,i,a){return{url:e,parentElement:t,type:n,index:r,resolveType:i,originalContent:a,resolvedContent:null,resolved:!1}}return t={resolveManifestOnLoad:function(e){(r=e).Period?u(f(r.Period,r,Me.A.PERIOD,xn),Me.A.PERIOD,xn):o.trigger(h.A.XLINK_READY,{manifest:r})},setParser:function(e){e&&(n=e)},reset:function(){o.off(h.A.XLINK_ELEMENT_LOADED,c,t),i&&(i.reset(),i=null)}},o.on(h.A.XLINK_ELEMENT_LOADED,c,t),i=Ln(a).create({errHandler:e.errHandler,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,settings:e.settings}),t}Fn.__dashjs_factory_name="XlinkController";var Un=r.A.getClassFactory(Fn),kn=n(50544),Bn=n(78508),Gn=n(34299);function Hn(e){function t(e,t,n,r,i){(function(e,t){var n=!0;if(t)for(var r=function(){var t=(0,Bn.A)(a[i],2),r=t[0],o=t[1],s=e[r];o.some((function(e){return s.match(e)}))&&(n=!1)},i=0,a=Object.entries(t);i<a.length;i++)r();return n})(r,e)&&(i[t]?n?i[t].push(r):function(e,t){if("object"===(0,Gn.A)(e))for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(r,i[t]):i[t]=n?[r]:r)}function n(e,n,r,i){for(var a=function(){var a=e[o];if(r[a]){var s=r[a];Array.isArray(s)?s.forEach((function(e){t(n[a],a,!0,e,i)})):t(n[a],a,!1,s,i)}},o=0,s=e.length;o<s;++o)a()}function r(e,t){for(var i=0,a=e.children.length;i<a;++i){var o=e.children[i],s=t[o.name];if(s)for(var u=0,c=s.length;u<c;++u){var l=s[u];n(e.properties,e.exceptions,t,l),r(o,l)}}}return{run:function(t){if(null===t||"object"!==(0,Gn.A)(t))return t;if(t.Period&&"period"in e)for(var n=e.period,i=t.Period,a=0,o=i.length;a<o;++a){var s=i[a];if(r(n,s),"adaptationset"in e){var u=s.AdaptationSet;if(u)for(var c=e.adaptationset,l=0,f=u.length;l<f;++l)r(c,u[l])}}return t}}}n(5506),Hn.__dashjs_factory_name="ObjectIron";var Yn=r.A.getClassFactory(Hn),Vn=function(){return(0,H.A)((function e(t,n){(0,Y.A)(this,e),this._test=t,this._converter=n}),[{key:"test",get:function(){return this._test}},{key:"converter",get:function(){return this._converter}}])}();function qn(e,t,n){return t=(0,Cn.A)(t),(0,Nn.A)(e,Kn()?Reflect.construct(t,n||[],(0,Cn.A)(e).constructor):t.apply(e,n))}function Kn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Kn=function(){return!!e})()}var jn=/^([-])?P(([\d.]*)Y)?(([\d.]*)M)?(([\d.]*)D)?T?(([\d.]*)H)?(([\d.]*)M)?(([\d.]*)S)?/,zn=function(e){function t(){return(0,Y.A)(this,t),qn(this,t,[function(e,t,n){for(var r=[Me.A.MIN_BUFFER_TIME,Me.A.MEDIA_PRESENTATION_DURATION,Me.A.MINIMUM_UPDATE_PERIOD,Me.A.TIMESHIFT_BUFFER_DEPTH,Me.A.MAX_SEGMENT_DURATION,Me.A.MAX_SUBSEGMENT_DURATION,Me.A.SUGGESTED_PRESENTATION_DELAY,Me.A.START,g.A.START_TIME,Me.A.DURATION],i=r.length,a=0;a<i;a++)if(t===r[a])return jn.test(n);return!1},function(e){var t=jn.exec(e),n=31536e3*parseFloat(t[3]||0)+2592e3*parseFloat(t[5]||0)+86400*parseFloat(t[7]||0)+3600*parseFloat(t[9]||0)+60*parseFloat(t[11]||0)+parseFloat(t[13]||0);return void 0!==t[1]&&(n=-n),n}])}return(0,wn.A)(t,e),(0,H.A)(t)}(Vn);function Wn(e,t,n){return t=(0,Cn.A)(t),(0,Nn.A)(e,Qn()?Reflect.construct(t,n||[],(0,Cn.A)(e).constructor):t.apply(e,n))}function Qn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Qn=function(){return!!e})()}var Xn=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+-])([0-9]{2})(?::?)([0-9]{2}))?/,$n=function(e){function t(){return(0,Y.A)(this,t),Wn(this,t,[function(e,t,n){return Xn.test(n)},function(e){var t,n=Xn.exec(e);if(t=Date.UTC(parseInt(n[1],10),parseInt(n[2],10)-1,parseInt(n[3],10),parseInt(n[4],10),parseInt(n[5],10),n[6]&&parseInt(n[6],10)||0,n[7]&&1e3*parseFloat(n[7])||0),n[9]&&n[10]){var r=60*parseInt(n[9],10)+parseInt(n[10],10);t+=("+"===n[8]?-1:1)*r*60*1e3}return new Date(t)}])}return(0,wn.A)(t,e),(0,H.A)(t)}(Vn);function Zn(e,t,n){return t=(0,Cn.A)(t),(0,Nn.A)(e,Jn()?Reflect.construct(t,n||[],(0,Cn.A)(e).constructor):t.apply(e,n))}function Jn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Jn=function(){return!!e})()}var er=/^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$/,tr=[Me.A.ID],nr=function(e){function t(){return(0,Y.A)(this,t),Zn(this,t,[function(e,t,n){return er.test(n)&&-1===tr.indexOf(t)},function(e){return parseFloat(e)}])}return(0,wn.A)(t,e),(0,H.A)(t)}(Vn);function rr(e,t,n){return t=(0,Cn.A)(t),(0,Nn.A)(e,ir()?Reflect.construct(t,n||[],(0,Cn.A)(e).constructor):t.apply(e,n))}function ir(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ir=function(){return!!e})()}var ar=function(e){function t(){return(0,Y.A)(this,t),rr(this,t,[function(e,t){var n=(0,kn.A)((0,kn.A)((0,kn.A)((0,kn.A)((0,kn.A)({},Me.A.ADAPTATION_SET,[Me.A.LANG]),Me.A.REPRESENTATION,[Me.A.LANG]),Me.A.CONTENT_COMPONENT,[Me.A.LANG]),Me.A.LABEL,[Me.A.LANG]),Me.A.GROUP_LABEL,[Me.A.LANG]);if(n.hasOwnProperty(e)){var r=n[e];return void 0!==r&&r.indexOf(t)>=0}return!1},function(e){return qt(e)||String(e)}])}return(0,wn.A)(t,e),(0,H.A)(t)}(Vn),or=function(){return(0,H.A)((function e(t,n,r,i){(0,Y.A)(this,e),this._name=t||"",this._properties=n||[],this._exceptions=r||{},this._children=i||[]}),[{key:"name",get:function(){return this._name}},{key:"children",get:function(){return this._children}},{key:"properties",get:function(){return this._properties}},{key:"exceptions",get:function(){return this._exceptions}}])}();function sr(e,t,n){return t=(0,Cn.A)(t),(0,Nn.A)(e,ur()?Reflect.construct(t,n||[],(0,Cn.A)(e).constructor):t.apply(e,n))}function ur(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ur=function(){return!!e})()}var cr=function(e){function t(){(0,Y.A)(this,t);var e=[Me.A.AUDIO_CHANNEL_CONFIGURATION,Me.A.AUDIO_SAMPLING_RATE,Me.A.CODECS,Me.A.CODING_DEPENDENCY,Me.A.CONTENT_PROTECTION,Me.A.ESSENTIAL_PROPERTY,Me.A.FRAMERATE,Me.A.FRAME_PACKING,Me.A.HEIGHT,Me.A.INBAND_EVENT_STREAM,Me.A.MAXIMUM_SAP_PERIOD,Me.A.MAX_PLAYOUT_RATE,Me.A.MIME_TYPE,Me.A.PROFILES,Me.A.SAR,Me.A.SCAN_TYPE,Me.A.SEGMENT_PROFILES,Me.A.SEGMENT_SEQUENCE_PROPERTIES,Me.A.START_WITH_SAP,Me.A.SUPPLEMENTAL_CODECS,Me.A.SUPPLEMENTAL_PROPERTY,Me.A.WIDTH],n=(0,kn.A)((0,kn.A)({},Me.A.SUPPLEMENTAL_PROPERTY,{schemeIdUri:[g.A.URL_QUERY_INFO_SCHEME,g.A.EXT_URL_QUERY_INFO_SCHEME,g.A.ADV_URL_QUERY_INFO_SCHEME,g.A.URL_QUERY_STATE_PREFIX]}),Me.A.ESSENTIAL_PROPERTY,{schemeIdUri:[g.A.URL_QUERY_INFO_SCHEME,g.A.EXT_URL_QUERY_INFO_SCHEME,g.A.ADV_URL_QUERY_INFO_SCHEME,g.A.URL_QUERY_STATE_PREFIX]});return sr(this,t,[Me.A.ADAPTATION_SET,e,n,[new or(Me.A.REPRESENTATION,e,n,[new or(Me.A.SUB_REPRESENTATION,e,n)])]])}return(0,wn.A)(t,e),(0,H.A)(t)}(or);function lr(e,t,n){return t=(0,Cn.A)(t),(0,Nn.A)(e,fr()?Reflect.construct(t,n||[],(0,Cn.A)(e).constructor):t.apply(e,n))}function fr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(fr=function(){return!!e})()}var dr=function(e){function t(){(0,Y.A)(this,t);var e=[Me.A.SEGMENT_BASE,Me.A.SEGMENT_TEMPLATE,Me.A.SEGMENT_LIST],n={};return lr(this,t,[Me.A.PERIOD,e,n,[new or(Me.A.ADAPTATION_SET,e,n,[new or(Me.A.REPRESENTATION,e,n)])]])}return(0,wn.A)(t,e),(0,H.A)(t)}(or);function hr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}n(42762);var gr=60,pr=62,mr=45,Er=47,vr=63,Ar=33,yr=39,Tr=34,_r=91,Sr=93,Ir=new Set([13,10,9,62,47,61,32]);function br(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.pos||0,r=e.length,i=!!t.keepComments,a=!!t.keepWhitespace,o=!!t.includeParentElement;function s(e){return{nodeName:arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#text",nodeValue:e,attributes:{},childNodes:[]}}function u(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=[];n<r;)if(e.charCodeAt(n)===gr){var u=e.charCodeAt(n+1);if(u===Er){var c=n+2;if(n=e.indexOf(">",n),!e.startsWith(t,c)){var f=e.substring(0,n).split("\n");throw new Error("Unexpected close tag\nLine: "+(f.length-1)+"\nColumn: "+(f[f.length-1].length+1)+"\nChar: "+e[n])}return n+1&&(n+=1),o}if(u===vr){n=e.indexOf(">",n),n++;continue}if(u===Ar){var d=e.charCodeAt(n+2);if(d===mr){for(var h=n;-1!==n&&(e.charCodeAt(n)!==pr||e.charCodeAt(n-1)!==mr||e.charCodeAt(n-2)!==mr);)n=e.indexOf(">",n+1);-1===n&&(n=r),i&&o.push(s(e.substring(h,n+1),"#comment"))}else{if(d===_r&&e.charCodeAt(n+8)===_r&&e.startsWith("CDATA",n+3)){var g=e.indexOf("]]>",n);-1===g?(o.push(s(e.substr(n+9),"#cdata")),n=r):(o.push(s(e.substring(n+9,g),"#cdata")),n=g+3);continue}var p=n+1;n+=2;for(var m=!1;n<r&&(e.charCodeAt(n)!==pr||m);){var E=e.charCodeAt(n);E===_r?m=!0:m&&E===Sr&&(m=!1),n++}o.push(s(e.substring(p,n),"#doctype"))}n++;continue}var v=l();o.push(v)}else{var A=(T=void 0,T=n,-2==(n=e.indexOf("<",n)-1)&&(n=r),(0,Kt.Uh)(e.slice(T,n+1)));if(a)A.length>0&&o.push(s(A));else{var y=A.trim();y.length>0&&o.push(s(y))}n++}var T;return o}function c(){for(var t=n;n<r&&!Ir.has(e.charCodeAt(n));)n++;return e.slice(t,n)}function l(){n++;var t=c(),i=t,a=null,o=t.indexOf(":");-1!==o&&(a=t.slice(0,o),i=t.slice(o+1));var s=function(){for(var t={};n<r&&e.charCodeAt(n)!==pr;){var i=e.charCodeAt(n);if(i>64&&i<91||i>96&&i<123){for(var a=c(),o="",s=e.charCodeAt(n);s!==yr&&s!==Tr;)n++,s=e.charCodeAt(n);if(s===yr||s===Tr){if(u=void 0,l=void 0,u=e[n],l=n+1,n=e.indexOf(u,l),o=e.slice(l,n),-1===n)throw new Error("Missing closing quote")}else n--;t[a]=(0,Kt.Uh)(o)}n++}var u,l;return t}(),l=[],f=e.charCodeAt(n-1);return n++,f!==Er&&(l=u(t)),{nodeName:t,nodeValue:null,attributes:s,childNodes:l,prefix:a,localName:i}}var f={nodeName:"#document",nodeValue:null,childNodes:u(""),attributes:{}};return o&&function e(t,n){t.parentElement=null!=n&&n.nodeName.startsWith("#")?null:n;var r,i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return hr(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hr(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}(t.childNodes);try{for(i.s();!(r=i.n()).done;)e(r.value,t)}catch(e){i.e(e)}finally{i.f()}}(f,null),f}var Rr=[Me.A.ACCESSIBILITY,Me.A.ADAPTATION_SET,Me.A.ADD,Me.A.AUDIO_CHANNEL_CONFIGURATION,Me.A.BASE_URL,Me.A.CONTENT_COMPONENT,Me.A.CONTENT_PROTECTION,Me.A.CONTENT_STEERING,Me.A.ESSENTIAL_PROPERTY,Me.A.EVENT,Me.A.EVENT_STREAM,Me.A.INBAND_EVENT_STREAM,Me.A.LABEL,Me.A.LOCATION,Me.A.METRICS,Me.A.PATCH_LOCATION,Me.A.PERIOD,Me.A.PRESELECTION,Me.A.PRODUCER_REFERENCE_TIME,Me.A.REMOVE,Me.A.REPLACE,Me.A.REPORTING,Me.A.REPRESENTATION,Me.A.ROLE,Me.A.S,Me.A.SEGMENT_SEQUENCE_PROPERTIES,Me.A.SEGMENT_URL,Me.A.SERVICE_DESCRIPTION,Me.A.SUPPLEMENTAL_PROPERTY,Me.A.UTC_TIMING];function Nr(e){e=e||{};var t,n,r,i,a=this.context,o=e.debug;function s(e){try{var t=function(e){var t=br(e),n=t.childNodes.find((function(e){return"MPD"===e.nodeName||"Patch"===e.nodeName}))||t.childNodes[0];return function e(t){-1!==t.nodeName.indexOf(":")&&(t.__prefix=t.prefix,t.nodeName=t.localName);var n=t.childNodes,i=t.attributes,a=t.nodeName;for(var o in t.tagName=a,i){var s=i[o];if("S"===a)s=parseInt(s);else for(var u=0,c=r.length;u<c;u++){var l=r[u];if(l.test(a,o,s)){s=l.converter(s);break}}t[o]=s}for(var f=null==n?void 0:n.length,d=0;d<f;d++){var h=n[d];if("#text"!==h.nodeName){e(h);var g=h.nodeName;Array.isArray(t[g])?t[g].push(h):-1!==Rr.indexOf(g)?(t[g]||(t[g]=[]),t[g].push(h)):t[g]=h}else t.__text=h.nodeValue}t.__children=n}(n),n}(e);return(0,kn.A)({},t.tagName,t)}catch(e){return null}}return t={getIron:function(){return i},parseXml:s,parse:function(e){var t,r=window.performance.now();if(!(t=s(e)))throw new Error("failed to parse the manifest");t.Patch?((t=t.Patch).add&&t.add.forEach((function(e){return i.run(e)})),t.replace&&t.replace.forEach((function(e){return i.run(e)}))):(t=t.MPD,i.run(t));var a=window.performance.now();return n.info("Parsing complete: "+(a-r).toPrecision(3)+"ms"),t.protocol="DASH",t}},n=o.getLogger(t),r=[new zn,new $n,new nr,new ar],i=Yn(a).create({adaptationset:new cr,period:new dr}),t}Nr.__dashjs_factory_name="DashParser";var Cr=r.A.getClassFactory(Nr);function wr(e){e=e||{};var t,n,r,i,a,o=this.context,s=e.debug,u=e.settings,c=(0,d.A)(o).getInstance(),l=(0,Pe.A)(o).getInstance(),f=e.mssHandler,p=e.errHandler;function m(e){c.trigger(h.A.INTERNAL_MANIFEST_LOADED,{manifest:e.manifest})}return t={load:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,g=new Date,p=new Mn(e,I.G.MPD_TYPE);t&&(p.serviceLocation=t),d&&(p.queryParams=d),p.startDate||(p.startDate=g),c.trigger(h.A.MANIFEST_LOADING_STARTED,{request:p}),r.load({request:p,success:function(t,r,d){var g,p,m;if(i)if(d&&d!==e?(p=l.parseBaseUrl(d),g=d):(l.isRelative(e)&&(e=l.resolve(e,window.location.href)),p=l.parseBaseUrl(e)),"No Content"!=r)if(null===a&&(a=function(e){var t=null;return e.indexOf("SmoothStreamingMedia")>-1?(f&&(t=f.createMssParser(),f.createMssFragmentProcessor(),f.registerEvents()),t):e.indexOf("MPD")>-1||e.indexOf("Patch")>-1?Cr(o).create({debug:s}):t}(t)),null!==a){i.setParser(a);try{m=a.parse(t)}catch(t){return void c.trigger(h.A.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new je.A(Ce.A.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,Ce.A.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+"".concat(e))})}if(m){if(m.url=g||e,m.originalUrl||(m.originalUrl=m.url),u&&u.get().streaming.enableManifestDurationMismatchFix&&m.mediaPresentationDuration&&m.Period.length>1){var E=m.Period.reduce((function(e,t){return e+t.duration}),0);!isNaN(E)&&m.mediaPresentationDuration>E&&(n.warn("Media presentation duration greater than duration of all periods. Setting duration to total period duration"),m.mediaPresentationDuration=E)}m.baseUri=p,m.loadedTime=new Date,i.resolveManifestOnLoad(m),c.trigger(h.A.ORIGINAL_MANIFEST_LOADED,{originalManifest:t})}else c.trigger(h.A.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new je.A(Ce.A.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,Ce.A.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+"".concat(e))})}else c.trigger(h.A.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new je.A(Ce.A.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,Ce.A.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+"".concat(e))});else c.trigger(h.A.INTERNAL_MANIFEST_LOADED,{manifest:null})},error:function(t,n,r){c.trigger(h.A.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new je.A(Ce.A.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE,Ce.A.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE+"".concat(e,", ").concat(r))})}})},reset:function(){c.off(h.A.XLINK_READY,m,t),f&&f.reset(),i&&(i.reset(),i=null),r&&(r.abort(),r=null)}},n=s.getLogger(t),c.on(h.A.XLINK_READY,m,t),r=(0,we.A)(o).create({errHandler:e.errHandler,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,urlUtils:l,constants:g.A,dashConstants:Me.A,errors:Ce.A}),i=Un(o).create({errHandler:p,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,settings:e.settings}),a=null,t}wr.__dashjs_factory_name="ManifestLoader";var Dr=r.A.getClassFactory(wr);function Or(){var e,t=this.context,n=(0,d.A)(t).getInstance();return{getValue:function(){return e},setValue:function(t){e=t,t&&n.trigger(h.A.MANIFEST_LOADED,{data:t})}}}Or.__dashjs_factory_name="ManifestModel";var Mr=r.A.getSingletonFactory(Or);function Pr(){var e,t,n,r=this.context,i=(0,c.A)(r).getInstance();return e={select:function(e){if(!e||0===e.length)return null;var r=null;return i.get().streaming.applyContentSteering&&(r=function(e){var r=n.getCurrentSteeringResponseData();return r&&r.pathwayPriority&&r.pathwayPriority.length>0?function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=0,i=null,a=function(){var a=e[r],o=n.findIndex((function(e){return e.serviceLocation&&e.serviceLocation===a}));if(-1!==o&&!t.contains(n[o].serviceLocation))return i=n[o],1;r+=1};r<e.length&&!a(););return i}(r.pathwayPriority,e):null}(e)),r||(r=function(e){return e[0]}(e)),r},setConfig:function(e){e.blacklistController&&(t=e.blacklistController),e.contentSteeringController&&(n=e.contentSteeringController)},reset:function(){t.reset()}},t=He(r).create({updateEventName:h.A.SERVICE_LOCATION_LOCATION_BLACKLIST_CHANGED,addBlacklistEventName:h.A.SERVICE_LOCATION_LOCATION_BLACKLIST_ADD,enableExpiry:!1}),n=ke(r).getInstance(),e}Pr.__dashjs_factory_name="LocationSelector";var Lr=r.A.getClassFactory(Pr);function xr(){var e,t,n,r,i,a,o,s,c,l,f,m,E,v,A,y=this.context,T=(0,d.A)(y).getInstance(),_=(0,Pe.A)(y).getInstance();function S(){E=NaN,s=!1,a=!0,o=!1,I()}function I(){null!==v&&(clearTimeout(v),v=null)}function b(e){I(),o||(isNaN(e)&&!isNaN(E)&&(e=1e3*E),isNaN(e)||(l.debug("Refresh manifest in "+e+" milliseconds."),v=setTimeout(C,e)))}function R(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];s=!0;var r=m.getValue(),i=r.url;i&&(i=Fe.A.removeQueryParameterFromUrl(i,g.A.CMCD_QUERY_KEY));var a=null,o=e.getPatchLocation(r),u=c.select(o),l=null;if(u&&!n)i=u.url,a=u.serviceLocation,l=u.queryParams;else{var d=function(n){var r=e.getLocation(n),i=t.getSynthesizedLocationElements(r);return r.concat(i)}(r),h=c.select(d);h&&(i=h.url,a=h.serviceLocation,l=h.queryParams)}_.isRelative(i)&&(i=_.resolve(i,r.url)),f.load(i,a,l)}function N(t){if(t){if(e.getIsPatch(t)){var n=t;t=m.getValue();var r=e.isPatchValid(t,n),i=r;if(r){var u=e.getPublishTime(t);e.applyPatchToManifest(t,n);var c=e.getPublishTime(t);i=u.getTime()!==c.getTime()}if(!i)return l.debug("Patch provided is invalid, performing full manifest refresh"),void R(!0);t.loadedTime=new Date}}else(t=m.getValue()).loadedTime=new Date;if(m.getValue()&&m.getValue().type===Me.A.DYNAMIC&&t.type===Me.A.STATIC)return T.trigger(h.A.DYNAMIC_TO_STATIC),s=!1,void(o=!0);m.setValue(t);var f=new Date,d=(f.getTime()-t.loadedTime.getTime())/1e3;1e3*(E=e.getManifestUpdatePeriod(t,d))>2147483647&&(E=2147483.647),T.trigger(h.A.MANIFEST_UPDATED,{manifest:t}),l.info("Manifest has been refreshed at "+f+"["+f.getTime()/1e3+"] "),a||b()}function C(){a||(s?b(A.get().streaming.manifestUpdateRetryInterval):R())}function w(e){if(e.error)e.error.code===Ce.A.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE&&r.error(e.error);else{var t=e.manifest;!function(e){!function(e){var t=n.getExternalSubtitles();if(t&&0!==t.length){var r=e&&e.Period?e.Period.length:0;t.forEach((function(t){if(null===t.periodId&&r>1)l.warn("External subtitle with id ".concat(t.id," has no periodId and the MPD contains more than one period. Unable to add the external subtitle as it is not clear which period shall be used."));else if(1===r)D(e.Period[0],t);else{var n=e.Period.find((function(e){return e.id===t.periodId}));n?D(n,t):l.warn("External subtitle with id ".concat(t.id," has periodId ").concat(t.periodId," but the MPD does not contain a period with that id. Unable to add the external subtitle."))}}))}}(e)}(t),N(t)}}function D(e,t){if(!e||!e.AdaptationSet)return e;e.AdaptationSet.push(t.serializeToMpdParserFormat())}function O(){a=!1,b()}function M(){(a=!A.get().streaming.scheduling.scheduleWhilePaused)&&I()}function P(){s=!1}return i={getIsUpdating:function(){return s},initialize:function(){S(),T.on(h.A.STREAMS_COMPOSED,P,this),T.on(p.A.PLAYBACK_STARTED,O,this),T.on(p.A.PLAYBACK_PAUSED,M,this),T.on(h.A.INTERNAL_MANIFEST_LOADED,w,this)},refreshManifest:R,reset:function(){T.off(p.A.PLAYBACK_STARTED,O,this),T.off(p.A.PLAYBACK_PAUSED,M,this),T.off(h.A.STREAMS_COMPOSED,P,this),T.off(h.A.INTERNAL_MANIFEST_LOADED,w,this),S()},setConfig:function(i){i&&(i.manifestModel&&(m=i.manifestModel),i.adapter&&(e=i.adapter),i.manifestLoader&&(f=i.manifestLoader),i.errHandler&&(r=i.errHandler),i.locationSelector&&(c=i.locationSelector),i.settings&&(A=i.settings),i.contentSteeringController&&(t=i.contentSteeringController),i.customParametersModel&&(n=i.customParametersModel))},setManifest:function(e){N(e)}},l=(0,u.A)(y).getInstance().getLogger(i),c=Lr(y).create(),n=(0,_t.A)(y).getInstance(),i}xr.__dashjs_factory_name="ManifestUpdater";var Fr=r.A.getClassFactory(xr);function Ur(e,t){return function(n,r){for(var i=Br(n,"tag"),a=Br(null==r?"*":r,"range"),o=[],s=-1;++s<a.length;){var u=a[s].toLowerCase();if(t||"*"!==u){for(var c=-1,l=[];++c<i.length;)if(e(i[c].toLowerCase(),u)){if(!t)return i[c];o.push(i[c])}else l.push(i[c]);i=l}}return t?o:void 0}}n(84864),n(57465),n(87745),Ur((function(e,t){return"*"===t||e===t||e.includes(t+"-")}),!0);var kr=Ur((function(e,t){var n=e.split("-"),r=t.split("-"),i=0,a=0;if("*"!==r[a]&&n[i]!==r[a])return!1;for(i++,a++;a<r.length;)if("*"!==r[a]){if(!n[i])return!1;if(n[i]!==r[a]){if(1===n[i].length)return!1;i++}else i++,a++}else a++;return!0}),!0);function Br(e,t){var n=e&&"string"==typeof e?[e]:e;if(!n||"object"!==(0,Gn.A)(n)||!("length"in n))throw new Error("Invalid "+t+" `"+n+"`, expected non-empty string");return n}function Gr(){var e,t,n,r,i,a,o,s,c,l,f,m=this.context,E=(0,d.A)(m).getInstance();function v(e){if(e&&e.currentRepresentation&&e.currentRepresentation.mediaInfo&&e.currentRepresentation.mediaInfo.type){var t=e.currentRepresentation.mediaInfo.type;o[t]=e.currentRepresentation}}function A(e,t){return e&&n[t]&&n[t][e]?n[t][e].list:[]}function y(e,t){return e&&n[t]&&n[t][e]?n[t][e].current:null}function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.streamInfo){var i=e.type,o=e.streamInfo.id,s=y(i,o);if(n[o]&&n[o][i]&&(n[o][i].current=e,n[o][i].current&&(i!==g.A.TEXT&&!I(e,s)||i===g.A.TEXT&&e.isFragmented)&&E.trigger(h.A.CURRENT_TRACK_CHANGED,{oldMediaInfo:s,newMediaInfo:e,switchMode:r.get().streaming.trackSwitchMode[i],options:t},{streamId:o}),!t.hasOwnProperty("noSettingsSave")||!t.noSettingsSave)){var u=function(e){var t={lang:e.lang,viewpoint:e.viewpoint,roles:e.roles,accessibility:e.accessibility,audioChannelConfiguration:e.audioChannelConfiguration,codec:e.codec};return t.lang||t.viewpoint||t.role&&t.role.length>0||t.accessibility&&t.accessibility.length>0||t.audioChannelConfiguration&&t.audioChannelConfiguration.length>0?t:null}(e);if(!u||!n[o][i].storeLastSettings)return;u.roles&&(u.role=u.roles[0],delete u.roles),u.accessibility&&(u.accessibility=u.accessibility[0]),u.audioChannelConfiguration&&(u.audioChannelConfiguration=u.audioChannelConfiguration[0]),a[i]=u,f.setSavedMediaSettings(i,u)}}}function _(e,t){e&&t&&(i[e]=t)}function S(e){return e?i[e]:null}function I(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;if(e.isPreselection!==t.isPreselection)return!1;var n=(0,Se.A)(m).getInstance(),r=e.id===t.id,i=n.areEqual(e.viewpoint,t.viewpoint),a=e.lang===t.lang,o=e.codec===t.codec,s=n.areEqual(e.roles,t.roles),u=n.areEqual(e.accessibility,t.accessibility),c=n.areEqual(e.audioChannelConfiguration,t.audioChannelConfiguration),l=n.areEqual(e.supplementalProperties,t.supplementalProperties),f=n.areEqual(e.essentialProperties,t.essentialProperties);return r&&o&&i&&a&&s&&u&&c&&l&&f}function b(){n={},a={},o={},i={audio:null,video:null,text:null},E.off(p.A.REPRESENTATION_SWITCH,v,e)}function R(e,n,i){var a=[];return e.forEach((function(e){n(i,e)&&a.push(e)})),0!==a.length?(t.info("Filter-Function ("+n.name+") resulted in "+a.length+" tracks"),a):n===O&&r.get().streaming.assumeDefaultRoleAsMain&&V(i.role,{schemeIdUri:g.A.DASH_ROLE_SCHEME_ID,value:Me.A.MAIN})&&(t.info("no track with Role set to main - assuming main as default and searching again"),0!==(a=R(e,M,null)).length)?a:(t.info("Filter-Function ("+n.name+") resulted in no tracks; setting ignored"),e)}function N(e,t){try{return!e.lang||e.lang instanceof RegExp?t.lang.match(e.lang):""!==t.lang&&kr(t.lang,qt(e.lang)).length>0}catch(e){return!1}}function C(e,t){return void 0===e.index||null===e.index||t.index===e.index}function w(e,t){return void 0===e.id||null===e.id||t.id===e.id}function D(e,t){return!e.viewpoint||!!t.viewpoint.filter((function(t){return V(t,e.viewpoint)}))[0]}function O(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!!t.roles&&(!e.role||!!t.roles.filter((function(t){return V(t,e.role)}))[0]||t.type===g.A.AUDIO&&n)}function M(e,t){return!t.roles||0===t.roles.length}function P(e,t){return e.accessibility?!!t.accessibility.filter((function(t){return V(t,e.accessibility)}))[0]:!t.accessibility.length}function L(e,t){return!e.audioChannelConfiguration||!!t.audioChannelConfiguration.filter((function(t){return V(t,e.audioChannelConfiguration)}))[0]}function x(e,t){return!e.codec||e.codec===t.codec}function F(e){var t=0,n=[];return e.forEach((function(e){isNaN(e.selectionPriority)||(e.selectionPriority>t?(t=e.selectionPriority,n=[e]):e.selectionPriority===t&&n.push(e))})),n}function U(e){var t,n=0,r=[];return e.forEach((function(e){(t=Math.max.apply(Math,e.bitrateList.map((function(e){return e.bandwidth}))))>n?(n=t,r=[e]):t===n&&r.push(e)})),r}function k(e){return e[0]&&e[0].type===g.A.VIDEO?function(e){var t,n=1/0,r=[];return e.forEach((function(e){var i=e.bitrateList.reduce((function(e,t){var n=Math.max(1,t.width*t.height);return e+t.bandwidth/n}),0);(t=i/e.bitrateList.length)<n?(n=t,r=[e]):t===n&&r.push(e)})),r}(e):e[0]&&e[0].type===g.A.AUDIO?function(e){var t=1/0,n=[];return e.forEach((function(e){var r=e.audioChannelConfiguration.reduce((function(e,t){return e+(ft(t)||0)}),0)/e.audioChannelConfiguration.length;e.hasOwnProperty("supplementalProperties")&&e.supplementalProperties.some((function(e){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"===e.schemeIdUri&&"JOC"===e.value}))&&(r=16),r||(r=1);var i=e.bitrateList.reduce((function(e,t){return e+t.bandwidth/r}),0)/e.bitrateList.length;i<t?(t=i,n=[e]):i===t&&n.push(e)})),n}(e):e}function B(e){var t,n=0,r=[];return e.forEach((function(e){(t=e.representationCount)>n?(n=t,r=[e]):t===n&&r.push(e)})),r}function G(e,n){if(e===g.A.TEXT)return function(e){if(!e||0===e.length)return null;var t=e.filter((function(e){return!(e&&e.roles&&e.roles.length>0)||e.roles.every((function(e){return e.schemeIdUri!==g.A.DASH_ROLE_SCHEME_ID||e.value!==Me.A.FORCED_SUBTITLE}))}));return t.length>0?t[0]:e[0]}(n);var i,a=s.getCustomInitialTrackSelectionFunction();if(i=function(e){try{var n;return n=function(e){try{var n=e.filter((function(e){var t=e.type;return e.bitrateList.some((function(e){var n=c.getAbrBitrateParameter("maxBitrate",t),r=c.getAbrBitrateParameter("minBitrate",t);return!(n>-1&&e.bandwidth>1e3*n||r>-1&&e.bandwidth<1e3*r)}))}));return n.length>0?n:e}catch(n){return t.error(n),e}}(e),n=function(e){try{if(!r.get().streaming.abr.limitBitrateByPortal)return e;var n=l.getVideoElementSize().elementWidth,i=e.filter((function(e){return e.type!==g.A.VIDEO||e.bitrateList.some((function(e){return e.width<=n}))}));return i.length>0?i:e}catch(n){return t.error(n),e}}(n),n}catch(n){return t.error(n),e}}(n),a&&"function"==typeof a)i=a(i);else if(o[e])i=function(e,t){if(!e||0===e.length||!t||!o[t])return e;var n=o[t].bandwidth;if(!n||isNaN(n))return e;var r={min:NaN,track:null};return e.forEach((function(e){e.bitrateList.forEach((function(t){var i=Math.abs(t.bandwidth-n);(isNaN(r.min)||i<r.min)&&(r.min=i,r.track=e)}))})),r.track?[r.track]:e}(i,e);else if(r.get().streaming.ignoreSelectionPriority||(t.info("Trying to find track with highest selectionPriority"),i=function(e){return F(e)}(i)),i.length>1&&r.get().streaming.prioritizeRoleMain&&(t.info("Trying to find a main track"),i=R(i,O,{role:{schemeIdUri:g.A.DASH_ROLE_SCHEME_ID,value:Me.A.MAIN}})),i.length>1){t.info("Selecting track based on selectionModeForInitialTrack");var u=r.get().streaming.selectionModeForInitialTrack;switch(u){case g.A.TRACK_SELECTION_MODE_HIGHEST_BITRATE:i=function(e){var t=U(e);return t.length>1&&(t=B(t)),t}(i);break;case g.A.TRACK_SELECTION_MODE_FIRST_TRACK:i=H(i);break;case g.A.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY:i=Y(i);break;case g.A.TRACK_SELECTION_MODE_WIDEST_RANGE:i=function(e){var t=B(e);return t.length>1&&(t=U(e)),t}(i);break;case g.A.TRACK_SELECTION_MODE_LOWEST_STARTUP_DELAY:i=function(e){var t=e.filter((function(e){return!(!e.segmentSequenceProperties||0===e.segmentSequenceProperties.length)&&e.segmentSequenceProperties.some((function(e){return e.isBootstrapConfiguration()}))}));return Y(t.length>0?t:e)}(i);break;default:t.warn("Track selection mode ".concat(u," is not supported. Falling back to TRACK_SELECTION_MODE_FIRST_TRACK")),i=H(i)}}return i.length>0?i[0]:n[0]}function H(e){return e[0]}function Y(e){var t=k(e);return t.length>1&&(t=U(t)),t}function V(e,t){return!(!e||!t)&&JSON.stringify({schemeIdUri:e.schemeIdUri,value:e.value})===JSON.stringify({schemeIdUri:t.schemeIdUri,value:t.value})}return e={addTrack:function(e){if(e){var i=e.type;if((a=i)===g.A.AUDIO||a===g.A.VIDEO||a===g.A.TEXT||a===g.A.IMAGE){var a,o,s=e.streamInfo.id;n[s]||(n[s]={audio:{list:[],storeLastSettings:o=r.get().streaming.saveLastMediaSettingsForCurrentStreamingSession,current:null},video:{list:[],storeLastSettings:o,current:null},text:{list:[],storeLastSettings:o,current:null},image:{list:[],storeLastSettings:o,current:null}});for(var u=n[s][i].list,c=0,l=u.length;c<l;++c)if(I(u[c],e))return void t.info("track not added as it is already set (this track-index="+e.index+" - existing track.index="+u[c].index+")");t.info("addTrack with track.codec='"+e.codec+"', track.type='"+e.type+"', track.id='"+e.id+"', track.index="+e.index),u.push(e)}else t.info("track not added (_isMultiTrackSupportedByType), track.index="+e.index)}},areTracksEqual:I,clearDataForStream:function(e){n[e]&&delete n[e]},getCurrentTrackFor:y,getInitialSettings:S,getTracksFor:A,getTracksWithHighestSelectionPriority:F,getTracksWithHighestBitrate:U,getTracksWithHighestEfficiency:k,getTracksWithWidestRange:B,initialize:function(){E.on(p.A.REPRESENTATION_SWITCH,v,e)},isCurrentTrack:function(e){if(!e)return!1;var t=e.type,r=e.streamInfo.id;return n[r]&&n[r][t]&&I(n[r][t].current,e)},matchSettings:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{var i=!1;if(e.lang){if(e.lang instanceof RegExp)i=n.lang.match(e.lang);else if(""!==n.lang){var a=qt(e.lang);a&&(i=kr(n.lang,a).length>0)}}else i=!0;var o=void 0===e.index||null===e.index||n.index===e.index,s=!e.viewpoint||!!n.viewpoint.filter((function(t){return V(t,e.viewpoint)}))[0],u=!e.role||!!n.roles.filter((function(t){return V(t,e.role)}))[0],c=!e.accessibility||!!n.accessibility.filter((function(t){return V(t,e.accessibility)}))[0],l=!e.audioChannelConfiguration||!!n.audioChannelConfiguration.filter((function(t){return V(t,e.audioChannelConfiguration)}))[0];return i&&o&&s&&(u||n.type===g.A.AUDIO&&r)&&c&&l}catch(e){return t.error(e),!1}},matchSettingsAccessibility:P,matchSettingsAudioChannelConfig:L,matchSettingsIndex:C,matchSettingsLang:N,matchSettingsRole:O,matchSettingsViewPoint:D,reset:b,saveTextSettingsDisabled:function(){f.setSavedMediaSettings(g.A.TEXT,null)},selectInitialTrack:G,setConfig:function(e){e&&(e.domStorage&&(f=e.domStorage),e.settings&&(r=e.settings),e.customParametersModel&&(s=e.customParametersModel),e.mediaPlayerModel&&(c=e.mediaPlayerModel),e.videoModel&&(l=e.videoModel))},setInitialMediaSettingsForType:function(e,n){var i=a[e]||S(e),o=A(e,n.id),s=[];i&&0!==Object.keys(i).length||((i=f.getSavedMediaSettings(e))&&delete i.codec,_(e,i)),o&&0!==o.length&&(s=r.get().streaming.includePreselectionsForInitialTrackSelection?Array.from(o):o.filter((function(e){return!e.isPreselection})),i&&(t.info("Filtering "+s.length+" "+e+" tracks based on settings"),s=R(s,w,i),s=R(s,N,i),s=R(s,C,i),s=R(s,D,i),e===g.A.AUDIO&&a[e]||(s=R(s,O,i)),s=R(s,P,i),s=R(s,L,i),s=R(s,x,i),t.info("Filtering "+e+" tracks ended, found "+s.length+" matching track(s).")),s.length>1?T(G(e,s)):T(s[0]))},setInitialSettings:_,setTrack:T},t=(0,u.A)(m).getInstance().getLogger(e),b(),e}Ur((function(e,t){for(var n=t;;){if("*"===n||e===n)return!0;var r=n.lastIndexOf("-");if(r<0)return!1;"-"===n.charAt(r-2)&&(r-=2),n=n.slice(0,r)}}),!1),Gr.__dashjs_factory_name="MediaController";var Hr=r.A.getSingletonFactory(Gr);r.A.updateSingletonFactory(Gr.__dashjs_factory_name,Hr);var Yr=Hr,Vr=-.5;function qr(){var e,t,n,r,i=this.context,a=(0,c.A)(i).getInstance();function o(e,n){return isNaN(e)?0:e>0?(n&&t.warn("Supplied minimum playback rate is a positive value when it should be negative or 0. The supplied rate will not be applied and set to 0: 100% playback speed."),0):e<Vr?(n&&t.warn("Supplied minimum playback rate is out of range and will be limited to ".concat(Vr,": ").concat(-50,"% playback speed.")),Vr):e}function s(e,n){return isNaN(e)?0:e<0?(n&&t.warn("Supplied maximum playback rate is a negative value when it should be negative or 0. The supplied rate will not be applied and set to 0: 100% playback speed."),0):e>1?(n&&t.warn("Supplied maximum playback rate is out of range and will be limited to ".concat(1,": ").concat(200,"% playback speed.")),1):e}function l(e,n){return isNaN(e)?0:e<0?(n&&t.warn("Supplied step algorithm value is a negative value when it should be positive or 0. The supplied value will not be applied and set to 0."),0):e<0?(n&&t.warn("Supplied step algorithm value is out of range and will be limited to ".concat(0)),0):e}function f(){var e=d(),t=n.getLiveDelay();return!isNaN(t)&&t>0?Math.min(e,t):e}function d(){return a.get().streaming.buffer.bufferTimeDefault>0?a.get().streaming.buffer.bufferTimeDefault:h()?20:12}function h(){return null!==a.get().streaming.buffer.fastSwitchEnabled?a.get().streaming.buffer.fastSwitchEnabled:!n.getLowLatencyModeEnabled()}return e={getAbrBitrateParameter:function(e,t){try{var n=a.get().streaming.abr[e][t];if(!isNaN(n)&&-1!==n)return n;var i=r.getServiceDescriptionSettings();return i&&i[e]&&!isNaN(i[e][t])?i[e][t]:-1}catch(e){return-1}},getBufferTimeDefault:f,getBufferTimeDefaultUnadjusted:d,getCatchupMaxDrift:function(){if(!isNaN(a.get().streaming.liveCatchup.maxDrift))return a.get().streaming.liveCatchup.maxDrift;var e=r.getServiceDescriptionSettings();return e&&e.liveCatchup&&!isNaN(e.liveCatchup.maxDrift)&&e.liveCatchup.maxDrift>=0?e.liveCatchup.maxDrift:12},getCatchupModeEnabled:function(){return null!==a.get().streaming.liveCatchup.enabled?a.get().streaming.liveCatchup.enabled:n.getInitialCatchupModeActivated()},getCatchupPlaybackRates:function(e){var t=a.get().streaming.liveCatchup.playbackRate;if(!isNaN(t.min)||!isNaN(t.max))return{min:o(t.min,e),max:s(t.max,e)};var n=r.getServiceDescriptionSettings();if(n&&n.liveCatchup&&(!isNaN(n.liveCatchup.playbackRate.min)||!isNaN(n.liveCatchup.playbackRate.max))){var i=n.liveCatchup.playbackRate;return{min:o(i.min,e),max:s(i.max,e)}}return{min:-.5,max:.5}},getCatchupStepSettings:function(e){var t=a.get().streaming.liveCatchup.step;return isNaN(t.start.min)&&isNaN(t.start.max)&&isNaN(t.stop.min)&&isNaN(t.stop.max)?{start:{min:0,max:1},stop:{min:0,max:1}}:{start:{min:l(t.start.min,e),max:l(t.start.max,e)},stop:{min:l(t.stop.min,e),max:l(t.stop.max,e)}}},getFastSwitchEnabled:h,getInitialBufferLevel:function(){var e=a.get().streaming.buffer.initialBufferLevel;return isNaN(e)||e<0?0:Math.min(f(),e)},getRetryAttemptsForType:function(e){var t=isNaN(a.get().streaming.retryAttempts.lowLatencyMultiplyFactor)?5:a.get().streaming.retryAttempts.lowLatencyMultiplyFactor;return n.getLowLatencyModeEnabled()?a.get().streaming.retryAttempts[e]*t:a.get().streaming.retryAttempts[e]},getRetryIntervalsForType:function(e){var t=isNaN(a.get().streaming.retryIntervals.lowLatencyReductionFactor)?10:a.get().streaming.retryIntervals.lowLatencyReductionFactor;return n.getLowLatencyModeEnabled()?a.get().streaming.retryIntervals[e]/t:a.get().streaming.retryIntervals[e]},getScheduleTimeout:function(){return n.getLowLatencyModeEnabled()?a.get().streaming.scheduling.lowLatencyTimeout:a.get().streaming.scheduling.defaultTimeout},reset:function(){},setConfig:function(e){e.playbackController&&(n=e.playbackController),e.serviceDescriptionController&&(r=e.serviceDescriptionController)}},t=(0,u.A)(i).getInstance().getLogger(e),e}qr.__dashjs_factory_name="MediaPlayerModel";var Kr=r.A.getSingletonFactory(qr);function jr(){var e,t,n,r,i,a,s,c,l,f,m,E,v,A,y,T,_,S,I,b,R,N,C,w,D=this.context,O=(0,d.A)(D).getInstance();function M(){F(),y=!1,f=0,A=0,t=0,v=!1,E=!1,r=!1,_=NaN,l=NaN,C&&(O.off(h.A.DATA_UPDATE_COMPLETED,X,i),O.off(h.A.MANIFEST_UPDATED,Ae,i),O.off(h.A.STREAMS_COMPOSED,ye,i),O.off(p.A.PLAYBACK_ENDED,he,i),O.off(p.A.STREAM_INITIALIZING,Ee,i),O.off(p.A.REPRESENTATION_SWITCH,ve,i),O.off(p.A.BUFFER_LEVEL_STATE_CHANGED,J,i),Q(),C.removeEventListener("canplay",$),C.removeEventListener("canplaythrough",Z),C.removeEventListener("ended",fe),C.removeEventListener("error",ge),C.removeEventListener("loadeddata",le),C.removeEventListener("loadedmetadata",ce),C.removeEventListener("pause",re),C.removeEventListener("play",ee),C.removeEventListener("playing",ne),C.removeEventListener("progress",se),C.removeEventListener("ratechange",ue),C.removeEventListener("seeked",ae),C.removeEventListener("seeking",ie),C.removeEventListener("stalled",me),C.removeEventListener("timeupdate",oe),C.removeEventListener("volumechange",de),C.removeEventListener("waiting",te)),w=null,C=null,R=null,s=null}function P(){return parseFloat((L(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null)-G()).toFixed(5))}function L(e){var t=e||R;return t.start+t.duration}function x(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];R&&C&&C.getElement()?(e&&s&&B(G()),C.play()):y=!0}function F(){R&&C&&C.pause()}function U(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];R&&C&&C.getElement()&&e!==(isNaN(_)?C.getTime():_)&&((a=!0===n)||(_=e),m.info("Requesting seek to time: "+e+(a?" (internal)":"")),s&&r&&B(e),C.setCurrentTime(e,t))}function k(){if(R&&C&&s){var e=b&&b.hasVideoTrack()?g.A.VIDEO:g.A.AUDIO,t=n.getCurrentDVRInfo(e);return t&&t.range?t.range.end:0}}function B(t){var n=new Date(N.getClientReferenceTime()),r=e.getRegularPeriods()[0],i=N.calcPresentationTimeFromWallTime(n,r);f=i-t}function G(){return R&&C?C.getTime():null}function H(){return R&&C?C.isPaused():null}function Y(){return R&&C?C.isSeeking():null}function V(){return R&&C?C.isStalled():null}function q(){return R&&C?C.getPlaybackRate():null}function K(){return R&&C?C.getEnded():null}function j(){return s}function z(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!H()&&s&&0!==C.getReadyState()&&!Y()&&!v){e||(e=b.hasVideoTrack()?g.A.VIDEO:g.A.AUDIO);var t=G(),r=function(e,t){var r=n.getCurrentDVRInfo(t),i=r?r.range:null;return i?e>i.end?Math.max(i.end-f,i.start):e>0&&e+.25<i.start&&Math.abs(e-i.start)<31536e4?E?Math.max(i.end-f,i.start):i.start:e:NaN}(t,e);!isNaN(r)&&r!==t&&!Y()&&(V()||T||1===C.getReadyState())&&(m.debug("UpdateCurrentTime: Seek to actual time: ".concat(r," from currentTime: ").concat(t)),U(r,!1,!1))}}function W(){null===w&&(w=setInterval((function(){!function(){if(O.trigger(h.A.WALLCLOCK_TIME_UPDATED,{isDynamic:s,time:new Date}),j()){var e=Date.now();(isNaN(l)||e>l+I.get().streaming.liveUpdateTimeThresholdInMilliseconds)&&(b.addDVRMetric(),H()?function(){var e=Date.now();(!c||e>c+500)&&(c=e,oe())}():z(),l=e)}}()}),I.get().streaming.wallclockTimeUpdateInterval))}function Q(){clearInterval(w),w=null}function X(e){var t=e.currentRepresentation,n=t?t.mediaInfo.streamInfo:null;null!==n&&R.id===n.id&&(R=n)}function $(){O.trigger(h.A.CAN_PLAY)}function Z(){O.trigger(h.A.CAN_PLAY_THROUGH)}function J(e){e.streamId===b.getActiveStreamInfo().id&&(T=e.state===o.BUFFER_EMPTY,I.get().streaming.buffer.setStallState&&C.setStallState(e.mediaType,e.state===o.BUFFER_EMPTY))}function ee(){m.info("Native video element event: play"),z(),W(),O.trigger(h.A.PLAYBACK_STARTED,{startTime:G()})}function te(){m.info("Native video element event: waiting"),O.trigger(h.A.PLAYBACK_WAITING,{playingTime:G()})}function ne(){m.info("Native video element event: playing"),a=!1,O.trigger(h.A.PLAYBACK_PLAYING,{playingTime:G()})}function re(){m.info("Native video element event: pause"),O.trigger(h.A.PLAYBACK_PAUSED,{ended:K()})}function ie(){if(!a){var e=G();isNaN(_)||_===e||(e=_),_=NaN,m.info("Seeking to: "+e),W(),O.trigger(h.A.PLAYBACK_SEEKING,{seekTime:e,streamId:R.id})}}function ae(){m.info("Native video element event: seeked"),a=!1,O.trigger(h.A.PLAYBACK_SEEKED,{streamId:R.id})}function oe(){R&&O.trigger(h.A.PLAYBACK_TIME_UPDATED,{timeToEnd:P(),time:G(),streamId:R.id})}function se(){O.trigger(h.A.PLAYBACK_PROGRESS,{streamId:R.id})}function ue(){var e=q();m.info("Native video element event: ratechange: ",e),O.trigger(h.A.PLAYBACK_RATE_CHANGED,{playbackRate:e})}function ce(){m.info("Native video element event: loadedmetadata"),O.trigger(h.A.PLAYBACK_METADATA_LOADED),W()}function le(){m.info("Native video element event: loadeddata"),O.trigger(h.A.PLAYBACK_LOADED_DATA)}function fe(){m.info("Native video element event: ended"),F(),Q();var e=b?b.getActiveStreamInfo():null;e&&O.trigger(h.A.PLAYBACK_ENDED,{isLast:e.isLast})}function de(){O.trigger(h.A.PLAYBACK_VOLUME_CHANGED)}function he(e){if(w&&e.isLast){m.info("onPlaybackEnded -- PLAYBACK_ENDED but native video element didn't fire ended");var t=e.seekTime?e.seekTime:L();C.setCurrentTime(t),F(),Q()}}function ge(e){var t=e.target||e.srcElement;O.trigger(h.A.PLAYBACK_ERROR,{error:t.error})}function pe(){s=!1}function me(e){O.trigger(h.A.PLAYBACK_STALLED,{e:e})}function Ee(e){var t;(t=e.mediaInfo)&&t.supplementalProperties&&t.supplementalProperties.find((function(e){return e.schemeIdUri===g.A.SUPPLEMENTAL_PROPERTY_DVB_LL_SCHEME}))&&(m.debug("Low Latency critical SupplementalProperty set: Enabling low Latency"),E=!0)}function ve(e){var t=b.getActiveStreamInfo();e&&t&&e.currentRepresentation&&e.streamId&&e.streamId===t.id&&e.mediaType&&(e.mediaType===g.A.VIDEO||e.mediaType===g.A.AUDIO)&&(E=!1===e.currentRepresentation.availabilityTimeComplete||e.currentRepresentation.k>1)&&!r&&(r=!0)}function Ae(){v=!0}function ye(){v=!1}return i={computeAndSetLiveDelay:function(n,r){var i,a,o,s=!isNaN(n)&&isFinite(n)?n:NaN,u=e.getSuggestedPresentationDelay(),c=S.getServiceDescriptionSettings();return i=isNaN(I.get().streaming.delay.liveDelay)?null===I.get().streaming.delay.liveDelayFragmentCount||isNaN(I.get().streaming.delay.liveDelayFragmentCount)||isNaN(s)?c&&!isNaN(c.liveDelay)&&c.liveDelay>0?c.liveDelay:!0===I.get().streaming.delay.useSuggestedPresentationDelay&&null!==u&&!isNaN(u)&&u>0?u:isNaN(s)?r&&!isNaN(r.minBufferTime)?4*r.minBufferTime:4*R.manifestInfo.minBufferTime:4*s:s*I.get().streaming.delay.liveDelayFragmentCount:I.get().streaming.delay.liveDelay,null!==(o=e.getAvailabilityStartTime())&&(t=o),a=r&&r.dvrWindowSize>0?Math.min(i,r.dvrWindowSize):i,f=a,A=a,a},getAvailabilityStartTime:function(){return t},getBufferLevel:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=null;return b.getActiveStreamProcessors().forEach((function(n){if(!e||0===e.length||-1===e.indexOf(n.getType())){var r=n.getBufferLevel();t=null===t?r:Math.min(t,r)}})),t},getCurrentLiveLatency:function(){if(!s||isNaN(t))return NaN;var e=G();if(isNaN(e)||0===e)return 0;var n=(new Date).getTime()+1e3*N.getClientTimeOffset();return Math.max(((n-t-1e3*e)/1e3).toFixed(3),0)},getEnded:K,getInitialCatchupModeActivated:function(){return r},getIsDynamic:j,getIsManifestUpdateInProgress:function(){return v},getLiveDelay:function(){return f},getLowLatencyModeEnabled:function(){return E},getOriginalLiveDelay:function(){return A},getPlaybackRate:q,getPlaybackStalled:function(){return T},getPlayedRanges:function(){return R&&C?C.getPlayedRanges():null},getStreamController:function(){return b},getStreamEndTime:L,getTime:G,getTimeToStreamEnd:P,initialize:function(e,t){R=e,!0!==t&&(C.addEventListener("canplay",$),C.addEventListener("canplaythrough",Z),C.addEventListener("ended",fe),C.addEventListener("error",ge),C.addEventListener("loadeddata",le),C.addEventListener("loadedmetadata",ce),C.addEventListener("pause",re),C.addEventListener("play",ee),C.addEventListener("playing",ne),C.addEventListener("progress",se),C.addEventListener("ratechange",ue),C.addEventListener("seeked",ae),C.addEventListener("seeking",ie),C.addEventListener("stalled",me),C.addEventListener("timeupdate",oe),C.addEventListener("volumechange",de),C.addEventListener("waiting",te),s=R.manifestInfo.isDynamic,T=!1,a=!1,O.on(h.A.DATA_UPDATE_COMPLETED,X,i),O.on(h.A.MANIFEST_UPDATED,Ae,i),O.on(h.A.STREAMS_COMPOSED,ye,i),O.on(p.A.PLAYBACK_ENDED,he,i,{priority:d.A.EVENT_PRIORITY_HIGH}),O.on(p.A.STREAM_INITIALIZING,Ee,i),O.on(p.A.REPRESENTATION_SWITCH,ve,i),O.on(p.A.BUFFER_LEVEL_STATE_CHANGED,J,i),O.on(p.A.DYNAMIC_TO_STATIC,pe,i),y&&(y=!1,x()))},isPaused:H,isProgressing:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500;return new Promise((function(t){var n=-1,r=null,a=function(e){clearTimeout(r),r=null,O.off(p.A.PLAYBACK_TIME_UPDATED,o,i),t(e)},o=function(e){n<0?n=e.time:e.time>n+.1&&a(!0)};r=setTimeout((function(){a(!1)}),e),O.on(p.A.PLAYBACK_TIME_UPDATED,o,i)}))},isSeeking:Y,isStalled:V,pause:F,play:x,reset:M,seek:U,seekToCurrentLive:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=k();0!==r&&U(r-f,e,t,n)},seekToOriginalLive:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=k();0!==r&&U(r-(f=A),e,t,n)},setConfig:function(t){t&&(t.streamController&&(b=t.streamController),t.serviceDescriptionController&&(S=t.serviceDescriptionController),t.dashMetrics&&(n=t.dashMetrics),t.adapter&&(e=t.adapter),t.videoModel&&(C=t.videoModel),t.timelineConverter&&(N=t.timelineConverter),t.settings&&(I=t.settings))},updateCurrentTime:z},m=(0,u.A)(D).getInstance().getLogger(i),M(),i}jr.__dashjs_factory_name="PlaybackController";var zr=r.A.getSingletonFactory(jr),Wr=n(1721),Qr=function(){return(0,H.A)((function e(){(0,Y.A)(this,e),this.availabilityEndTime=NaN,this.availabilityStartTime=NaN,this.duration=NaN,this.index=null,this.indexRange=null,this.isPartialSegment=!1,this.media=null,this.mediaRange=null,this.mediaUrl=null,this.mediaStartTime=NaN,this.presentationStartTime=NaN,this.replacementNumber=NaN,this.replacementTime=null,this.representation=null,this.wallStartTime=NaN}),[{key:"assignAttributes",value:function(e){for(var t in e)e.hasOwnProperty(t)&&this.hasOwnProperty(t)&&(this[t]=e[t])}}])}();function Xr(e,t,n){return t=(0,Cn.A)(t),(0,Nn.A)(e,$r()?Reflect.construct(t,n||[],(0,Cn.A)(e).constructor):t.apply(e,n))}function $r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return($r=function(){return!!e})()}var Zr=function(e){function t(){return(0,Y.A)(this,t),Xr(this,t)}return(0,wn.A)(t,e),(0,H.A)(t)}(Qr);function Jr(){var e,t,n,r,i,a,o,s,u,c,l,f,d=this.context;function h(e,n,i,a){var s=null,u=e?f.resolve(e.path):null,c=a||{init:!0,url:u?u.url:void 0,range:{start:0,end:1500},searching:!1,bytesLoaded:0,bytesToLoad:1500,mediaType:n,representation:e};t.debug("Start searching for initialization.");var l=m(c);o.load({request:l,success:function(t){if(c.bytesLoaded=c.range.end,!(s=r.findInitRange(t)))return c.range.end=c.bytesLoaded+c.bytesToLoad,h(e,n,i,c);e.range=s,i(e)},error:function(){i(e)}}),t.debug("Perform init search: "+c.url)}function g(e,n,i,a,s,u){if(i&&(void 0===i.start||void 0===i.end)){var c=i?i.toString().split("-"):null;i=c?{start:parseFloat(c[0]),end:parseFloat(c[1])}:null}s=s||p;var l=null,d=null,h=!!i,E=e?f.resolve(e.path):null,v={init:!1,url:E?E.url:void 0,range:h?i:{start:0,end:1500},searching:!h,bytesLoaded:u?u.bytesLoaded:0,bytesToLoad:1500,mediaType:n,representation:e},A=m(v);o.load({request:A,success:function(i){var o=v.bytesToLoad,u=i.byteLength;if(v.bytesLoaded=v.range.end-v.range.start,l=r.parse(i),(d=l.getBox("sidx"))&&d.isComplete){var c,f,h=d.references;if(null!=h&&h.length>0&&(c=1===h[0].reference_type),c){var p,m,E,A;t.debug("Initiate multiple SIDX load."),v.range.end=v.range.start+d.size;var y=[],T=0,_=(d.offset||v.range.start)+d.size,S=function(t){t?(y=y.concat(t),++T>=m&&(y.sort((function(e,t){return e.startTime-t.startTime<0?-1:0})),s(y,e,a))):s(null,e,a)};for(p=0,m=h.length;p<m;p++)E=_,A=_+h[p].referenced_size-1,_+=h[p].referenced_size,g(e,n,{start:E,end:A},a,S,v)}else t.debug("Parsing segments from SIDX. representation "+n+" - id: "+e.id+" for range : "+v.range.start+" - "+v.range.end),f=function(e,t){for(var n,r,i,a,o=e.references,s=o.length,u=e.timescale,c=e.earliest_presentation_time,l=t.range.start+e.offset+e.first_offset+e.size,f=[],d=0;d<s;d++)i=o[d].subsegment_duration,a=o[d].referenced_size,(n=new Zr).duration=i,n.startTime=c,n.timescale=u,r=l+a-1,n.mediaRange=l+"-"+r,f.push(n),c+=i,l+=a;return f}(d,v),s(f,e,a)}else{if(d)v.range.start=d.offset||v.range.start,v.range.end=v.range.start+(d.size||o);else{if(u<v.bytesLoaded)return void s(null,e,a);var I=l.getLastBox();I&&I.size?(v.range.start=I.offset+I.size,v.range.end=v.range.start+o):v.range.end+=o}g(e,n,v.range,a,null,v)}},error:function(){s(null,e,a)}}),t.debug("Perform SIDX load for type ".concat(n," : ").concat(v.url," with range ").concat(v.range.start," - ").concat(v.range.end))}function p(e,t,n){n({segments:e,representation:t,error:e?void 0:new je.A(s.SEGMENT_BASE_LOADER_ERROR_CODE,s.SEGMENT_BASE_LOADER_ERROR_MESSAGE)})}function m(e){if(e.url){var t=new J.A;return t.setInfo(e),t}}return e={setConfig:function(o){o.baseURLController&&(f=o.baseURLController),o.dashMetrics&&(i=o.dashMetrics),o.mediaPlayerModel&&(a=o.mediaPlayerModel),o.errHandler&&(n=o.errHandler),o.boxParser&&(r=o.boxParser),o.debug&&(t=o.debug.getLogger(e)),o.errors&&(s=o.errors),o.urlUtils&&(l=o.urlUtils),o.constants&&(u=o.constants),o.dashConstants&&(c=o.dashConstants)},initialize:function(){o=(0,we.A)(d).create({errHandler:n,dashMetrics:i,mediaPlayerModel:a,boxParser:r,errors:s,urlUtils:l,constants:u,dashConstants:c})},loadInitialization:function(e,t){return new Promise((function(n){h(e,t,n)}))},loadSegments:function(e,t,n){return new Promise((function(r){g(e,t,n,r)}))},reset:function(){o&&(o.abort(),o=null)}}}Jr.__dashjs_factory_name="SegmentBaseLoader";var ei=r.A.getSingletonFactory(Jr);function ti(e){var t;e=e||{};var n=new DataView(e.data),r=0;function i(e,t){var i=!0,a=0;if(void 0===t&&(t=!1),e.tag>16777215?(n.getUint32(r)!==e.tag&&(i=!1),a=4):e.tag>65535?(256*n.getUint16(r)+n.getUint8(r+2)!==e.tag&&(i=!1),a=3):e.tag>255?(n.getUint16(r)!==e.tag&&(i=!1),a=2):(n.getUint8(r)!==e.tag&&(i=!1),a=1),!i&&e.required&&!t)throw new Error("required tag not found");return i&&(r+=a),i}function a(e){var t=1,i=128,a=-1,o=0,s=n.getUint8(r),u=0;for(u=0;u<8;u+=1){if((s&i)===i){o=void 0===e?s&~i:s,a=u;break}i>>=1}for(u=0;u<a;u+=1,t+=1)o=o<<8|255&n.getUint8(r+t);return r+=t,o}return t={getPos:function(){return r},setPos:function(e){r=e},consumeTag:i,consumeTagAndSize:function(e,t){var n=i(e,t);return n&&a(),n},parseTag:function(e){var n;return i(e),n=a(),t[e.parse](n)},skipOverElement:function(e,t){var n,o=i(e,t);return o&&(n=a(),r+=n),o},getMatroskaCodedNum:a,getMatroskaFloat:function(e){var t;switch(e){case 4:t=n.getFloat32(r),r+=4;break;case 8:t=n.getFloat64(r),r+=8}return t},getMatroskaUint:function(e){if(e>4)return function(e){for(var t=Math.floor(Number.MAX_SAFE_INTEGER/256),i=0,a=0;a<e;a+=1){if(i>t)throw new Error("Value exceeds safe integer limit");i*=256;var o=n.getUint8(r+a);if(i>Number.MAX_SAFE_INTEGER-o)throw new Error("Value exceeds safe integer limit");i+=o}return r+=e,i}(e);for(var t=0,i=0;i<e;i+=1)t<<=8,t|=255&n.getUint8(r+i);return r+=e,t>>>0},moreData:function(){return r<n.byteLength}}}n(64601),ti.__dashjs_factory_name="EBMLParser";var ni=r.A.getClassFactory(ti);function ri(){var e,t,n,r,i,a,o,s,u,c=this.context;function l(e){var t=new J.A;return t.setInfo(e),t}return e={setConfig:function(n){if(!(n.baseURLController&&n.dashMetrics&&n.mediaPlayerModel&&n.errHandler))throw new Error(g.A.MISSING_CONFIG_ERROR);u=n.baseURLController,i=n.dashMetrics,a=n.mediaPlayerModel,r=n.errHandler,s=n.errors,t=n.debug.getLogger(e)},initialize:function(){o=(0,we.A)(c).create({errHandler:r,dashMetrics:i,mediaPlayerModel:a,errors:s})},loadInitialization:function(e,n){return new Promise((function(r){var i=null,a=e?u.resolve(e.path):null,s=e?e.range.split("-"):null,c={range:{start:s?parseFloat(s[0]):null,end:s?parseFloat(s[1]):null},request:i,url:a?a.url:void 0,init:!0,mediaType:n};t.info("Start loading initialization."),i=l(c),o.load({request:i,success:function(){r(e)},error:function(){r(e)}}),t.debug("Perform init load: "+c.url)}))},loadSegments:function(e,r,i){return new Promise((function(a){var f=null,d=e?u.resolve(e.path):null,h=d?d.url:void 0;f=l({bytesLoaded:0,bytesToLoad:8192,range:{start:0,end:8192},request:f,url:h,init:!1,mediaType:r,representation:e}),t.debug("Parsing ebml header"),o.load({request:f,success:function(r){!function(e,r,i,a){if(e&&0!==e.byteLength){var s,u,f,d,h=ni(c).create({data:e}),g=i?i.split("-"):null,p=null,m={url:r,range:{start:g?parseFloat(g[0]):null,end:g?parseFloat(g[1]):null},request:p};for(t.debug("Parse EBML header: "+m.url),h.skipOverElement(n.EBML),h.consumeTag(n.Segment),f=h.getMatroskaCodedNum(),f+=h.getPos(),d=h.getPos();h.moreData()&&!h.consumeTagAndSize(n.Segment.Info,!0);)if(!(h.skipOverElement(n.Segment.SeekHead,!0)||h.skipOverElement(n.Segment.Tracks,!0)||h.skipOverElement(n.Segment.Cues,!0)||h.skipOverElement(n.Void,!0)))throw new Error("no valid top level element found");for(;void 0===s;){var E=h.getMatroskaCodedNum(!0),v=h.getMatroskaCodedNum();E===n.Segment.Info.Duration.tag?s=h[n.Segment.Info.Duration.parse](v):h.setPos(h.getPos()+v)}p=l(m),o.load({request:p,success:function(e){u=function(e,r,i,a){var o,s,u,l,f,d,h,g;for(u=[],f=0,d=(s=function(e){var t,r,i=[],a=ni(c).create({data:e});for(a.consumeTagAndSize(n.Segment.Cues);a.moreData()&&a.consumeTagAndSize(n.Segment.Cues.CuePoint,!0);){for((t={}).CueTime=a.parseTag(n.Segment.Cues.CuePoint.CueTime),t.CueTracks=[];a.moreData()&&a.consumeTag(n.Segment.Cues.CuePoint.CueTrackPositions,!0);){var o=a.getMatroskaCodedNum(),s=a.getPos();if((r={}).Track=a.parseTag(n.Segment.Cues.CuePoint.CueTrackPositions.CueTrack),0===r.Track)throw new Error("Cue track cannot be 0");r.ClusterPosition=a.parseTag(n.Segment.Cues.CuePoint.CueTrackPositions.CueClusterPosition),t.CueTracks.push(r),a.setPos(s+o)}if(0===t.CueTracks.length)throw new Error("Mandatory cuetrack not found");i.push(t)}if(0===i.length)throw new Error("mandatory cuepoint not found");return i}(e)).length;f<d;f+=1)l=new Zr,o=f<s.length-1?s[f+1].CueTime-s[f].CueTime:a-s[f].CueTime,l.duration=o,l.startTime=s[f].CueTime,l.timescale=1e3,h=s[f].CueTracks[0].ClusterPosition+r,g=f<s.length-1?s[f+1].CueTracks[0].ClusterPosition+r-1:i-1,l.mediaRange=h+"-"+g,u.push(l);return t.debug("Parsed cues: "+u.length+" cues."),u}(e,d,f,s),a(u)},error:function(){t.error("Download Error: Cues "+m.url),a(null)}}),t.debug("Perform cues load: "+m.url+" bytes="+m.range.start+"-"+m.range.end)}else a(null)}(r,h,i,(function(t){a({segments:t,representation:e,error:t?void 0:new je.A(s.SEGMENT_BASE_LOADER_ERROR_CODE,s.SEGMENT_BASE_LOADER_ERROR_MESSAGE)})}))},error:function(){a({representation:e,error:new je.A(s.SEGMENT_BASE_LOADER_ERROR_CODE,s.SEGMENT_BASE_LOADER_ERROR_MESSAGE)})}})}))},reset:function(){o&&(o.abort(),o=null)}},n={EBML:{tag:440786851,required:!0},Segment:{tag:408125543,required:!0,SeekHead:{tag:290298740,required:!0},Info:{tag:357149030,required:!0,TimecodeScale:{tag:2807729,required:!0,parse:"getMatroskaUint"},Duration:{tag:17545,required:!0,parse:"getMatroskaFloat"}},Tracks:{tag:374648427,required:!0},Cues:{tag:475249515,required:!0,CuePoint:{tag:187,required:!0,CueTime:{tag:179,required:!0,parse:"getMatroskaUint"},CueTrackPositions:{tag:183,required:!0,CueTrack:{tag:247,required:!0,parse:"getMatroskaUint"},CueClusterPosition:{tag:241,required:!0,parse:"getMatroskaUint"}}}}},Void:{tag:236,required:!0}},e}ri.__dashjs_factory_name="WebmSegmentBaseLoader";var ii=r.A.getSingletonFactory(ri);function ai(e){e=e||{};var t,n,r,i=this.context,a=e.eventBus,o=e.events,s=e.dashMetrics,u=e.mediaPlayerModel,c=e.errHandler,l=e.baseURLController,f=e.debug,d=e.boxParser,h=e.errors;function g(e){return"webm"===(e?e.split("/")[1]:"").toLowerCase()}return t={initialize:function(){n.initialize(),r.initialize()},getSegmentBaseInitSegment:function(e){return g(e.representation.mimeType)?r.loadInitialization(e.representation,e.mediaType):n.loadInitialization(e.representation,e.mediaType)},getSegmentList:function(e){return g(e.mimeType)?r.loadSegments(e.representation,e.mediaType,e.representation?e.representation.indexRange:null):n.loadSegments(e.representation,e.mediaType,e.representation?e.representation.indexRange:null)},reset:function(){n.reset(),r.reset()}},n=ei(i).getInstance(),r=ii(i).getInstance(),n.setConfig({baseURLController:l,dashMetrics:s,mediaPlayerModel:u,errHandler:c,eventBus:a,events:o,errors:h,debug:f,boxParser:d}),r.setConfig({baseURLController:l,dashMetrics:s,mediaPlayerModel:u,errHandler:c,eventBus:a,events:o,errors:h,debug:f}),t}ai.__dashjs_factory_name="SegmentBaseController";var oi=r.A.getSingletonFactory(ai),si=[g.A.SERVICE_DESCRIPTION_DVB_LL_SCHEME],ui="video",ci="audio";function li(){var e,t,n,r,i,a=this.context;function o(){t={liveDelay:NaN,liveCatchup:{maxDrift:NaN,playbackRate:{min:NaN,max:NaN}},minBitrate:{},maxBitrate:{},initialBitrate:{},contentSteering:null,clientDataReporting:null},n=[]}function s(e,n,i){try{t[e][n]=i/1e3}catch(e){r.error(e)}}return e={applyServiceDescription:function(e){if(e&&e.serviceDescriptions){var i=e.serviceDescriptions.filter((function(e){return si.includes(e.schemeIdUri)})),a=e.serviceDescriptions.filter((function(e){return null==e.schemeIdUri})),o=i.length>0?i[i.length-1]:a[a.length-1];o&&(o.latency&&o.latency.target>0&&function(e){var i;if(e.schemeIdUri,g.A.SERVICE_DESCRIPTION_DVB_LL_SCHEME,i=function(e){return{liveDelay:e.latency.target/1e3,maxDrift:!isNaN(e.latency.max)&&e.latency.max>e.latency.target?(e.latency.max-e.latency.target+500)/1e3:NaN,referenceId:e.latency.referenceId||NaN}}(e),n.length>0){var a=function(e){var t,r=0,i=n.filter((function(t){return t.id===e.referenceId}));return 0===i.length?(r=n.length>0?n[0].to:0,t=n[0].id||NaN):(r=i[0].to||0,t=i[0].id||NaN),{to:r,id:t}}(i),o=a.to,s=a.id;t.liveDelay=i.liveDelay-o,t.liveCatchup.maxDrift=i.maxDrift,r.debug("\n Found latency properties coming from service description. Applied time offset of ".concat(o," from ProducerReferenceTime element with id ").concat(s,".\n Live Delay: ").concat(i.liveDelay-o,", Live catchup max drift: ").concat(i.maxDrift,"\n "))}else t.liveDelay=i.liveDelay,t.liveCatchup.maxDrift=i.maxDrift,r.debug("Found latency properties coming from service description: Live Delay: ".concat(i.liveDelay,", Live catchup max drift: ").concat(i.maxDrift))}(o),o.playbackRate&&function(e){var n=e.playbackRate.min?Math.round(1e3*(e.playbackRate.min-1))/1e3:NaN,i=e.playbackRate.max?Math.round(1e3*(e.playbackRate.max-1))/1e3:NaN;t.liveCatchup.playbackRate.min=n,t.liveCatchup.playbackRate.max=i,r.debug("Found latency properties coming from service description: Live catchup min playback rate: ".concat(n)),r.debug("Found latency properties coming from service description: Live catchup max playback rate: ".concat(i))}(o),o.operatingQuality,o.operatingBandwidth&&function(e){if(e&&e.operatingBandwidth&&e.operatingBandwidth.mediaType&&"all"!==e.operatingBandwidth.mediaType){var t={};t.minBandwidth=e.operatingBandwidth.min,t.maxBandwidth=e.operatingBandwidth.max,t.targetBandwidth=e.operatingBandwidth.target;var n=[];e.operatingBandwidth.mediaType===ui||e.operatingBandwidth.mediaType===ci?n.push(e.operatingBandwidth.mediaType):"any"===e.operatingBandwidth.mediaType&&(n.push(ci),n.push(ui)),n.forEach((function(e){isNaN(t.minBandwidth)||s("minBitrate",e,t.minBandwidth),isNaN(t.maxBandwidth)||s("maxBitrate",e,t.maxBandwidth),isNaN(t.targetBandwidth)||s("initialBitrate",e,t.targetBandwidth)}))}}(o),o.contentSteering&&function(e){t.contentSteering=e.contentSteering}(o),o.clientDataReporting&&function(e){t.clientDataReporting=e.clientDataReporting}(o))}},calculateProducerReferenceTimeOffsets:function(e){try{var t=[];if(e&&e.length>0){var a=[g.A.VIDEO,g.A.AUDIO,g.A.TEXT],o=i.getAvailabilityStartTime()/1e3;e.forEach((function(e){var n=a.reduce((function(t,n){return t.concat(i.getAllMediaInfoForType(e,n))}),[]).reduce((function(t,n){return i.getProducerReferenceTimes(e,n).forEach((function(r){var a=i.getVoRepresentations(n);if(a&&a.length>0&&a[0].adaptation&&a[0].segmentInfoType===Me.A.SEGMENT_TEMPLATE){var s=a[0],u=new Date(r[Me.A.WALL_CLOCK_TIME]).getTime()/1e3-(r[Me.A.PRESENTATION_TIME]/s[Me.A.TIMESCALE]-s[Me.A.PRESENTATION_TIME_OFFSET]+e.start),c=o-u;t.push({id:r[Me.A.ID],to:c})}})),t}),[]);t=t.concat(n)}))}n=t}catch(e){r.error(e),n=[]}},getProducerReferenceTimeOffsets:function(){return n},getServiceDescriptionSettings:function(){return t},reset:function(){o()},setConfig:function(e){e&&e.adapter&&(i=e.adapter)}},r=(0,u.A)(a).getInstance().getLogger(e),o(),e}li.__dashjs_factory_name="ServiceDescriptionController";var fi=r.A.getSingletonFactory(li);function di(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}n(78350),n(30237),n(30531),n(40150);var hi=function(){return(0,H.A)((function e(t,n){(0,Y.A)(this,e),this.eventBus=n,this.mimeType=t,this.updating=!1,this.chunks=[],this.appendWindowStart=0,this.appendWindowEnd=1/0,this.timestampOffset=0,this.mode="segments"}),[{key:"appendBuffer",value:function(e,t,n){var r=this;if(this.updating)throw new Error("SourceBuffer is currently updating");this.updating=!0,this.eventBus.trigger("externalSourceBufferUpdateStart",{mimeType:this.mimeType,request:"appendBuffer",data:e,start:t,end:n}),Number.isNaN(t)||(this.chunks.push({data:e,start:t,end:n}),this.chunks.sort((function(e,t){return e.start-t.start}))),setTimeout((function(){r.updating=!1,r.eventBus.trigger("externalSourceBufferUpdating",{mimeType:r.mimeType}),r.eventBus.trigger("externalSourceBufferUpdateEnd",{mimeType:r.mimeType})}),10)}},{key:"abort",value:function(){this.updating&&(this.updating=!1,this.eventBus.trigger("externalSourceBufferAbort",{mimeType:this.mimeType}),this.eventBus.trigger("externalSourceBufferUpdateEnd",{mimeType:this.mimeType}))}},{key:"remove",value:function(e,t){var n=this;if(this.updating)throw new Error("SourceBuffer is currently updating");this.updating=!0,this.eventBus.trigger("externalSourceBufferUpdateStart",{mimeType:this.mimeType,request:"remove",start:e,end:t}),this.chunks=this.chunks.filter((function(n){return n.end<=e||n.start>=t})),setTimeout((function(){n.updating=!1,n.eventBus.trigger("externalSourceBufferUpdating",{mimeType:n.mimeType}),n.eventBus.trigger("externalSourceBufferUpdateEnd",{mimeType:n.mimeType})}),10)}},{key:"buffered",get:function(){return new gi(this.chunks)}}])}(),gi=function(){return(0,H.A)((function e(t){(0,Y.A)(this,e),this._ranges=[];var n,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return di(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?di(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}(t);try{for(r.s();!(n=r.n()).done;){var i=n.value,a=this._ranges,o={start:i.start,end:i.end},s=a.length?a[a.length-1]:null;!s||o.start>s.end?a.push(o):s.end=o.end}}catch(e){r.e(e)}finally{r.f()}}),[{key:"length",get:function(){return this._ranges.length}},{key:"start",value:function(e){return this._ranges[e].start}},{key:"end",value:function(e){return this._ranges[e].end}}])}(),pi=hi,mi=function(){return(0,H.A)((function e(t){(0,Y.A)(this,e),this.eventBus=t,this.reset()}),[{key:"duration",get:function(){return this._duration},set:function(e){if("open"!==this._readyState)throw new Error("ExternalMediaSource is not open");this._duration=e}},{key:"readyState",get:function(){return this._readyState}},{key:"addSourceBuffer",value:function(e){if("open"!==this._readyState)throw new Error("ExternalMediaSource is not open");var t=new pi(e,this.eventBus);return this.sourceBuffers.set(t,e),t}},{key:"removeSourceBuffer",value:function(e){if(!this.sourceBuffers.has(e))throw new Error("ExternalSourceBuffer not found");this.sourceBuffers.delete(e)}},{key:"open",value:function(){this._readyState="open",this.eventBus.trigger("externalMediaSourceOpen",{})}},{key:"endOfStream",value:function(){if("open"!==this._readyState)throw new Error("ExternalMediaSource is not open");this._readyState="ended",this.eventBus.trigger("externalMediaSourceEnded",{})}},{key:"close",value:function(){this._readyState="closed",this.eventBus.trigger("externalMediaSourceClosed",{})}},{key:"reset",value:function(){this.sourceBuffers=new Map,this._duration=NaN,this._readyState="closed"}}])}(),Ei=(0,H.A)((function e(){(0,Y.A)(this,e),this.streamId=null,this.segmentType=null,this.index=NaN,this.bytes=null,this.start=NaN,this.end=NaN,this.duration=NaN,this.representation=null,this.endFragment=null}));function vi(e,t,n){return t=(0,Cn.A)(t),(0,Nn.A)(e,Ai()?Reflect.construct(t,n||[],(0,Cn.A)(e).constructor):t.apply(e,n))}function Ai(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ai=function(){return!!e})()}var yi=function(e){function t(e){var n;return(0,Y.A)(this,t),(n=vi(this,t,[e])).checkForExistenceOnly=!0,n}return(0,wn.A)(t,e),(0,H.A)(t)}(J.A);function Ti(e){e=e||{};var t,n,r=this.context,i=e.eventBus,a=e.events,o=e.urlUtils,s=e.errors,u=e.streamId;return t={abort:function(){n&&n.abort()},checkForExistence:function(e){var t=function(t){i.trigger(a.CHECK_FOR_EXISTENCE_COMPLETED,{request:e,exists:t})};if(e){var r=new yi(e.url);n.load({request:r,success:function(){t(!0)},error:function(){t(!1)}})}else t(!1)},load:function(e){var r=function(n,r){i.trigger(a.LOADING_COMPLETED,{request:e,response:n||null,error:r||null,sender:t})};e?n.load({request:e,progress:function(n){i.trigger(a.LOADING_PROGRESS,{request:e,stream:n.stream,streamId:u}),n.data&&i.trigger(a.LOADING_DATA_PROGRESS,{request:e,response:n.data||null,error:null,sender:t})},success:function(e){r(e)},error:function(e,t,n){r(void 0,new je.A(s.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE,n,t))},abort:function(e){e&&i.trigger(a.LOADING_ABANDONED,{mediaType:e.mediaType,request:e,sender:t})}}):r(void 0,new je.A(s.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE,s.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE))},reset:function(){n&&(n.abort(),n.reset(),n=null)},resetInitialSettings:function(){n&&n.resetInitialSettings()}},n=(0,we.A)(r).create({errHandler:e.errHandler,errors:s,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,urlUtils:o,constants:g.A,boxParser:e.boxParser,dashConstants:e.dashConstants}),t}Ti.__dashjs_factory_name="FragmentLoader";var _i=r.A.getClassFactory(Ti);function Si(e){e=e||{};var t,n,r,i=this.context,a=(0,d.A)(i).getInstance(),o=e.errHandler,s=e.mediaPlayerModel,c=e.dashMetrics,l=(0,u.A)(i).getInstance(),f=e.streamInfo;function m(){return f.id}function E(){for(var e in r)r[e].reset();r={}}function v(e){if(e.sender){var t=e.request,r=e.response,i=t.isInitializationRequest(),o=t.representation.mediaInfo.streamInfo;if(e.error&&(t.mediaType===g.A.AUDIO||t.mediaType===g.A.VIDEO||t.mediaType===g.A.TEXT&&t.representation.mediaInfo.isFragmented)&&a.trigger(h.A.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD,{entry:e.request.serviceLocation}),r&&o){var s=function(e,t,n,r){var i=new Ei;return i.streamId=n,i.segmentType=t.type,i.start=t.startTime,i.duration=t.duration,i.end=i.start+i.duration,i.bytes=e,i.index=t.index,i.representation=t.representation,i.endFragment=r,i}(r,t,f.id,e.type!==h.A.FRAGMENT_LOADING_PROGRESS);a.trigger(i?h.A.INIT_FRAGMENT_LOADED:h.A.MEDIA_FRAGMENT_LOADED,{chunk:s,request:t},{streamId:o.id,mediaType:t.mediaType})}else n.warn("No "+t.mediaType+" bytes to push or stream is inactive.")}}return t={getStreamId:m,getModel:function(t){var n=r[t];return n||(n=ae(i).create({streamInfo:f,type:t,dashMetrics:c,fragmentLoader:_i(i).create({dashMetrics:c,mediaPlayerModel:s,errHandler:o,settings:e.settings,boxParser:e.boxParser,eventBus:a,events:h.A,errors:Ce.A,dashConstants:e.dashConstants,urlUtils:e.urlUtils,streamId:m()}),debug:l,eventBus:a,events:h.A}),r[t]=n),n},reset:function(){a.off(p.A.FRAGMENT_LOADING_COMPLETED,v,this),a.off(p.A.FRAGMENT_LOADING_PROGRESS,v,this),E()}},n=l.getLogger(t),E(),a.on(p.A.FRAGMENT_LOADING_COMPLETED,v,t),a.on(p.A.FRAGMENT_LOADING_PROGRESS,v,t),t}Si.__dashjs_factory_name="FragmentController";var Ii=r.A.getClassFactory(Si),bi=(0,H.A)((function e(t){(0,Y.A)(this,e),this.newMediaInfo=t.newMediaInfo,this.previouslySelectedRepresentation=t.previouslySelectedRepresentation,this.newRepresentation=t.newRepresentation}));function Ri(e){var t,n,r,i,a,o,s=this.context,l=(0,c.A)(s).getInstance(),f=e.textController,d=e.eventBus,p=[],m=[],E=!1,v=e.mediaSource,A=null;function y(e){return e.mimeType+';codecs="'+e.codecs+'"'}function T(e){return i=f.getTextSourceBuffer(e),Promise.resolve()}function _(){if("function"==typeof i.addEventListener)try{i.addEventListener("updateend",w,!1),i.addEventListener("error",D,!1),i.addEventListener("abort",D,!1)}catch(e){o=setInterval(w,50)}else o=setInterval(w,50)}function S(){try{"function"==typeof i.removeEventListener&&(i.removeEventListener("updateend",w,!1),i.removeEventListener("error",D,!1),i.removeEventListener("abort",D,!1)),clearInterval(o)}catch(e){r.error(e)}}function b(e){return new Promise((function(t){i&&l.get().streaming.buffer.useAppendWindow?O((function(){try{if(!i)return void t();var n=v.duration,o=0;e&&!isNaN(e.start)&&!isNaN(e.duration)&&isFinite(e.duration)&&(n=e.start+e.duration),e&&!isNaN(e.start)&&(o=e.start),i.appendWindowEnd===n&&i.appendWindowStart===o||(i.appendWindowStart=0,i.appendWindowEnd=n+.01,i.appendWindowStart=Math.max(o-.1,0),r.debug("Updated append window for ".concat(a.type,". Set start to ").concat(i.appendWindowStart," and end to ").concat(i.appendWindowEnd))),t()}catch(e){r.warn("Failed to set append window"),t()}})):t()}))}function R(e){return new Promise((function(t){i?O((function(){try{i.timestampOffset===e||isNaN(e)||(i.timestampOffset=e,r.debug("Set MSE timestamp offset to ".concat(e))),t()}catch(e){t()}})):t()}))}function N(){if(!E&&m.length>0){E=!0;var e=m[0];m.splice(0,1);var t=function(){E=!1,m.length>0&&N.call(this),e&&e.data&&e.data.segmentType&&e.data.segmentType!==I.G.INIT_SEGMENT_TYPE&&delete e.data.bytes,e.promise.resolve({chunk:e.data})};try{if(A=e.request,0===e.data.bytes.byteLength)t.call(this);else{try{r.debug("Appending ".concat(e.data.segmentType," from period ").concat(e.data.streamId," to buffer. Request URL: ").concat(e.request.url,", Representation: ID: ").concat(e.data.representation.id,", bitrate: ").concat(e.data.representation.bitrateInKbit))}catch(e){}i instanceof pi?i.appendBuffer(e.data.bytes,e.data.start,e.data.end):i.appendBuffer?i.appendBuffer(e.data.bytes):i.append(e.data.bytes,e.data),O(t.bind(this))}}catch(t){r.fatal('SourceBuffer append failed "'+t+'"'),m.length>0?N():E=!1,delete e.data.bytes,e.promise.reject({chunk:e.data,error:new je.A(t.code,t.message)})}}}function C(){p.length>0&&(i.updating||(p.shift()(),C()))}function w(){i&&!i.updating&&C()}function D(e){var t,r,i=e.target||{};t=h.A.SOURCE_BUFFER_ERROR,r={error:i,lastRequestAppended:A}||{},d.trigger(t,r,{streamId:a.streamInfo.id,mediaType:n})}function O(e){try{p.push(e),i&&!i.updating&&C()}catch(e){r.error(e)}}return t={abort:function(){return new Promise((function(e){try{m=[],"open"===v.readyState?O((function(){try{i&&i.abort(),e()}catch(t){e()}})):i&&i.setTextTrack&&"ended"===v.readyState?(i.abort(),e()):e()}catch(t){e()}}))},abortBeforeAppend:function(){return new Promise((function(e){O((function(){var t=i.appendWindowStart,n=i.appendWindowEnd;i&&(i.abort(),i.appendWindowStart=t,i.appendWindowEnd=n),e()}))}))},append:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new Promise((function(r,i){e?(m.push({data:e,promise:{resolve:r,reject:i},request:n}),O(N.bind(t))):i({chunk:e,error:new je.A(Ce.A.APPEND_ERROR_CODE,Ce.A.APPEND_ERROR_MESSAGE)})}))},changeType:function(e){var t=y(e);return new Promise((function(e,n){O((function(){if(i&&i.changeType)try{r.debug("Changing SourceBuffer codec to ".concat(t)),i.changeType(t),e()}catch(e){!function(e){r.error(e),"string"==typeof(null==e?void 0:e.name)&&"NotSupportedError"===e.name&&l.update({streaming:{buffer:{useChangeType:!1,resetSourceBuffersForTrackSwitch:!0}}})}(e),n()}else e()}))}))},getAllBufferRanges:function(){try{var e;return null===(e=i)||void 0===e?void 0:e.buffered}catch(e){return r.error("getAllBufferRanges exception: "+e.message),null}},getBuffer:function(){return i},getType:function(){return n},initializeForFirstUse:function(e,t){a=e;var r=e.streamInfo;n=a.type;var o=t?y(t):e.codec;try{if(o.match(/application\/mp4;\s*codecs="(stpp|wvtt).*"/i))return T(r);i=v.addSourceBuffer(o),_();var s=[];return s.push(b(a.streamInfo)),t&&void 0!==t.mseTimeOffset&&s.push(R(t.mseTimeOffset)),Promise.all(s)}catch(e){return a.type==g.A.TEXT&&!a.isFragmented||-1!==o.indexOf('codecs="stpp')||-1!==o.indexOf('codecs="vtt')||-1!==o.indexOf("text/vtt")?T(r):Promise.reject(e)}},initializeForStreamSwitch:function(e,t,r){n=(a=e).type,function(e){i=e.getBuffer()}(r),_()},remove:function(e){return new Promise((function(t,n){var r=e.start,a=e.end;r>=0&&a>r?O((function(){try{i.remove(r,a),O((function(){t({from:r,to:a,unintended:!1}),e.resolve&&e.resolve()}))}catch(t){n({from:r,to:a,unintended:!1,error:new je.A(Ce.A.REMOVE_ERROR_CODE,Ce.A.REMOVE_ERROR_MESSAGE)}),e.reject&&e.reject(t)}})):t()}))},removeEventListeners:S,reset:function(){if(i){try{p=[],S(),E=!1,m=[],i.getClassName&&"TextSourceBuffer"===i.getClassName()||(r.debug("Removing sourcebuffer from media source"),v.removeSourceBuffer(i))}catch(e){}i=null}A=null},updateAppendWindow:b,updateTimestampOffset:R},r=(0,u.A)(s).getInstance().getLogger(t),t}Ri.__dashjs_factory_name="SourceBufferSink";var Ni=r.A.getClassFactory(Ri);function Ci(e){var t,n,r,i=this.context,a=[],o=[],s=e;return t={getAllBufferRanges:function(){for(var e=[],t=0;t<o.length;t++){var n=o[t];0===e.length||n.start>e[e.length-1].end?e.push({start:n.start,end:n.end}):e[e.length-1].end=n.end}var r={start:function(t){return e[t].start},end:function(t){return e[t].end}};return Object.defineProperty(r,"length",{get:function(){return e.length}}),r},append:function(e){return"InitializationSegment"!==e.segmentType?(o.push(e),o.sort((function(e,t){return e.start-t.start})),r=null):(a.includes(e)||a.push(e),r=e),n.debug("PreBufferSink appended chunk s: "+e.start+"; e: "+e.end),s&&s({chunk:e}),Promise.resolve()},remove:function(e,t){return o=o.filter((function(n){return!((isNaN(t)||n.start<t)&&(isNaN(e)||n.end>e))})),Promise.resolve()},abort:function(){return Promise.resolve()},discharge:function(){for(var e=o,t=null,n=function(n){t&&e[n].representation.id==t.representation.id||(t=a.find((function(t){return t.representation.id===e[n].representation.id})))&&(e.splice(n,0,t),n++),i=n},i=0;i<e.length;i++)n(i);return r&&(e.push(r),r=null),o=[],a=[],e},reset:function(){o=[],a=[],r=null,s=null},updateTimestampOffset:function(){return Promise.resolve()},waitForUpdateEnd:function(e){e()},getBuffer:function(){return this}},n=(0,u.A)(i).getInstance().getLogger(t),t}Ci.__dashjs_factory_name="PreBufferSink";var wi=r.A.getClassFactory(Ci),Di=.01,Oi="BufferController";function Mi(e){var t,n,r,i,a,s,c,l,f,m,E,v,A,y,T,_,S,b,R,N,C,w=(e=e||{}).capabilities,D=this.context,O=(0,d.A)(D).getInstance(),M=e.fragmentModel,P=e.playbackController,L=e.representationController,x=e.settings,F=e.streamInfo,U=e.textController,k=e.type;function B(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new Promise((function(n,r){s=e,f&&t&&"function"==typeof f.discharge?(m=f,G(t).then((function(){n()})).catch((function(e){r(e)}))):n()}))}function G(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Map,r=arguments.length>2?arguments[2]:void 0;return new Promise((function(i,a){b&&e?s?(E=!1,function(e,t,r){return new Promise((function(i){f=Ni(D).create({mediaSource:s,textController:U,eventBus:O}),function(e,t,n){var r=L.getCurrentRepresentation(),i=null;return k!==g.A.VIDEO&&k!==g.A.AUDIO||(i=t.get(k)),i?function(e,t,n,r){f.initializeForStreamSwitch(e,t,n);var i=[];return i.push(f.abortBeforeAppend()),i.push(fe()),i.push(z(t,r)),t&&void 0!==t.mseTimeOffset&&i.push(le(t)),Promise.allSettled(i)}(e,r,i,n):function(e,t){return f.initializeForFirstUse(e,t)}(e,r)}(e,t,r).then((function(){return le(L.getCurrentRepresentation())})).then((function(){i(f)})).catch((function(e){n.warn("Caught error on create SourceBuffer: "+e),i(f)}))}))}(e,t,r).then((function(e){i(e)})).catch((function(e){a(e)}))):(E=!0,function(){var e=this;return new Promise((function(t,n){f=wi(D).create(K.bind(e)),le(L.getCurrentRepresentation()).then((function(){t(f)})).catch((function(){n()}))}))}().then((function(e){i(e)})).catch((function(e){a(e)}))):i(null)}))}function H(e){x.get().streaming.cacheInitSegments&&(n.info("Init fragment finished loading saving to",k+"'s init cache"),b.save(e.chunk)),n.debug("Appending init fragment for type ".concat(k,", representationId ").concat(e.chunk.representation.id," and bandwidth ").concat(e.chunk.representation.bandwidth)),V(e.chunk)}function Y(e){V(e.chunk,e.request)}function V(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;f&&(f.append(e,t).then((function(e){K(e)})).catch((function(e){K(e)})),e.representation.mediaInfo.type===g.A.VIDEO&&ve(h.A.VIDEO_CHUNK_RECEIVED,{chunk:e}))}function q(e){if(e&&e.length>0)for(var t=0,r=e.length;t<r;t++)n.debug("Buffered range: "+e.start(t)+" - "+e.end(t)+", currentTime = ",P.getTime())}function K(e){if(e.error)!function(e){22===e.error.code&&function(){if(S=!0,a=.8*pe(),n.warn("Quota exceeded, Critical Buffer: "+a),a>0){var e=Math.max(.2*a,1),t=a-e,r=Math.min(x.get().streaming.buffer.bufferTimeAtTopQuality,.9*t),i=Math.min(x.get().streaming.buffer.bufferTimeAtTopQualityLongForm,.9*t),o={streaming:{buffer:{bufferToKeep:parseFloat(e.toFixed(5)),bufferTimeAtTopQuality:parseFloat(r.toFixed(5)),bufferTimeAtTopQualityLongForm:parseFloat(i.toFixed(5))}}};x.update(o)}}(),22!==e.error.code&&Ee()||(n.warn("Clearing playback buffer to overcome quota exceed situation"),ve(h.A.QUOTA_EXCEEDED,{criticalBufferLevel:a,quotaExceededTime:e.chunk.start}),se(oe()))}(e);else if(f&&(ee(),S=!1,(y=e.chunk)&&y.endFragment)){y&&!isNaN(y.index)&&(c=Math.max(y.index,c),te());var t=f.getAllBufferRanges();y.segmentType===I.G.MEDIA_SEGMENT_TYPE&&(q(t),X(),function(){if(!isNaN(C)&&!E)if(k===g.A.AUDIO||k===g.A.VIDEO){var e=P.getTime(),t=J(e,0),n=J(C,0);if(t&&n&&t.start===n.start)C=NaN;else{var r=L.getCurrentRepresentation().segmentDuration,i=J(C,r);i&&(x.get().streaming.buffer.enableSeekDecorrelationFix&&Math.abs(e-C)>r?C<=i.end&&P.seek(Math.max(C,i.start),!1,!0):e<i.start&&P.seek(i.start,!1,!0))}}else C=NaN}());var r=!1;v&&(v.indexOf(y)>0&&(r=!0),v=null),y&&!r&&ve(h.A.BYTES_APPENDED_END_FRAGMENT,{startTime:y.start,index:y.index,bufferedRanges:t,segmentType:y.segmentType,mediaType:k,representationId:y.representation.id})}}function j(e,t){var n=[];return n.push(le(e)),n.push(f?f.abort():Promise.resolve()),n.push(z(e,t)),Promise.allSettled(n)}function z(e,t){if(!e||!t)return n.warn("BufferController._changeCodec() is missing the information about the Representations. Doing nothing"),Promise.resolve();if(e&&t&&e.mimeType===t.mimeType&&e.codecFamily===t.codecFamily)return n.debug("Switching to new codec ".concat(e.codecs," without changeType as previous codec ").concat(t.codecs," is compatible.")),Promise.resolve();if(!x.get().streaming.buffer.useChangeType||!w.supportsChangeType())return n.debug("changeType() not available"),Promise.resolve();n.debug("Using changeType() to switch from codec ".concat(t.codecs," to ").concat(e.codecs));var r=e.dependentRepresentation?e.dependentRepresentation:e;return f.changeType(r)}function W(){return new Promise((function(e,t){var n=Q();if(!n||0===n.length)return X(),void e();se(n).then((function(){e()})).catch((function(e){t(e)}))}))}function Q(e){var t=[],r=f.getAllBufferRanges();if(!r||0===r.length)return t;if(!e&&0!==e||isNaN(e))t.push({start:r.start(0),end:r.end(r.length-1)+.5});else{var i=function(e,t){var n=x.get().streaming.buffer.bufferToKeep,r=t.start(0);if(e-r>n){var i=Math.max(0,e-n),a=M.getRequests({state:ae.FRAGMENT_MODEL_EXECUTED,time:e,threshold:Di})[0];if(a&&(i=Math.min(a.startTime,i)),i>0)return{start:r,end:i}}return null}(e,r),a=function(e,t){var r=t.end(t.length-1)+.5,i=me(e),a=F.manifestInfo.duration>=x.get().streaming.buffer.longFormContentDurationThreshold?x.get().streaming.buffer.bufferTimeAtTopQualityLongForm:x.get().streaming.buffer.bufferTimeAtTopQuality,o=isNaN(i)?e:Math.min(i,e+a);if(o>=t.end(t.length-1))return null;var s=M.getRequests({state:ae.FRAGMENT_MODEL_EXECUTED,time:e,threshold:Di})[0];if(s&&(o=Math.max(s.startTime+s.duration,o)),x.get().streaming.buffer.avoidCurrentTimeRangePruning)for(var u=0;u<t.length;u++)if(t.start(u)<=e&&e<=t.end(u)&&t.start(u)<=o&&o<=t.end(u)){var c=o;o=u+1<t.length?t.start(u+1):t.end(u)+1,n.debug("Buffered range ["+t.start(u)+", "+t.end(u)+"] overlaps with targetTime "+e+" and range to be pruned ["+c+", "+r+"], using ["+o+", "+r+"] instead"+(o<r?"":" (no actual pruning)"));break}return o<t.end(t.length-1)?{start:o,end:r}:null}(e,r);i&&t.push(i),a&&t.push(a)}return t}function X(){N||k===g.A.TEXT&&!U.isTextEnabled()||ee()}function $(){ne()}function Z(){ne(),C=NaN}function J(e,t){if(!f)return null;var n,r,i=f.getAllBufferRanges(),a=0,o=0,s=null,u=null,c=0,l=isNaN(t)?.15:t;if(null!=i){for(r=0,n=i.length;r<n;r++)if(a=i.start(r),o=i.end(r),null===s)c=Math.abs(a-e),(e>=a&&e<o||c<=l)&&(s=a,u=o);else{if(!((c=a-u)<=l))break;u=o}if(null!==s)return{start:s,end:u}}return null}function ee(){if(P){var e=P.getTime()||0;E&&(e=isNaN(C)?0:C);var t=x.get().streaming.gaps.jumpGaps&&!isNaN(x.get().streaming.gaps.smallGapLimit)?x.get().streaming.gaps.smallGapLimit:NaN;i=Math.max(function(e,t){var n;return x.get().streaming.gaps.jumpGaps&&(t=x.get().streaming.gaps.smallGapLimit),null===(n=J(e,t))?0:n.end-e}(e,t),0),ve(h.A.BUFFER_LEVEL_UPDATED,{mediaType:k,bufferLevel:i}),ne()}}function te(){var e=c>=l-1,t=P.getTimeToStreamEnd(F)-i<1e-5;!e&&!t||r||(ge(!0),n.debug("checkIfBufferingCompleted trigger BUFFERING_COMPLETED for stream id ".concat(F.id," and type ").concat(k)))}function ne(){if(k===g.A.AUDIO||k===g.A.VIDEO){var e=P.getLowLatencyModeEnabled()?x.get().streaming.buffer.lowLatencyStallThreshold:x.get().streaming.buffer.stallThreshold;i<=e&&!r?re(o.BUFFER_EMPTY):(r||i>e)&&re(o.BUFFER_LOADED)}}function re(e){A===e||e===o.BUFFER_EMPTY&&0===P.getTime()||k===g.A.TEXT&&!U.isTextEnabled()||(A=e,ve(h.A.BUFFER_LEVEL_STATE_CHANGED,{state:e}),ve(e===o.BUFFER_LOADED?h.A.BUFFER_LOADED:h.A.BUFFER_EMPTY),n.debug(e===o.BUFFER_LOADED?"Got enough buffer to start":"Waiting for more buffer before starting playback"))}function ie(){f&&k!==g.A.TEXT&&(r||se(oe()))}function oe(){var e=[],t=f.getAllBufferRanges();if(!t||0===t.length)return e;var n=P.getTime(),r=Math.max(0,n-x.get().streaming.buffer.bufferToKeep),i=M.getRequests({state:ae.FRAGMENT_MODEL_EXECUTED,time:n,threshold:Di})[0];if(i)r=Math.min(i.startTime,r);else if(0===n&&P.getIsDynamic())return[];if(t.start(0)<=r){for(var a={start:0,end:r},o=0;o<t.length&&t.end(o)<=r;o++)a.end=t.end(o);a.start<a.end&&e.push(a)}return e}function se(e){return new Promise((function(t,n){if(!e||!f||0===e.length)return ee(),void t();var r=[];e.forEach((function(e){r.push(function(e){return new Promise((function(t,n){e.resolve=t,e.reject=n,R.push(e)}))}(e))})),_||ue(),Promise.all(r).then((function(){t()})).catch((function(e){n(e)}))}))}function ue(){try{if(0===R.length||!f)return n.debug("Nothing to prune, halt pruning"),R=[],void(_=!1);var e=f.getBuffer();if(!e||!e.buffered||0===e.buffered.length)return n.debug("SourceBuffer is empty (or does not exist), halt pruning"),R=[],void(_=!1);var t=R.shift();n.debug("".concat(k,": Removing buffer from: ").concat(t.start," to ").concat(t.end)),_=!0,P.getTime()<t.end&&ge(!1),f.remove(t).then((function(e){ce(e)})).catch((function(e){ce(e)}))}catch(e){_=!1}}function ce(e){n.debug("onRemoved buffer from:",e.from,"to",e.to),f&&(q(f.getAllBufferRanges()),0===R.length&&(_=!1,ee()),e.unintended&&(n.warn("Detected unintended removal from:",e.from,"to",e.to,"setting streamprocessor time to",e.from),ve(h.A.SEEK_TARGET,{time:e.from})),_?ue():(N?N=!1:ee(),ve(h.A.BUFFER_CLEARED,{from:e.from,to:e.to,unintended:e.unintended,hasEnoughSpaceToAppend:Ee(),quotaExceeded:S})))}function le(e){return new Promise((function(t){e&&void 0!==e.mseTimeOffset&&f&&f.updateTimestampOffset?f.updateTimestampOffset(e.mseTimeOffset).then((function(){t()})).catch((function(){t()})):t()}))}function fe(){return f&&!r?f.updateAppendWindow(F):Promise.resolve()}function de(){++T*(x.get().streaming.wallclockTimeUpdateInterval/1e3)>=x.get().streaming.buffer.bufferPruningInterval&&(T=0,ie())}function he(){ne()}function ge(e){(r=e)?ve(h.A.BUFFERING_COMPLETED):l=Number.POSITIVE_INFINITY}function pe(){try{var e,t,n=f.getAllBufferRanges(),r=0;if(!n)return r;for(t=0,e=n.length;t<e;t++)r+=n.end(t)-n.start(t);return r}catch(e){return 0}}function me(e){try{var t=e,n=f.getAllBufferRanges();if(!n||0===n.length)return NaN;for(var r=0;t===e&&r<n.length;){var i=n.start(r),a=n.end(r);t>=i&&t<=a&&(t=a),r+=1}return t===e?NaN:t}catch(e){return NaN}}function Ee(){var e=pe();return isNaN(e)||e<a}function ve(e,t){var n=t||{};O.trigger(e,n,{streamId:F.id,mediaType:k})}function Ae(e,t){if(a=Number.POSITIVE_INFINITY,A=void 0,l=Number.POSITIVE_INFINITY,c=0,y=null,r=!1,_=!1,S=!1,i=0,T=0,R=[],C=NaN,E=!1,f){var n=f;f=null,e||(t?n.removeEventListeners():n.abort().then((function(){n.reset(t),n=null})))}N=!1}return t={appendInitSegmentFromCache:function(e){var t=b.extract(F.id,e);return!!t&&(n.debug("Appending init fragment for type ".concat(k,", representationId ").concat(t.representation.id," and bandwidth ").concat(t.representation.bandwidth)),V(t),!0)},clearBuffers:se,createBufferSink:G,dischargePreBuffer:function(){if(f&&m&&"function"==typeof m.discharge){var e=m.getAllBufferRanges();if(e.length>0){for(var t="Beginning "+k+"PreBuffer discharge, adding buffer for:",r=0;r<e.length;r++)t+=" start: "+e.start(r)+", end: "+e.end(r)+";";n.debug(t)}else n.debug("PreBuffer discharge requested, but there were no media segments in the PreBuffer.");v=[];for(var i=m.discharge(),a=0;a<i.length;a++){var o=i[a];v.push(o),f.append(o)}m.reset(),m=null}},getAllRangesWithSafetyFactor:Q,getBuffer:function(){return f},getBufferControllerType:function(){return Oi},getBufferLevel:function(){return i},getContinuousBufferTimeForTargetTime:me,getIsBufferingCompleted:function(){return r},getIsPruningInProgress:function(){return _},getMediaSource:function(){return s},getRangeAt:J,getStreamId:function(){return F.id},getType:function(){return k},hasBufferAtTime:function(e){try{var t=f.getAllBufferRanges();if(!t||0===t.length)return!1;for(var r=0;r<t.length;){var i=t.start(r),a=t.end(r);if(e>=i&&e<=a)return!0;r+=1}return!1}catch(e){return n.error(e),!1}},initialize:function(e){B(e),O.on(h.A.INIT_FRAGMENT_LOADED,H,t),O.on(h.A.MEDIA_FRAGMENT_LOADED,Y,t),O.on(h.A.WALLCLOCK_TIME_UPDATED,de,t),O.on(p.A.PLAYBACK_PLAYING,Z,t),O.on(p.A.PLAYBACK_PROGRESS,X,t),O.on(p.A.PLAYBACK_TIME_UPDATED,X,t),O.on(p.A.PLAYBACK_RATE_CHANGED,he,t),O.on(p.A.PLAYBACK_STALLED,$,t)},prepareForAbandonQualitySwitch:function(e,t){return j(e,t)},prepareForDefaultQualitySwitch:function(e,t){return j(e,t)},prepareForFastQualitySwitch:function(e,t){return j(e,t)},prepareForForceReplacementQualitySwitch:function(e,t){return new Promise((function(n){var r=[];r.push(f.abort()),r.push(fe()),r.push(W()),r.push(le(e)),r.push(z(e,t)),Promise.allSettled(r).then((function(){ge(!1),n()}))}))},prepareForNonReplacementTrackSwitch:function(e,t){return new Promise((function(n){var r=[];r.push(fe()),r.push(z(e,t)),Promise.allSettled(r).then((function(){n()}))}))},prepareForPlaybackSeek:function(){return r&&ge(!1),f.abort()},prepareForReplacementTrackSwitch:function(e,t){return new Promise((function(n){var r=[];r.push(f.abort()),r.push(fe()),r.push(z(e,t)),r.push(W()),r.push(le(e)),Promise.allSettled(r).then((function(){ge(!1),n()}))}))},pruneAllSafely:W,pruneBuffer:ie,reset:function(e,t){O.off(h.A.INIT_FRAGMENT_LOADED,H,this),O.off(h.A.MEDIA_FRAGMENT_LOADED,Y,this),O.off(h.A.WALLCLOCK_TIME_UPDATED,de,this),O.off(p.A.PLAYBACK_PLAYING,Z,this),O.off(p.A.PLAYBACK_PROGRESS,X,this),O.off(p.A.PLAYBACK_TIME_UPDATED,X,this),O.off(p.A.PLAYBACK_RATE_CHANGED,he,this),O.off(p.A.PLAYBACK_STALLED,$,this),Ae(e,t)},segmentRequestingCompleted:function(e){isNaN(e)||(l=e,te())},setIsBufferingCompleted:ge,setMediaSource:B,setSeekTarget:function(e){C=e},updateAppendWindow:fe,updateBufferTimestampOffset:le},n=(0,u.A)(D).getInstance().getLogger(t),b=Mt(D).getInstance(),Ae(),t}Mi.__dashjs_factory_name=Oi;var Pi=r.A.getClassFactory(Mi),Li="NotFragmentedTextBufferController";function xi(e){e=e||{};var t,n,r,i,a,o,s=this.context,u=(0,d.A)(s).getInstance(),c=e.textController,l=e.errHandler,f=e.streamInfo,g=e.type;function p(e){i=e}function m(e){var t,r;n!==e&&(n=e)&&(t=h.A.BUFFERING_COMPLETED,r={},u.trigger(t,r,{streamId:f.id,mediaType:g}))}function E(e){e.chunk.bytes&&!n&&(o.save(e.chunk),a.append(e.chunk),m(!0))}return t={appendInitSegmentFromCache:function(e){return null!==o.extract(f.id,e)},clearBuffers:function(){return Promise.resolve()},createBufferSink:function(e){return new Promise((function(t,n){try{(a=Ni(s).create({mediaSource:i,textController:c,eventBus:u})).initializeForFirstUse(e),r||(a.getBuffer()&&"function"==typeof a.getBuffer().initialize&&a.getBuffer().initialize(),r=!0),t(a)}catch(e){l.error(new je.A(Ce.A.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,Ce.A.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+g)),n(e)}}))},dischargePreBuffer:function(){},getAllRangesWithSafetyFactor:function(){return[]},getBuffer:function(){return a},getBufferControllerType:function(){return Li},getBufferLevel:function(){return 0},getContinuousBufferTimeForTargetTime:function(){return Number.POSITIVE_INFINITY},getIsBufferingCompleted:function(){return n},getIsPruningInProgress:function(){return!1},getMediaSource:function(){return i},getRangeAt:function(){return null},getStreamId:function(){return f.id},getType:function(){return g},hasBufferAtTime:function(){return!0},initialize:function(e){p(e)},prepareForPlaybackSeek:function(){return Promise.resolve()},prepareForReplacementTrackSwitch:function(){return n=!1,Promise.resolve()},pruneAllSafely:function(){return Promise.resolve()},pruneBuffer:function(){},reset:function(e){u.off(h.A.INIT_FRAGMENT_LOADED,E,t),!e&&a&&(a.abort(),a.reset(),a=null)},segmentRequestingCompleted:function(){},setIsBufferingCompleted:m,setMediaSource:p,setSeekTarget:function(){},updateAppendWindow:function(){return Promise.resolve()},updateBufferTimestampOffset:function(){return Promise.resolve()}},r=!1,i=null,n=!1,o=Mt(s).getInstance(),u.on(h.A.INIT_FRAGMENT_LOADED,E,t),t}xi.__dashjs_factory_name=Li;var Fi=r.A.getClassFactory(xi);function Ui(e){var t,n,r,i,a,s,c,l,f,m,E,v,A=(e=e||{}).abrController,y=e.bufferController,T=this.context,_=e.dashMetrics,S=(0,d.A)(T).getInstance(),I=e.fragmentModel,b=e.mediaPlayerModel,R=e.playbackController,N=e.representationController,C=e.settings,w=e.textController,D=e.type;function O(){s=(0,u.A)(T).getInstance().getLogger(r),V(),f=e.streamInfo}function M(){c=!0}function P(){c=!1}function L(e){if(!y.getIsBufferingCompleted()){x();var t=isNaN(e)?0:e;l=setTimeout(F,t)}}function x(){l&&(clearTimeout(l),l=null)}function F(){var e=b.getScheduleTimeout();try{if(function(){try{return D===g.A.TEXT&&!w.isTextEnabled()||R.isPaused()&&(!R.getStreamController().getInitialPlayback()||!R.getStreamController().getAutoPlay())&&!C.get().streaming.scheduling.scheduleWhilePaused}catch(e){return!1}}())return void x();!function(){try{return!!c&&N.getCurrentRepresentation()&&(null==a||m||function(){var e=N.getCurrentRepresentation();if(!D||!e)return!0;var n=e&&e.segmentDuration&&!isNaN(e.segmentDuration)?e.segmentDuration:0,r=_.getCurrentBufferLevel(D),i=U();return(i<=n||R.getLowLatencyModeEnabled()||D===g.A.AUDIO&&t)&&(n=0),r+n<i}())}catch(e){return!1}}()?L(e):function(){if(!A.handlePendingManualQualitySwitch(f.id,D)){var e,t=!1;v&&(t=A.checkPlaybackQuality(D,f.id)),t||(e=N.getCurrentRepresentation(),n||e.id!==a||m?function(e){m?(s.debug("Switch track for "+D+", representation id = "+e.id),m=!1):s.debug("Quality has changed, get init request for representationid = "+e.id),S.trigger(h.A.INIT_FRAGMENT_NEEDED,{representationId:e.id,sender:r},{streamId:f.id,mediaType:D}),v=!1,n=!1}(e):(s.debug("Media segment needed for ".concat(D," and stream id ").concat(f.id)),S.trigger(h.A.MEDIA_FRAGMENT_NEEDED,{},{streamId:f.id,mediaType:D}),v=!0))}}()}catch(t){L(e)}}function U(){var e=NaN,n=N.getCurrentRepresentation();return D&&n?(e=D===g.A.TEXT?function(){try{if(w.isTextEnabled()){var e=N.getCurrentRepresentation();if(isNaN(e.fragmentDuration)){var t=_.getCurrentSchedulingInfo(o.SCHEDULING_INFO);return t?t.duration:0}return e.fragmentDuration}return 0}catch(e){return 0}}():D===g.A.AUDIO&&t?function(){try{var e=_.getCurrentBufferLevel(g.A.VIDEO),t=N.getCurrentRepresentation();return isNaN(t.fragmentDuration)?e+1:Math.max(e+1,t.fragmentDuration)}catch(e){return 0}}():function(){try{var e=C.get().streaming.enhancement.enabled?N.getCurrentCompositeRepresentation():N.getCurrentRepresentation(),t=e.mediaInfo.streamInfo;return A.isPlayingAtTopQuality(e)?t.manifestInfo.duration>=C.get().streaming.buffer.longFormContentDurationThreshold?C.get().streaming.buffer.bufferTimeAtTopQualityLongForm:C.get().streaming.buffer.bufferTimeAtTopQuality:b.getBufferTimeDefaultUnadjusted()}catch(e){return b.getBufferTimeDefaultUnadjusted()}}(),e):e}function k(){B(!0)}function B(e){if(R&&I){var t=I.getRequests({state:ae.FRAGMENT_MODEL_EXECUTED,time:R.getTime(),threshold:0})[0];t&&R.getTime()>=t.startTime&&((!i.representation||t.representation.mediaInfo.type===i.representation.mediaInfo.type&&t.representation.mediaInfo.index!==i.representation.mediaInfo.index)&&e&&function(e){s.debug("Track change rendered for streamId ".concat(f.id," and type ").concat(D)),S.trigger(h.A.TRACK_CHANGE_RENDERED,{mediaType:D,oldMediaInfo:i&&i.representation&&i.representation.mediaInfo?i.representation.mediaInfo:null,newMediaInfo:e.representation.mediaInfo,streamId:f.id})}(t),i.representation&&t.representation.id===i.representation.id||!e||function(e){s.debug("Quality change rendered for streamId ".concat(f.id," and type ").concat(D)),S.trigger(h.A.QUALITY_CHANGE_RENDERED,{mediaType:D,oldRepresentation:i.representation?i.representation:null,newRepresentation:e.representation,streamId:f.id})}(t),i.representation=t.representation)}}function G(){I.abortRequests(),x()}function H(){C.get().streaming.scheduling.scheduleWhilePaused||L()}function Y(e){_.updatePlayListTraceMetrics({playbackspeed:e.playbackRate.toString()})}function V(){v=!0,E=0,a=null,i={representation:null},m=!1,n=!1,c=!0}return r={clearScheduleTimer:x,getBufferTarget:U,getPlaybackController:function(){return R},getStreamId:function(){return f.id},getSwitchTrack:function(){return m},getTimeToLoadDelay:function(){return E},getType:function(){return D},initialize:function(e){t=e,S.on(h.A.URL_RESOLUTION_FAILED,G,r),S.on(p.A.PLAYBACK_STARTED,H,r),S.on(p.A.PLAYBACK_RATE_CHANGED,Y,r),S.on(p.A.PLAYBACK_TIME_UPDATED,k,r),S.on(p.A.MANAGED_MEDIA_SOURCE_START_STREAMING,M,r),S.on(p.A.MANAGED_MEDIA_SOURCE_END_STREAMING,P,r)},reset:function(){S.off(h.A.URL_RESOLUTION_FAILED,G,r),S.off(p.A.PLAYBACK_STARTED,H,r),S.off(p.A.PLAYBACK_RATE_CHANGED,Y,r),S.off(p.A.PLAYBACK_TIME_UPDATED,k,r),S.off(p.A.MANAGED_MEDIA_SOURCE_START_STREAMING,M,r),S.off(p.A.MANAGED_MEDIA_SOURCE_END_STREAMING,P,r),x(),B(!1),V(),f=null},setShouldCheckPlaybackQuality:function(e){v=e},setInitSegmentRequired:function(e){n=e},setLastInitializedRepresentationId:function(e){a=e},setup:O,setSwitchTrack:function(e){m=e},setTimeToLoadDelay:function(e){E=e},startScheduleTimer:L},O(),r}Ui.__dashjs_factory_name="ScheduleController";var ki=r.A.getClassFactory(Ui);n(68156);var Bi=/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g;function Gi(e,t,n){return t=(0,Cn.A)(t),(0,Nn.A)(e,Hi()?Reflect.construct(t,n||[],(0,Cn.A)(e).constructor):t.apply(e,n))}function Hi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Hi=function(){return!!e})()}var Yi=function(e){function t(){var e;return(0,Y.A)(this,t),(e=Gi(this,t)).isPartialSegment=!0,e.replacementSubNumber=NaN,e.totalNumberOfPartialSegments=NaN,e}return(0,wn.A)(t,e),(0,H.A)(t)}(Qr);function Vi(e){return e?e.totalNumberOfPartialSegments&&!isNaN(e.totalNumberOfPartialSegments)&&e.totalNumberOfPartialSegments>0&&!isNaN(e.subNumberOfPartialSegmentToRequest)?function(e){var t=function(e,t){var n=new Yi,r=e.segmentDurationInSeconds/e.totalNumberOfPartialSegments,i=e.representation,a=e.timelineConverter,o=e.isDynamic,s=e.index,u=e.totalNumberOfPartialSegments,c=qi({representation:i,segmentDurationInSeconds:r,presentationStartTime:e.presentationStartTime+t*r,presentationEndTime:e.presentationStartTime+(t+1)*r,timelineConverter:a,isDynamic:o,mediaTimeInSeconds:e.mediaTimeInSeconds+t*r,index:s});return n.assignAttributes(c),n.replacementSubNumber=t,n.totalNumberOfPartialSegments=u,n}(e,e.subNumberOfPartialSegmentToRequest);return Ki(t,e),t}(e):function(e){var t=new Zr,n=qi(e);return t.assignAttributes(n),Ki(t,e),t}(e):null}function qi(e){var t=e.representation,n=e.segmentDurationInSeconds,r=e.presentationStartTime,i=e.presentationEndTime,a=e.mediaTimeInSeconds,o=e.timelineConverter,s=e.isDynamic,u=e.index,c={availabilityEndTime:o.calcAvailabilityEndTimeFromPresentationTime(i+n,t,s),availabilityStartTime:o.calcAvailabilityStartTimeFromPresentationTime(i,t,s),duration:n,index:u,mediaStartTime:a,presentationStartTime:r,replacementNumber:t.startNumber+u,representation:t};return c.wallStartTime=o.calcWallTimeForSegment(c,s),c}function Ki(e,t){var n=t.tManifest,r=t.mediaTime,i=t.mediaUrl,a=t.mediaRange;e.replacementTime=n||r,e.media=zi(i,e.representation.id,e.replacementNumber,e.replacementSubNumber,e.representation.bandwidth,e.replacementTime),e.mediaRange=a,e.mediaUrl=i}function ji(e,t,n,r){var i=t.adaptation.period;if(isFinite(i.duration)&&i.start+i.duration<=n.presentationStartTime)return!1;if(r){if("INF"===t.availabilityTimeOffset)return!0;var a=e.getClientReferenceTime();return n.availabilityStartTime.getTime()<=a&&(!isFinite(n.availabilityEndTime)||n.availabilityEndTime.getTime()>=a)}return!0}function zi(e,t,n,r,i,a){return e?function(e,t,n,r,i,a){return e.replace(Bi,(function(e,o,s,u){var c,l;switch(o){case void 0:return"$";case"RepresentationID":c=t;break;case"Number":c=n;break;case"SubNumber":c=r;break;case"Bandwidth":c=i;break;case"Time":if("string"==typeof a)return a;c=a?Math.round(a):a;break;default:c=null}if(null==c)return e;switch(u){case void 0:case"d":case"i":case"u":l=c.toString();break;case"o":l=c.toString(8);break;case"x":l=c.toString(16);break;case"X":l=c.toString(16).toUpperCase();break;default:l=c.toString()}var f=parseInt(s,10)||1;return l.padStart(f,"0")}))}(e,t,n,r,i,a):e}function Wi(e){var t,n,r,i=e.index,a=e.isDynamic,o=e.mediaRange,s=e.mediaTime,u=e.mediaUrl,c=e.representation,l=e.subNumberOfPartialSegmentToRequest,f=e.timelineConverter,d=e.totalNumberOfPartialSegments;t=c.segmentDuration,isNaN(t)&&(t=c.adaptation.period.duration),n=parseFloat((c.adaptation.period.start+i*t).toFixed(5)),r=parseFloat((n+t).toFixed(5));var h=Vi({index:i,isDynamic:a,mediaRange:o,mediaTime:s,mediaTimeInSeconds:f.calcMediaTimeFromPresentationTime(n,c),mediaUrl:u,presentationEndTime:r,presentationStartTime:n,representation:c,segmentDurationInSeconds:t,subNumberOfPartialSegmentToRequest:l,timelineConverter:f,totalNumberOfPartialSegments:d});return ji(f,c,h,a)?h:null}function Qi(e){var t=e.durationInTimescale,n=e.fTimescale,r=e.index,i=e.subNumberOfPartialSegmentToRequest,a=e.isDynamic,o=e.mediaRange,s=e.mediaTime,u=e.mediaUrl,c=e.totalNumberOfPartialSegments,l=e.representation,f=e.tManifest,d=e.timelineConverter,h=s/n,g=t/n,p=d.calcPresentationTimeFromMediaTime(h,l),m=Vi({representation:l,segmentDurationInSeconds:g,presentationStartTime:p,presentationEndTime:p+g,mediaTimeInSeconds:h,timelineConverter:d,isDynamic:a,index:r,totalNumberOfPartialSegments:c,subNumberOfPartialSegmentToRequest:i,mediaUrl:u,mediaRange:o,tManifest:f,mediaTime:s});return ji(d,l,m,a)?m:null}function Xi(e){return e.k}function $i(e){var t,n,r,i=(e=e||{}).eventBus,a=e.events,o=e.abrController,s=e.dashMetrics,u=e.playbackController,c=e.timelineConverter,l=e.type,f=e.streamInfo,d=e.segmentsController,h=e.isDynamic;function m(){return l}function E(){var e;return(null===(e=r)||void 0===e?void 0:e.mediaInfo.type)===l?r:function(){var e,t=null===(e=r)||void 0===e?void 0:e.dependentRepresentation;if(t){if(!t.mediaInfo)throw new Error("dependentRepresentation has no mediaInfo!");if(t.mediaInfo.type===l)return t}return null}()}function v(){r=null,n=[]}function A(e){return new Promise((function(t,n){var r=e.hasInitialization(),i=e.hasSegments(),a=[];a.push(d.updateInitData(e,r)),a.push(d.updateSegmentData(e,i)),Promise.all(a).then((function(n){var r;n[0]&&!n[0].error&&(e=function(e,t){return t&&!t.error&&t.representation?t.representation:e}(e,n[0])),n[1]&&!n[1].error&&(e=function(e,t){if(t&&!t.error){var n,r,i,a,o=t.segments,s=[],u=0;for(n=0,r=o?o.length:0;n<r;n++)(a=Qi({durationInTimescale:(i=o[n]).duration,fTimescale:i.timescale,index:u,isDynamic:h,mediaRange:i.mediaRange,mediaTime:i.startTime,mediaUrl:i.media,representation:e,timelineConverter:c}))&&(s.push(a),a=null,u++);return s.length>0&&(e.segments=s),e}}(e,n[1])),e.fragmentDuration=e.segmentDuration?e.segmentDuration:e.segments&&e.segments.length>0?e.segments[0].duration:NaN,(r=e).mediaFinishedInformation=d.getMediaFinishedInformation(r),function(e){var t,n=s.getCurrentManifestUpdate(),r=!1;if(n){for(var i=0;i<n.representationInfo.length;i++)if((t=n.representationInfo[i]).index===e.index&&t.mediaType===m()){r=!0;break}r||s.addManifestUpdateRepresentationInfo(e,m())}}(e),t()})).catch((function(e){n(e)}))}))}function y(e){if(!n||0===n.length)return null;var t=n.filter((function(t){return t.id===e}));return t.length>0?t[0]:null}function T(e){i.trigger(a.DATA_UPDATE_COMPLETED,{currentRepresentation:r,error:e},{streamId:f.id,mediaType:l})}function _(e){r&&r.id===e.id||function(e){!function(){if(!(o&&s&&u&&c))throw new Error(g.A.MISSING_CONFIG_ERROR)}();var t=new Date,n=1e3*u.getTime();e&&s.addRepresentationSwitch(e.adaptation.type,t,n,e.id),i.trigger(p.A.REPRESENTATION_SWITCH,{mediaType:l,streamId:f.id,currentRepresentation:e},{streamId:f.id,mediaType:l})}(e),r=e}function S(e){if(e.newDuration){var t=E();t&&t.adaptation.period&&(t.adaptation.period.duration=e.newDuration)}}return t={getCurrentCompositeRepresentation:function(){return r},getCurrentRepresentation:E,getRepresentationById:y,getStreamId:function(){return f.id},getType:m,prepareQualityChange:function(e){var t=n.filter((function(t){return t.id===e.id}));t.length>0&&_(t[0])},reset:function(){i.off(p.A.MANIFEST_VALIDITY_CHANGED,S,t),v()},updateData:function(e,t,i){return new Promise((function(a,c){if(n=e,_(y(i)),l!==g.A.VIDEO&&l!==g.A.ENHANCEMENT&&l!==g.A.AUDIO&&(l!==g.A.TEXT||!t))return T(),void a();for(var d=[],h=0,p=n.length;h<p;h++){var m=n[h];d.push(A(m))}Promise.all(d).then((function(){!function(){o.setPlaybackQuality(l,f,r);var e=s.getCurrentDVRInfo(l);e&&s.updateManifestUpdateInfo({latency:e.range.end-u.getTime()}),T()}(),a()})).catch((function(e){c(e)}))}))}},v(),i.on(p.A.MANIFEST_VALIDITY_CHANGED,S,t),t}$i.__dashjs_factory_name="RepresentationController";var Zi=r.A.getClassFactory($i);function Ji(e){var t,n,r,i,a,o=(e=e||{}).eventBus,s=e.debug,u=e.urlUtils,c=e.type,l=e.streamInfo,f=e.segmentsController,d=e.timelineConverter,h=e.baseURLController;function g(){return c}function m(){r=null}function E(e,t,n){var r,i,a=h.resolve(n.path),o={};return a&&t!==a.url&&u.isRelative(t)?(r=a.url,i=a.serviceLocation,o=a.queryParams,t&&(r=u.resolve(t,r))):r=t,!u.isRelative(r)&&(e.url=r,e.serviceLocation=i,e.queryParams=o,!0)}function v(e,t,i){var a=null;if(!t||!t.segmentInfoType)return a;var o=f.getSegmentByTime(t,i);return o&&(r=o,n.debug("Index for time "+i+" is "+o.index),a=A(0,o)),a}function A(e,t){if(null==t)return null;var n=new J.A,r=t.representation,i=r.bandwidth,a=zi(t.media,r.id,t.replacementNumber,t.replacementSubNumber,i,t.replacementTime);return n.adaptationIndex=r.adaptation.index,n.availabilityEndTime=t.availabilityEndTime,n.availabilityStartTime=t.availabilityStartTime,n.availabilityTimeComplete=r.availabilityTimeComplete,n.bandwidth=r.bandwidth,n.duration=t.duration,n.index=t.index,n.isPartialSegmentRequest=t.isPartialSegment,n.mediaStartTime=t.mediaStartTime,n.mediaType=g(),n.presentationStartTime=t.presentationStartTime,n.range=t.mediaRange,n.representation=r,n.startTime=t.presentationStartTime,n.timescale=r.timescale,n.type=I.G.MEDIA_SEGMENT_TYPE,n.wallStartTime=t.wallStartTime,E(n,a,r)?n:void 0}function y(e){if(!e)return{indexToRequest:0,subNumberOfPartialSegmentToRequest:NaN};var t=e.isPartialSegment,n=!isNaN(e.replacementSubNumber),r=!isNaN(e.totalNumberOfPartialSegments);if(t&&n&&r){var i=e.replacementSubNumber+1;return i<e.totalNumberOfPartialSegments?{indexToRequest:e.index,subNumberOfPartialSegmentToRequest:i}:{indexToRequest:e.index+1,subNumberOfPartialSegmentToRequest:0}}return{indexToRequest:e.index+1,subNumberOfPartialSegmentToRequest:NaN}}function T(e,t,o,s){var u=null,c=f.getSegmentByIndex(t,o,s,r);if(c)u=A(0,c),r=c;else{if(i&&!a)return n.debug(g()+" No segment found at index: "+o+". Wait for next loop"),null;a=!0}return u}function _(){n.debug("Dynamic stream complete"),a=!0}return t={getCurrentIndex:function(){return r?r.index:-1},getInitRequest:function(e,t){return t?function(e,t,n){var r=new J.A,a=t.adaptation.period,o=a.start;if(r.mediaType=n,r.type=I.G.INIT_SEGMENT_TYPE,r.range=t.range,r.availabilityStartTime=d.calcAvailabilityStartTimeFromPresentationTime(o,t,i),r.availabilityEndTime=d.calcAvailabilityEndTimeFromPresentationTime(o+a.duration,t,i),r.representation=t,E(r,t.initialization,t))return r.url=zi(r.url,t.id,void 0,void 0,t.bandwidth),r}(0,t,g()):null},getLastSegment:function(){return r},getNextSegmentRequest:function(e,t){if(!t||!t.segmentInfoType)return null;if(function(e){return e&&r&&e.endNumber&&r.replacementNumber&&r.replacementNumber>=e.endNumber}(t))return a=!0,null;var n=y(r);return T(0,t,n.indexToRequest,n.subNumberOfPartialSegmentToRequest)},getNextSegmentRequestIdempotent:function(e,t){var n=y(r),i=n.indexToRequest,a=n.subNumberOfPartialSegmentToRequest,o=f.getSegmentByIndex(t,i,a,r);return o?A(0,o):null},getSegmentRequestForTime:v,getStreamId:function(){return l.id},getStreamInfo:function(){return l},getType:g,getValidTimeAheadOfTargetTime:function(e,t,n,r){try{if(isNaN(e)||!t||!n)return NaN;if(e<0&&(e=0),isNaN(r)&&(r=.5),v(0,n,e))return e;if(n.adaptation.period.start+n.adaptation.period.duration<e)return NaN;for(var i=isFinite(n.adaptation.period.duration)?n.adaptation.period.start+n.adaptation.period.duration:e+30,a=Math.min(e+r,i),o=NaN,s=null;a<=i;){var u=null;if(a<=i&&(u=v(0,n,a)),u){o=a,s=u;break}a+=r}if(s){var c=s.startTime+s.duration;return e>s.startTime&&c-e>r?e:!isNaN(s.startTime)&&e<s.startTime&&o>s.startTime?s.startTime+.001:Math.min(c-r,o)}return o}catch(e){return NaN}},initialize:function(e){i=e,a=!1,f.initialize(e)},isLastSegmentRequested:function(e,t){if(!e||!r)return!1;if(a)return!0;if(!isFinite(e.adaptation.period.duration))return!1;if(r.presentationStartTime+r.duration>t)return!1;if(e.mediaFinishedInformation&&!isNaN(e.mediaFinishedInformation.numberOfSegments)&&!isNaN(r.index)&&r.index>=e.mediaFinishedInformation.numberOfSegments-1){if(!i||e.segmentInfoType===Me.A.SEGMENT_TEMPLATE)return!0;if(i&&e.segmentInfoType===Me.A.SEGMENT_LIST&&e.adaptation.period.nextPeriodId)return!0}return!!(i&&e.adaptation.period.nextPeriodId&&e.segmentInfoType===Me.A.SEGMENT_TIMELINE&&e.mediaFinishedInformation&&!isNaN(e.mediaFinishedInformation.mediaTimeOfLastSignaledSegment)&&r&&!isNaN(r.mediaStartTime)&&!isNaN(r.duration)&&r.mediaStartTime+r.duration>=e.mediaFinishedInformation.mediaTimeOfLastSignaledSegment-.05)},repeatSegmentRequest:function(e,t){return t&&t.segmentInfoType?T(0,t,r?r.index:0,r&&r.isPartialSegment&&!isNaN(r.replacementSubNumber)?r.replacementSubNumber:NaN):null},reset:function(){m(),o.off(p.A.DYNAMIC_TO_STATIC,_,t)}},n=s.getLogger(t),m(),o.on(p.A.DYNAMIC_TO_STATIC,_,t),t}Ji.__dashjs_factory_name="DashHandler";var ea=r.A.getClassFactory(Ji);function ta(e,t){var n=(e=e||{}).timelineConverter,r=e.dashMetrics;function i(e,r){if(function(){if(!n)throw new Error(g.A.MISSING_CONFIG_ERROR)}(),!e)return null;void 0===r&&(r=null);var i=null,o=n.calcMediaTimeFromPresentationTime(r,e);return function(e,t){var n,r,i,o,s,u,c=function(e){return e.adaptation.period.mpd.manifest.Period[e.adaptation.period.index].AdaptationSet[e.adaptation.index].Representation[e.index].SegmentTemplate||e.adaptation.period.mpd.manifest.Period[e.adaptation.period.index].AdaptationSet[e.adaptation.index].Representation[e.index].SegmentList}(e),l=c.SegmentTimeline,f=c.SegmentURL,d=0,h=-1;u=e.timescale;var g=!1,p=(n=l.S).length;for(i=0;i<p&&!g;i++)for(s=0,(r=n[i]).hasOwnProperty("r")&&(s=r.r),r.hasOwnProperty("t")&&(d=r.t),s<0&&(s=a(e,n[i+1],r,u,d/u)),o=0;o<=s&&!g;o++)(g=t({mediaTime:d,segmentBase:c,segmentURL:f,currentSElement:r,sElementCounterIncludingRepeats:++h,sElementCounter:i}))&&(e.segmentDuration=r.d/u),d+=r.d}(e,(function(r){var a=e.timescale;return function(r,a){var o=a.mediaTime,s=a.segmentBase,u=a.segmentURL,c=a.currentSElement,l=a.sElementCounterIncludingRepeats,f=a.sElementCounter,d=c.d,h=e.timescale;return r<o+d&&r>=o&&(function(r){var a=r.segmentURL,o=r.sElementCounter,s=r.currentSElement,u=r.mediaTime,c=r.durationInTimescale,l=r.fTimescale,f=r.requiredMediaTimeInTimescaleUnits,d=r.sElementCounterIncludingRepeats,h=function(e,t,n){var r=e.media;return t&&(r=t[n].media||""),r}(r.segmentBase,a,o),g=function(e,t,n){var r=e.mediaRange;return t&&(r=t[n].mediaRange),r}(s,a,o),p=Xi(s),m=function(e){if(!(!e||void 0===e.totalNumberOfPartialSegments||isNaN(e.totalNumberOfPartialSegments)||e.totalNumberOfPartialSegments<1)){for(var t=e.requiredMediaTimeInTimescaleUnits,n=e.mediaTime,r=e.totalNumberOfPartialSegments,i=e.durationInTimescale/r,a=0;a<r;a++){var o=n+a*i;if(t>=o&&t<o+i)return a}return NaN}}({durationInTimescale:c,requiredMediaTimeInTimescaleUnits:f,mediaTime:u,totalNumberOfPartialSegments:p});i=Qi({timelineConverter:n,isDynamic:t,representation:e,mediaTime:u,durationInTimescale:c,fTimescale:l,mediaUrl:h,mediaRange:g,index:d,tManifest:s.tManifest,totalNumberOfPartialSegments:p,subNumberOfPartialSegmentToRequest:m})}({segmentBase:s,segmentURL:u,sElementCounter:f,currentSElement:c,mediaTime:o,durationInTimescale:d,fTimescale:h,requiredMediaTimeInTimescaleUnits:r,sElementCounterIncludingRepeats:l}),!0)}(parseFloat((o*a).toPrecision(15)),r)})),i}function a(e,t,i,a,o){var s;if(t&&t.hasOwnProperty("t"))s=t.t/a;else try{var u=0;if(isNaN(e.adaptation.period.start)||isNaN(e.adaptation.period.duration)||!isFinite(e.adaptation.period.duration)){var c=r.getCurrentDVRInfo();u=isNaN(c.end)?0:c.end}else u=e.adaptation.period.start+e.adaptation.period.duration;s=n.calcMediaTimeFromPresentationTime(u,e),e.segmentDuration=i.d/a}catch(e){s=0}return Math.max(Math.ceil((s-o)/(i.d/a))-1,0)}return{getMediaFinishedInformation:function(e){if(!e)return 0;var t,n,r,i,o,s,u=(e.adaptation.period.mpd.manifest.Period[e.adaptation.period.index].AdaptationSet[e.adaptation.index].Representation[e.index].SegmentTemplate||e.adaptation.period.mpd.manifest.Period[e.adaptation.period.index].AdaptationSet[e.adaptation.index].Representation[e.index].SegmentList).SegmentTimeline,c=0,l=0,f=0;s=e.timescale;var d=(t=u.S).length;for(r=0;r<d;r++)for(o=0,(n=t[r]).hasOwnProperty("r")&&(o=n.r),n.hasOwnProperty("t")&&(l=(c=n.t)/s),o<0&&(o=a(e,t[r+1],n,s,l)),i=0;i<=o;i++)f++,l=(c+=n.d)/s;return{numberOfSegments:f,mediaTimeOfLastSignaledSegment:l}},getSegmentByIndex:function(e,t){return e?i(e,t&&!isNaN(t.presentationStartTime)?t.presentationStartTime+t.duration+.01:0):null},getSegmentByTime:i}}ta.__dashjs_factory_name="TimelineSegmentsGetter";var na=r.A.getClassFactory(ta);function ra(e,t){var n=(e=e||{}).timelineConverter;function r(e,r,a){if(!e)return null;var o=i(e),s=Xi(o);void 0!==s&&s>=0&&(a=void 0!==a&&a<s?a:0);var u=Wi({index:r=Math.max(r,0),isDynamic:t,mediaTime:Math.round(r*e.segmentDuration*e.timescale,10),mediaUrl:o.media,representation:e,subNumberOfPartialSegmentToRequest:a,timelineConverter:n,totalNumberOfPartialSegments:s});return u&&e.endNumber&&u.replacementNumber>e.endNumber?null:u}function i(e){return e.adaptation.period.mpd.manifest.Period[e.adaptation.period.index].AdaptationSet[e.adaptation.index].Representation[e.index].SegmentTemplate}return{getMediaFinishedInformation:function(e){var t={numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN};if(!e)return t;var n=e.segmentDuration;return isNaN(n)?t.numberOfSegments=1:t.numberOfSegments=Math.ceil(e.adaptation.period.duration/n),t},getSegmentByIndex:r,getSegmentByTime:function(e,t){if(!e)return null;var a=e.segmentDuration;if(isNaN(a))return null;var o=n.calcPeriodRelativeTimeFromMpdRelativeTime(e,t),s=i(e),u=Math.floor(o/a),c=function(e){if(!(!e||void 0===e.totalNumberOfPartialSegments||isNaN(e.totalNumberOfPartialSegments)||e.totalNumberOfPartialSegments<1)){var t=e.totalNumberOfPartialSegments,n=e.representation,r=e.requestedTimeRelativeToPeriodStart,i=e.indexWithoutStartNumber*n.segmentDuration,a=n.segmentDuration/t,o=r-i,s=Math.floor(o/a);return s=Math.max(0,Math.min(s,t-1))}}({totalNumberOfPartialSegments:Xi(s),representation:e,requestedTimeRelativeToPeriodStart:o,indexWithoutStartNumber:u});return r(e,u,c)}}}ra.__dashjs_factory_name="TemplateSegmentsGetter";var ia=r.A.getClassFactory(ra);function aa(e,t){var n=(e=e||{}).timelineConverter;function r(){if(!n||!n.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(g.A.MISSING_CONFIG_ERROR)}function i(e,i){if(r(),!e)return null;var a=e.adaptation.period.mpd.manifest.Period[e.adaptation.period.index].AdaptationSet[e.adaptation.index].Representation[e.index].SegmentList,o=a.SegmentURL.length,s=e&&!isNaN(e.startNumber)?e.startNumber:1,u=Math.max(s-1,0),c=Math.max(i-u,0),l=null;if(c<o){var f=a.SegmentURL[c];(l=Wi({index:i,isDynamic:t,mediaRange:f.mediaRange,mediaTime:(s+i-1)*e.segmentDuration,representation:e,timelineConverter:n}))&&(l.media=f.media?f.media:"",l.indexRange=f.indexRange)}return l}return{getSegmentByIndex:i,getSegmentByTime:function(e,t){if(r(),!e)return null;var a=e.segmentDuration;if(isNaN(a))return null;var o=n.calcPeriodRelativeTimeFromMpdRelativeTime(e,t);return i(e,Math.floor(o/a))},getMediaFinishedInformation:function(e){var t={numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN};if(!e)return t;var n=e.adaptation.period.mpd.manifest.Period[e.adaptation.period.index].AdaptationSet[e.adaptation.index].Representation[e.index].SegmentList,r=e&&!isNaN(e.startNumber)?e.startNumber:1,i=Math.max(r-1,0);return t.numberOfSegments=i+n.SegmentURL.length,t}}}aa.__dashjs_factory_name="ListSegmentsGetter";var oa=r.A.getClassFactory(aa);function sa(e){var t=(e=e||{}).timelineConverter;function n(){if(!t||!t.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(g.A.MISSING_CONFIG_ERROR)}function r(e,t){if(n(),!e)return null;var r,i=e.segments?e.segments.length:-1;if(t<i&&(r=e.segments[t])&&r.index===t)return r;for(var a=0;a<i;a++)if((r=e.segments[a])&&r.index===t)return r;return null}return{getSegmentByIndex:r,getSegmentByTime:function(e,t){n();var i=function(e,t){if(!e)return-1;var n,r,i,a,o,s=e.segments,u=s?s.length:null,c=-1;if(s&&u>0)for(o=0;o<u;o++)if(i=(r=s[o]).presentationStartTime,t+(n=(a=r.duration)/2)>=i&&t-n<i+a){c=r.index;break}return c}(e,t);return r(e,i)},getMediaFinishedInformation:function(e){var t={numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN};return e&&e.segments?(t.numberOfSegments=e.segments.length,t):t}}}sa.__dashjs_factory_name="SegmentBaseGetter";var ua=r.A.getClassFactory(sa);function ca(e){e=e||{};var t,n,r=this.context,i=e.dashConstants,a=e.type,o=e.segmentBaseController;function s(e){return e?e.segments?n[i.SEGMENT_BASE]:n[e.segmentInfoType]:null}return t={initialize:function(t){n[i.SEGMENT_TIMELINE]=na(r).create(e,t),n[i.SEGMENT_TEMPLATE]=ia(r).create(e,t),n[i.SEGMENT_LIST]=oa(r).create(e,t),n[i.SEGMENT_BASE]=ua(r).create(e,t)},updateInitData:function(e,t){return t?Promise.resolve():o.getSegmentBaseInitSegment({representation:e,mediaType:a})},updateSegmentData:function(e,t){return t?Promise.resolve():o.getSegmentList({mimeType:e.mimeType,representation:e,mediaType:a})},getSegmentByIndex:function(e,t,n,r){var a=s(e);return a?e.segmentInfoType?e.segmentInfoType===i.SEGMENT_TIMELINE?a.getSegmentByIndex(e,r):e.segmentInfoType===i.SEGMENT_TEMPLATE?a.getSegmentByIndex(e,t,n):a.getSegmentByIndex(e,t):a.getSegmentByIndex(e,t):null},getSegmentByTime:function(e,t){var n=s(e);return n?n.getSegmentByTime(e,t):null},getMediaFinishedInformation:function(e){var t=s(e);return t?t.getMediaFinishedInformation(e):{numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN}}},n={},t}ca.__dashjs_factory_name="SegmentsController";var la=r.A.getClassFactory(ca);function fa(){return{ntpToUTC:function(e){var t=new Date(Date.UTC(1900,0,1,0,0,0));return new Date(t.getTime()+e).getTime()}}}fa.__dashjs_factory_name="TimeUtils";var da=r.A.getSingletonFactory(fa);function ha(e){e=e||{};var t,n,r,i,a,s,c,l,f,m,E,v,A,y,T,_,S,b,R=this.context,N=(0,d.A)(R).getInstance(),C=e.abrController,w=e.adapter,D=e.boxParser,O=e.capabilities,M=e.dashMetrics,P=e.errHandler,L=e.fragmentModel,x=e.manifestModel,F=e.mediaController,U=e.mediaPlayerModel,k=e.mimeType,B=e.playbackController,G=e.segmentBlacklistController,H=e.settings,Y=e.streamInfo,V=e.textController,q=e.timelineConverter,K=e.type;function j(){return Y.id}function z(){return K}function W(){m=[],i=null,n=0,S=!1,_=!1,v=!1,s=null,b=!1,ie()}function Q(e){return!isNaN(e)&&!isNaN(Y.duration)&&isFinite(Y.duration)&&e>=Y.start+Y.duration}function X(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.sender)if(B.getIsManifestUpdateInProgress())J();else if((!i.isText||V.isTextEnabled())&&t&&e.representationId&&!t.appendInitSegmentFromCache(e.representationId)){var r=A.getCurrentRepresentation();if(0===r.range)return void $();var o=a?a.getInitRequest(i,r):null;o?L.executeRequest(o):n&&(y.setInitSegmentRequired(!0),J())}}function $(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(B.getIsManifestUpdateInProgress()||t.getIsPruningInProgress())J();else{var o=function(){var e;if(isNaN(n)||z()===g.A.TEXT&&!V.isTextEnabled())return null;if(a){var t=_e();e=S?a.getSegmentRequestForTime(i,t,n):_?a.repeatSegmentRequest(i,t):a.getNextSegmentRequest(i,t)}return e}();o?(S=!1,_=!1,function(e){isNaN(e.startTime+e.duration)||(n=e.startTime+e.duration),e.delayLoadingTime=(new Date).getTime()+y.getTimeToLoadDelay(),y.setTimeToLoadDelay(0),function(e){var t=e.url;return e.range&&(t=t.concat("_",e.range)),G.contains(t)}(e)?(f.warn("Fragment request url ".concat(e.url," for stream id ").concat(Y.id," and media type ").concat(K," is on the ignore list and will be skipped")),J()):(f.debug("Next fragment request url for stream id ".concat(Y.id," and media type ").concat(K," is ").concat(e.url," with request range ").concat(e.range)),L.executeRequest(e))}(o)):function(e){var t=A.getCurrentRepresentation();try{var r;if(H.get().streaming.gaps.enableSeekFix&&(S||0===B.getTime())&&(l?l&&t.segmentInfoType===Me.A.SEGMENT_TIMELINE&&(r=function(e){return a.getValidTimeAheadOfTargetTime(n,i,e,H.get().streaming.gaps.threshold)}(t)):r=function(e){var t=a.getValidTimeAheadOfTargetTime(n,i,e,H.get().streaming.gaps.threshold);return isNaN(t)&&n>=e.adaptation.period.mpd.mediaPresentationDuration-e.segmentDuration&&(t=n-.1),t}(t),!isNaN(r)&&r!==n))return void function(e,t){B.isSeeking()||0===B.getTime()?(f.warn("Adjusting playback time ".concat(e," because of gap in the manifest. Seeking by ").concat(e-n)),B.seek(e,!1,!1)):(f.warn("Adjusting buffering time ".concat(e," because of gap in the manifest. Adjusting time by ").concat(e-n)),De(e),t&&J())}(r,e)}catch(e){f.error(e)}Z()||e&&J()}(r)}}function Z(){var e=A.getCurrentRepresentation(),r=a.isLastSegmentRequested(e,n);if(r){var i=a.getCurrentIndex();f.debug("Segment requesting for stream ".concat(Y.id," has finished")),N.trigger(h.A.STREAM_REQUESTING_COMPLETED,{segmentIndex:i},{streamId:Y.id,mediaType:K}),t.segmentRequestingCompleted(i),Te()}return r}function J(){var e=U.getScheduleTimeout();y.startScheduleTimer(e)}function ee(e){M.addBufferState(K,e.state,y.getBufferTarget()),e.state!==o.BUFFER_EMPTY||B.isSeeking()||(f.info("Buffer is empty! Stalling!"),M.pushPlayListTraceMetrics(new Date,An.REBUFFERING_REASON))}function te(e){L.syncExecutedRequestsWithBufferedRange(t.getBuffer().getAllBufferRanges(),Y.duration),e.quotaExceeded&&e.from>B.getTime()&&De(e.from),e.hasEnoughSpaceToAppend&&e.quotaExceeded&&y.startScheduleTimer()}function ne(e){if(e&&e.lastRequestAppended&&e.lastRequestAppended.url){var t=e.lastRequestAppended.url;e.lastRequestAppended.range&&(t=t.concat("_",e.lastRequestAppended.range)),f.warn("Blacklisting segment with url ".concat(t)),G.add(t)}}function re(e){if(f.debug("Appended bytes for ".concat(e.mediaType," and stream id ").concat(e.streamId)),e.segmentType===I.G.INIT_SEGMENT_TYPE){var t=e.representationId;y.setLastInitializedRepresentationId(t),f.info("["+K+"] lastInitializedRepresentationId changed to "+t)}E&&E.enabled?de(E.newRepresentation,E.oldRepresentation):b||y.startScheduleTimer(0)}function ie(){E={newRepresentation:null,oldRepresentation:null,enabled:!1}}function oe(e){return new Promise((function(n){if(!A)return Promise.resolve();var r,a;se((a=e.newRepresentation?{selectedRepresentation:(r=e).newRepresentation,currentMediaInfo:r.newMediaInfo}:null!==i&&w.areMediaInfosEqual(i,e.newMediaInfo)?function(e){return{currentMediaInfo:e.newMediaInfo,selectedRepresentation:A.getCurrentRepresentation()}}(e):function(e){var t;return t=!H.get().streaming.abr.autoSwitchBitrate[e.newMediaInfo.type]&&e.previouslySelectedRepresentation?e.previouslySelectedRepresentation.bitrateInKbit:C.getInitialBitrateFor(K),{selectedRepresentation:C.getOptimalRepresentationForBitrate(e.newMediaInfo,t,!1),currentMediaInfo:e.newMediaInfo}}(e)).currentMediaInfo),N.trigger(),function(e){s&&e.selectedRepresentation.dependentRepresentation&&(f.info("["+K+"] selectMediaInfo : call selectMediaInfo on enhancementStreamProcessor for index = "+e.selectedRepresentation.absoluteIndex),s.selectMediaInfo(new bi({newMediaInfo:e.selectedRepresentation.mediaInfo,newRepresentation:e.selectedRepresentation})))}(a);var o=C.getPossibleVoRepresentations(i,!1);return A.updateData(o,i.isFragmented,a.selectedRepresentation.id).then((function(){!function(){if(t&&A){var e=A.getCurrentCompositeRepresentation();t.getIsBufferingCompleted()||t.updateBufferTimestampOffset(e)}}(),n()})).catch((function(e){f.error(e),n()}))}))}function se(e){w.areMediaInfosEqual(i,e)||N.trigger(p.A.NEW_TRACK_SELECTED,{value:e}),i=e,C.handleNewMediaInfo(i),N.trigger(h.A.MEDIAINFO_UPDATED,{mediaType:K,streamId:Y.id,currentMediaInfo:i})}function ue(e){var n=e.newRepresentation,r=e.oldRepresentation,a=Oe();n&&r||f.warn("_handleDifferentSwitchTypes() is missing the target representations"),e.reason&&e.reason.forceReplace?function(e,n){L.abortRequests(),N.trigger(h.A.BUFFER_REPLACEMENT_STARTED,{mediaType:K,streamId:Y.id},{mediaType:K,streamId:Y.id}),y.setShouldCheckPlaybackQuality(!1),t.prepareForForceReplacementQualitySwitch(e,n).then((function(){ce()})).catch((function(){ce()}))}(n,r):e&&e.reason&&e.reason.forceAbandon?function(e,n){t.prepareForAbandonQualitySwitch(e,n).then((function(){le()})).catch((function(){le()}))}(n,r):!U.getFastSwitchEnabled()||a&&a.isPartialSegment?de(n,r):function(e,n){var r=B.getTime(),a=1.5*(isNaN(e.fragmentDuration)?1:e.fragmentDuration),s=L.getRequests({state:ae.FRAGMENT_MODEL_EXECUTED,time:r+a,threshold:0})[0];if(s&&!i.isText){var u=t.getBufferLevel(),c=C.getAbandonmentStateFor(Y.id,K),l=K===g.A.VIDEO&&e.dependentRepresentation?e.dependentRepresentation.bandwidth:e.bandwidth;s.bandwidth<l&&u>=a&&c===o.ALLOW_LOAD?t.prepareForFastQualitySwitch(e,n).then((function(){fe(r,a)})).catch((function(){fe(r,a)})):de(e,n)}else de(e,n)}(n,r),M.pushPlayListTraceMetrics(new Date,An.REPRESENTATION_SWITCH_STOP_REASON),M.createPlaylistTraceMetrics(n.id,1e3*B.getTime(),B.getPlaybackRate())}function ce(){Re(),ie(),v=!1}function le(){L.abortRequests(),_=!0,y.setShouldCheckPlaybackQuality(!1),y.startScheduleTimer(),v=!1}function fe(e,t){L.abortRequests(),De(e+t),y.setShouldCheckPlaybackQuality(!1),y.startScheduleTimer(),v=!1}function de(e,n){var r=L.getRequests({state:ae.FRAGMENT_MODEL_LOADING});if(r&&r.length>0)return f.debug("Preparing for default quality switch: Waiting for ongoing segment request to be finished before applying switch."),E.newRepresentation=e,E.oldRepresentation=n,void(E.enabled=!0);t.prepareForDefaultQualitySwitch(e,n).then((function(){he()})).catch((function(){he()}))}function he(){y.setShouldCheckPlaybackQuality(!1),i.segmentAlignment||i.subSegmentAlignment?y.startScheduleTimer():Ne(),ie(),v=!1}function ge(e){f.info("onFragmentLoadingAbandoned request: "+e.request.url+" has been aborted"),B.isSeeking()||y.getSwitchTrack()||v||(f.info("onFragmentLoadingAbandoned request: "+e.request.url+" has to be downloaded again, origin is not seeking process or switch track call"),e.request&&e.request.isInitializationRequest()?y.setInitSegmentRequired(!0):De(e.request.startTime+e.request.duration/2),y.startScheduleTimer(0))}function pe(e){f.info("OnFragmentLoadingCompleted for stream id "+Y.id+" and media type "+K+" - Url:",e.request?e.request.url:"undefined",e.request.range?", Range:"+e.request.range:""),i.isText&&y.startScheduleTimer(0),e.error&&e.request.serviceLocation&&function(e){f.info("Fragment loading completed with an error"),e&&e.request&&e.request.type&&(e.request.type===I.G.INIT_SEGMENT_TYPE?X({representationId:e.request.representation.id,sender:{}},!1):e.request.type===I.G.MEDIA_SEGMENT_TYPE&&(De(e.request.startTime+e.request.duration/2),$({},!1)))}(e)}function me(){De(B.getTime()),ye().startScheduleTimer()}function Ee(e){var n=e.currentTrackInfo;if(n){var r=m.find((function(e){return e.index===n.index&&e.lang===n.lang}));r&&oe(new bi({newMediaInfo:r})).then((function(){t.setIsBufferingCompleted(!1),De(B.getTime()),y.setInitSegmentRequired(!0),y.startScheduleTimer()}))}}function ve(e){De(e.quotaExceededTime),Te()}function Ae(){return t?t.getBuffer():null}function ye(){return y}function Te(){y&&y.clearScheduleTimer()}function _e(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:NaN;return isNaN(t)?e=A?A.getCurrentRepresentation():null:((0,ze.zQ)(t),e=A?A.getRepresentationById(t):null),e}function Se(){return!!t&&t.getIsBufferingCompleted()}function Ie(e){if(H.get().streaming.enableManifestTimescaleMismatchFix){var t=e.chunk,n=t.bytes,r=_e(t.representation.id);r&&(r.timescale=D.getMediaTimescaleFromMoov(n))}}function be(e){var t=e.chunk,n=t.bytes,r=_e(t.representation.id);if(r){var i;if(H.get().streaming.parseInbandPrft&&e.request.type===I.G.MEDIA_SEGMENT_TYPE){var a=function(e,t){var n=e.getBoxes("prft"),r=[];return n.forEach((function(e){r.push(function(e,t){var n="unknown";switch(e.flags){case 0:n=Me.A.PRODUCER_REFERENCE_TIME_TYPE.ENCODER;break;case 16:n=Me.A.PRODUCER_REFERENCE_TIME_TYPE.APPLICATION;break;case 24:n=Me.A.PRODUCER_REFERENCE_TIME_TYPE.CAPTURED}var r=1e3*e.ntp_timestamp_sec+e.ntp_timestamp_frac/Math.pow(2,32)*1e3;return{type:n,ntpTimestamp:r=da(R).getInstance().ntpToUTC(r),mediaTime:e.media_time/t}}(e,t))})),r}(i=i||D.parse(n),r.timescale);a&&a.length&&N.trigger(p.A.INBAND_PRFT,{data:a},{streamId:Y.id,mediaType:K})}var o=w.getEventsFor(r.mediaInfo,null,Y),s=w.getEventsFor(r,r,Y);if(o&&o.length>0||s&&s.length>0){var u=e.request,c=function(e,t,n,r){try{for(var i={},a=[],o=n.concat(r),s=0,u=o.length;s<u;s++)i[o[s].schemeIdUri+"/"+o[s].value]=o[s];var c=e.getBoxes("emsg");if(!c||0===c.length)return a;for(var l=e.getBox("sidx"),f=!l||isNaN(l.earliest_presentation_time)||isNaN(l.timescale)?t&&!isNaN(t.mediaStartTime)?t.mediaStartTime:0:l.earliest_presentation_time/l.timescale,d=Math.max(f,0),h=A.getCurrentRepresentation(),g=0,p=c.length;g<p;g++){var m=w.getEvent(c[g],i,d,h);m&&a.push(m)}return a}catch(e){return[]}}(i=i||D.parse(n),u,o,s);N.trigger(h.A.INBAND_EVENTS,{events:c},{streamId:Y.id})}}}function Re(){var e=B.getTime();H.get().streaming.buffer.flushBufferAtTrackSwitch&&B.seek(e+.001,!1,!0),De(e),t.setSeekTarget(e),y.startScheduleTimer()}function Ne(){var e=B.getTime(),n=t.getContinuousBufferTimeForTargetTime(e);De(isNaN(n)?e:n),y.startScheduleTimer()}function we(e){e&&!isNaN(e.time)&&(De(e.time),t.setSeekTarget(e.time))}function De(e){n=e,S=!0}function Oe(){return a.getLastSegment()}return c={checkAndHandleCompletedBuffering:Z,clearScheduleTimer:Te,createBufferSinks:function(e,n){var r=Ae();return r?Promise.resolve(r):t?t.createBufferSink(i,e,n):Promise.resolve(null)},dischargePreBuffer:function(){t.dischargePreBuffer()},finalisePlayList:function(e,t){M.pushPlayListTraceMetrics(e,t)},getAllMediaInfos:function(){return m},getBuffer:Ae,getBufferController:function(){return t},getBufferLevel:function(){return t?t.getBufferLevel():0},getFragmentModel:function(){return L},getLastSegment:Oe,getMediaInfo:function(){return i},getMediaSource:function(){return t.getMediaSource()},getRepresentation:_e,getRepresentationController:function(){return A},getScheduleController:ye,getStreamId:j,getStreamInfo:function(){return Y},getType:z,initialize:function(i,o,s){T=la(R).create({events:h.A,eventBus:N,streamInfo:Y,timelineConverter:q,dashConstants:Me.A,segmentBaseController:e.segmentBaseController,type:K}),a=ea(R).create({baseURLController:e.baseURLController,boxParser:D,constants:g.A,dashConstants:Me.A,dashMetrics:M,debug:(0,u.A)(R).getInstance(),errHandler:P,errors:Ce.A,eventBus:N,events:h.A,mediaPlayerModel:U,segmentsController:T,settings:H,streamInfo:Y,timelineConverter:q,type:K,urlUtils:(0,Pe.A)(R).getInstance()}),l=Y.manifestInfo.isDynamic,a.initialize(l),C.registerStreamType(K,c),A=Zi(R).create({abrController:C,adapter:w,dashConstants:Me.A,dashMetrics:M,errors:Ce.A,eventBus:N,events:h.A,isDynamic:l,playbackController:B,segmentsController:T,streamInfo:Y,timelineConverter:q,type:K}),t=function(e,t){return e?e!==g.A.TEXT||t?Pi(R).create({abrController:C,capabilities:O,errHandler:P,fragmentModel:L,manifestModel:x,mediaController:F,mediaPlayerModel:U,playbackController:B,representationController:A,settings:H,streamInfo:Y,textController:V,type:e}):Fi(R).create({errHandler:P,fragmentModel:L,mimeType:k,settings:H,streamInfo:Y,textController:V,type:e}):(P.error(new je.A(Ce.A.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,Ce.A.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+"not properly defined")),null)}(K,s),t&&t.initialize(i),y=ki(R).create({abrController:C,adapter:w,bufferController:t,dashMetrics:M,fragmentModel:L,mediaController:F,mediaPlayerModel:U,mimeType:k,playbackController:B,representationController:A,settings:H,streamInfo:Y,textController:V,type:K}),r=o,y.initialize(o),n=0,S=!1,_=!1},isBufferingCompleted:Se,prepareInnerPeriodPlaybackSeeking:function(e){return new Promise((function(n){if(t.hasBufferAtTime(e.seekTime))return t.pruneBuffer(),Q(t.getContinuousBufferTimeForTargetTime(e.seekTime))&&t.setIsBufferingCompleted(!0),void n();Te(),L.abortRequests(),t.prepareForPlaybackSeek().then((function(){var n=t.getAllRangesWithSafetyFactor(e.seekTime);return t.clearBuffers(n)})).then((function(){var r=t.getContinuousBufferTimeForTargetTime(e.seekTime);if(Q(r))t.setIsBufferingCompleted(!0),n();else{var i=isNaN(r)?e.seekTime:r;De(i),t.setSeekTarget(i);var a=[];a.push(t.updateAppendWindow());var o=_e();a.push(t.updateBufferTimestampOffset(o)),Promise.all(a).then((function(){y.setInitSegmentRequired(!0),y.setShouldCheckPlaybackQuality(!1),y.startScheduleTimer(),n()}))}})).catch((function(e){f.error(e)}))}))},prepareOuterPeriodPlaybackSeeking:function(){return new Promise((function(e,n){try{Te(),L.abortRequests(),t.prepareForPlaybackSeek().then((function(){return t.pruneAllSafely()})).then((function(){e()}))}catch(e){n(e)}}))},prepareQualityChange:function(e){if(e.newRepresentation){var t=function(e){if(s)s.prepareQualityChange(e);else if(K===g.A.ENHANCEMENT){var t=e.oldRepresentation.mediaInfo.type,n=e.newRepresentation.mediaInfo.type;if(t===g.A.ENHANCEMENT&&n===g.A.VIDEO)return f.info("Stop "+K+" stream processor"),y.reset(),!0;if(t===g.A.VIDEO&&n===g.A.ENHANCEMENT)return f.info("Start "+K+" stream processor"),oe(new bi({newMediaInfo:e.newRepresentation.mediaInfo,newRepresentation:e.newRepresentation})).then((function(){y.setup(),y.initialize(r),y.startScheduleTimer()})),!0}return!1}(e);t||(E&&E.enabled&&f.warn("Canceling queued representation switch to ".concat(E.newRepresentation.id," for ").concat(K)),e.isAdaptationSetSwitch?(f.debug("Preparing quality switch to different AdaptationSet for type ".concat(K," from representation id ").concat(e.oldRepresentation.id," to ").concat(e.newRepresentation.id)),function(e){var t=e.newRepresentation;v=!0,Te(),y.setSwitchTrack(!0);var n=t.mediaInfo;se(n),oe(new bi({newMediaInfo:n,newRepresentation:t})).then((function(){ue(e)}))}(e)):(f.debug("Preparing quality within the same AdaptationSet for type ".concat(K," from representation id ").concat(e.oldRepresentation.id," to ").concat(e.newRepresentation.id)),function(e){var t=e.newRepresentation;v=!0,Te(),A.prepareQualityChange(t),ue(e)}(e)))}},prepareTrackSwitch:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise((function(r){f.debug("Preparing track switch for type ".concat(K));var i=K===g.A.TEXT||n||H.get().streaming.trackSwitchMode[K]===g.A.TRACK_SWITCH_MODE_ALWAYS_REPLACE&&B.getTimeToStreamEnd(Y)>H.get().streaming.buffer.stallThreshold;t.getIsBufferingCompleted()&&!i?function(e){return new Promise((function(n){var r=A.getCurrentRepresentation();t.prepareForNonReplacementTrackSwitch(r,e).then((function(){N.trigger(h.A.BUFFERING_COMPLETED,{},{streamId:Y.id,mediaType:K}),n()})).catch((function(){N.trigger(h.A.BUFFERING_COMPLETED,{},{streamId:Y.id,mediaType:K}),n()}))}))}(e).then((function(){r()})):(y.setSwitchTrack(!0),i?function(e){return new Promise((function(n){N.trigger(h.A.BUFFER_REPLACEMENT_STARTED,{mediaType:K,streamId:Y.id},{mediaType:K,streamId:Y.id}),L.abortRequests();var r=_e();t.prepareForReplacementTrackSwitch(r,e).then((function(){Re(),n()})).catch((function(){Re(),n()}))}))}(e).then((function(){r()})):function(e){return new Promise((function(n){var r=function(){var i=L.getRequests({state:ae.FRAGMENT_MODEL_LOADING});if(i&&0!==i.length)N.once(p.A.FRAGMENT_LOADING_COMPLETED,r,c);else{var a=_e();t.prepareForNonReplacementTrackSwitch(a,e).then((function(){Ne(),n()})).catch((function(e){f.error(e),Ne(),n()}))}};r()}))}(e).then((function(){r()})))}))},probeNextRequest:function(){var e=_e();return a.getNextSegmentRequestIdempotent(i,e)},reset:function(e,n){a&&a.reset(),t&&(t.reset(e,n),t=null),y&&(y.reset(),y=null),A&&(A.reset(),A=null),T&&(T=null),C&&C.unRegisterStreamType(j(),K),N.off(h.A.BUFFER_CLEARED,te,c),N.off(h.A.BUFFER_LEVEL_STATE_CHANGED,ee,c),N.off(h.A.BYTES_APPENDED_END_FRAGMENT,re,c),N.off(h.A.FRAGMENT_LOADING_ABANDONED,ge,c),N.off(h.A.FRAGMENT_LOADING_COMPLETED,pe,c),N.off(h.A.INIT_FRAGMENT_LOADED,Ie,c),N.off(h.A.INIT_FRAGMENT_NEEDED,X,c),N.off(h.A.MEDIA_FRAGMENT_LOADED,be,c),N.off(h.A.MEDIA_FRAGMENT_NEEDED,$,c),N.off(h.A.QUOTA_EXCEEDED,ve,c),N.off(h.A.SEEK_TARGET,we,c),N.off(h.A.SET_FRAGMENTED_TEXT_AFTER_DISABLED,me,c),N.off(h.A.SET_NON_FRAGMENTED_TEXT,Ee,c),N.off(h.A.SOURCE_BUFFER_ERROR,ne,c),W(),K=null,Y=null},selectMediaInfo:oe,setEnhancementStreamProcessor:function(e){s=e,f.info("enhancementStreamProcessor = "+s)},setExplicitBufferingTime:De,setMediaInfoArray:function(e){m=e},setMediaSource:function(e){return t.setMediaSource(e,i)},setTrackSwitchInProgress:function(e){b=e},updateStreamInfo:function(e){return Y=e,Se()?Promise.resolve():t.updateAppendWindow()}},f=(0,u.A)(R).getInstance().getLogger(c),W(),N.on(h.A.BUFFER_CLEARED,te,c),N.on(h.A.BUFFER_LEVEL_STATE_CHANGED,ee,c),N.on(h.A.BYTES_APPENDED_END_FRAGMENT,re,c),N.on(h.A.FRAGMENT_LOADING_ABANDONED,ge,c),N.on(h.A.FRAGMENT_LOADING_COMPLETED,pe,c),N.on(h.A.INIT_FRAGMENT_LOADED,Ie,c),N.on(h.A.INIT_FRAGMENT_NEEDED,X,c),N.on(h.A.MEDIA_FRAGMENT_LOADED,be,c),N.on(h.A.MEDIA_FRAGMENT_NEEDED,$,c),N.on(h.A.QUOTA_EXCEEDED,ve,c),N.on(h.A.SEEK_TARGET,we,c),N.on(h.A.SET_FRAGMENTED_TEXT_AFTER_DISABLED,me,c),N.on(h.A.SET_NON_FRAGMENTED_TEXT,Ee,c),N.on(h.A.SOURCE_BUFFER_ERROR,ne,c),c}ha.__dashjs_factory_name="StreamProcessor";var ga=r.A.getClassFactory(ha),pa=(0,H.A)((function e(){(0,Y.A)(this,e),this.url=null,this.width=null,this.height=null,this.x=null,this.y=null})),ma=(0,H.A)((function e(){(0,Y.A)(this,e),this.bitrate=0,this.width=0,this.height=0,this.tilesHor=0,this.tilesVert=0,this.widthPerTile=0,this.heightPerTile=0,this.startNumber=0,this.segmentDuration=0,this.timescale=0,this.templateUrl="",this.id=""})),Ea=n(99838),va=n(90447),Aa=n(5099);function ya(e){var t,n,r,i,a,o,s,u,c,l=this.context,f=e.adapter,d=e.baseURLController,h=e.streamInfo,p=e.timelineConverter,m=e.debug,E=e.eventBus,v=e.events,A=e.dashConstants,y=(0,Pe.A)(l).getInstance();function T(e,t){var r=new ma;r.id=e.id,r.bitrate=e.bandwidth,r.width=e.width,r.height=e.height,r.tilesHor=1,r.tilesVert=1,e.essentialProperties&&e.essentialProperties.forEach((function(e){if(g.A.THUMBNAILS_SCHEME_ID_URIS.indexOf(e.schemeIdUri)>=0&&e.value){var t=e.value.split("x");2!==t.length||isNaN(t[0])||isNaN(t[1])||(r.tilesHor=parseInt(t[0],10),r.tilesVert=parseInt(t[1],10))}})),t?s.updateSegmentData(e).then((function(t){!function(e,t,n){var r=[],i=function(e,t){var n,r,i,a,o=[],s=0;for(n=0,r=e.segments.length;n<r;n++)(a=Qi({durationInTimescale:(i=e.segments[n]).duration,fTimescale:i.timescale,index:s,isDynamic:f.getIsDynamic(),mediaRange:i.mediaRange,mediaTime:i.startTime,mediaUrl:i.media,representation:t,timelineConverter:p}))&&(o.push(a),a=null,s++);return o}(n,t);t.segments=i,t.fragmentDuration=t.segmentDuration||(t.segments&&t.segments.length>0?t.segments[0].duration:NaN),e.segmentDuration=t.segments[0].duration,e.readThumbnail=function(e,n){var i=null;r.some((function(t){if(t.start<=e&&t.end>e)return i=t.url,!0})),i?n(i):t.segments.some((function(i){if(i.mediaStartTime<=e&&i.mediaStartTime+i.duration>e){var a=d.resolve(t.path),o=new va.A({method:"get",url:a.url,responseType:"arraybuffer",customData:{request:{range:i.mediaRange},onloadend:function(e){var t=c.getSamplesInfo(e.target.response),a=new Blob([e.target.response.slice(t.sampleList[0].offset,t.sampleList[0].offset+t.sampleList[0].size)],{type:"image/jpeg"}),o=window.URL.createObjectURL(a);r.push({start:i.mediaStartTime,end:i.mediaStartTime+i.duration,url:o}),n&&n(o)}}}),s=new Aa.A({request:o});return u.load(o,s),!0}}))}}(r,e,t)})):(r.startNumber=e.startNumber,r.segmentDuration=e.segmentDuration,r.timescale=e.timescale,r.templateUrl=function(e){var t=y.isRelative(e.media)?y.resolve(e.media,d.resolve(e.path).url):e.media;return t?zi(t,e.id):""}(e)),r.tilesHor>0&&r.tilesVert>0&&(r.widthPerTile=r.width/r.tilesHor,r.heightPerTile=r.height/r.tilesVert,n.push(r))}function _(){n=[],r=[],a=-1,o=null,i&&(i.reset(),i=null)}return t={addTracks:function(){if(h&&f&&(o=f.getMediaInfoForType(h,g.A.IMAGE))){var e=f.getVoRepresentations(o);e&&e.length>0&&e.forEach((function(e){(e.segmentInfoType===Me.A.SEGMENT_TEMPLATE&&e.segmentDuration>0&&e.media||e.segmentInfoType===Me.A.SEGMENT_TIMELINE)&&T(e),e.segmentInfoType===Me.A.SEGMENT_BASE&&T(e,!0),r.push(e)})),n.length>0&&n.sort((function(e,t){return e.bitrate-t.bitrate}))}},getCurrentTrack:function(){return a<0?null:n[a]},getCurrentTrackIndex:function(){return a},getRepresentations:function(){return r},getThumbnailRequestForTime:function(e){for(var t,r=f.getVoRepresentations(o),s=0;s<r.length;s++)if(n[a].id===r[s].id){t=r[s];break}return i.getSegmentRequestForTime(o,t,e)},getTracks:function(){return n},reset:_,setTrackById:function(e){if(n&&0!==n.length){var t=n.findIndex((function(t){return t.id===e}));-1!==t&&(a=t)}},setTrackByIndex:function(e){n&&0!==n.length&&(e>=n.length&&(e=n.length-1),a=e)}},_(),u=(0,Ea.A)(l).create({}),c=ot(l).getInstance(),s=la(l).create({events:v,eventBus:E,streamInfo:h,timelineConverter:p,dashConstants:A,dashMetrics:e.dashMetrics,segmentBaseController:e.segmentBaseController,type:g.A.IMAGE}),(i=ea(l).create({streamInfo:h,type:g.A.IMAGE,timelineConverter:p,segmentsController:s,baseURLController:d,debug:m,eventBus:E,events:v,dashConstants:A,urlUtils:y})).initialize(!!f&&f.getIsDynamic()),t}ya.__dashjs_factory_name="ThumbnailTracks";var Ta=r.A.getClassFactory(ya);function _a(e){var t,n,r=this.context,i=e.streamInfo;function a(e){n.setTrackByIndex(e)}function o(){n&&n.reset()}return t={getCurrentTrack:function(){return n.getCurrentTrack()},getCurrentTrackIndex:function(){return n.getCurrentTrackIndex()},getPossibleVoRepresentations:function(){return n.getRepresentations()},getStreamId:function(){return i.id},initialize:function(){n.addTracks();var e=n.getTracks();e&&e.length>0&&a(0)},provide:function(e,t){if("function"==typeof t){var r,i,a=n.getCurrentTrack();if(!a||a.segmentDuration<=0||null==e)t(null);else{(i=n.getThumbnailRequestForTime(e))&&(a.segmentDuration=i.duration),r=e%a.segmentDuration;var o=Math.floor(r*a.tilesHor*a.tilesVert/a.segmentDuration),s=new pa;if(s.width=Math.floor(a.widthPerTile),s.height=Math.floor(a.heightPerTile),s.x=Math.floor(o%a.tilesHor)*a.widthPerTile,s.y=Math.floor(o/a.tilesHor)*a.heightPerTile,"readThumbnail"in a)return a.readThumbnail(e,(function(e){s.url=e,t(s)}));if(i)s.url=i.url,a.segmentDuration=NaN;else{var u=Math.floor(e/a.segmentDuration);s.url=function(e,t){var n=t+e.startNumber;return zi(e.templateUrl,void 0,n,void 0,e.bandwidth,(n-1)*e.segmentDuration*e.timescale)}(a,u)}t(s)}}},reset:o,setTrackByIndex:a,setTrackById:function(e){n.setTrackById(e)}},o(),n=Ta(r).create({streamInfo:i,adapter:e.adapter,baseURLController:e.baseURLController,timelineConverter:e.timelineConverter,debug:e.debug,eventBus:e.eventBus,events:e.events,dashConstants:e.dashConstants,dashMetrics:e.dashMetrics,segmentBaseController:e.segmentBaseController}),t}_a.__dashjs_factory_name="ThumbnailController";var Sa=r.A.getClassFactory(_a),Ia=[g.A.VIDEO,g.A.AUDIO,g.A.TEXT,g.A.MUXED,g.A.IMAGE];function ba(e){e=e||{};var t,n,r,i,a,o,s,c,l,f,m,E,v,A,y,T,_=this.context,S=(0,d.A)(_).getInstance(),I=(0,Pe.A)(_).getInstance(),b=e.manifestModel,R=e.mediaPlayerModel,N=e.dashMetrics,C=e.manifestUpdater,w=e.adapter,D=e.timelineConverter,O=e.capabilities,M=e.errHandler,P=e.abrController,L=e.playbackController,x=e.throughputController,F=e.eventController,U=e.mediaController,k=e.protectionController,B=e.textController,G=e.videoModel,H=e.streamInfo,Y=e.settings;function V(e,t,n){return new Promise((function(r,i){Z(),ee();var a=G.getElement(),o=[];Ia.forEach((function(t){if((t!==g.A.TEXT||e)&&(t!==g.A.VIDEO||!a||a&&/^VIDEO$/i.test(a.nodeName))){var r=n.find((function(e){return e.mediaInfo.type===t}));o.push(q(t,e,r))}})),Promise.all(o).then((function(){return function(e,t){return new Promise((function(n){var r={},i=A.map((function(n){var r=n.getRepresentation(),i=t.find((function(e){return e.mediaInfo.type===r.mediaInfo.type}));return n.createBufferSinks(e,i)}));Promise.all(i).then((function(e){e.forEach((function(e){e&&(r[e.getType()]=e)})),n(r)})).catch((function(){n(r)}))}))}(t,n)})).then((function(t){if(0===A.length){var n="No streams to play.";M.error(new je.A(Ce.A.MANIFEST_ERROR_ID_NOSTREAMS_CODE,n,b.getValue())),m.fatal(n)}else fe();e&&B.createTracks(H),r(t)})).catch((function(e){i(e)}))}))}function q(t,r,a){var s,u=w.getAllMediaInfoForType(H,t),c=[],l=null,f=-1;if(!u||0===u.length)return m.info("No "+t+" data."),Promise.resolve();t===g.A.VIDEO&&(o=!0),t===g.A.AUDIO&&(i=!0);for(var d=0,p=u.length;d<p;d++)l=u[d],t===g.A.TEXT&&l.isEmbedded&&(B.addEmbeddedTrack(H,l),c.push(l)),K(l)&&U.addTrack(l),l.type===g.A.ENHANCEMENT&&(f=d);if(c.length>0&&(U.setInitialMediaSettingsForType(t,H),B.addMediaInfosToBuffer(H,t,c)),u=u.filter((function(e){return!e.isEmbedded})),0===u.length)return Promise.resolve();if(t===g.A.IMAGE)return(y=Sa(_).create({streamInfo:H,adapter:w,baseURLController:e.baseURLController,timelineConverter:e.timelineConverter,debug:n,eventBus:S,events:h.A,dashConstants:Me.A,dashMetrics:e.dashMetrics,segmentBaseController:e.segmentBaseController})).initialize(),Promise.resolve();S.trigger(h.A.STREAM_INITIALIZING,{streamInfo:H,mediaInfo:l}),U.setInitialMediaSettingsForType(t,H);var E=j(u,r,t);if(f>=0){var v=new mi(S);v.open(),v.duration=H.manifestInfo.duration;var A=j(u,v,g.A.ENHANCEMENT);A.selectMediaInfo(new bi({newMediaInfo:u[f]})),E.setEnhancementStreamProcessor(A)}if(s=U.getCurrentTrackFor(t,H.id)){var T=t===g.A.TEXT&&s.isEmbedded?u[0]:s,I=new bi({newMediaInfo:T,previouslySelectedRepresentation:a});return E.selectMediaInfo(I)}return Promise.resolve()}function K(e){var t,n=e?e.type:null;return n===g.A.MUXED?(t="Multiplexed representations are intentionally not supported, as they are not compliant with the DASH-AVC/264 guidelines",m.fatal(t),M.error(new je.A(Ce.A.MANIFEST_ERROR_ID_MULTIPLEXED_CODE,t,b.getValue())),!1):!(n!==g.A.TEXT&&n!==g.A.IMAGE&&e.contentProtection&&e.contentProtection.length>0&&!O.supportsEncryptedMedia()&&(M.error(new je.A(Ce.A.CAPABILITY_MEDIAKEYS_ERROR_CODE,Ce.A.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE)),1))}function j(n,i,a){var s=n&&n.length>0?n.filter((function(e){return e.type===a}))[0]:null,u=r.getModel(s?s.type:null),c=s?s.type:null,l=s?s.mimeType:null,f=s?s.isFragmented:null,d=ga(_).create({abrController:P,adapter:w,baseURLController:e.baseURLController,boxParser:t,capabilities:O,dashMetrics:e.dashMetrics,errHandler:M,fragmentModel:u,manifestModel:b,mediaController:U,mediaPlayerModel:R,mimeType:l,playbackController:L,segmentBaseController:e.segmentBaseController,segmentBlacklistController:v,settings:Y,streamInfo:H,textController:B,throughputController:x,timelineConverter:D,type:c});return d.initialize(i,o,f),A.push(d),d.setMediaInfoArray(n),c===g.A.TEXT&&B.addMediaInfosToBuffer(H,c,n,u),d}function z(e){for(var t=A?A.length:0,n=0;n<t;n++){var r=A[n].getFragmentModel();r.abortRequests(),r.resetInitialSettings(),A[n].reset(!1,e)}B&&B.deactivateStream(H),y&&(y.reset(),y=null),A=[],c=!1,a=!1,de(!1),Q(!1),S.trigger(h.A.STREAM_DEACTIVATED,{streamInfo:H})}function W(e){z(e),f=!1,o=!1,i=!1,l=!1,T=[]}function Q(e){l=e}function X(){return H?H.start:NaN}function $(){return H?H.id:null}function Z(){if(!G||!P)throw new Error(g.A.MISSING_CONFIG_ERROR)}function J(e){e.error&&(M.error(e.error),m.fatal(e.error.message))}function ee(){if(F){var e=w.getEventsFor(H);e&&e.length>0&&F.addInlineEvents(e,H.id)}}function te(e){var t=ne(e);return t?t.getMediaInfo():null}function ne(e){return e?A.find((function(t){return t.getType()===e})):null}function re(){var e=ce(),t=e.length;if(0!==t){for(var n=0;n<t;n++)if(!e[n].isBufferingCompleted()&&(e[n].getType()===g.A.AUDIO||e[n].getType()===g.A.VIDEO))return void m.debug("onBufferingCompleted - One streamProcessor has finished but",e[n].getType(),"one is not buffering completed");m.debug("onBufferingCompleted - trigger STREAM_BUFFERING_COMPLETED"),a=!0,S.trigger(h.A.STREAM_BUFFERING_COMPLETED,{streamInfo:H},{streamInfo:H})}else m.warn("onBufferingCompleted - can't trigger STREAM_BUFFERING_COMPLETED because no streamProcessor is defined")}function ie(e){F&&F.addInbandEvents(e.events,H.id)}function ae(){fe()}function oe(){ee()}function se(e){return e&&e.type?ue(e.type):null}function ue(e){return e?ce().filter((function(t){return t.getType()===e}))[0]:null}function ce(){for(var e,t,n=[],r=0;r<A.length;r++)(e=(t=A[r]).getType())!==g.A.AUDIO&&e!==g.A.VIDEO&&e!==g.A.TEXT&&e!==g.A.ENHANCEMENT||n.push(t);return n}function le(){for(var e=A.length,t=0;t<e&&A[t];t++)A[t].getScheduleController().startScheduleTimer()}function fe(){var e=A.length;if(k){k.clearMediaInfoArray();for(var t=0;t<e&&A[t];t++){var n=A[t].getType(),r=A[t].getMediaInfo();if(n===g.A.AUDIO||n===g.A.VIDEO||n===g.A.TEXT&&r&&r.isFragmented){var i=A[t].getMediaInfo();i&&k.initializeForMedia(i)}}k.handleKeySystemFromManifest()}f||(f=!0,G.waitForReadyState(g.A.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA,(function(){S.trigger(h.A.STREAM_INITIALIZED,{streamInfo:H})})))}function de(e){E=e}function he(){return E}return s={activate:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return new Promise((function(r,i){if(!c)return he()?(c=!0,S.trigger(h.A.STREAM_ACTIVATED,{streamInfo:H}),void r()):void function(e,t){return V(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:[])}(e,t,n).then((function(){c=!0,n&&n.length>0&&le(),S.trigger(h.A.STREAM_ACTIVATED,{streamInfo:H}),r()})).catch((function(e){i(e)}));r()}))},checkAndHandleCompletedBuffering:function(){a||A.forEach((function(e){e.checkAndHandleCompletedBuffering()}))},deactivate:z,getAdapter:function(){return w},getCurrentMediaInfoForType:function(e){var t=ue(e);return t?t.getMediaInfo():null},getCurrentRepresentationForType:function(e){var t=ue(e);return t?t.getRepresentation():null},getDuration:function(){return H?H.duration:NaN},getHasAudioTrack:function(){return i},getHasFinishedBuffering:function(){return a},getHasVideoTrack:function(){return o},getId:$,getIsActive:function(){return c},getIsEndedEventSignaled:function(){return l},getPreloaded:he,getRepresentationForTypeById:function(e,t){var n;if(e===g.A.IMAGE){if(!y)return null;n=y.getPossibleVoRepresentations()}else{var r=function(e){var t=ne(e);return t?t.getAllMediaInfos():[]}(e);n=r.flatMap((function(e){return P.getPossibleVoRepresentationsFilteredBySettings(e,!0)}))}if(!n||0===n.length)return null;var i=n.filter((function(e){return e.id===t}));return i&&i.length>0?i[0]:null},getRepresentationForTypeByIndex:function(e,t){var n;if(e===g.A.IMAGE){if(!y)return null;n=y.getPossibleVoRepresentations()}else{var r=te(e);n=P.getPossibleVoRepresentationsFilteredBySettings(r,!0)}return n[t=Math.max(Math.min(t,n.length-1),0)]},getRepresentationsByType:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(Z(),e===g.A.IMAGE)return y?y.getPossibleVoRepresentations():[];var n=te(e);return t?P.getPossibleVoRepresentationsFilteredBySettings(n,!0):P.getPossibleVoRepresentations(n,!0)},getStartTime:X,getStreamId:function(){return H?H.id:null},getStreamInfo:function(){return H},getStreamProcessors:ce,getThumbnailController:function(){return y},initialize:function(){S.on(h.A.BUFFERING_COMPLETED,re,s),S.on(h.A.INBAND_EVENTS,ie,s),S.on(h.A.DATA_UPDATE_COMPLETED,ae,s),S.on(p.A.PLAYBACK_SEEKED,oe,s),k&&(S.on(h.A.KEY_ERROR,J,s),S.on(h.A.SERVER_CERTIFICATE_UPDATED,J,s),S.on(h.A.LICENSE_REQUEST_COMPLETE,J,s),S.on(h.A.KEY_SYSTEM_SELECTED,J,s),S.on(h.A.KEY_SESSION_CREATED,J,s)),B.initializeForStream(H),S.trigger(h.A.STREAM_UPDATED,{streamInfo:H})},initializeForTextWithMediaSource:function(e){return new Promise((function(t,n){q(g.A.TEXT,e,null).then((function(){return(e=ue(g.A.TEXT))?e.createBufferSinks():Promise.resolve();var e})).then((function(){B.createTracks(H),t()})).catch((function(e){n(e)}))}))},prepareQualityChange:function(e){var t=ue(e.mediaType);t&&t.prepareQualityChange(e)},prepareTrackChange:function(e){if(c&&H){a=!1;var t=e.newMediaInfo,n=b.getValue(),r=se(t);if(r){var i=L.getTime();if(m.info("Stream - Process track changed at current time "+i),n.refreshManifestOnSwitchTrack)T.push(e),C.getIsUpdating()||(m.debug("Stream - Refreshing manifest for switch track"),C.refreshManifest());else{r.clearScheduleTimer(),r.setTrackSwitchInProgress(!0);var o=r.getRepresentation();r.selectMediaInfo(new bi({newMediaInfo:t})).then((function(){var t=!!(e&&e.options&&e.options.hasOwnProperty("replaceBuffer"))&&e.options.replaceBuffer;return r.prepareTrackSwitch(o,t)})).then((function(){r.setTrackSwitchInProgress(!1)}))}}}},reset:function(e){r&&(r.reset(),r=null),P&&H&&P.clearDataForStream(H.id),v&&(v.reset(),v=null),B&&H&&B.clearDataForStream(H.id),U&&H&&U.clearDataForStream(H.id),W(e),H=null,S.off(h.A.BUFFERING_COMPLETED,re,s),S.off(h.A.INBAND_EVENTS,ie,s),S.off(h.A.DATA_UPDATE_COMPLETED,ae,s),S.off(p.A.PLAYBACK_SEEKED,oe,s),k&&(S.off(h.A.KEY_ERROR,J,s),S.off(h.A.SERVER_CERTIFICATE_UPDATED,J,s),S.off(h.A.LICENSE_REQUEST_COMPLETE,J,s),S.off(h.A.KEY_SYSTEM_SELECTED,J,s),S.off(h.A.KEY_SESSION_CREATED,J,s))},setIsEndedEventSignaled:Q,setMediaSource:function(e){return new Promise((function(t,n){for(var r=[],i=0;i<A.length;)K(A[i].getMediaInfo())?(r.push(A[i].setMediaSource(e)),i++):(A[i].reset(),A.splice(i,1));Promise.all(r).then((function(){for(var e=0;e<A.length;e++)A[e].dischargePreBuffer();if(0===A.length){var n="No streams to play.";M.error(new je.A(Ce.A.MANIFEST_ERROR_ID_NOSTREAMS_CODE,n+"nostreams",b.getValue())),m.fatal(n)}t()})).catch((function(e){m.error(e),n(e)}))}))},startPreloading:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return new Promise((function(r,i){he()?i():(m.info("[startPreloading] Preloading next stream with id ".concat($())),de(!0),V(e,t,n).then((function(){for(var e=0;e<A.length&&A[e];e++)A[e].setExplicitBufferingTime(X()),A[e].getScheduleController().startScheduleTimer();r()})).catch((function(){de(!1),i()})))}))},startScheduleControllers:le,triggerProtectionError:function(e){J(e)},updateData:function(e){return new Promise((function(t){H=e,F&&ee();for(var n,r=[],i=0,a=A.length;i<a;i++){var o=A[i],s=o.getMediaInfo();r.push(o.updateStreamInfo(H));var u=w.getAllMediaInfoForType(H,o.getType());if(u=u.filter((function(e){return!e.isEmbedded})),o.setMediaInfoArray(u),u)for(var c=0;c<u.length;c++)w.areMediaInfosEqual(s,u[c])&&r.push(o.selectMediaInfo(new bi({newMediaInfo:u[c]})))}Promise.all(r).then((function(){for(var e=[];T.length>0;){var t=T.pop(),r=t.newMediaInfo;if(!(n=se(t.oldMediaInfo)))return;var i=n.getRepresentation();n.setTrackSwitchInProgress(!0),e.push(n.prepareTrackSwitch(i)),e.push(n.selectMediaInfo(new bi({newMediaInfo:r})))}return Promise.all(e)})).then((function(){fe(),n&&n.setTrackSwitchInProgress(!1),S.trigger(h.A.STREAM_UPDATED,{streamInfo:H}),t()})).catch((function(e){M.error(e)}))}))}},function(){try{n=(0,u.A)(_).getInstance(),m=n.getLogger(s),W(),t=ot(_).getInstance(),v=He(_).create({updateEventName:h.A.SEGMENT_LOCATION_BLACKLIST_CHANGED,addBlacklistEventName:h.A.SEGMENT_LOCATION_BLACKLIST_ADD,enableExpiry:!1}),r=Ii(_).create({streamInfo:H,mediaPlayerModel:R,dashMetrics:N,errHandler:M,settings:Y,boxParser:t,dashConstants:Me.A,urlUtils:I})}catch(e){throw e}}(),s}ba.__dashjs_factory_name="Stream";var Ra=r.A.getClassFactory(ba);function Na(){var e,t,n,r,i,a,o,s,c,l,f,g,p,m,E,v,A=this.context,y=(0,d.A)(A).getInstance(),T=(0,Pe.A)(A).getInstance();function _(){s=[],c=[],l=null,f=null,p=null,g=NaN,n=!1,r=!1,m=i.get().streaming.utcSynchronization.timeBetweenSyncAttempts}function S(){i.get().streaming.utcSynchronization.enabled&&!n&&!r&&p&&p.value&&p.schemeIdUri&&!isNaN(g)&&!isNaN(i.get().streaming.utcSynchronization.backgroundAttempts)&&(f&&(Date.now()-f)/1e3<30||(s=[],r=!0,b(isNaN(i.get().streaming.utcSynchronization.backgroundAttempts)?2:i.get().streaming.utcSynchronization.backgroundAttempts)))}function b(e){try{if(e<=0)return void U();var t=Date.now();a[p.schemeIdUri](p.value,(function(n){var r=Date.now(),i=N(t,r,n);s.push(i),b(e-1)}),(function(){U()}))}catch(e){U()}}function R(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null)||0;if(!c||0===c.length||e>=c.length)C();else{var t=c[e];if(t)if(a.hasOwnProperty(t.schemeIdUri)){var n=(new Date).getTime();a[t.schemeIdUri](t.value,(function(e){var r=(new Date).getTime(),i=N(n,r,e);p=t,C(i)}),(function(){R(e+1)}))}else R(e+1);else C()}}function N(e,t,n){return n-(t-(t-e)/2)}function C(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:NaN,r=isNaN(n);r&&i.get().streaming.utcSynchronization.useManifestDateHeaderTimeSource?(e=o.getLatestMPDRequestHeaderValueByID("Date"),t=null!==e?new Date(e).getTime():Number.NaN,isNaN(t)?F(!0):F(!1,t-Date.now())):F(r,n)}function w(e){var t=Date.parse(e);return isNaN(t)&&(t=function(e){var t,n,r=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+\-])([0-9]{2})([0-9]{2}))?/.exec(e);return t=Date.UTC(parseInt(r[1],10),parseInt(r[2],10)-1,parseInt(r[3],10),parseInt(r[4],10),parseInt(r[5],10),r[6]&&(parseInt(r[6],10)||0),r[7]&&1e3*parseFloat(r[7])||0),r[9]&&r[10]&&(n=60*parseInt(r[9],10)+parseInt(r[10],10),t+=("+"===r[8]?-1:1)*n*60*1e3),new Date(t).getTime()}(e)),t}function D(e){return Date.parse(e)}function O(e){return Date.parse(e)}function M(e,t,n){n()}function P(e,t,n){var r=w(e);isNaN(r)?n():t(r)}function L(e,t,n,r,i){var a,o,s=!1,u=new XMLHttpRequest,c=i?I.G.HEAD:I.G.GET,l=t.match(/\S+/g);if(t=l.shift(),a=function(){s||(s=!0,l.length?L(e,l.join(" "),n,r,i):r())},o=function(){var t,r;200===u.status&&(t=i?u.getResponseHeader("Date"):u.response,r=e(t),isNaN(r)||(n(r),s=!0))},T.isRelative(t)){var f=v.resolve();f&&(t=T.resolve(t,f.url))}u.open(c,t),u.timeout=5e3,u.onload=o,u.onloadend=a,u.send()}function x(e,t,n){L(O,e,t,n,!0)}function F(e,r){if(isNaN(g)||isNaN(r)||e||function(e){try{var n,r=k(e),a=isNaN(m)?30:m,o=isNaN(i.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor)?2:i.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor,s=isNaN(i.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts)?600:i.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts,u=isNaN(i.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts)?2:i.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts;r?(n=Math.min(a*o,s),t.debug("Increasing timeBetweenSyncAttempts to ".concat(n))):(n=Math.max(a/o,u),t.debug("Decreasing timeBetweenSyncAttempts to ".concat(n))),m=n}catch(e){}}(r),!e&&!isNaN(r)){l=Date.now(),n=!1;var a=isNaN(g);g=r,a&&S(),t.debug("Completed UTC sync. Setting client - server offset to ".concat(r))}e&&(p=null,n=!1,E.error(new je.A(Ce.A.TIME_SYNC_FAILED_ERROR_CODE,Ce.A.TIME_SYNC_FAILED_ERROR_MESSAGE)));var o=i.get().streaming.utcSynchronization.artificialTimeOffsetToApply;y.trigger(h.A.UPDATE_TIME_SYNC_OFFSET,{offset:r+o}),y.trigger(h.A.TIME_SYNCHRONIZATION_COMPLETED)}function U(){if(s&&0!==s.length){var e=s.reduce((function(e,t){return e+t}),0)/s.length;k(e)?t.debug("Completed background UTC sync. Offset is within allowed threshold and is not adjusted."):(t.debug("Completed background UTC sync. Setting client - server offset to ".concat(e)),g=e,y.trigger(h.A.UPDATE_TIME_SYNC_OFFSET,{offset:g})),r=!1,f=Date.now()}}function k(e){try{if(isNaN(g))return!0;var t=i.get().streaming.utcSynchronization.maximumAllowedDrift&&!isNaN(i.get().streaming.utcSynchronization.maximumAllowedDrift)?i.get().streaming.utcSynchronization.maximumAllowedDrift:100;return e>=g-t&&e<=g+t}catch(e){return!0}}return e={initialize:function(){_(),a={"urn:mpeg:dash:utc:http-head:2014":x,"urn:mpeg:dash:utc:http-xsdate:2014":L.bind(null,w),"urn:mpeg:dash:utc:http-iso:2014":L.bind(null,D),"urn:mpeg:dash:utc:direct:2014":P,"urn:mpeg:dash:utc:http-head:2012":x,"urn:mpeg:dash:utc:http-xsdate:2012":L.bind(null,w),"urn:mpeg:dash:utc:http-iso:2012":L.bind(null,D),"urn:mpeg:dash:utc:direct:2012":P,"urn:mpeg:dash:utc:http-ntp:2014":M,"urn:mpeg:dash:utc:ntp:2014":M,"urn:mpeg:dash:utc:sntp:2014":M}},attemptSync:function(e,t){c=e,n||(function(e){try{if(!e||!i.get().streaming.utcSynchronization.enabled)return!1;var t=isNaN(m)?30:m;return!(l&&t&&!isNaN(t))||(Date.now()-l)/1e3>=t}catch(e){return!0}}(t)?(n=!0,R()):y.trigger(h.A.TIME_SYNCHRONIZATION_COMPLETED))},setConfig:function(e){e&&(e.dashMetrics&&(o=e.dashMetrics),e.baseURLController&&(v=e.baseURLController),e.errHandler&&(E=e.errHandler),e.settings&&(i=e.settings))},reset:function(){_(),y.off(h.A.ATTEMPT_BACKGROUND_SYNC,S,e)}},t=(0,u.A)(A).getInstance().getLogger(e),y.on(h.A.ATTEMPT_BACKGROUND_SYNC,S,e),e}Na.__dashjs_factory_name="TimeSyncController";var Ca=r.A.getSingletonFactory(Na);Ca.HTTP_TIMEOUT_MS=5e3,r.A.updateSingletonFactory(Na.__dashjs_factory_name,Ca);var wa=Ca;function Da(){var e,t,n,r,i,a=this.context,o=(0,d.A)(a).getInstance();return e={attachMediaSource:function(e){var n=window.URL.createObjectURL(t);return e.setSource(n),"managedMediaSource"===r&&(e.setDisableRemotePlayback(!0),t.addEventListener("startstreaming",(function(){o.trigger(p.A.MANAGED_MEDIA_SOURCE_START_STREAMING)})),t.addEventListener("endstreaming",(function(){o.trigger(p.A.MANAGED_MEDIA_SOURCE_END_STREAMING)}))),n},createMediaSource:function(){var e="WebKitMediaSource"in window,n="MediaSource"in window;return"ManagedMediaSource"in window?(t=new ManagedMediaSource,r="managedMediaSource",i.info("Created ManagedMediaSource")):n?(t=new MediaSource,r="mediaSource",i.info("Created MediaSource")):e&&(t=new WebKitMediaSource,i.info("Created WebkitMediaSource")),t},detachMediaSource:function(e){e.setSource(null)},setConfig:function(e){e&&e.settings&&(n=e.settings)},setDuration:function e(r){t&&"open"===t.readyState&&(null===r&&isNaN(r)||t.duration!==r&&(r!==1/0||n.get().streaming.buffer.mediaSourceDurationInfinity||(r=Math.pow(2,32)),function(e){for(var t=e.sourceBuffers,n=0;n<t.length;n++)if(t[n].updating)return!0;return!1}(t)?setTimeout(e.bind(null,r),50):(i.info("Set MediaSource duration:"+r),t.duration=r)))},setSeekable:function(e,n){t&&"function"==typeof t.setLiveSeekableRange&&"function"==typeof t.clearLiveSeekableRange&&"open"===t.readyState&&e>=0&&e<n&&(t.clearLiveSeekableRange(),t.setLiveSeekableRange(e,n))},signalEndOfStream:function(e){if(e&&"open"===e.readyState){for(var t=e.sourceBuffers,n=0;n<t.length;n++){if(t[n].updating)return;if(0===t[n].buffered.length)return}i.info("call to mediaSource endOfStream"),e.endOfStream()}}},i=(0,u.A)(a).getInstance().getLogger(e),e}Da.__dashjs_factory_name="MediaSourceController";var Oa=r.A.getSingletonFactory(Da);function Ma(){var e="urn:mpeg:dash:event:2012",t=1,n="urn:mpeg:dash:event:callback:2015",r=1,i=300,a="discarded",o="updated",s="added";function c(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}var l,f,h,g,m,E,v,A,y,T,_,S=this.context,I=(0,d.A)(S).getInstance();function b(){if(!v||!A)throw new Error("setConfig function has to be called previously")}function R(){_=!1,h={},g={},m=null,T=!1,E=Date.now()/1e3}function N(){try{if(!T){T=!0;var e=A.getTime(),t=e-E;t=E>0?Math.max(0,t):0,C(g,t,e),C(h,t,e),w(g),w(h),E=e,T=!1}}catch(e){T=!1,f.error(e)}}function C(e,t,n){try{P(e,(function(r){if(void 0!==r){var i=isNaN(r.duration)?0:r.duration;r.calculatedPresentationTime<=n&&r.calculatedPresentationTime+t+i>=n?x(r,p.A.EVENT_MODE_ON_START):(L(n,i+t,r.calculatedPresentationTime)||function(e){try{var t=e.eventStream.period.start+e.eventStream.period.duration;return e.calculatedPresentationTime>t}catch(e){return f.error(e),!1}}(r))&&(f.debug("Removing event ".concat(r.id," from period ").concat(r.eventStream.period.id," as it is expired or invalid")),function(e,t){try{var n=t.eventStream.schemeIdUri,r=t.eventStream.period.id,i=t.eventStream.value,a=t.id;e[r][n]=e[r][n].filter((function(e){return i&&e.eventStream.value&&e.eventStream.value!==i||e.id!==a})),0===e[r][n].length&&delete e[r][n]}catch(e){f.error(e)}}(e,r))}}))}catch(e){f.error(e)}}function w(e){try{for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&c(e[t])&&delete e[t]}catch(e){f.error(e)}}function D(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.eventStream.schemeIdUri,i=e.eventStream.value,u=e.id,c=a;t[r]||(t[r]=[]);var l=t[r].findIndex((function(e){return(!i||e.eventStream.value&&e.eventStream.value===i)&&e.id===u}));if(-1===l)t[r].push(e),e.triggeredReceivedEvent=!1,e.triggeredStartEvent=!1,c=s;else if(n){var f=t[r][l];e.triggeredReceivedEvent=f.triggeredReceivedEvent,e.triggeredStartEvent=f.triggeredStartEvent,t[r][l]=e,c=o}return c}function O(e){try{if(e.eventStream.value==t){var n,r=e.calculatedPresentationTime;n=4294967295==e.calculatedPresentationTime?NaN:e.calculatedPresentationTime+e.duration,I.trigger(p.A.MANIFEST_VALIDITY_CHANGED,{id:e.id,validUntil:r,newDuration:n,newManifestValidAfter:NaN},{mode:p.A.EVENT_MODE_ON_START})}}catch(e){f.error(e)}}function M(e){try{var t=A.getTime();P(e,(function(e){var n=e.eventStream&&e.eventStream.period&&!isNaN(e.eventStream.period.duration)?e.eventStream.period.duration:NaN,r=e.eventStream&&e.eventStream.period&&!isNaN(e.eventStream.period.start)?e.eventStream.period.start:NaN;if(!isNaN(n)&&!isNaN(r)){var a=e.calculatedPresentationTime;Math.abs(a-t)<i&&x(e,p.A.EVENT_MODE_ON_START)}}))}catch(e){f.error(e)}}function P(e,t){try{if(e)for(var n in e){var r=e[n];for(var i in r)for(var a=r[i],o=0;o<a.length;o++){var s=a[o];void 0!==s&&t(s)}}}catch(e){f.error(e)}}function L(e,t,n){try{return e-t>n}catch(e){return f.error(e),!1}}function x(i,a){try{var o=A.getTime(),s=i.id;if(a===p.A.EVENT_MODE_ON_RECEIVE&&!i.triggeredReceivedEvent)return f.debug("Received event ".concat(s)),i.triggeredReceivedEvent=!0,void I.trigger(i.eventStream.schemeIdUri,{event:i},{mode:a});i.triggeredStartEvent||(i.eventStream.schemeIdUri===e&&i.eventStream.value==t?0===i.duration&&0===i.presentationTimeDelta||(f.debug("Starting manifest refresh event ".concat(s," at ").concat(o)),function(){try{b(),v.refreshManifest()}catch(e){f.error(e)}}()):i.eventStream.schemeIdUri===n&&i.eventStream.value==r?(f.debug("Starting callback event ".concat(s," at ").concat(o)),function(e){try{var t=(0,Ea.A)(S).create({}),n=new va.A({method:"get",url:e,responseType:"arraybuffer",customData:{}}),r=new Aa.A({request:n});t.load(n,r)}catch(e){f.error(e)}}(i.messageData instanceof Uint8Array?Fe.A.uint8ArrayToString(i.messageData):i.messageData)):(f.debug("Starting event ".concat(s," from period ").concat(i.eventStream.period.id," at ").concat(o)),I.trigger(i.eventStream.schemeIdUri,{event:i},{mode:a}),y.get().streaming.events.deleteEventMessageDataTimeout>-1&&setTimeout((function(){delete i.messageData,delete i.parsedMessageData}),y.get().streaming.events.deleteEventMessageDataTimeout)),i.triggeredStartEvent=!0)}catch(e){f.error(e)}}return l={addInlineEvents:function(e,t){try{if(b(),h[t]||(h[t]={}),e)for(var n=0;n<e.length;n++){var r=e[n];if(!L(A.getTime(),isNaN(r.duration)?0:r.duration,r.calculatedPresentationTime)){var i=D(r,h[t],!0);i===s?(f.debug("Added inline event with id ".concat(r.id," from period ").concat(t)),x(r,p.A.EVENT_MODE_ON_RECEIVE)):i===o&&f.debug("Updated inline event with id ".concat(r.id," from period ").concat(t))}}}catch(e){throw e}},addInbandEvents:function(t,n){try{b(),g[n]||(g[n]={});for(var r=0;r<t.length;r++){var i=t[r];L(A.getTime(),isNaN(i.duration)?0:i.duration,i.calculatedPresentationTime)||(D(i,g[n],!1)===s?(i.eventStream.schemeIdUri===e&&O(i),f.debug("Added inband event with id ".concat(i.id," from period ").concat(n)),x(i,p.A.EVENT_MODE_ON_RECEIVE)):f.debug("Inband event with scheme_id_uri ".concat(i.eventStream.schemeIdUri,", value ").concat(i.eventStream.value,", period id ").concat(n," and event id ").concat(i.id," was ignored because it has been added before.")))}N()}catch(e){throw e}},getInbandEvents:function(){return g},getInlineEvents:function(){return h},start:function(){try{b(),f.debug("Start Event Controller");var e=y.get().streaming.events.eventControllerRefreshDelay;_||isNaN(e)||(_=!0,m=setInterval(N,e))}catch(e){throw e}},setConfig:function(e){try{if(!e)return;e.manifestUpdater&&(v=e.manifestUpdater),e.playbackController&&(A=e.playbackController),e.settings&&(y=e.settings)}catch(e){throw e}},reset:function(){(function(){try{null!==m&&_&&(clearInterval(m),m=null,_=!1,function(){try{M(g),M(h)}catch(e){f.error(e)}}())}catch(e){throw e}})(),R()}},f=(0,u.A)(S).getInstance().getLogger(l),R(),l}Ma.__dashjs_factory_name="EventController";var Pa=r.A.getSingletonFactory(Ma),La={LEVELS:{SUGGESTION:"Suggestion",WARNING:"Warning",ERROR:"Error"},EVENTS:{NO_UTC_TIMING_ELEMENT:{key:"NO_UTC_TIMING_ELEMENT",message:"No UTCTiming element is present in the manifest. You may experience playback failures. For a detailed validation use https://conformance.dashif.org/"},NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE:{key:"NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE",message:'SMPTE 2052-1:2013 defines the attribute name as "imageType" and does not define "imagetype"'},INVALID_DVR_WINDOW:{key:"INVALID_DVR_WINDOW",message:"No valid segment found when applying a specification compliant DVR window calculation. Using SegmentTimeline entries as a fallback."}}},xa=n(45313),Fa=n(70445),Ua=n(21923);function ka(){var e,t,n,r,i,a,s,c,l,f,m,E,v,A,y,T,_,S,I,b,R,N,C,w,D,O,M,P,L,x,F,U,k,B,G,H,Y,V,q,K,j,z,W,Q,X,$,Z,J,ee=this.context,te=(0,d.A)(ee).getInstance();function ne(){if(!(a&&a.hasOwnProperty("load")&&N&&N.hasOwnProperty("initialize")&&N.hasOwnProperty("reset")&&N.hasOwnProperty("getClientTimeOffset")&&s&&R&&l&&G))throw new Error(g.A.MISSING_CONFIG_ERROR)}function re(){!function(){try{var e=c.getStreamsInfo();if(!w&&0===e.length)throw new Error("There are no periods in the MPD");w&&e.length>0&&l.updateManifestUpdateInfo({currentTime:G.getTime(),buffered:B.getBufferRange(),presentationStartTime:e[0].start,clientTimeOffset:N.getClientTimeOffset()}),C.length>0&&function(e){0!==e.length?C=C.filter((function(n){var r=e.filter((function(e){return e.id===n.getId()})).length>0||n.getId()===w.getId();return r||(t.debug("Removing stream ".concat(n.getId())),n.reset(!0),n=null),r})):t.warn("No periods included in the current manifest. Skipping the filtering of outdated stream objects.")}(e);for(var n=[],r=0,i=e.length;r<i;r++){var a=e[r];n.push(ae(a)),l.addManifestUpdateStreamInfo(a)}Promise.all(n).then((function(){return new Promise((function(t,n){w?t():oe(e,t,n)}))})).then((function(){te.trigger(h.A.STREAMS_COMPOSED),we()})).catch((function(e){throw e}))}catch(e){R.error(new je.A(Ce.A.MANIFEST_ERROR_ID_NOSTREAMS_CODE,e.message+" nostreamscomposed",s.getValue())),U=!0,Ze()}}()}function ie(){X=!0}function ae(e){var t=Qe(e.id);return t?t.updateData(e):(t=Ra(ee).create({manifestModel:s,mediaPlayerModel:Y,dashMetrics:l,manifestUpdater:i,adapter:c,timelineConverter:N,capabilities:n,capabilitiesFilter:r,errHandler:R,baseURLController:v,segmentBaseController:A,textController:O,abrController:T,playbackController:G,throughputController:_,eventController:I,mediaController:S,protectionController:D,videoModel:B,streamInfo:e,settings:Q}),C.push(t),t.initialize(),Promise.resolve())}function oe(e,n,r){try{ye();var i=l.getCurrentDVRInfo().range;if(i.end<i.start)return void function(e,n,r,i){$&&clearTimeout($);var a=Math.min(1e3*(-1*(e.end-e.start)+2),2147483647);t.debug("Waiting for ".concat(a," ms before playback can start")),te.trigger(h.A.AST_IN_FUTURE,{delay:a}),$=setTimeout((function(){oe(n,r,i)}),a)}(i,e,n,r);Q.get().streaming.applyProducerReferenceTime&&H.calculateProducerReferenceTimeOffsets(e);var a=e[0].manifestInfo;if(Q.get().streaming.applyServiceDescription&&H.applyServiceDescription(a),c.getIsDynamic()){var o=Ue(a);G.computeAndSetLiveDelay(o,a)}(Q.get().streaming.applyContentSteering&&E.shouldQueryBeforeStart()?E.loadSteeringData():Promise.resolve()).then((function(){var e=s.getValue();e&&v.update(e),se(),n()})).catch((function(e){t.error(e),se(),n()}))}catch(e){r(e)}}function se(){var e=c.getIsDynamic()?function(){var e,n=l.getCurrentDVRInfo();e=(n&&n.range?n.range.end:0)-G.getOriginalLiveDelay();var r=n?n.range:null;if(r){if(isNaN(Z)&&-1===Z.toString().indexOf("posix:")){var i=Le(!0);isNaN(i)||(t.info("Start time from URI parameters: ".concat(i)),e=Math.min(e,i))}else{t.info("Start time provided by the app: ".concat(Z));var a=xe(!0,Z);isNaN(a)||(e=Math.min(e,a))}var o=Q.get().streaming.timeShiftBuffer.calcFromSegmentTimeline?.1:0;e=Math.max(e,r.start+o)}return e}():function(){var e=et()[0].getStreamInfo().start;if(isNaN(Z)){var n=Le(!1);isNaN(n)||(t.info("Start time from URI parameters: ".concat(n)),e=Math.max(e,n))}else{t.info("Start time provided by the app: ".concat(Z));var r=xe(!1,Z);isNaN(r)||(e=Math.max(e,r))}return e}(),n=Ae(e),r=null!==n?n:C[0];te.trigger(h.A.INITIAL_STREAM_SWITCH,{startTime:e}),ue(r,null,e),z||(z=setInterval((function(){!x&&G.getTimeToStreamEnd()<=0&&!G.isSeeking()&&te.trigger(h.A.PLAYBACK_ENDED,{isLast:We().isLast})}),200))}function ue(e,n,r){try{if(x||!e||n===e&&e.getIsActive())return;x=!0,te.trigger(h.A.PERIOD_SWITCH_STARTED,{fromStreamInfo:n?n.getStreamInfo():null,toStreamInfo:e.getStreamInfo()});var i=!1,a=[],o=de(n);w=e,n&&(i=Ee(e,n),a=fe(n),n.deactivate(i)),r=isNaN(r)?!i&&n?e.getStreamInfo().start:NaN:r,t.info("Switch to stream ".concat(e.getId(),". Seektime is ").concat(r,", current playback time is ").concat(G.getTime(),". Seamless period switch is set to ").concat(i)),W=W.filter((function(e){return e.getId()!==w.getId()})),G.initialize(We(),!!n),B.getElement()?ce({seekTime:r,keepBuffers:i,sourceBufferSinksFromPreviousPeriod:o,streamActivated:!1,representationsFromPreviousPeriod:a}):le({seekTime:r,keepBuffers:i,sourceBufferSinksFromPreviousPeriod:o})}catch(e){x=!1}}function ce(e){var n;function r(){if(k&&"open"===k.readyState){t.debug("MediaSource is open!"),window.URL.revokeObjectURL(n),k.removeEventListener("sourceopen",r),k.removeEventListener("webkitsourceopen",r),Pe();var i=l.getCurrentDVRInfo();f.setSeekable(i.range.start,i.range.end),e.streamActivated?(isNaN(e.seekTime)||G.seek(e.seekTime,!0,!0),w.setMediaSource(k).then((function(){w.initializeForTextWithMediaSource(k)}))):le(e)}}function i(){k.addEventListener("sourceopen",r,!1),k.addEventListener("webkitsourceopen",r,!1),n=f.attachMediaSource(B),t.debug("MediaSource attached to element. Waiting on open...")}k?e.keepBuffers?le(e):(f.detachMediaSource(B),i()):(k=f.createMediaSource(),i())}function le(e){var t=e.representationsFromPreviousPeriod||[];w.activate(k,e.sourceBufferSinksFromPreviousPeriod,t).then((function(){isNaN(e.seekTime)||(te.trigger(h.A.SEEK_TARGET,{time:e.seekTime},{streamId:w.getId()}),G.seek(e.seekTime,!1,!0),w.startScheduleControllers()),x=!1,te.trigger(h.A.PERIOD_SWITCH_COMPLETED,{toStreamInfo:We()})}))}function fe(e){return(e?e.getStreamProcessors():[]).map((function(e){return e.getRepresentation()}))}function de(e){var t=new Map;return e?((e?e.getStreamProcessors():[]).forEach((function(e){var n=e.getBuffer();n&&t.set(n.getType(),n)})),t):t}function he(e){var t=Ae(e.seekTime);t&&t!==w?t&&t!==w&&(ge(),function(e,t){var n=e&&!isNaN(e.seekTime)?e.seekTime:NaN,r=w.getStreamProcessors().map((function(t){return t.prepareOuterPeriodPlaybackSeeking(e)}));Promise.all(r).then((function(){ue(t,w,n)})).catch((function(e){R.error(e)}))}(e,t)):(ge(),function(e){w.getStreamProcessors().forEach((function(t){return t.prepareInnerPeriodPlaybackSeeking(e)})),Ye(An.USER_REQUEST_STOP_REASON)}(e)),Ve(vn.SEEK_START_REASON)}function ge(){pe()}function pe(){W&&W.length>0&&(W.forEach((function(e){e.deactivate(!0)})),W=[])}function me(e){if(e.newMediaInfo.streamInfo.id===w.getId()){if(pe(),Q.get().streaming.buffer.resetSourceBuffersForTrackSwitch&&e.oldMediaInfo&&e.oldMediaInfo.codec!==e.newMediaInfo.codec){var t=G.getTime();return w.deactivate(!1),void ce({seekTime:t,keepBuffers:!1,streamActivated:!1})}w.prepareTrackChange(e)}}function Ee(e,t){try{return Q.get().streaming.buffer.reuseExistingSourceBuffers&&(n.isProtectionCompatible(t.getStreamInfo(),e.getStreamInfo())||X)&&n.supportsChangeType()&&Q.get().streaming.buffer.useChangeType}catch(e){return!1}}function ve(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(k&&!e.getPreloaded()&&Ee(e,t)){var n=fe(t),r=de(t);e.startPreloading(k,r,n).then((function(){W.push(e)}))}}function Ae(e){if(isNaN(e))return null;for(var t=C.length,n=0;n<t;n++){var r=C[n];if(e<parseFloat((r.getStartTime()+r.getDuration()).toFixed(5)))return r}return null}function ye(){try{var e=c.getIsDynamic(),t=c.getStreamsInfo()[0].manifestInfo,n=G.getTime(),r=N.calcTimeShiftBufferWindow(C,e),i=Oe();if(void 0===r.start||void 0===r.end)return;i&&0!==i.length?i.forEach((function(e){l.addDVRInfo(e.getType(),n,t,r)})):l.addDVRInfo(g.A.VIDEO,n,t,r)}catch(e){}}function Te(e){if(K&&L){var t=Y.getInitialBufferLevel(),n=[g.A.TEXT];(isNaN(t)||t<=G.getBufferLevel(n)||c.getIsDynamic()&&t>G.getLiveDelay())&&(K=!1,Ve(vn.INITIAL_PLAYOUT_START_REASON),G.play())}e&&e.mediaType&&l.addBufferLevel(e.mediaType,new Date,1e3*e.bufferLevel)}function _e(e){e.streamInfo.id===w.getId()&&pe(),Qe(e.streamInfo.id).prepareQualityChange(e)}function Se(){if(c.getIsDynamic()&&0!==G.getOriginalLiveDelay()&&w){var e=c.getStreamsInfo();if(e.length>0){var t=e[0].manifestInfo,n=Ue(t);G.computeAndSetLiveDelay(n,t)}}}function Ie(){if(Ge()){var e=B.getPlaybackQuality();e&&l.addDroppedFrames(e)}}function be(){t.debug("[onPlaybackStarted]"),!K&&q&&Ve(vn.RESUME_FROM_PAUSE_START_REASON),K&&(K=!1),j&&(j=!1,Q.get().streaming.applyContentSteering&&!E.shouldQueryBeforeStart()&&E.loadSteeringData()),q=!1}function Re(e){t.debug("[onPlaybackPaused]"),e.ended||(q=!0,Ye(An.USER_REQUEST_STOP_REASON))}function Ne(e){t.debug("Stream with id ".concat(e.streamInfo.id," finished buffering"));var n=e.streamInfo.isLast;k&&n?(t.info("[onStreamBufferingCompleted] calls signalEndOfStream of mediaSourceController."),f.signalEndOfStream(k)):we()}function we(){if(w)if(w.getHasFinishedBuffering())for(var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;try{var t=e||w||null;if(t){var n=t.getStreamInfo();return C.filter((function(e){var t=e.getStreamInfo();return t.start>n.start&&n.id!==t.id}))}}catch(e){return[]}}(w),t=0;t<e.length;){var n=e[t],r=0===t?w:e[t-1];!n.getPreloaded()&&r.getHasFinishedBuffering()&&ve(n,r),t+=1}else w.checkAndHandleCompletedBuffering()}function De(){z&&(clearInterval(z),z=null)}function Oe(){return w?w.getStreamProcessors():[]}function Me(e){if(w&&!w.getIsEndedEventSignaled()){w.setIsEndedEventSignaled(!0);var n=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null)||w||null;if(!e)return null;for(var t=e.getStreamInfo(),n=t.start,r=0,i=-1,a=NaN;r<C.length;){var o=C[r].getStreamInfo(),s=o.start-n;s>0&&(isNaN(a)||s<a)&&t.id!==o.id&&(a=s,i=r),r+=1}return i>=0?C[i]:null}();n?(t.debug("StreamController onEnded, found next stream with id ".concat(n.getStreamInfo().id,". Switching from ").concat(w.getStreamInfo().id," to ").concat(n.getStreamInfo().id)),ue(n,w,NaN)):(t.debug("StreamController no next stream found"),w.setIsEndedEventSignaled(!1)),Ye(n?An.END_OF_PERIOD_STOP_REASON:An.END_OF_CONTENT_STOP_REASON)}e&&e.isLast&&(De(),E.stopSteeringRequestTimer())}function Pe(e){var t=e||We().manifestInfo.duration;f.setDuration(t)}function Le(e){var t=y.getURIFragmentData();if(!t||!t.t)return NaN;var n=et()[0].getStreamInfo().start;return t.t=t.t.split(",")[0],Fe(e,t.t,n)}function xe(e,t){var n=0;return e||(n=et()[0].getStreamInfo().start),Fe(e,t,n)}function Fe(e,t,n){var r=c.getRegularPeriods()[0],i=t.toString(),a=-1!==i.indexOf("posix:")?"now"===i.substring(6)?Date.now()/1e3:parseFloat(i.substring(6)):NaN;return e&&!isNaN(a)?N.calcPresentationTimeFromWallTime(new Date(1e3*a),r):parseFloat(i)+n}function Ue(e){try{return e&&Number.isFinite(e.maxFragmentDuration)?e.maxFragmentDuration:NaN}catch(e){return NaN}}function ke(){var e=s.getValue();v.initialize(e)}function Be(e){if(e.error)U=!0,Ze();else{t.info("Manifest updated... updating data system wide.");var n=e.manifest;c.updatePeriods(n),r.filterUnsupportedFeatures(n).then((function(){v.initialize(n);var e=c.getUTCTimingSources();!c.getIsDynamic()||e&&0!==e.length||te.trigger(p.A.CONFORMANCE_VIOLATION,{level:La.LEVELS.WARNING,event:La.EVENTS.NO_UTC_TIMING_ELEMENT});var t=c.getIsDynamic()?e.concat(V.getUTCTimingSources()):e;m.attemptSync(t,c.getIsDynamic()),P.createFinalQueryStrings(n)}))}}function Ge(){return!!w&&w.getHasVideoTrack()}function He(){return!!w&&w.getHasAudioTrack()}function Ye(e,t){t=t||new Date,Oe().forEach((function(n){n.finalisePlayList(t,e)})),l.addPlayList()}function Ve(e){l.createPlaylistMetrics(1e3*G.getTime(),e)}function qe(t){var r,i;D.updateKeyStatusesMap(t),r=Oe(),i=!1,r.forEach((function(e){var t=e.getMediaInfo();!t||n.areKeyIdsUsable(t)?t&&n.areKeyIdsExpired(t)&&function(e){var t=Qe(e.getStreamId());t&&t.triggerProtectionError({error:new je.A(Ua.A.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE,Ua.A.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE)})}(e):(i=!0,function(e){var t=e.getAllMediaInfos().filter((function(e){return n.areKeyIdsUsable(e)}));if(t&&0!==t.length)S.setTrack(t[0],{replaceBuffer:!0});else{var r=e.getType();R.error(new je.A(Ce.A.NO_SUPPORTED_KEY_IDS,"Type: ".concat(r,": ").concat(Ce.A.NO_SUPPORTED_KEY_IDS_MESSAGE)))}}(e))})),i&&(0===G.getTime()?te.once(p.A.FRAGMENT_LOADING_COMPLETED,(function(){Ke()}),e):G.isProgressing(500).then((function(e){e||Ke()})))}function Ke(){var e=G.getTime();G.seek(e+.01,!1,!1)}function ze(e){if(e.error){var n;switch(e.error.code){case 1:n="MEDIA_ERR_ABORTED";break;case 2:n="MEDIA_ERR_NETWORK";break;case 3:n="MEDIA_ERR_DECODE",J.counts.mediaErrorDecode+=1;break;case 4:n="MEDIA_ERR_SRC_NOT_SUPPORTED";break;case 5:n="MEDIA_ERR_ENCRYPTED";break;default:n="UNKNOWN"}"MEDIA_ERR_DECODE"===n&&Q.get().errors.recoverAttempts.mediaErrorDecode>=J.counts.mediaErrorDecode?function(){t.error("A MEDIA_ERR_DECODE occured: Resetting the MediaSource");var e=G.getTime();w.deactivate(!1),t.info("MediaSource has been resetted. Resuming playback from time ".concat(e)),ce({seekTime:e,keepBuffers:!1,streamActivated:!1})}():(F=!0,e.error.message&&(n+=" ("+e.error.message+")"),e.error.msExtendedCode&&(n+=" (0x"+(e.error.msExtendedCode>>>0).toString(16).toUpperCase()+")"),t.fatal("Video Element Error: "+n),e.error&&t.fatal(e.error),R.error(new je.A(e.error.code,n)),Ze())}}function We(){return w?w.getStreamInfo():null}function Qe(e){for(var t=0,n=C.length;t<n;t++)if(C[t].getId()===e)return C[t];return null}function Xe(e){isNaN(e.newDuration)||Pe(e.newDuration)}function $e(){C=[],Z=NaN,D=null,x=!1,w=null,F=!1,U=!1,K=!0,j=!0,q=!1,L=!0,z=null,X=!1,W=[],$=null,J={counts:{mediaErrorDecode:0}}}function Ze(){ne(),m.reset(),Ye(F||U?An.FAILURE_STOP_REASON:An.USER_REQUEST_STOP_REASON);for(var t=0,n=C?C.length:0;t<n;t++)C[t].reset(F);te.off(p.A.PLAYBACK_TIME_UPDATED,Ie,e),te.off(p.A.PLAYBACK_SEEKING,he,e),te.off(p.A.PLAYBACK_ERROR,ze,e),te.off(p.A.PLAYBACK_STARTED,be,e),te.off(p.A.PLAYBACK_PAUSED,Re,e),te.off(p.A.PLAYBACK_ENDED,Me,e),te.off(p.A.METRIC_ADDED,Je,e),te.off(p.A.MANIFEST_VALIDITY_CHANGED,Xe,e),te.off(p.A.BUFFER_LEVEL_UPDATED,Te,e),te.off(p.A.QUALITY_CHANGE_REQUESTED,_e,e),te.off(p.A.CONTENT_STEERING_REQUEST_COMPLETED,ke,e),h.A.KEY_SESSION_UPDATED&&te.off(h.A.KEY_SESSION_UPDATED,ie,e),te.off(h.A.MANIFEST_UPDATED,Be,e),te.off(h.A.STREAM_BUFFERING_COMPLETED,Ne,e),te.off(h.A.TIME_SYNCHRONIZATION_COMPLETED,re,e),te.off(h.A.CURRENT_TRACK_CHANGED,me,e),te.off(h.A.SETTING_UPDATED_LIVE_DELAY,Se,e),te.off(h.A.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,Se,e),te.off(Fa.A.INTERNAL_KEY_STATUSES_CHANGED,qe,e),v.reset(),i.reset(),I.reset(),l.clearAllCurrentMetrics(),s.setValue(null),a.reset(),N.reset(),b.reset(),k&&(f.detachMediaSource(B),k=null),B=null,D&&(D=null,M=null,s.getValue()&&te.trigger(h.A.PROTECTION_DESTROYED,{data:s.getValue().url})),De(),te.trigger(h.A.STREAM_TEARDOWN_COMPLETE),$e()}function Je(e){if(e.metric===o.DVR_INFO){var t=He()?g.A.AUDIO:g.A.VIDEO;e.mediaType===t&&f.setSeekable(e.value.range.start,e.value.range.end)}}function et(){return C}return e={addDVRMetric:ye,getActiveStream:function(){return w},getActiveStreamInfo:We,getActiveStreamProcessors:Oe,getAutoPlay:function(){return L},getHasMediaOrInitialisationError:function(){return F||U},getInitialPlayback:function(){return K},getIsStreamSwitchInProgress:function(){return x},getProtectionData:function(){return D?D.getProtectionData():null},getStreamById:Qe,getStreamForTime:Ae,getStreams:et,getTimeRelativeToStreamId:function(e,t){for(var n=null,r=0,i=0,a=null,o=0;o<C.length;o++){if(i=(n=C[o]).getStartTime(),a=n.getDuration(),Number.isFinite(i)&&(r=i),n.getId()===t)return e-r;Number.isFinite(a)&&(r+=a)}return null},hasAudioTrack:He,hasVideoTrack:Ge,initialize:function(t,n){ne(),L=t,M=n,N.initialize(),(i=Fr(ee).create()).setConfig({manifestModel:s,adapter:c,manifestLoader:a,errHandler:R,settings:Q,contentSteeringController:E}),i.initialize(),(I=Pa(ee).getInstance()).setConfig({manifestUpdater:i,playbackController:G,settings:Q}),I.start(),P=(0,xa.A)(ee).getInstance(),m.setConfig({dashMetrics:l,baseURLController:v,errHandler:R,settings:Q}),m.initialize(),f.setConfig({settings:Q}),D&&(te.trigger(h.A.PROTECTION_CREATED,{controller:D}),D.setMediaElement(B.getElement()),M&&D.setProtectionData(M)),te.on(p.A.PLAYBACK_TIME_UPDATED,Ie,e),te.on(p.A.PLAYBACK_SEEKING,he,e),te.on(p.A.PLAYBACK_ERROR,ze,e),te.on(p.A.PLAYBACK_STARTED,be,e),te.on(p.A.PLAYBACK_PAUSED,Re,e),te.on(p.A.PLAYBACK_ENDED,Me,e),te.on(p.A.METRIC_ADDED,Je,e),te.on(p.A.MANIFEST_VALIDITY_CHANGED,Xe,e),te.on(p.A.BUFFER_LEVEL_UPDATED,Te,e),te.on(p.A.QUALITY_CHANGE_REQUESTED,_e,e),te.on(p.A.CONTENT_STEERING_REQUEST_COMPLETED,ke,e),h.A.KEY_SESSION_UPDATED&&te.on(h.A.KEY_SESSION_UPDATED,ie,e),te.on(h.A.MANIFEST_UPDATED,Be,e),te.on(h.A.STREAM_BUFFERING_COMPLETED,Ne,e),te.on(h.A.TIME_SYNCHRONIZATION_COMPLETED,re,e),te.on(h.A.CURRENT_TRACK_CHANGED,me,e),te.on(h.A.SETTING_UPDATED_LIVE_DELAY,Se,e),te.on(h.A.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,Se,e),te.on(Fa.A.INTERNAL_KEY_STATUSES_CHANGED,qe,e)},load:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:NaN;ne(),Z=t,a.load(e)},loadWithManifest:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:NaN;!function(){if(!i||!i.hasOwnProperty("setManifest"))throw new Error("initialize function has to be called previously")}(),Z=t,i.setManifest(e)},refreshManifest:function(){i.getIsUpdating()||i.refreshManifest()},reset:Ze,setConfig:function(e){e&&(e.capabilities&&(n=e.capabilities),e.capabilitiesFilter&&(r=e.capabilitiesFilter),e.manifestLoader&&(a=e.manifestLoader),e.manifestModel&&(s=e.manifestModel),e.mediaPlayerModel&&(Y=e.mediaPlayerModel),e.customParametersModel&&(V=e.customParametersModel),e.protectionController&&(D=e.protectionController),e.adapter&&(c=e.adapter),e.dashMetrics&&(l=e.dashMetrics),e.errHandler&&(R=e.errHandler),e.timelineConverter&&(N=e.timelineConverter),e.videoModel&&(B=e.videoModel),e.playbackController&&(G=e.playbackController),e.throughputController&&(_=e.throughputController),e.serviceDescriptionController&&(H=e.serviceDescriptionController),e.contentSteeringController&&(E=e.contentSteeringController),e.textController&&(O=e.textController),e.abrController&&(T=e.abrController),e.mediaController&&(S=e.mediaController),e.settings&&(Q=e.settings),e.baseURLController&&(v=e.baseURLController),e.uriFragmentModel&&(y=e.uriFragmentModel),e.segmentBaseController&&(A=e.segmentBaseController),e.manifestUpdater&&(i=e.manifestUpdater))},setProtectionData:function(e){M=e,D&&D.setProtectionData(M)},switchToVideoElement:function(e){w&&(G.initialize(We()),ce({seekTime:e,keepBuffers:!1,streamActivated:!0}))}},t=(0,u.A)(ee).getInstance().getLogger(e),m=wa(ee).getInstance(),f=Oa(ee).getInstance(),b=Mt(ee).getInstance(),$e(),e}ka.__dashjs_factory_name="StreamController";var Ba=r.A.getSingletonFactory(ka);function Ga(e,t,n){return t=(0,Cn.A)(t),(0,Nn.A)(e,Ha()?Reflect.construct(t,n||[],(0,Cn.A)(e).constructor):t.apply(e,n))}function Ha(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ha=function(){return!!e})()}n(70761);var Ya=function(e){function t(){var e;return(0,Y.A)(this,t),(e=Ga(this,t)).captionData=null,e.label=null,e.defaultTrack=!1,e.kind=null,e.isFragmented=!1,e.isEmbedded=!1,e.isTTML=null,e}return(0,wn.A)(t,e),(0,H.A)(t)}(Pt),Va=n(17377);function qa(){var e=0;function t(e){for(var t="",n=0;n<e.length;++n)t+=e[n].uchar;return t.length-t.replace(/^\s+/,"").length}function n(e){return"left: "+3.125*e.x+"%; top: "+6.66*e.y1+"%; width: "+(100-3.125*e.x)+"%; height: "+6.66*Math.max(e.y2-1-e.y1,1)+"%; align-items: flex-start; overflow: visible; -webkit-writing-mode: horizontal-tb;"}function r(e){return"red"===e?"rgb(255, 0, 0)":"green"===e?"rgb(0, 255, 0)":"blue"===e?"rgb(0, 0, 255)":"cyan"===e?"rgb(0, 255, 255)":"magenta"===e?"rgb(255, 0, 255)":"yellow"===e?"rgb(255, 255, 0)":"white"===e?"rgb(255, 255, 255)":"black"===e?"rgb(0, 0, 0)":e}function i(e,t){var n=e.videoHeight/15;return t?"font-size: "+n+"px; font-family: Menlo, Consolas, 'Cutive Mono', monospace; color: "+(t.foreground?r(t.foreground):"rgb(255, 255, 255)")+"; font-style: "+(t.italics?"italic":"normal")+"; text-decoration: "+(t.underline?"underline":"none")+"; white-space: pre; background-color: "+(t.background?r(t.background):"transparent")+";":"font-size: "+n+"px; font-family: Menlo, Consolas, 'Cutive Mono', monospace; justify-content: flex-start; text-align: left; color: rgb(255, 255, 255); font-style: normal; white-space: pre; line-height: normal; font-weight: normal; text-decoration: none; width: 100%; display: flex;"}function a(e){return e.replace(/^\s+/g,"")}function o(e){return e.replace(/\s+$/g,"")}return{createHTMLCaptionsFromScreen:function(r,s,u,c){var l,f,d=null,h=!1,g=-1,p={start:s,end:u,spans:[]},m="style_cea608_white_black",E={},v={},A=[];for(l=0;l<15;++l){var y=c.rows[l],T="",_=null;if(!1===y.isEmpty()){var S=t(y.chars);null===d&&(d={x:S,y1:l,y2:l+1,p:[]}),S!==g&&h&&(d.p.push(p),p={start:s,end:u,spans:[]},d.y2=l,d.name="region_"+d.x+"_"+d.y1+"_"+d.y2,!1===E.hasOwnProperty(d.name)?(A.push(d),E[d.name]=d):E[d.name].p.contat(d.p),d={x:S,y1:l,y2:l+1,p:[]});for(var I=0;I<y.chars.length;++I){var b=y.chars[I],R=b.penState;if(null===_||!R.equals(_)){T.trim().length>0&&(p.spans.push({name:m,line:T,row:l}),T="");var N="style_cea608_"+R.foreground+"_"+R.background;R.underline&&(N+="_underline"),R.italics&&(N+="_italics"),v.hasOwnProperty(N)||(v[N]=JSON.parse(JSON.stringify(R))),_=R,m=N}T+=b.uchar}T.trim().length>0&&p.spans.push({name:m,line:T,row:l}),h=!0,g=S}else h=!1,g=-1,d&&(d.p.push(p),p={start:s,end:u,spans:[]},d.y2=l,d.name="region_"+d.x+"_"+d.y1+"_"+d.y2,!1===E.hasOwnProperty(d.name)?(A.push(d),E[d.name]=d):E[d.name].p.contat(d.p),d=null)}d&&(d.p.push(p),d.y2=l+1,d.name="region_"+d.x+"_"+d.y1+"_"+d.y2,!1===E.hasOwnProperty(d.name)?(A.push(d),E[d.name]=d):E[d.name].p.contat(d.p),d=null);var C=[];for(l=0;l<A.length;++l){var w=A[l],D="sub_cea608_"+e++,O=document.createElement("div");O.id=D;var M=n(w);O.style.cssText="position: absolute; margin: 0; display: flex; box-sizing: border-box; pointer-events: none;"+M;var P=document.createElement("div");P.className="paragraph bodyStyle",P.style.cssText=i(r);var L=document.createElement("div");L.className="cueUniWrapper",L.style.cssText="unicode-bidi: normal; direction: ltr;";for(var x=0;x<w.p.length;++x){var F=w.p[x],U=0;for(f=0;f<F.spans.length;++f){var k=F.spans[f];if(k.line.length>0){if(0!==f&&U!=k.row){var B=document.createElement("br");B.className="lineBreak",L.appendChild(B)}var G=!1;U===k.row&&(G=!0),U=k.row;var H=v[k.name],Y=document.createElement("span");Y.className="spanPadding "+k.name+" customSpanColor",Y.style.cssText=i(r,H),0!==f&&G?f===F.spans.length-1?Y.textContent=o(k.line):Y.textContent=k.line:F.spans.length>1&&f<F.spans.length-1&&k.row===F.spans[f+1].row?Y.textContent=a(k.line):Y.textContent=k.line.trim(),L.appendChild(Y)}}}P.appendChild(L),O.appendChild(P);var V={bodyStyle:["%",90]};for(var q in v)v.hasOwnProperty(q)&&(V[q]=["%",90]);C.push({type:"html",start:s,end:u,cueHTMLElement:O,cueID:D,cellResolution:[32,15],isFromCEA608:!0,fontSize:V,lineHeight:{},linePadding:{}})}return C}}}qa.__dashjs_factory_name="EmbeddedTextHtmlRender";var Ka=r.A.getSingletonFactory(qa);function ja(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return za(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?za(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function za(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}n(90744);var Wa=function(){return(0,H.A)((function e(){(0,Y.A)(this,e),this.time=null,this.verboseLevel=0}),[{key:"log",value:function(e,t){if(this.verboseLevel>=e){var n="function"==typeof t?t():t;console.log("".concat(this.time," [").concat(e,"] ").concat(n))}}}])}(),Qa=function(){return(0,H.A)((function e(){(0,Y.A)(this,e),this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}),[{key:"reset",value:function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}},{key:"setStyles",value:function(e){for(var t=0,n=["foreground","underline","italics","background","flash"];t<n.length;t++){var r=n[t];Object.prototype.hasOwnProperty.call(e,r)&&(this[r]=e[r])}}},{key:"isDefault",value:function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash}},{key:"equals",value:function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash}},{key:"copy",value:function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash}}])}(),Xa=function(){return(0,H.A)((function e(){(0,Y.A)(this,e),this.uchar=" ",this.penState=new Qa}),[{key:"reset",value:function(){this.uchar=" ",this.penState.reset()}},{key:"setChar",value:function(e,t){this.uchar=e,this.penState.copy(t)}},{key:"setPenState",value:function(e){this.penState.copy(e)}},{key:"equals",value:function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)}},{key:"copy",value:function(e){this.uchar=e.uchar,this.penState.copy(e.penState)}},{key:"isEmpty",value:function(){return" "===this.uchar&&this.penState.isDefault()}}])}(),$a=100,Za={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499};function Ja(e){return String.fromCharCode(Za[e]||e)}var eo=function(){return(0,H.A)((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Wa;(0,Y.A)(this,e),this.chars=[],this.cueStartTime=null,this.pos=0,this.currPenState=new Qa;for(var n=0;n<$a;n++)this.chars.push(new Xa);this.logger=t}),[{key:"equals",value:function(e){for(var t=0;t<$a;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}},{key:"copy",value:function(e){for(var t=0;t<$a;t++)this.chars[t].copy(e.chars[t])}},{key:"isEmpty",value:function(){for(var e=!0,t=0;t<$a;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e}},{key:"setCursor",value:function(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(3,"Negative cursor position "+this.pos),this.pos=0):this.pos>$a&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=$a)}},{key:"moveCursor",value:function(e){var t=this.pos+e;if(e>1)for(var n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)}},{key:"backSpace",value:function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}},{key:"insertChar",value:function(e){var t=this;e>=144&&this.backSpace();var n=Ja(e);this.pos>=$a?this.logger.log(0,(function(){return"Cannot insert "+e.toString(16)+" ("+n+") at position "+t.pos+". Skipping it!"})):(this.chars[this.pos].setChar(n,this.currPenState),this.moveCursor(1))}},{key:"clearFromPos",value:function(e){var t;for(t=e;t<$a;t++)this.chars[t].reset()}},{key:"clear",value:function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}},{key:"clearToEndOfRow",value:function(){this.clearFromPos(this.pos)}},{key:"getTextString",value:function(){for(var e=[],t=!0,n=0;n<$a;n++){var r=this.chars[n].uchar;" "!==r&&(t=!1),e.push(r)}return t?"":e.join("")}},{key:"setPenStyles",value:function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}}])}(),to=15,no=function(){return(0,H.A)((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Wa;(0,Y.A)(this,e),this.rows=[],this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null;for(var n=0;n<to;n++)this.rows.push(new eo(t));this.logger=t}),[{key:"reset",value:function(){for(var e=0;e<to;e++)this.rows[e].clear();this.currRow=14}},{key:"equals",value:function(e){for(var t=!0,n=0;n<to;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t}},{key:"copy",value:function(e){for(var t=0;t<to;t++)this.rows[t].copy(e.rows[t])}},{key:"isEmpty",value:function(){for(var e=!0,t=0;t<to;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e}},{key:"backSpace",value:function(){this.rows[this.currRow].backSpace()}},{key:"clearToEndOfRow",value:function(){this.rows[this.currRow].clearToEndOfRow()}},{key:"insertChar",value:function(e){this.rows[this.currRow].insertChar(e)}},{key:"setPen",value:function(e){this.rows[this.currRow].setPenStyles(e)}},{key:"moveCursor",value:function(e){this.rows[this.currRow].moveCursor(e)}},{key:"setCursor",value:function(e){this.logger.log(2,"setCursor: "+e),this.rows[this.currRow].setCursor(e)}},{key:"setPAC",value:function(e){this.logger.log(2,(function(){return"pacData = "+JSON.stringify(e)}));var t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(var n=0;n<to;n++)this.rows[n].clear();var r=this.currRow+1-this.nrRollUpRows,i=this.lastOutputScreen;if(i){var a=i.rows[r].cueStartTime,o=this.logger.time;if(null!==a&&null!==o&&a<o)for(var s=0;s<this.nrRollUpRows;s++)this.rows[t-this.nrRollUpRows+s+1].copy(i.rows[r+s])}}this.currRow=t;var u=this.rows[this.currRow];if(null!==e.indent){var c=e.indent,l=Math.max(c-1,0);u.setCursor(e.indent),e.color=u.chars[l].penState.foreground}var f={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(f)}},{key:"setBkgData",value:function(e){this.logger.log(2,(function(){return"bkgData = "+JSON.stringify(e)})),this.backSpace(),this.setPen(e),this.insertChar(32)}},{key:"setRollUpRows",value:function(e){this.nrRollUpRows=e}},{key:"rollUp",value:function(){var e=this;if(null!==this.nrRollUpRows){this.logger.log(1,(function(){return e.getDisplayText()}));var t=this.currRow+1-this.nrRollUpRows,n=this.rows.splice(t,1)[0];n.clear(),this.rows.splice(this.currRow,0,n),this.logger.log(2,"Rolling up")}else this.logger.log(3,"roll_up but nrRollUpRows not set yet")}},{key:"getDisplayText",value:function(e){e=e||!1;for(var t=[],n="",r=-1,i=0;i<to;i++){var a=this.rows[i].getTextString();a&&(r=i+1,e?t.push("Row "+r+": '"+a+"'"):t.push(a.trim()))}return t.length>0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n}},{key:"getTextAndFormat",value:function(){return this.rows}}])}(),ro=function(){return(0,H.A)((function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Wa;(0,Y.A)(this,e),this.chNr=t,this.outputFilter=n,this.mode=null,this.displayedMemory=new no(r),this.nonDisplayedMemory=new no(r),this.lastOutputScreen=new no(r),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=r,this.logger.log(2,"new Cea608Channel("+this.chNr+")")}),[{key:"reset",value:function(){var e,t;this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),null===(e=this.outputFilter)||void 0===e||null===(t=e.reset)||void 0===t||t.call(e),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}},{key:"getHandler",value:function(){return this.outputFilter}},{key:"setHandler",value:function(e){this.outputFilter=e}},{key:"setPAC",value:function(e){this.writeScreen.setPAC(e)}},{key:"setBkgData",value:function(e){this.writeScreen.setBkgData(e)}},{key:"setMode",value:function(e){e!==this.mode&&(this.mode=e,this.logger.log(2,(function(){return"MODE="+e})),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.setRollUpRows(null),this.nonDisplayedMemory.setRollUpRows(null)),this.mode=e)}},{key:"insertChars",value:function(e){var t,n=this,r=ja(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;this.writeScreen.insertChar(i)}}catch(e){r.e(e)}finally{r.f()}var a=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,(function(){return a+": "+n.writeScreen.getDisplayText(!0)})),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(this.logger.log(1,(function(){return"DISPLAYED: "+n.displayedMemory.getDisplayText(!0)})),this.outputDataUpdate())}},{key:"ccRCL",value:function(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}},{key:"ccBS",value:function(){this.logger.log(2,"BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}},{key:"ccAOF",value:function(){}},{key:"ccAON",value:function(){}},{key:"ccDER",value:function(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}},{key:"ccRU",value:function(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}},{key:"ccFON",value:function(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}},{key:"ccRDC",value:function(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}},{key:"ccTR",value:function(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}},{key:"ccRTD",value:function(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}},{key:"ccEDM",value:function(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}},{key:"ccCR",value:function(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}},{key:"ccENM",value:function(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}},{key:"ccEOC",value:function(){var e=this;if(this.logger.log(2,"EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var t=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=t,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,(function(){return"DISP: "+e.displayedMemory.getDisplayText()}))}this.outputDataUpdate(!0)}},{key:"ccTO",value:function(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}},{key:"ccMIDROW",value:function(e){var t={flash:!1};t.underline=e%2==1,t.italics=e>=46,t.italics?t.foreground="white":t.foreground=["white","green","blue","cyan","red","yellow","magenta"][Math.floor(e/2)-16],this.logger.log(2,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)}},{key:"outputDataUpdate",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.logger.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))}},{key:"cueSplitAtTime",value:function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}}])}(),io=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];function ao(e){var t,n=[],r=ja(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;n.push(i.toString(16))}}catch(e){r.e(e)}finally{r.f()}return n}var oo={17:2,18:4,21:6,22:8,23:10,19:13,20:15},so={25:2,26:4,29:6,30:8,31:10,27:13,28:15},uo={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},co={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14};function lo(e,t,n){n.a=e,n.b=t}var fo=function(){return(0,H.A)((function e(t,n,r){(0,Y.A)(this,e),this.currentChannel=0,this.cmdHistory={a:null,b:null},this.lastTime=null;var i=this.logger=new Wa;this.channels=[null,new ro(t,n,i),new ro(t+1,r,i)]}),[{key:"addData",value:function(e,t){var n=this;this.lastTime=e,this.logger.time=e;for(var r=function(r){var i=127&t[r],a=127&t[r+1],o=!1,s=null;if(null!==n.lastTime&&(e=n.lastTime+.5*r*1001/3e4,n.logger.time=e),0===i&&0===a)return 0;n.logger.log(3,(function(){return"["+ao([t[r],t[r+1]])+"] -> ("+ao([i,a])+")"}));var u=n.cmdHistory;if(i>=16&&i<=31){if(function(e,t,n){return n.a===e&&n.b===t}(i,a,u))return lo(null,null,u),n.logger.log(3,(function(){return"Repeated command ("+ao([i,a])+") is dropped"})),0;lo(i,a,n.cmdHistory),(o=n.parseCmd(i,a))||(o=n.parseMidrow(i,a)),o||(o=n.parsePAC(i,a)),o||(o=n.parseBackgroundAttributes(i,a))}else lo(null,null,u);if(!o&&(s=n.parseChars(i,a)).length){var c=n.currentChannel;c&&c>0?n.channels[c].insertChars(s):n.logger.log(2,"No channel found yet. TEXT-MODE?")}o||s||n.logger.log(2,(function(){return"Couldn't parse cleaned data "+ao([i,a])+" orig: "+ao([t[r],t[r+1]])}))},i=0;i<t.length;i+=2)r(i)}},{key:"parseCmd",value:function(e,t){if(!((20===e||28===e||21===e||29===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=33&&t<=35))return!1;var n=20===e||21===e||23===e?1:2,r=this.channels[n];return 20===e||21===e||28===e||29===e?32===t?r.ccRCL():33===t?r.ccBS():34===t?r.ccAOF():35===t?r.ccAON():36===t?r.ccDER():37===t?r.ccRU(2):38===t?r.ccRU(3):39===t?r.ccRU(4):40===t?r.ccFON():41===t?r.ccRDC():42===t?r.ccTR():43===t?r.ccRTD():44===t?r.ccEDM():45===t?r.ccCR():46===t?r.ccENM():47===t&&r.ccEOC():r.ccTO(t-32),this.currentChannel=n,!0}},{key:"parseMidrow",value:function(e,t){var n=0;if((17===e||25===e)&&t>=32&&t<=47){if((n=17===e?1:2)!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;var r=this.channels[n];return!!r&&(r.ccMIDROW(t),this.logger.log(3,(function(){return"MIDROW ("+ao([e,t])+")"})),!0)}return!1}},{key:"parsePAC",value:function(e,t){var n;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127||(16===e||24===e)&&t>=64&&t<=95))return!1;var r=e<=23?1:2;n=t>=64&&t<=95?1===r?uo[e]:co[e]:1===r?oo[e]:so[e];var i=this.channels[r];return!!i&&(i.setPAC(this.interpretPAC(n,t)),this.currentChannel=r,!0)}},{key:"interpretPAC",value:function(e,t){var n,r={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>95?t-96:t-64,r.underline=!(1&~n),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r}},{key:"parseChars",value:function(e,t){var n,r,i=[],a=null;return e>=25?(n=2,a=e-8):(n=1,a=e),a>=17&&a<=19?(r=17===a?t+80:18===a?t+112:t+144,this.logger.log(2,(function(){return"Special char '"+Ja(r)+"' in channel "+n})),i=[r]):e>=32&&e<=127&&(i=0===t?[e]:[e,t]),i&&this.logger.log(3,(function(){return"Char codes = "+ao(i).join(",")})),i}},{key:"parseBackgroundAttributes",value:function(e,t){if(!((16===e||24===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=45&&t<=47))return!1;var n,r={};16===e||24===e?(n=Math.floor((t-32)/2),r.background=io[n],t%2==1&&(r.background=r.background+"_semi")):45===t?r.background="transparent":(r.foreground="black",47===t&&(r.underline=!0));var i=e<=23?1:2;return this.channels[i].setBkgData(r),!0}},{key:"reset",value:function(){for(var e=0;e<Object.keys(this.channels).length;e++){var t=this.channels[e];t&&t.reset()}lo(null,null,this.cmdHistory)}},{key:"cueSplitAtTime",value:function(e){var t,n=ja(this.channels);try{for(n.s();!(t=n.n()).done;){var r=t.value;r&&r.cueSplitAtTime(e)}}catch(e){n.e(e)}finally{n.f()}}}])}();function ho(e,t,n){for(var r=[],i=t;i<n;i++)i+2<n&&0===e.getUint8(i)&&0===e.getUint8(i+1)&&3===e.getUint8(i+2)?(r.push(0),r.push(0),i+=2):r.push(e.getUint8(i));return new DataView(new Uint8Array(r).buffer)}function go(e,t,n,r){return!(4!==e||t<8)&&181===n.getUint8(r)&&49===n.getUint16(r+1)&&1195456820===n.getUint32(r+3)&&3===n.getUint8(r+7)}function po(e,t){return(127&e)>0||(127&t)>0}var mo=6,Eo=39,vo=40,Ao=23,yo=24;function To(e,t){var n=e.getUint8(t),r=31&n;if(r===mo)return{nalType:r,headerSize:1};var i=n>>1&63;if(i===Eo||i===vo)return{nalType:i,headerSize:2};if(t+1>=e.byteLength)return null;var a=e.getUint8(t+1)>>3&31;return a===Ao||a===yo?{nalType:a,headerSize:2}:null}function _o(e,t){for(var n,r=0;r<e.byteLength-1;){var i=0,a=0,o=void 0;do{i+=o=e.getUint8(r++)}while(255===o);do{a+=o=e.getUint8(r++)}while(255===o);if(go(i,a,e,r))for(var s=r+10,u=s+3*(31&e.getUint8(s-2)),c=s;c<u;c+=3){var l=e.getUint8(c);if(4&l){var f=3&l;if(0===(n=f)||1===n){var d=e.getUint8(c+1),h=e.getUint8(c+2);po(d,h)&&t[f].push(d,h)}}}r+=a}}function So(e,t,n){for(var r=0,i=[[],[]],a=t;a<t+n-6;a++){var o=a+4+(r=e.getUint32(a));if(o>t+n)break;var s=To(e,a+4);if(s){var u=a+4+s.headerSize;o<=e.byteLength&&_o(ho(e,u,o),i)}a+=r+3}return i}function Io(e){var t,n,r,i,a,o,s,c,l,f,p,m,E,v,A,y,T=e.errHandler,_=e.manifestModel,S=e.mediaController,b=e.videoModel,R=e.textTracks,N=e.vttParser,C=e.vttCustomRenderingParser,w=e.ttmlParser,D=e.streamInfo,O=e.settings,M=this.context,P=(0,d.A)(M).getInstance(),L=!1;function x(){o=null,c=NaN,l=[],s=!1,a=[],i=null}function F(e){var t={};t[Me.A.SUBTITLE]="subtitles",t[Me.A.CAPTION]="captions",t[Me.A.FORCED_SUBTITLE]="subtitles";var n=new Ya;for(var r in e)n[r]=e[r];n.defaultTrack=function(e){var t=!1;return p.length>1&&e.isEmbedded?t=e.id&&e.id===g.A.CC1:1===p.length?e.id&&"string"==typeof e.id&&"CC"===e.id.substring(0,2)&&(t=!0):0===p.length&&(t=e.index===a[0].index),t}(e),n.isTTML=function(e){return e.codec&&e.codec.search(g.A.STPP)>=0||e.mimeType&&e.mimeType.search(g.A.TTML)>=0}(e),n.kind=function(e,t){var n=e.roles&&e.roles.length>0?t[e.roles[0].value]:t.caption;return n=Object.values(t).includes(n)?n:t.caption}(e,t),R.addTextTrackInfo(n)}function U(e){var t=e.chunk;t.representation.mediaInfo.embeddedCaptions&&B(t.bytes,t)}function k(e){f=e}function B(e,a){var u=a.representation.mediaInfo,l=u.type,d=u.mimeType,h=u.codec||d;h?-1!==u.codec.indexOf("application/mp4")?function(e,a,u){var l;if("InitializationSegment"===a.segmentType)s=!0,c=r.getMediaTimescaleFromMoov(e);else{if(!s)return;l=r.getSamplesInfo(e).sampleList,u.search(g.A.STPP)>=0?function(e,r,a){var s,u;for(i=null!==i?i:Y(a),s=0;s<r.length;s++){var l=r[s],d=l.cts,h=H(),p=h+d/c,m=p+l.duration/c;t.buffered.add(p,m);var E=new DataView(e,l.offset,l.subSizes[0]),v=rt.Utils.dataViewToString(E,g.A.UTF8),A=[],y=l.offset+l.subSizes[0];for(u=1;u<l.subSizes.length;u++){var T=new Uint8Array(e,y,l.subSizes[u]),S=String.fromCharCode.apply(null,T);A.push(S),y+=l.subSizes[u]}try{var I=_.getValue().ttmlTimeIsRelative?d/c:0,b=i.parse(v,I,d/c,(d+l.duration)/c,A);R.addCaptions(f,h,b)}catch(e){o.removeExecutedRequestsBeforeTime(),V(),n.error("TTML parser error: "+e)}}}(e,l,u):function(e,r){var i,a,o,s=[];for(i=0;i<r.length;i++){var u=r[i],l=H()+u.cts/c,d=l+u.duration/c;t.buffered.add(l,d);var h=e.slice(u.offset,u.offset+u.size),g=rt.parseBuffer(h);for(a=0;a<g.boxes.length;a++){var p=g.boxes[a];if(n.debug("VTT box1: "+p.type),"vtte"!==p.type&&"vttc"===p.type){n.debug("VTT vttc boxes.length = "+p.boxes.length);var m={styles:{}};for(o=0;o<p.boxes.length;o++){var E=p.boxes[o];if(n.debug("VTT box2: "+E.type),"payl"===E.type)m.start=u.cts/c,m.end=(u.cts+u.duration)/c,m.data=E.cue_text;else if("sttg"===E.type&&E.settings&&""!==E.settings)try{var v=E.settings.split(" ");m.styles=N.getCaptionStyles(v)}catch(e){}}m&&m.data&&(s.push(m),n.debug("VTT ".concat(m.start," - ").concat(m.end," : ").concat(m.data)))}}}s.length>0&&R.addCaptions(f,0,s)}(e,l)}}(e,a,h):l===g.A.VIDEO?function(e,t){var i,a;if(t.segmentType===I.G.INIT_SEGMENT_TYPE)0===m&&(m=r.getMediaTimescaleFromMoov(e));else if(t.segmentType===I.G.MEDIA_SEGMENT_TYPE){if(0===m)return void n.warn("CEA-608: No timescale for embeddedTextTrack yet");var o=(a=r.getSamplesInfo(e)).lastSequenceNumber,s=Math.trunc(t.start),u=Math.trunc(t.end);if(A[0]||A[1]||function(){for(var e,t=0;t<p.length;t++){if(-1===(e=R.getTrackIdxForId(p[t].id)))return void n.warn("CEA-608: data before track is ready.");var r=G(e);A[t]=new fo(t+1,{newCue:r},null)}}(),m){if(function(e,t,n,r,i){return null!==e&&null!==t&&null!==r&&null!==i&&(t===e?r!==i:t!==e+n)}(E,o,a.numSequences,v,s))for(i=0;i<A.length;i++)A[i]&&A[i].reset();for(var c=function(e,t){if(0===t.length)return null;for(var n={splits:[],fields:[[],[]]},r=new DataView(e),i=0;i<t.length;i++)for(var a=t[i],o=So(r,a.offset,a.size),s=null,u=0,c=0;c<2;c++)if(o[c].length>0){a.cts!==s?u=0:u+=1;var l=H();n.fields[c].push([a.cts+l*m,o[c],u]),s=a.cts}return n.fields.forEach((function(e){e.sort((function(e,t){return e[0]===t[0]?e[2]-t[2]:e[0]-t[0]}))})),n}(e,a.sampleList),l=0;l<A.length;l++){var f=c.fields[l],d=A[l];if(d)for(i=0;i<f.length;i++)d.addData(f[i][0]/m,f[i][1])}E=o,v=u}}}(e,a):function(e,n,r){var i,a,o=new DataView(e,0,e.byteLength);a=rt.Utils.dataViewToString(o,g.A.UTF8);try{i=Y(r).parse(a,0),R.addCaptions(R.getCurrentTrackIdx(),0,i),t.buffered&&t.buffered.add(n.start,n.end)}catch(e){T.error(new je.A(Ce.A.TIMED_TEXT_ERROR_ID_PARSE_CODE,Ce.A.TIMED_TEXT_ERROR_MESSAGE_PARSE+e.message,a))}}(e,a,h):n.error("No text type defined")}function G(e){return function(t,n,r){var i;(i=b.getTTMLRenderingDiv()?y.createHTMLCaptionsFromScreen(b.getElement(),t,n,r):[{start:t,end:n,data:r.getDisplayText(),styles:{}}])&&R.addCaptions(e,0,i)}}function H(){return isNaN(t.timestampOffset)?0:t.timestampOffset}function Y(e){var t;return e.search(g.A.VTT)>=0?t=O.get().streaming.text.webvtt.customRenderingEnabled&&C?C:N:(e.search(g.A.TTML)>=0||e.search(g.A.STPP)>=0)&&(t=w),t}function V(e,n){void 0===e&&e===n&&(e=t.buffered.start(0),n=t.buffered.end(t.buffered.length-1)),t.buffered.remove(e,n),R.deleteCuesFromTrackIdx(f,e,n)}function q(e){p.forEach((function(t){var n=R.getTrackIdxForId(t.id);n>=0&&R.deleteCuesFromTrackIdx(n,e.from,e.to)}))}return t={abort:function(){},addEmbeddedTrack:function(e){if(L&&e)if(e.id===g.A.CC1||e.id===g.A.CC3){for(var t=0;t<p.length;t++)if(p[t].id===e.id)return;p.push(e)}else n.warn("Embedded track "+e.id+" not supported!")},addMediaInfos:function(e,n,r){if(a=a.concat(n),e===g.A.TEXT&&n[0].isFragmented&&!n[0].isEmbedded){o=r,t.buffered=(0,Va.A)(M).create(),l=S.getTracksFor(g.A.TEXT,D.id).filter((function(e){return e.isFragmented}));for(var i=S.getCurrentTrackFor(g.A.TEXT,D.id),s=0;s<l.length;s++)if(l[s]===i){k(s);break}}for(var u=0;u<n.length;u++)F(n[u])},append:B,getConfig:function(){return{fragmentModel:o,fragmentedTracks:l,videoModel:b}},getStreamId:function(){return D.id},initialize:function(){L||(p=[],f=null,m=0,A=[],E=null,v=null,L=!0,y=Ka(M).getInstance(),P.on(h.A.VIDEO_CHUNK_RECEIVED,U,t),P.on(h.A.BUFFER_CLEARED,q,t))},remove:V,reset:function(){x(),a=[],r=null},resetEmbedded:function(){P.off(h.A.VIDEO_CHUNK_RECEIVED,U,t),P.off(h.A.BUFFER_CLEARED,q,t),R&&R.deleteAllTextTracks(),L=!1,p=[],A=[null,null],E=null,v=null},resetMediaInfos:function(){a=[]},setCurrentFragmentedTrackIdx:k},n=(0,u.A)(M).getInstance().getLogger(t),r=ot(M).getInstance(),x(),t}Io.__dashjs_factory_name="TextSourceBuffer";var bo=r.A.getClassFactory(Io),Ro=(n(42207),n(55815),n(64979),n(79739),n(13611),function(){return(0,H.A)((function e(){(0,Y.A)(this,e),this.root=null,this.size=0}),[{key:"addCue",value:function(e){var t={start:e.startTime,end:e.endTime,cue:e,maxEnd:e.endTime,left:null,right:null,height:1},n=this._insert(t,this.root),r=(0,Bn.A)(n,2),i=r[0],a=r[1];this.root=i,a&&this.size++}},{key:"removeCue",value:function(e){var t=this._remove(e,this.root),n=(0,Bn.A)(t,2),r=n[0],i=n[1];return this.root=r,i&&this.size--,i}},{key:"findCuesInRange",value:function(e,t){var n=[];return this._searchRange(this.root,e,t,n),n}},{key:"findCuesAtTime",value:function(e){return this.findCuesInRange(e,e)}},{key:"getAllCues",value:function(){var e=[];return this._inorderTraversal(this.root,e),e}},{key:"getSize",value:function(){return this.size}},{key:"clear",value:function(){this.root=null,this.size=0}},{key:"_compareCues",value:function(e,t){return e.startTime!==t.startTime?e.startTime-t.startTime:e.endTime!==t.endTime?e.endTime-t.endTime:"undefined"!=typeof VTTCue&&e instanceof VTTCue&&t instanceof VTTCue||e.text&&t.text?e.text.localeCompare(t.text):0}},{key:"_compareIntervals",value:function(e,t){return this._compareCues(e.cue,t.cue)}},{key:"_insert",value:function(e,t){if(!t)return[e,!0];var n=this._compareIntervals(e,t);if(n<0){var r=this._insert(e,t.left),i=(0,Bn.A)(r,1)[0];t.left=i}else{if(!(n>0))return[t,!1];var a=this._insert(e,t.right),o=(0,Bn.A)(a,1)[0];t.right=o}t.height=1+Math.max(this._getHeight(t.left),this._getHeight(t.right)),t.maxEnd=Math.max(t.maxEnd,e.maxEnd);var s=this._getBalance(t);return s>1?(this._compareIntervals(e,t.left)<0||(t.left=this._leftRotate(t.left)),[this._rightRotate(t),!0]):s<-1?(this._compareIntervals(e,t.right)>0||(t.right=this._rightRotate(t.right)),[this._leftRotate(t),!0]):[t,!0]}},{key:"_searchRange",value:function(e,t,n,r){e&&(this._overlaps(e,t,n)&&r.push(e.cue),e.left&&e.left.maxEnd>=t&&this._searchRange(e.left,t,n,r),e.right&&e.start<=n&&this._searchRange(e.right,t,n,r))}},{key:"_inorderTraversal",value:function(e,t){e&&(this._inorderTraversal(e.left,t),t.push(e.cue),this._inorderTraversal(e.right,t))}},{key:"_overlaps",value:function(e,t,n){if(n===t){var r=t;return e.start<=r&&r<e.end}return e.start<n&&t<e.end}},{key:"_getHeight",value:function(e){return e?e.height:0}},{key:"_getBalance",value:function(e){return e?this._getHeight(e.left)-this._getHeight(e.right):0}},{key:"_leftRotate",value:function(e){var t=e.right,n=t.left;return t.left=e,e.right=n,e.height=1+Math.max(this._getHeight(e.left),this._getHeight(e.right)),t.height=1+Math.max(this._getHeight(t.left),this._getHeight(t.right)),e.maxEnd=Math.max(e.end,e.left?e.left.maxEnd:0,e.right?e.right.maxEnd:0),t.maxEnd=Math.max(t.end,t.left?t.left.maxEnd:0,t.right?t.right.maxEnd:0),t}},{key:"_rightRotate",value:function(e){var t=e.left,n=t.right;return t.right=e,e.left=n,e.height=1+Math.max(this._getHeight(e.left),this._getHeight(e.right)),t.height=1+Math.max(this._getHeight(t.left),this._getHeight(t.right)),e.maxEnd=Math.max(e.end,e.left?e.left.maxEnd:0,e.right?e.right.maxEnd:0),t.maxEnd=Math.max(t.end,t.left?t.left.maxEnd:0,t.right?t.right.maxEnd:0),t}},{key:"_remove",value:function(e,t){if(!t)return[null,!1];var n=this._compareCues(e,t.cue);if(n<0){var r=this._remove(e,t.left),i=(0,Bn.A)(r,2),a=i[0],o=i[1];return t.left=a,o&&this._updateNode(t),[t,o]}if(n>0){var s=this._remove(e,t.right),u=(0,Bn.A)(s,2),c=u[0],l=u[1];return t.right=c,l&&this._updateNode(t),[t,l]}if(t.left||t.right){if(t.left){if(t.right){var f=this._findMin(t.right);t.cue=f.cue,t.start=f.start,t.end=f.end;var d=this._remove(f.cue,t.right),h=(0,Bn.A)(d,1)[0];return t.right=h,this._updateNode(t),[t,!0]}return[t.left,!0]}return[t.right,!0]}return[null,!0]}},{key:"_findMin",value:function(e){for(;e.left;)e=e.left;return e}},{key:"_updateNode",value:function(e){e.height=1+Math.max(this._getHeight(e.left),this._getHeight(e.right)),e.maxEnd=Math.max(e.end,e.left?e.left.maxEnd:0,e.right?e.right.maxEnd:0)}}])}()),No=n(37640);function Co(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return wo(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wo(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function wo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Do=["text","align","fontSize","id","isd","line","lineAlign","lineHeight","linePadding","position","positionAlign","region","size","snapToLines","vertical"];function Oo(e){var t,n,r,i,a,o,s,c,l,f,m,E,v,A,y,T,_,S,I,b,R=this.context,N=(0,d.A)(R).getInstance(),C=e.videoModel,w=e.streamInfo,D=e.settings,O=new Map;function M(e,t,n,r,i,a){var o=0,s=0;e/t>n/r?o=(s=t)/r*n:s=(o=e)/n*r;var u,c,l=0,f=0;return o/s>i?(f=s,l=s*i):(l=o,f=o/i),u=(e-l)/2,c=(t-f)/2,a?{x:u+.1*l,y:c+.1*f,w:.8*l,h:.8*f}:{x:u,y:c,w:l,h:f}}function P(e,t){var n=C.getClientWidth(),r=C.getClientHeight(),i=C.getVideoWidth(),a=C.getVideoHeight(),o=C.getVideoRelativeOffsetTop(),u=C.getVideoRelativeOffsetLeft();if(0!==i&&0!==a){var d=i/a,h=!1;e.isFromCEA608&&(d=3.5/3,h=!0);var g=M.call(this,n,r,i,a,d,h),E=g.w,v=g.h,T=g.x,S=g.y;if(E!=l||v!=f||T!=s||S!=c||t){if(s=T+u,c=S+o,l=E,f=v,m){var I=m.style;I&&(I.left=s+"px",I.top=c+"px",I.width=l+"px",I.height=f+"px",I.zIndex=A&&document[A]||y?_:null,N.trigger(p.A.CAPTION_CONTAINER_RESIZE))}var b=e.activeCues;if(b)for(var R=b.length,w=0;w<R;++w){var D=b[w];D.scaleCue(D)}}}}function L(e){var t,n,r,i,a,o=l,s=f;if(e.cellResolution){var u=[o/e.cellResolution[0],s/e.cellResolution[1]];if(e.linePadding)for(t in e.linePadding)if(e.linePadding.hasOwnProperty(t)){n=(e.linePadding[t]*u[0]).toString();for(var c=document.getElementsByClassName("spanPadding"),d=0;d<c.length;d++)c[d].style.cssText=c[d].style.cssText.replace(/(padding-left\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+n),c[d].style.cssText=c[d].style.cssText.replace(/(padding-right\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+n)}if(e.fontSize){for(t in e.fontSize)if(e.fontSize.hasOwnProperty(t)){"%"===e.fontSize[t][0]?r=e.fontSize[t][1]/100:"c"===e.fontSize[t][0]&&(r=e.fontSize[t][1]),n=(r*u[1]).toString(),a="defaultFontSize"!==t?document.getElementsByClassName(t):document.getElementsByClassName("paragraph");for(var h=0;h<a.length;h++)a[h].style.cssText=a[h].style.cssText.replace(/(font-size\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+n)}if(e.lineHeight)for(t in e.lineHeight)if(e.lineHeight.hasOwnProperty(t)){"%"===e.lineHeight[t][0]?i=e.lineHeight[t][1]/100:"c"===e.fontSize[t][0]&&(i=e.lineHeight[t][1]),n=(i*u[1]).toString(),a=document.getElementsByClassName(t);for(var g=0;g<a.length;g++)a[g].style.cssText=a[g].style.cssText.replace(/(line-height\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+n)}}}if(e.isd){var p=document.getElementById(e.cueID);p&&m.removeChild(p),F(e)}}function x(e,t){var n=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/,r=/^#(.*)$/;if(n.test(t)){var i=n.exec(t),a=parseInt(i[4],10)-1;return"data:image/png;base64,"+btoa(e.images[a])}if(r.test(t)){var o=r.exec(t)[1];return"data:image/png;base64,"+e.embeddedImages[o]}return t}function F(e){if(m){ae.call(this);var t=document.createElement("div");m.appendChild(t),T=(0,No.renderHTML)(e.isd,t,(function(t){return x(e,t)}),m.clientHeight,m.clientWidth,D.get().streaming.text.imsc.displayForcedOnlyMode,(function(e){n.info("renderCaption :",e)}),T,D.get().streaming.text.imsc.enableRollUp),t.id=e.cueID,N.trigger(p.A.CAPTION_RENDERED,{captionDiv:t,currentTrackIdx:o})}}function U(e,t){var n,r=Co(t.findCuesInRange(e.startTime-.1,e.endTime+.1));try{for(r.s();!(n=r.n()).done;){var i=n.value;if(k(e,i)&&B(e,i,Do))return i;if(k(i,e)&&B(e,i,Do))return i}}catch(e){r.e(e)}finally{r.f()}return null}function k(e,t){return!!t&&t.endTime>=e.startTime}function B(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];if(JSON.stringify(e[i])!==JSON.stringify(t[i]))return!1}return!0}function G(e,t){t&&t.forEach((function(t){t.kind&&"image"===t.kind&&(t.src=x(e,t.src)),G(e,t.contents)}))}function H(e,t,r){var i=$(e),a=O.get(i),o=D.get().streaming.text.dispatchForManualRendering;if(i&&a&&Array.isArray(r)&&0!==r.length){for(var s=0;s<r.length;s++){var u=null,c=r[s];if(i.cellResolution=c.cellResolution,i.isFromCEA608=c.isFromCEA608,isNaN(c.start)||isNaN(c.end)||(o?u=Y(c,t):z(c)&&m?u=K(c,t,i):c.data&&(u=j(c,t,i))),u){if(D.get().streaming.text.extendSegmentedCues){var l=U(u,a.allCues);l&&(a.allCues.removeCue(l),d=u,(f=l).startTime=Math.min(f.startTime,d.startTime),f.endTime=Math.max(f.endTime,d.endTime),u=f)}a.allCues.addCue(u)}else n.error("Impossible to display subtitles. You might have missed setting a TTML rendering div via player.attachTTMLRenderingDiv(TTMLRenderingDiv)")}var f,d;ne()}}function Y(e,t){var n=W(e,t);return n.onenter=function(){z(e)&&b&&b.cueID!==n.cueID&&q(b),delete n.type,b=n,V(n)},n.onexit=function(){q(n),b=null},n}function V(e){N.trigger(p.A.CUE_ENTER,e)}function q(e){N.trigger(p.A.CUE_EXIT,{cueID:e.cueID})}function K(e,t,r){var i=this,a=W(e,t);return m.style.left=s+"px",m.style.top=c+"px",m.style.width=l+"px",m.style.height=f+"px",a.onenter=function(){var e=this;r.mode===g.A.TEXT_SHOWING&&(this.isd?(I?requestAnimationFrame((function(){return F(e)})):F(this),n.debug("Cue enter id:"+this.cueID)):(m.appendChild(this.cueHTMLElement),L.call(i,this),N.trigger(p.A.CAPTION_RENDERED,{captionDiv:this.cueHTMLElement,currentTrackIdx:o})))},a.onexit=function(){if(m)for(var e=m.childNodes,t=0;t<e.length;++t)e[t].id===this.cueID&&(n.debug("Cue exit id:"+e[t].id),m.removeChild(e[t]),--t)},a}function j(e,t,r){var i=W(e,t);if(e.styles)try{void 0!==e.styles.align&&"align"in i&&(i.align=e.styles.align),void 0!==e.styles.line&&"line"in i&&(i.line=e.styles.line),void 0!==e.styles.lineAlign&&(i.lineAlign=e.styles.lineAlign),void 0!==e.styles.snapToLines&&"snapToLines"in i&&(i.snapToLines=e.styles.snapToLines),void 0!==e.styles.position&&"position"in i&&(i.position=e.styles.position),void 0!==e.styles.positionAlign&&(i.positionAlign=e.styles.positionAlign),void 0!==e.styles.size&&"size"in i&&(i.size=e.styles.size)}catch(e){n.error(e)}return i.onenter=function(){r.mode===g.A.TEXT_SHOWING&&N.trigger(p.A.CAPTION_RENDERED,{currentTrackIdx:o})},i}function z(e){return"html"===e.type}function W(e,t){return z(e)?function(e,t){var n=new r(e.start+t,e.end+t,"");return n.cueHTMLElement=e.cueHTMLElement,n.isd=e.isd,n.images=e.images,n.embeddedImages=e.embeddedImages,n.cueID=e.cueID,n.scaleCue=L.bind(self),n.cellResolution=e.cellResolution,n.lineHeight=e.lineHeight,n.linePadding=e.linePadding,n.fontSize=e.fontSize,n.isd&&G(n,n.isd.contents),n}(e,t):function(e,t){var n=new r(e.start-t,e.end-t,e.data);return n.cueID=Fe.A.generateUuid(),n}(e,t)}function Q(e){if(E)for(var t=E.childNodes,n=0;n<t.length;++n)t[n].id===e.cueID&&(E.removeChild(t[n]),--n)}function X(){var e,t=[],n=Co(C.getTextTracks());try{for(n.s();!(e=n.n()).done;){var r=e.value;r.manualMode===g.A.TEXT_SHOWING&&t.push(r)}}catch(e){n.e(e)}finally{n.f()}return t}function $(e){return e>=0&&i[e]?C.getTextTrack(i[e].kind,i[e].id,i[e].lang,i[e].isTTML,i[e].isEmbedded):null}function Z(e){var t=this;if(e!==o){var n=$(o=e);J.call(this,n),v&&(clearInterval(v),v=null),n&&"html"===n.renderingType&&(P.call(this,n,!0),window.ResizeObserver?(S=new window.ResizeObserver((function(){P.call(t,n,!0)}))).observe(C.getElement()):v=setInterval(P.bind(this,n),500))}}function J(e){ae.call(this),e&&"html"===e.renderingType?re.call(this):ie.call(this)}function ee(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return!!e&&(isNaN(t)||(r?e.startTime:e.endTime)>=t)&&(isNaN(n)||(r?e.endTime:e.startTime)<=n)}function te(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e){if(e.cues&&e.cues.length>0)for(var i=e.cues.length-1;i>=0;i--)ee(e.cues[i],t,n,r)&&(e.cues[i].onexit&&e.cues[i].onexit(),e.removeCue(e.cues[i]));var a=O.get(e);if(a){var o=a.activeCues,s=o.filter((function(e){return e.startTime>=t&&e.endTime<=n}));s.forEach((function(e){D.get().streaming.text.dispatchForManualRendering?q(e):Q(e)})),a.activeCues=o.filter((function(e){return!s.includes(e)}))}}}function ne(){var e,t=Co(O.values());try{for(t.s();!(e=t.n()).done;)e.value.lastCueWindowUpdate=-1/0}catch(e){t.e(e)}finally{t.f()}}function re(){var e=document.getElementById("native-cue-style");if(!e){(e=document.createElement("style")).id="native-cue-style",document.head.appendChild(e);var t=e.sheet,r=C.getElement();try{r&&(r.id?t.insertRule("#"+r.id+"::cue {background: transparent}",0):0!==r.classList.length?t.insertRule("."+r.className+"::cue {background: transparent}",0):t.insertRule("video::cue {background: transparent}",0))}catch(e){n.info(""+e.message)}}}function ie(){var e=document.getElementById("native-cue-style");e&&document.head.removeChild(e)}function ae(){if(m)for(;m.firstChild;)m.removeChild(m.firstChild)}function oe(){return i}return t={addCaptions:H,addTextTrackInfo:function(e){i.push(e)},createTracks:function(){i.sort((function(e,t){return e.index-t.index})),m=C.getTTMLRenderingDiv(),E=C.getVttRenderingDiv();for(var e,t,n,r,s,u,c=-1,l=0;l<i.length;l++){var f=(void 0,void 0,void 0,void 0,void 0,t=(e=i[l]).kind,n=void 0!==e.id?e.id:e.lang,r=e.lang,s=e.isTTML,u=e.isEmbedded,C.addTextTrack(t,n,r,s,u));a.push(f),i[l].defaultTrack&&(f.default=!0,c=l);var d=$(l);d&&(d.mode=g.A.TEXT_SHOWING,m&&(i[l].isTTML||i[l].isEmbedded)?d.renderingType="html":d.renderingType="default",O.set(d,{allCues:new Ro,lastCueWindowUpdate:-1/0,activeCues:[]})),H(l,0,i[l].captionData),N.trigger(p.A.TEXT_TRACK_ADDED)}if(Z.call(this,c),c>=0){var v=function(){var e=$(c);e&&"html"===e.renderingType&&P.call(this,e,!0),N.off(p.A.PLAYBACK_METADATA_LOADED,v,this)};N.on(p.A.PLAYBACK_METADATA_LOADED,v,this);for(var A=0;A<i.length;A++){var y=$(A);if(y){var T=D.get().streaming.text.dispatchForManualRendering;y.mode=A!==c||T?g.A.TEXT_HIDDEN:g.A.TEXT_SHOWING,y.manualMode=A===c?g.A.TEXT_SHOWING:g.A.TEXT_HIDDEN}}}N.trigger(h.A.TEXT_TRACKS_QUEUE_INITIALIZED,{index:o,tracks:i,streamId:w.id})},deleteAllTextTracks:function(){for(var e=a?a.length:0,t=0;t<e;t++){var n=$(t);n&&te.call(this,n,w.start,w.start+w.duration,!1)}a=[],i=[],v&&(clearInterval(v),v=null),S&&C&&(S.unobserve(C.getElement()),S=null),o=-1,ae.call(this),O.clear()},deleteCuesFromTrackIdx:function(e,t,n){var r=$(e);r&&te(r,t,n)},disableManualTracks:function(){var e=X();if(e&&e.length>0){var t=e[0],n=O.get(t);if(!n)return;n.activeCues.forEach((function(e){D.get().streaming.text.dispatchForManualRendering?q(e):Q(e)})),n.activeCues=[]}},getCurrentTrackIdx:function(){return o},getCurrentTextTrackInfo:function(){return i[o]},getStreamId:function(){return w.id},getTextTrackInfos:oe,getTrackIdxForId:function(e){for(var t=-1,n=0;n<i.length;n++)if(i[n].id===e){t=n;break}return t},initialize:function(){"undefined"!=typeof window&&"undefined"!=typeof navigator&&(r=window.VTTCue||window.TextTrackCue,i=[],a=[],o=-1,s=0,c=0,l=0,f=0,m=null,E=null,v=null,y=!1,_=2147483647,T=null,I="requestAnimationFrame"in window,O.clear(),void 0!==document.fullscreenElement?A="fullscreenElement":void 0!==document.webkitIsFullScreen?A="webkitIsFullScreen":document.msFullscreenElement?A="msFullscreenElement":document.mozFullScreen&&(A="mozFullScreen"))},manualCueProcessing:function(e){var t=X();if(t&&t.length>0){var n=t[0],r=O.get(n);if(!r)return;var i=r.activeCues,a=r.allCues.findCuesAtTime(e),o=i.filter((function(e){return!a.includes(e)})),s=a.filter((function(e){return!i.includes(e)}));o.forEach((function(e){D.get().streaming.text.dispatchForManualRendering?q(e):Q(e)})),s.forEach((function(e){D.get().streaming.text.dispatchForManualRendering?V(e):WebVTT.processCues(window,[e],E,e.cueID)})),r.activeCues=a}},setCurrentTrackIdx:Z,setModeForTrackIdx:function(e,t){var n=$(e);n&&n.mode!==t&&(n.mode=t),n&&n.manualMode!==t&&(n.manualMode=t)},updateTextTrackWindow:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=oe(),r=D.get().streaming.text.webvtt.customRenderingEnabled,i=function(){var i=n[a],o=$(a),s=O.get(o);if(!o||!s)return 0;if(!i.isEmbedded&&r)return 0;var u=D.get().streaming.buffer,c=u.bufferToKeep,l=u.bufferPruningInterval,f=Date.now();if((f-s.lastCueWindowUpdate)/1e3<l&&!t)return 0;var d=C.getPlaybackRate()||1,h=Math.max(0,e-c/d),p=e+2*l/d;if(o.cues)for(;o.cues.length>0;)o.removeCue(o.cues[0]);o.mode!==g.A.TEXT_DISABLED&&s.allCues.findCuesInRange(h,p).forEach((function(e){o.addCue(e)})),s.lastCueWindowUpdate=f},a=0;a<n.length;a++)i()},invalidateCueWindow:ne},n=(0,u.A)(R).getInstance().getLogger(t),t}Oo.__dashjs_factory_name="TextTracks";var Mo=r.A.getClassFactory(Oo);function Po(){var e,t,n,r,i,a,o=this.context;function s(e){var t=e.split(":"),n=t.length-1;return e=60*parseInt(t[n-1],10)+parseFloat(t[n]),2===n&&(e+=3600*parseInt(t[0],10)),e}function c(e){var t=e.split(r),n=t[1].split(a);return n.shift(),t[1]=n[0],n.shift(),{cuePoints:t,styles:l(n)}}function l(e){var t={};return e.forEach((function(e){var n=e.split(":");if(n.length>1){var r=(0,Bn.A)(n,2),i=r[0],a=r[1];switch(i){case"align":case"A":t.align=a;break;case"line":case"L":var o=a.split(","),s=(0,Bn.A)(o,2),u=s[0],c=s[1],l=u.endsWith("%");t.line="auto"===u?u:parseInt(u,10),l&&(t.snapToLines=!1),c&&(t.lineAlign=c);break;case"position":case"P":var f=a.split(","),d=(0,Bn.A)(f,2),h=d[0],g=d[1];t.position=parseInt(h,10),g&&(t.positionAlign=g);break;case"size":case"S":t.size=parseInt(a,10)}}})),t}function f(e,t){for(var n,i=t,a="",o="";""!==e[i]&&i<e.length;)i++;if((n=i-t)>1)for(var s=0;s<n;s++){if((o=e[t+s]).match(r)){a="";break}a+=o,s!==n-1&&(a+="\n")}else(o=e[t]).match(r)||(a=o);return a}return e={parse:function(e){var a,o,u=[];if(!e)return u;a=(e=e.split(n)).length,o=-1;for(var l=0;l<a;l++){var d=e[l];if(d.length>0&&"WEBVTT"!==d&&d.match(r)){var h=c(d),g=h.cuePoints,p=h.styles,m=f(e,l+1),E=s(g[0].replace(i,"")),v=s(g[1].replace(i,""));!isNaN(E)&&!isNaN(v)&&E>=o&&v>E?""!==m?(o=E,u.push({start:E,end:v,data:m,styles:p})):t.error("Skipping cue due to empty/malformed cue text"):t.error("Skipping cue due to incorrect cue timing")}}return u},getCaptionStyles:l},t=(0,u.A)(o).getInstance().getLogger(e),n=/(?:\r\n|\r|\n)/gm,r=/-->/,i=/(^[\s]+|[\s]+$)/g,a=/\s\b/g,e}n(99449),Po.__dashjs_factory_name="VTTParser";var Lo=r.A.getSingletonFactory(Po);function xo(){var e,t;return e={parse:function(e){var n=[];return t.oncue=function(e){e.start=e.startTime,e.end=e.endTime,e.data=e.text,e.styles={align:e.align,line:e.line,position:e.position,size:e.size},n.push(e)},t.parse(e),n}},function(){try{window&&window.WebVTT&&window.WebVTT.Parser&&(t=new window.WebVTT.Parser(window,window.vttjs,window.WebVTT.StringDecoder()))}catch(e){}}(),e}xo.__dashjs_factory_name="VttCustomRenderingParser";var Fo=r.A.getSingletonFactory(xo);function Uo(){var e,t,n=this.context,r=(0,d.A)(n).getInstance(),i=0;return e={parse:function(e,n,a,o,s){var u,c,l,f="",d=[],g={},m={},E="",v="",A={onOpenTag:function(e,n,i){if(i[" imagetype"]&&!i[" imageType"]&&(r.trigger(p.A.CONFORMANCE_VIOLATION,{level:La.LEVELS.ERROR,event:La.EVENTS.NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE}),i[" imageType"]=i[" imagetype"]),"image"===n&&("http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt"===e||"http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"===e)){if(!i[" imageType"]||"PNG"!==i[" imageType"].value)return void t.warn("smpte-tt imageType != PNG. Discarded");E=i["http://www.w3.org/XML/1998/namespace id"].value}},onCloseTag:function(){E&&(m[E]=v.trim()),v="",E=""},onText:function(e){E&&(v+=e)}};if(!e)throw f="no ttml data to parse",new Error(f);g.data=e,r.trigger(h.A.TTML_TO_PARSE,g);var y=(0,No.fromXML)(g.data,(function(e){f=e}),A);r.trigger(h.A.TTML_PARSED,{ttmlString:g.data,ttmlDoc:y});var T,_=y.getMediaTimeEvents();for(l=0;l<_.length;l++){var S=(0,No.generateISD)(y,_[l],(function(e){f=e}));S.contents.some((function(e){return e.contents.length}))&&(u=_[l]+n)<(c=l+1<_.length?_[l+1]+n:o)&&d.push({start:u,end:c,type:"html",cueID:(void 0,T="cue_TTML_"+i,i++,T),isd:S,images:s,embeddedImages:m})}if(""!==f)throw t.error(f),new Error(f);return d}},t=(0,u.A)(n).getInstance().getLogger(e),e}Uo.__dashjs_factory_name="TTMLParser";var ko=r.A.getSingletonFactory(Uo);function Bo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Go(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bo(Object(n),!0).forEach((function(t){(0,kn.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ho(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Yo(e){var t,n,r,i=this.context,a=(0,d.A)(i).getInstance(),o=(0,Pe.A)(i).getInstance(),s=e.adapter,c=e.baseURLController,l="error",f="loaded",h="unloaded";function m(e,t){var n,i,a=!1;if(c.resolve()){var u=s.getVoRepresentations(e);u&&u.length>0&&(n=c.resolve(u[0].path).url)}var l=e.essentialProperties.filter((function(e){return e.schemeIdUri&&e.schemeIdUri===g.A.FONT_DOWNLOAD_DVB_SCHEME})),f=e.supplementalProperties.filter((function(e){return e.schemeIdUri&&e.schemeIdUri===g.A.FONT_DOWNLOAD_DVB_SCHEME}));l.length>0?(a=!0,i=l):i=f,i.forEach((function(i){if(function(e){return!(!(e.value&&1===parseInt(e.value)&&e.dvbUrl&&e.dvbUrl.length>0&&e.dvbFontFamily&&e.dvbFontFamily.length>0&&e.dvbMimeType)||e.dvbMimeType!==g.A.OFF_MIMETYPE&&e.dvbMimeType!==g.A.WOFF_MIMETYPE)}(i)){var s=(u=i.dvbUrl,c=n,o.isPathAbsolute(u)?u:o.isRelative(u)?c?o.resolve(u,c):o.resolve(u):u);r.push({fontFamily:i.dvbFontFamily,url:s,mimeType:i.dvbMimeType,trackId:e.id,streamId:t,isEssential:a,status:h,fontFace:new FontFace(i.dvbFontFamily,"url(".concat(s,")"),{display:"swap"})})}var u,c}))}function E(e,t){var n=r[e];r[e]=Go(Go({},n),{},{status:t})}function v(){r=[]}return t={addFontsFromTracks:function(e,t){if(e&&Array.isArray(e)&&t)for(var n=0;n<e.length;n++)m(e[n],t)},downloadFonts:function(){for(var e=function(e){var t=r[e];document.fonts.add(t.fontFace),a.trigger(p.A.DVB_FONT_DOWNLOAD_ADDED,t),t.fontFace.load().then((function(){E(e,f),a.trigger(p.A.DVB_FONT_DOWNLOAD_COMPLETE,t)}),(function(r){E(e,l),n.debug("Font download error: ",r),a.trigger(p.A.DVB_FONT_DOWNLOAD_FAILED,t)}))},t=0;t<r.length;t++)e(t)},getFonts:function(){return r},getFontsForTrackId:function(e){return r.filter((function(t){return t.trackId&&t.trackId===e}))},reset:function(){!function(){var e,t=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ho(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ho(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}(r);try{for(t.s();!(e=t.n()).done;){var i=e.value,a=document.fonts.delete(i.fontFace);n.debug("Removal of fontFamily: ".concat(i.fontFamily," was ").concat(a?"successful":"unsuccessful"))}}catch(e){t.e(e)}finally{t.f()}}(),v()}},n=(0,u.A)(i).getInstance().getLogger(t),v(),t}n(83851),Yo.__dashjs_factory_name="DVBFonts";var Vo=r.A.getClassFactory(Yo);function qo(e){var t,n,r,i,a,o,s,c,l,f,m,E,v,A,y=this.context,T=e.adapter,_=e.errHandler,S=e.manifestModel,I=e.mediaController,b=e.baseURLController,R=e.videoModel,N=e.settings;function C(e){if(A.error("Could not download ".concat(e.isEssential?"an essential":"a"," font - fontFamily: ").concat(e.fontFamily,", url: ").concat(e.url)),e.isEssential){var t=i[e.streamId].getTrackIdxForId(e.trackId);i[e.streamId].setModeForTrackIdx(t,g.A.TEXT_DISABLED)}}function w(e){if(A.debug("Successfully downloaded ".concat(e.isEssential?"an essential":"a"," font - fontFamily: ").concat(e.fontFamily,", url: ").concat(e.url)),e.isEssential){var t=i[e.streamId].getTrackIdxForId(e.trackId);t===i[e.streamId].getCurrentTrackIdx()?i[e.streamId].setModeForTrackIdx(t,g.A.TEXT_SHOWING):i[e.streamId].setModeForTrackIdx(t,g.A.TEXT_HIDDEN)}}function D(e){var t=e.tracks,r=e.index,a=e.streamId;if(!1===N.get().streaming.text.defaultEnabled&&!x()||E)F(a,-1);else{var o=I.getCurrentTrackFor(g.A.TEXT,a);if(o){var s={lang:o.lang,role:o.roles[0],index:o.index,codec:o.codec,accessibility:o.accessibility[0]};t.some((function(e,t){if(I.matchSettings(s,e))return F(a,t),r=t,!0}))}l=!1}n[a].lastEnabledIndex=r,c.trigger(p.A.TEXT_TRACKS_ADDED,{enabled:x(),index:r,tracks:t,streamId:a}),m=!0,v.addFontsFromTracks(t,a),v.getFonts().forEach((function(e){if(e.isEssential){var t=i[e.streamId].getTrackIdxForId(e.trackId);i[e.streamId].setModeForTrackIdx(t,g.A.TEXT_DISABLED)}})),v.downloadFonts()}function O(e){try{var t=e.streamId,n=i[t];if(!n||isNaN(e.time))return;n.updateTextTrackWindow(e.time),N.get().streaming.text.webvtt.customRenderingEnabled&&n.manualCueProcessing(e.time)}catch(e){}}function M(e){try{var t=e.streamId;if(!i[t])return;i[t].disableManualTracks()}catch(e){}}function P(e){try{var t=i[e.streamId];if(!t)return;var n=R.getTime()||0;t.updateTextTrackWindow(n,!0)}catch(e){A.error(e)}}function L(e){try{if(!e||!e.mediaType||e.mediaType!==g.A.AUDIO||!e.currentMediaInfo)return;var t=i[e.streamId].getCurrentTextTrackInfo(),n=NaN;l?n=U(e.streamId):k(t)&&e.currentMediaInfo.lang&&e.currentMediaInfo.lang!==t.lang&&(n=U(e.streamId),isNaN(n)&&(n=-1)),isNaN(n)||F(e.streamId,n)}catch(e){A.error(e)}}function x(){var e=!0;return l&&!f&&(e=!1),e}function F(e,t){(l=-1===t)&&c.trigger(h.A.BUFFER_LEVEL_UPDATED,{mediaType:g.A.TEXT,bufferLevel:-1},{streamId:e,mediaType:g.A.TEXT}),l&&I&&I.saveTextSettingsDisabled();var n=B(e);if(n!==t&&i[e]){i[e].disableManualTracks(),i[e].invalidateCueWindow();var a=i[e].getCurrentTextTrackInfo(),o=a?R.getTextTrack(a.kind,a.id,a.lang,a.isTTML,a.isEmbedded):null;o&&o.mode!==g.A.TEXT_DISABLED&&i[e].setModeForTrackIdx(n,g.A.TEXT_HIDDEN),i[e].setCurrentTrackIdx(t),a=i[e].getCurrentTextTrackInfo();var s=N.get().streaming.text.dispatchForManualRendering;if(a&&!s&&a.mode!==g.A.TEXT_DISABLED&&i[e].setModeForTrackIdx(t,g.A.TEXT_SHOWING),a&&a.isFragmented&&!a.isEmbedded)!function(e,t,n){if(r[e])for(var a=r[e].getConfig().fragmentedTracks,o=0;o<a.length;o++){var s=a[o];if(t.lang===s.lang&&(s.id?t.id===s.id:t.index===s.index)){var u=I.getCurrentTrackFor(g.A.TEXT,e);(s.id?u.id!==s.id:u.index!==s.index)?(i[e].deleteCuesFromTrackIdx(n),r[e].setCurrentFragmentedTrackIdx(o)):-1===n&&c.trigger(h.A.SET_FRAGMENTED_TEXT_AFTER_DISABLED,{},{streamId:e,mediaType:g.A.TEXT})}}}(e,a,n);else if(a&&!a.isFragmented)!function(e,t){c.trigger(h.A.SET_NON_FRAGMENTED_TEXT,{currentTrackInfo:t},{streamId:e,mediaType:g.A.TEXT})}(e,a);else if(!a&&l){var u=U(e);return void(isNaN(u)||F(e,u))}I.setTrack(a)}}function U(e){var t=function(e){return i[e].getTextTrackInfos().filter((function(e,t){return e._indexToSelect=t,!!(e&&e.roles&&e.roles.length>0)&&k(e)}))}(e);if(!t||t.length<=0)return NaN;var n=I.getCurrentTrackFor(g.A.AUDIO,e);if(!n)return NaN;var r=t.find((function(e){return n.lang===e.lang}));return r?r._indexToSelect:NaN}function k(e){return!(!e||!e.roles||0===e.roles.length)&&e.roles.some((function(e){return e.schemeIdUri===g.A.DASH_ROLE_SCHEME_ID&&e.value===Me.A.FORCED_SUBTITLE}))}function B(e){return i[e].getCurrentTrackIdx()}function G(){r={},i={},n={},l=!0,m=!1,E=!1}return t={addEmbeddedTrack:function(e,t){var n=e.id;r[n]&&r[n].addEmbeddedTrack(t)},addMediaInfosToBuffer:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=e.id;r[a]&&r[a].addMediaInfos(t,n,i)},createTracks:function(e){var t=e.id;i[t]&&i[t].createTracks()},deactivateStream:function(e){if(e){var t=e.id;r[t]&&r[t].resetMediaInfos(),i[t]&&i[t].deleteAllTextTracks()}},enableForcedTextStreaming:function(e){return(0,ze.sq)(e,"boolean"),f=e,!0},enableText:function(e,t){return(0,ze.sq)(t,"boolean"),x()!==t&&(t&&F(e,n[e].lastEnabledIndex),t||(n[e].lastEnabledIndex=B(e),m?F(e,-1):E=!0)),!0},getAllTracksAreDisabled:function(){return l},getCurrentTrackIdx:B,getTextSourceBuffer:function(e){var t=e.id;if(r&&r[t])return r[t]},initialize:function(){v=Vo(y).create({adapter:T,baseURLController:b}),c.on(h.A.TEXT_TRACKS_QUEUE_INITIALIZED,D,t),c.on(h.A.DVB_FONT_DOWNLOAD_FAILED,C,t),c.on(h.A.DVB_FONT_DOWNLOAD_COMPLETE,w,t),c.on(h.A.MEDIAINFO_UPDATED,L,t),c.on(h.A.PLAYBACK_TIME_UPDATED,O,t),N.get().streaming.text.webvtt.customRenderingEnabled&&c.on(h.A.PLAYBACK_SEEKING,M,t),c.on(h.A.PLAYBACK_SEEKED,P,t)},initializeForStream:function(e){var t=e.id,u=Mo(y).create({videoModel:R,settings:N,streamInfo:e});u.initialize(),i[t]=u;var c=bo(y).create({errHandler:_,adapter:T,dvbFonts:v,manifestModel:S,mediaController:I,videoModel:R,textTracks:u,vttParser:a,vttCustomRenderingParser:o,ttmlParser:s,streamInfo:e,settings:N});c.initialize(),r[t]=c,n[t]={},n[t].lastEnabledIndex=-1},isTextEnabled:x,reset:function(){Object.keys(r).forEach((function(e){r[e].resetEmbedded(),r[e].reset()})),v.reset(),G(),c.off(h.A.TEXT_TRACKS_QUEUE_INITIALIZED,D,t),c.off(h.A.DVB_FONT_DOWNLOAD_FAILED,C,t),c.off(h.A.DVB_FONT_DOWNLOAD_COMPLETE,w,t),c.off(h.A.MEDIAINFO_UPDATED,L,t),c.off(h.A.PLAYBACK_TIME_UPDATED,O,t),N.get().streaming.text.webvtt.customRenderingEnabled&&c.off(h.A.PLAYBACK_SEEKING,M,t),c.off(h.A.PLAYBACK_SEEKED,P,t)},setTextTrack:F,clearDataForStream:function(e){r[e]&&(r[e].resetEmbedded(),r[e].reset(),delete r[e]),i[e]&&(i[e].deleteAllTextTracks(),delete i[e]),n[e]&&delete n[e]}},f=!1,m=!1,E=!1,a=Lo(y).getInstance(),o=Fo(y).getInstance(),s=ko(y).getInstance(),c=(0,d.A)(y).getInstance(),A=(0,u.A)(y).getInstance().getLogger(t),G(),t}qo.__dashjs_factory_name="TextController";var Ko=r.A.getClassFactory(qo);function jo(e){e=e||{};var t,n,r,i,a,o,s=this.context,c=(0,u.A)(s).getInstance(),l=e.settings,f=(0,d.A)(s).getInstance();function h(){return navigator&&navigator.connection&&!isNaN(navigator.connection.downlink)&&navigator.connection.downlink>0?1e3*navigator.connection.downlink:NaN}function m(e,t,n,r){var i=Math.pow(.5,n/r.fast);e.fastEstimate=(1-i)*t+i*e.fastEstimate;var a=Math.pow(.5,n/r.slow);e.slowEstimate=(1-a)*t+a*e.slowEstimate,e.totalWeight+=n}function E(){t={},n={},r={},i={}}var v={addEntry:function(e,s){try{if(!(e&&s&&s.trace&&s.trace.length))return;!function(e){t[e]=t[e]||[],n[e]=n[e]||[],r[e]=r[e]||{fastEstimate:0,slowEstimate:0,totalWeight:0},i[e]=i[e]||{fastEstimate:0,slowEstimate:0,totalWeight:0}}(e);var u=s.tresponse.getTime()-s.trequest.getTime()||1,c=function(e,t){return e._fileLoaderType&&e._fileLoaderType===g.A.FILE_LOADER_TYPES.FETCH?function(e){var t=e.trace.reduce((function(e,t){return e+t.b[0]}),0),n=e.trace.reduce((function(e,t){return e+t.d}),0),r=NaN;return l.get().streaming.abr.throughput.useNetworkInformationApi.fetch&&(r=h()),isNaN(r)&&(r=Math.round(8*t/n)),{downloadedBytes:t,value:r,downloadTimeInMs:n}}(e):function(e,t){var n=NaN,r=NaN,i=!1;if(l.get().streaming.abr.throughput.useResourceTimingApi&&e._resourceTimingValues)n=e._resourceTimingValues.transferSize,r=e._resourceTimingValues.responseEnd-e._resourceTimingValues.responseStart,i=!0;else{if(e.trace.length<=1)return{throughput:NaN,downloadTimeInMs:NaN};n=e.trace.reduce((function(e,t){return e+t.b[0]}),0)-e.trace[0].b[0],r=Math.max(e.trace.reduce((function(e,t){return e+t.d}),0)-e.trace[0].d,1)}var a=NaN;if(!i&&l.get().streaming.abr.throughput.useNetworkInformationApi.xhr&&(a=h()),isNaN(a)){var o=l.get().streaming.abr.throughput.useDeadTimeLatency?r:r+t;a=Math.round(8*n/o)}return{downloadedBytes:n,value:a,downloadTimeInMs:r}}(e,t)}(s,u);if(c.latencyInMs=u,isNaN(c.value)||!isFinite(c.value))return;if(s.cmsd){var d=s.cmsd.dynamic&&s.cmsd.dynamic.etp?s.cmsd.dynamic.etp:null;if(d){var E=l.get().streaming.cmsd.abr.etpWeightRatio;E>0&&E<=1&&(c.value=c.value*(1-E)+d*E)}}if(function(e,t,n){return l.get().streaming.abr.throughput.useResourceTimingApi&&n._resourceTimingValues?0===n._resourceTimingValues.transferSize&&n._resourceTimingValues.decodedBodySize>0:!isNaN(t)&&(e===g.A.VIDEO?t<l.get().streaming.cacheLoadThresholds[g.A.VIDEO]:e===g.A.AUDIO?t<l.get().streaming.cacheLoadThresholds[g.A.AUDIO]:void 0)}(e,s._tfinish.getTime()-s.trequest.getTime(),s))return void o.debug("".concat(e," Assuming segment ").concat(s.url," came from cache, ignoring it for throughput calculation"));o.debug("Added throughput entry for ".concat(e,": ").concat(c.value," kbit/s")),c.serviceLocation=s._serviceLocation,t[e].push(c),n[e].push({value:u}),function(e){t[e].length>l.get().streaming.abr.throughput.sampleSettings.maxMeasurementsToKeep&&t[e].shift(),n[e].length>l.get().streaming.abr.throughput.sampleSettings.maxMeasurementsToKeep&&n[e].shift()}(e),f.trigger(p.A.THROUGHPUT_MEASUREMENT_STORED,{throughputValues:c}),s.type!==I.G.MPD_TYPE&&(m(r[e],c.value,l.get().streaming.abr.throughput.ewma.weightDownloadTimeMultiplicationFactor*c.downloadTimeInMs,a.bandwidthHalfLife),m(i[e],u,1,a.latencyHalfLife))}catch(e){o.error(e)}},getThroughputDict:function(e){return e?t[e]:t},getEwmaThroughputDict:function(e){return e?r[e]:r},getEwmaLatencyDict:function(e){return e?i[e]:i},getEwmaHalfLife:function(){return a},getLatencyDict:function(e){return e?n[e]:n},reset:E};return o=c.getLogger(v),a={bandwidthHalfLife:{fast:l.get().streaming.abr.throughput.ewma.throughputFastHalfLifeSeconds,slow:l.get().streaming.abr.throughput.ewma.throughputSlowHalfLifeSeconds},latencyHalfLife:{fast:l.get().streaming.abr.throughput.ewma.latencyFastHalfLifeCount,slow:l.get().streaming.abr.throughput.ewma.latencySlowHalfLifeCount}},E(),v}jo.__dashjs_factory_name="ThroughputModel";var zo=r.A.getClassFactory(jo);function Wo(){var e,t,n,r=this.context,i=(0,d.A)(r).getInstance();function a(){performance.clearResourceTimings()}function s(t){t.metric!==o.HTTP_REQUEST||!t.value||t.value.type!==I.G.MPD_TYPE&&(t.value.type!==I.G.MEDIA_SEGMENT_TYPE||t.mediaType!==g.A.AUDIO&&t.mediaType!==g.A.VIDEO)||e.addEntry(t.mediaType,t.value)}function u(r,i){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:NaN,s=null,u=e.getEwmaHalfLife(),d=null,p=!0;switch(a||(a=n.get().streaming.abr.throughput.averageCalculationMode),r){case g.A.THROUGHPUT_TYPES.BANDWIDTH:s=a===g.A.THROUGHPUT_CALCULATION_MODES.EWMA?e.getEwmaThroughputDict(i):e.getThroughputDict(i),d=u.bandwidthHalfLife,p=!0,o=isNaN(o)?t.getIsDynamic()?n.get().streaming.abr.throughput.sampleSettings.live:n.get().streaming.abr.throughput.sampleSettings.vod:o;break;case g.A.THROUGHPUT_TYPES.LATENCY:s=a===g.A.THROUGHPUT_CALCULATION_MODES.EWMA?e.getEwmaLatencyDict(i):e.getLatencyDict(i),d=u.latencyHalfLife,p=!1,o=isNaN(o)?n.get().streaming.abr.throughput.sampleSettings.averageLatencySampleAmount:o}if(!s||0===s.length)return NaN;switch(a){case g.A.THROUGHPUT_CALCULATION_MODES.ARITHMETIC_MEAN:return l(s,c(s,o,r));case g.A.THROUGHPUT_CALCULATION_MODES.BYTE_SIZE_WEIGHTED_ARITHMETIC_MEAN:return f(s,c(s,o,r));case g.A.THROUGHPUT_CALCULATION_MODES.DATE_WEIGHTED_ARITHMETIC_MEAN:return h(s,c(s,o,r));case g.A.THROUGHPUT_CALCULATION_MODES.HARMONIC_MEAN:return m(s,c(s,o,r));case g.A.THROUGHPUT_CALCULATION_MODES.BYTE_SIZE_WEIGHTED_HARMONIC_MEAN:return E(s,c(s,o,r));case g.A.THROUGHPUT_CALCULATION_MODES.DATE_WEIGHTED_HARMONIC_MEAN:return v(s,c(s,o,r));case g.A.THROUGHPUT_CALCULATION_MODES.EWMA:return A(s,d,p);case g.A.THROUGHPUT_CALCULATION_MODES.ZLEMA:return y(s,c(s,o,r))}}function c(e,t,r){if(e){if(t>=e.length)t=e.length;else if(r===g.A.THROUGHPUT_TYPES.BANDWIDTH&&n.get().streaming.abr.throughput.sampleSettings.enableSampleSizeAdjustment)for(var i=1;i<t;++i){var a=e[e.length-i].value/e[e.length-i-1].value;if((a>=n.get().streaming.abr.throughput.sampleSettings.increaseScale||a<=n.get().streaming.abr.throughput.sampleSettings.decreaseScale)&&(t+=1)===e.length)break}}else t=0;return t}function l(e,t){var n=e;return 0!==t&&n&&0!==n.length?(n=n.slice(-t)).reduce((function(e,t){return e+t.value}),0)/n.length:NaN}function f(e,t){var n=e;if(0===t||!n||0===n.length)return NaN;n=n.slice(-t);var r=0;return n.reduce((function(e,t){var n=Math.sqrt(t.downloadedBytes);return r+=n,e+t.value*n}),0)/r}function h(e,t){var n=e;if(0===t||!n||0===n.length)return NaN;n=n.slice(-t);var r=0;return n.reduce((function(e,t,n){var i=n+1;return r+=i,e+t.value*i}),0)/r}function m(e,t){var n=e;if(0===t||!n||0===n.length)return NaN;var r=(n=n.slice(-t)).reduce((function(e,t){return e+1/t.value}),0);return n.length/r}function E(e,t){var n=e;if(0===t||!n||0===n.length)return NaN;n=n.slice(-t);var r=0,i=n.reduce((function(e,t){var n=Math.sqrt(t.downloadedBytes);return r+=n,e+1/t.value*n}),0);return r/i}function v(e,t){var n=e;if(0===t||!n||0===n.length)return NaN;n=n.slice(-t);var r=0,i=n.reduce((function(e,t,n){var i=n+1;return r+=i,e+1/t.value*i}),0);return r/i}function A(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||e.totalWeight<=0)return NaN;var r=e.fastEstimate/(1-Math.pow(.5,e.totalWeight/t.fast)),i=e.slowEstimate/(1-Math.pow(.5,e.totalWeight/t.slow));return n?Math.min(r,i):Math.max(r,i)}function y(e,t){if(0===t||!e||0===e.length)return NaN;for(var n=e.slice(-t).map((function(e){return e.value})),r=2/(n.length+1),i=n[n.length-1],a=n[n.length-1],o=0;o<n.length;o++)a=r*(i=r*n[o]+(1-r)*i)+(1-r)*a;return a}function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:NaN,r=u(g.A.THROUGHPUT_TYPES.BANDWIDTH,e,t,n);return Math.round(r)}var _={getArithmeticMean:l,getAverageLatency:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:NaN,r=u(g.A.THROUGHPUT_TYPES.LATENCY,e,t,n);return Math.round(r)},getAverageThroughput:T,getByteSizeWeightedArithmeticMean:f,getByteSizeWeightedHarmonicMean:E,getDateWeightedArithmeticMean:h,getDateWeightedHarmonicMean:v,getEwma:A,getHarmonicMean:m,getRawThroughputData:function(t){return t?e.getThroughputDict(t):[]},getSafeAverageThroughput:function(e){var t=T(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:NaN);return isNaN(t)||(t*=n.get().streaming.abr.throughput.bandwidthSafetyFactor),t},getZlema:y,initialize:function(){var t,o;e=zo(r).create({settings:n}),i.on(p.A.METRIC_ADDED,s,_),null===(t=window.performance)||void 0===t||null===(o=t.addEventListener)||void 0===o||o.call(t,"resourcetimingbufferfull",a)},reset:function(){var t,n;e.reset(),i.off(p.A.METRIC_ADDED,s,_),null===(t=window.performance)||void 0===t||null===(n=t.removeEventListener)||void 0===n||n.call(t,"resourcetimingbufferfull",a)},setConfig:function(e){e.settings&&(n=e.settings),e.playbackController&&(t=e.playbackController)}};return _}Wo.__dashjs_factory_name="ThroughputController";var Qo=r.A.getSingletonFactory(Wo);function Xo(){var e,t,n,r,i=this.context,a=(0,d.A)(i).getInstance(),o=(0,c.A)(i).getInstance();function s(e){r=e}function u(e,t,n,r){var i,a=t.adaptation.period.mpd,o=a.availabilityStartTime;if(r)i=n&&a.timeShiftBufferDepth!==Number.POSITIVE_INFINITY?new Date(o.getTime()+1e3*(e+a.timeShiftBufferDepth)):a.availabilityEndTime;else if(n){var s=t.availabilityTimeOffset;i=new Date(o.getTime()+1e3*(e-s))}else i=o;return i}function l(e,t){return(e.getTime()-t.mpd.availabilityStartTime.getTime()+1e3*r)/1e3}function f(e,t){return e+(t.adaptation.period.start-t.presentationTimeOffset)}function m(e){var n={start:NaN,end:NaN},r=e[0].getAdapter().getRegularPeriods()[0],i=l(new Date,r);if(!e||0===e.length)return{range:n,now:i};e.forEach((function(e){var r=e.getCurrentRepresentationForType(g.A.VIDEO);if(r||(r=e.getCurrentRepresentationForType(g.A.AUDIO)),!r){var a=e.getAdapter(),o=a.getMediaInfoForType(e.getStreamInfo(),g.A.VIDEO)||a.getMediaInfoForType(e.getStreamInfo(),g.A.AUDIO);r=a.getVoRepresentations(o)[0]}var s={start:NaN,end:NaN};if(r)if(r.segmentInfoType===Me.A.SEGMENT_TIMELINE)s=function(e){var n,r,i,a,o=e.adaptation.period.mpd.manifest.Period[e.adaptation.period.index].AdaptationSet[e.adaptation.index],s=t.getRepresentationFor(e.index,o),u=s.SegmentTemplate||s.SegmentList,c=u.SegmentTimeline,l=u.timescale,d=c.S,h={start:0,end:0},g=d[0].t,p=!isNaN(g),m=p?g:0,E=0;for(p&&(h.start=f(m/l,e)),i=0,a=d.length;i<a;i++)r=0,(n=d[i]).hasOwnProperty("r")&&(r=n.r),E+=n.d*(1+r);return h.end=f((m+E)/l,e),h}(r);else{var u=r.adaptation.period;s.start=u.start,s.end=Math.max(i,u.start+u.duration)}!isNaN(s.start)&&(isNaN(n.start)||n.start>s.start)&&(n.start=s.start),!isNaN(s.end)&&(isNaN(n.end)||n.end<s.end)&&(n.end=s.end)})),n.end=Math.min(i,n.end);var a=v(e,n.end,!0);return n.end=isNaN(a)?n.end:a,n.start=r&&r.mpd&&r.mpd.timeShiftBufferDepth&&!isNaN(r.mpd.timeShiftBufferDepth)&&!isNaN(n.end)?Math.max(n.end-r.mpd.timeShiftBufferDepth,n.start):n.start,n.start=v(e,n.start),{range:n,now:i}}function E(e,t){n=e-t.end}function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{for(var r=0,i=!1,a=NaN;!i&&r<e.length;){var o=e[r].getStreamInfo();o.start<=t&&(!isFinite(o.duration)||o.start+o.duration>=t)?(a=t,i=!0):!n&&o.start>t&&(isNaN(a)||o.start<a)?a=o.start:n&&o.start+o.duration<t&&(isNaN(a)||o.start+o.duration>a)&&(a=o.start+o.duration),r+=1}return a}catch(e){return t}}function A(e){void 0===e.offset||isNaN(e.offset)||s(e.offset/1e3)}function y(){r=0,n=0}function T(){a.off(h.A.UPDATE_TIME_SYNC_OFFSET,A,this),y()}return e={calcAvailabilityEndTimeFromPresentationTime:function(e,t,n){return u(e,t,n,!0)},calcAvailabilityStartTimeFromPresentationTime:function(e,t,n){return u(e,t,n)},calcMediaTimeFromPresentationTime:function(e,t){return e-t.adaptation.period.start+t.presentationTimeOffset},calcPeriodRelativeTimeFromMpdRelativeTime:function(e,t){return t-e.adaptation.period.start},calcPresentationTimeFromMediaTime:f,calcPresentationTimeFromWallTime:l,calcTimeShiftBufferWindow:function(e,t){if(!t)return function(e){var t={start:NaN,end:NaN},n=0,r=NaN;return e.forEach((function(e){var t=e.getStreamInfo();n+=t.duration,(isNaN(r)||t.start<r)&&(r=t.start)})),t.start=r,t.end=r+n,t}(e);if(o.get().streaming.timeShiftBuffer.calcFromSegmentTimeline){var n=m(e);return E(n.now,n.range),n.range}return function(e){var t={start:NaN,end:NaN};if(!e||0===e.length)return t;var n=e[0].getAdapter().getRegularPeriods()[0],r=l(new Date,n),i=n.mpd.timeShiftBufferDepth,s=isNaN(i)?0:r-i;if(t.start=v(e,s),t.end=!isNaN(t.start)&&r<t.start?r:v(e,r,!0),!isNaN(i)&&t.end<r-i&&(t.end=NaN),o.get().streaming.timeShiftBuffer.fallbackToSegmentTimeline){var u=m(e);if(u.range.end<t.start)return a.trigger(p.A.CONFORMANCE_VIOLATION,{level:La.LEVELS.WARNING,event:La.EVENTS.INVALID_DVR_WINDOW}),E(u.now,u.range),u.range}return t}(e)},calcWallTimeForSegment:function(e,t){var n,r,i;return t&&(n=e.representation.adaptation.period.mpd.suggestedPresentationDelay,r=e.presentationStartTime+n,i=new Date(e.availabilityStartTime.getTime()+1e3*r)),i},getClientReferenceTime:function(){return Date.now()-1e3*n+1e3*r},getClientTimeOffset:function(){return r},initialize:function(){y(),a.on(h.A.UPDATE_TIME_SYNC_OFFSET,A,this)},reset:T,setClientTimeOffset:s,setConfig:function(e){e&&e.dashManifestModel&&(t=e.dashManifestModel)}},t=(0,Ut.A)(i).getInstance(),T(),e}Xo.__dashjs_factory_name="TimelineConverter";var $o=r.A.getSingletonFactory(Xo),Zo=(0,H.A)((function e(){(0,Y.A)(this,e),this.t=null,this.xywh=null,this.track=null,this.id=null,this.s=null,this.r=null}));function Jo(){var e;return{initialize:function(t){if(e=new Zo,!t)return null;var n=t.indexOf("#");if(-1!==n)for(var r=t.substr(n+1).split("&"),i=0,a=r.length;i<a;++i){var o=r[i],s=o.indexOf("=");if(-1!==s){var u=o.substring(0,s);e.hasOwnProperty(u)&&(e[u]=o.substr(s+1))}}},getURIFragmentData:function(){return e}}}Jo.__dashjs_factory_name="URIFragmentModel";var es=r.A.getSingletonFactory(Jo),ts=n(41349),ns=new Map([[g.A.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA,"loadedmetadata"],[g.A.VIDEO_ELEMENT_READY_STATES.HAVE_CURRENT_DATA,"loadeddata"],[g.A.VIDEO_ELEMENT_READY_STATES.HAVE_FUTURE_DATA,"canplay"],[g.A.VIDEO_ELEMENT_READY_STATES.HAVE_ENOUGH_DATA,"canplaythrough"]]);function rs(){var e,t,n,r,i,a,o,s,l,f,p,m,E=this.context,v=(0,d.A)(E).getInstance(),A=[];function y(e){n&&(arguments.length>1&&void 0!==arguments[1]&&arguments[1]?n.playbackRate=e:O(g.A.VIDEO_ELEMENT_READY_STATES.HAVE_FUTURE_DATA,(function(){n.playbackRate=e})))}function T(){return A.length>0}function _(e){var t=A.indexOf(e);if(null!==e&&(-1!==t&&A.splice(t,1),f.get().streaming.buffer.syntheticStallEvents.enabled&&n&&!T())){var r=function(){if(y(a||1,f.get().streaming.buffer.syntheticStallEvents.ignoreReadyState),!n.paused){var e=document.createEvent("Event");e.initEvent("playing",!0,!1),n.dispatchEvent(e)}};f.get().streaming.buffer.syntheticStallEvents.ignoreReadyState?r():(s&&s.func&&s.event&&b(s.event,s.func),s=O(g.A.VIDEO_ELEMENT_READY_STATES.HAVE_FUTURE_DATA,r))}}function S(){if(n&&T()&&0===n.playbackRate){var e=document.createEvent("Event");e.initEvent("waiting",!0,!1),n.dispatchEvent(e)}}function I(e,t){n&&n.addEventListener(e,t)}function b(e,t){n&&n.removeEventListener(e,t)}function R(){return n?n.readyState:NaN}function N(){return n?n.buffered:null}function C(){return n?n.clientWidth:NaN}function w(){return n?n.clientHeight:NaN}function D(e,t,r,i,a){if(n)for(var o=0;o<n.textTracks.length;o++)if(n.textTracks[o].kind===e&&(!t||n.textTracks[o].label==t)&&n.textTracks[o].language===r&&n.textTracks[o].isTTML===i&&n.textTracks[o].isEmbedded===a)return n.textTracks[o];return null}function O(e,t){return e===g.A.VIDEO_ELEMENT_READY_STATES.HAVE_NOTHING||R()>=e?(t(),null):function(e,t){var n=function(){b(e,n),t(e)};return I(e,n),{func:n,event:e}}(ns.get(e),t)}return r={addEventListener:I,addTextTrack:function(e,t,r,i,a){if(!n)return null;var o=D(e,t,r,i,a);return o||((o=n.addTextTrack(e,t,r)).isEmbedded=a,o.isTTML=i),o},appendChild:function(e){n&&(n.appendChild(e),void 0!==e.isTTML&&(n.textTracks[n.textTracks.length-1].isTTML=e.isTTML,n.textTracks[n.textTracks.length-1].isEmbedded=e.isEmbedded))},getBufferRange:N,getClientHeight:w,getClientWidth:C,getElement:function(){return n},getEnded:function(){return n?n.ended:null},getPlaybackQuality:function(){if(!n)return null;var e="webkitDroppedFrameCount"in n&&"webkitDecodedFrameCount"in n,t=null;return"getVideoPlaybackQuality"in n?t=n.getVideoPlaybackQuality():e&&(t={droppedVideoFrames:n.webkitDroppedFrameCount,totalVideoFrames:n.webkitDroppedFrameCount+n.webkitDecodedFrameCount,creationTime:new Date}),t},getPlaybackRate:function(){return n?n.playbackRate:null},getPlayedRanges:function(){return n?n.played:null},getReadyState:R,getSource:function(){return n?n.src:null},getTTMLRenderingDiv:function(){return e},getTextTrack:D,getTextTracks:function(){return n?n.textTracks:[]},getTime:function(){return n?isNaN(t)?n.currentTime:t:null},getVideoElementSize:function(){var e=f.get().streaming.abr.usePixelRatioInLimitBitrateByPortal&&window.hasOwnProperty("devicePixelRatio")?window.devicePixelRatio:1;return{elementWidth:C()*e,elementHeight:w()*e}},getVideoHeight:function(){return n?n.videoHeight:NaN},getVideoRelativeOffsetLeft:function(){if(n){var e=n.parentNode.host||n.parentNode;return e?n.getBoundingClientRect().left-e.getBoundingClientRect().left:NaN}return NaN},getVideoRelativeOffsetTop:function(){if(n){var e=n.parentNode.host||n.parentNode;return e?n.getBoundingClientRect().top-e.getBoundingClientRect().top:NaN}return NaN},getVideoWidth:function(){return n?n.videoWidth:NaN},getVttRenderingDiv:function(){return m},initialize:function(){v.on(h.A.PLAYBACK_PLAYING,S,this)},isPaused:function(){return n?n.paused:null},isSeeking:function(){return n?n.seeking||!isNaN(t):null},isStalled:T,pause:function(){n&&(n.pause(),n.autoplay=!1)},play:function(){if(n){n.autoplay=!0;var e=n.play();e&&e.catch&&"undefined"!=typeof Promise&&e.catch((function(e){"NotAllowedError"===e.name&&v.trigger(h.A.PLAYBACK_NOT_ALLOWED),i.warn("Caught pending play exception - continuing (".concat(e,")"))}))}},removeChild:function(e){n&&n.removeChild(e)},removeEventListener:b,reset:function(){clearTimeout(p),v.off(h.A.PLAYBACK_PLAYING,S,this),A.length=0,function(){try{o&&n&&(o.unobserve(n),o.disconnect(),o=null)}catch(e){}}()},setConfig:function(e){e&&e.settings&&(f=e.settings)},setCurrentTime:function(e,r){n&&(l&&l.func&&l.event&&b(l.event,l.func),t=e,l=O(g.A.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA,(function(){if(n)if(n.currentTime!==t)try{t=r?function(e){var t=N(),n=e,r=9999999999;if(t)for(var i=0;i<t.length;i++){var a=t.start(i),o=t.end(i),s=Math.abs(a-e),u=Math.abs(o-e);if(e>=a&&e<=o)return e;s<r&&(r=s,n=a),u<r&&(r=u,n=o)}return n}(t):t,isNaN(t)||(n.currentTime=t),t=NaN}catch(e){0===n.readyState&&e.code===e.INVALID_STATE_ERR&&(p=setTimeout((function(){n.currentTime=t,t=NaN}),400))}else t=NaN})))},setDisableRemotePlayback:function(e){n&&(n.disableRemotePlayback=e)},setElement:function(e){if(!(null==e||e&&/^(VIDEO|AUDIO)$/i.test(e.nodeName)))throw"element is not video or audio DOM type!";!function(e){try{if(!o||!e)return;o.observe(e)}catch(e){}}(n=e)},setPlaybackRate:y,setSource:function(e){n&&(e?n.src=e:(n.removeAttribute("src"),n.load()))},setStallState:function(e,t){!function(e,t){t?function(e){if(null!==e&&n&&!n.seeking&&-1===A.indexOf(e)&&(A.push(e),f.get().streaming.buffer.syntheticStallEvents.enabled&&n&&1===A.length&&(f.get().streaming.buffer.syntheticStallEvents.ignoreReadyState||R()>=g.A.VIDEO_ELEMENT_READY_STATES.HAVE_FUTURE_DATA))){a=n.playbackRate,y(0,!0);var t=document.createEvent("Event");t.initEvent("waiting",!0,!1),n.dispatchEvent(t)}}(e):_(e)}(e,t)},setTTMLRenderingDiv:function(t){(e=t).style.position="absolute",e.style.display="flex",e.style.overflow="hidden",e.style.pointerEvents="none",e.style.top=0,e.style.left=0},setVttRenderingDiv:function(e){m=e},waitForReadyState:O},i=(0,u.A)(E).getInstance().getLogger(r),f=(0,c.A)(E).getInstance(),t=NaN,function(){try{o=new ResizeObserver((function(){v.trigger(h.A.VIDEO_ELEMENT_RESIZED)}))}catch(e){}}(),r}rs.__dashjs_factory_name="VideoModel";var is=r.A.getSingletonFactory(rs),as=n(48986);function os(){var e,t,n,i,a,s,l,f,m,E,v,A,y,T,_,S,b,R,N,C,w,D,O,M,P,L,x,F,U,k,B,G,H,Y,V,q,K,j,z,W,Q,X,$="You must first call initialize() and set a source before calling this method",Z="You must first call initialize() and set a valid source and view before calling this method",J="You must first call attachView() to set the video element before calling this method",ee="You must first call attachSource() with a valid source before calling this method",te="MediaPlayer not initialized!",ne=this.context,re=(0,d.A)(ne).getInstance(),ie=(0,c.A)(ne).getInstance(),ae=(0,u.A)(ne).getInstance({settings:ie});function oe(){Se(null),ve(null),i=null,_&&(_.reset(),_=null),S&&(S.reset(),S=null),w&&w.reset(),ie.reset(),R&&(R.reset(),R=null),X&&(X.resetLoader(),X=null)}function se(){return!!n&&!!K.getElement()}function ue(){return(0,as.i)()}function ce(){if(!l)throw Z;return U.isPaused()}function le(){if(!l)throw Z;return U.getIsDynamic()}function fe(e){var t=L&&L.hasVideoTrack()?g.A.VIDEO:g.A.AUDIO,n=H.getCurrentDVRInfo(t);return n?de(n.range.start+e,n):0}function de(e,t){var n=U.getOriginalLiveDelay();return e>t.range.end-n&&(e=t.range.end-n),e}function he(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!l)throw Z;var t=Ee().currentTime;return""!==e&&(t=L.getTimeRelativeToStreamId(t,e)),t}function ge(e){(0,ze.sq)(e,"boolean"),f=e}function pe(){w.restoreDefaultUTCTimingSources()}function me(){return H}function Ee(){if(!K.getElement())throw J;return K.getElement()}function ve(e){if(!a)throw te;K.setElement(e),e&&(we(),function(){if(!S&&"undefined"!=typeof dashjs){var e=dashjs.MetricsReporting;if("function"==typeof e){var t=e(ne).create();S=t.createMetricsReporting({debug:ae,eventBus:re,mediaElement:Ee(),adapter:N,dashMetrics:H,mediaPlayerModel:C,events:h.A,constants:g.A,metricsConstants:o})}}}(),function(){if(!b&&"undefined"!=typeof dashjs){var e=dashjs.MssHandler;"function"==typeof e&&(Ce.A.extend(e.errors),b=e(ne).create({eventBus:re,mediaPlayerModel:C,dashMetrics:H,manifestModel:Y,playbackController:U,streamController:L,protectionController:_,baseURLController:O,errHandler:D,events:h.A,constants:g.A,debug:ae,initSegmentType:I.G.INIT_SEGMENT_TYPE,BASE64:_e,ISOBoxer:rt,settings:ie}))}}(),L&&L.switchToVideoElement(m)),l&&(be(),Re()),Oe(m)}function ye(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!s)throw $;var r=t?L.getStreamById(t):Ie();return r?r.getRepresentationsByType(e,n):[]}function Te(e){if(!s)throw $;var t=L.getActiveStreamInfo();return t?T.getTracksFor(e,t.id).filter((function(e){return!_||_.areKeyIdsUsable(e.normalizedKeyIds)})):[]}function Se(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:NaN;if(!a)throw te;"string"==typeof e&&j.initialize(e),null==t&&(t=NaN),isNaN(t)||(t=Math.max(0,t)),m=t,n=e,(s||l)&&(be(),Re()),se()&&Oe(m)}function Ie(){if(!s)throw $;var e=L.getActiveStreamInfo();return e?L.getStreamById(e.id):null}function be(){l=!1,s=!1,N.reset(),L.reset(),F.reset(),G.reset(),U.reset(),k.reset(),B.reset(),E.reset(),v.reset(),T.reset(),W.reset(),_&&(ie.get().streaming.protection.keepProtectionMediaKeys?_.stop():(_.reset(),_=null,we())),x.reset(),V.reset(),q.reset()}function Re(){w.resetPlaybackSessionSpecificSettings()}function Ne(){return Dr(ne).create({debug:ae,errHandler:D,dashMetrics:H,mediaPlayerModel:C,mssHandler:b,settings:ie})}function we(){if(_)return _;if("undefined"==typeof dashjs)return null;var e=dashjs.Protection;if("function"==typeof e){var t=e(ne).create();return h.A.extend(e.events),p.A.extend(e.events,{publicOnly:!0}),Ce.A.extend(e.errors),_=t.createProtectionSystem({debug:ae,errHandler:D,videoModel:K,customParametersModel:w,capabilities:M,eventBus:re,events:h.A,BASE64:_e,constants:g.A,cmcdController:V,settings:ie}),M||(M=(0,st.A)(ne).getInstance()),M.setProtectionController(_),_}return null}function De(){if(!a)throw te;if(R)return R;if("undefined"==typeof dashjs)return null;var e=dashjs.OfflineController;if("function"==typeof e){h.A.extend(e.events),p.A.extend(e.events,{publicOnly:!0}),Ce.A.extend(e.errors);var t=Ne(),n=Fr(ne).create();return n.setConfig({manifestModel:Y,adapter:N,manifestLoader:t,errHandler:D,contentSteeringController:B}),R=e(ne).create({debug:ae,manifestUpdater:n,baseURLController:O,manifestLoader:t,manifestModel:Y,mediaPlayerModel:C,abrController:E,playbackController:U,adapter:N,errHandler:D,dashMetrics:H,timelineConverter:y,segmentBaseController:W,schemeLoaderFactory:A,eventBus:re,events:h.A,errors:Ce.A,constants:g.A,settings:ie,dashConstants:Me.A,urlUtils:(0,Pe.A)(ne).getInstance()})}return null}function Oe(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:NaN;R&&R.resetRecords(),!s&&n&&(s=!0,t.info("Streaming Initialized"),e=Ne(),L||(L=Ba(ne).getInstance()),x||(x=Ko(ne).create({adapter:N,baseURLController:O,errHandler:D,manifestModel:Y,mediaController:T,settings:ie,videoModel:K})),P.setConfig({adapter:N,capabilities:M,customParametersModel:w,errHandler:D,manifestModel:Y,protectionController:_,settings:ie}),L.setConfig({abrController:E,adapter:N,baseURLController:O,capabilities:M,capabilitiesFilter:P,contentSteeringController:B,customParametersModel:w,dashMetrics:H,errHandler:D,manifestLoader:e,manifestModel:Y,mediaController:T,mediaPlayerModel:C,playbackController:U,protectionController:_,segmentBaseController:W,serviceDescriptionController:k,settings:ie,textController:x,throughputController:v,timelineConverter:y,uriFragmentModel:j,videoModel:K}),F.setConfig({adapter:N,playbackController:U,settings:ie,streamController:L,timelineConverter:y,videoModel:K}),U.setConfig({adapter:N,dashMetrics:H,serviceDescriptionController:k,settings:ie,streamController:L,timelineConverter:y,videoModel:K}),G.setConfig({mediaPlayerModel:C,playbackController:U,settings:ie,streamController:L,videoModel:K}),v.setConfig({settings:ie,playbackController:U}),E.setConfig({adapter:N,capabilities:M,cmsdModel:q,customParametersModel:w,dashMetrics:H,domStorage:z,mediaPlayerModel:C,settings:ie,streamController:L,throughputController:v,videoModel:K}),V.setConfig({abrController:E,dashMetrics:H,errHandler:D,mediaPlayerModel:C,playbackController:U,serviceDescriptionController:k,throughputController:v}),Q.setConfig({serviceDescriptionController:k}),q.setConfig({}),T.initialize(),v.initialize(),E.initialize(),L.initialize(f,i),x.initialize(),F.initialize(),G.initialize(),V.initialize(f),q.initialize(),B.initialize(),W.initialize(),"string"==typeof n?L.load(n,r):L.loadWithManifest(n,r)),!l&&se()&&(l=!0,re.trigger(p.A.PLAYBACK_INITIALIZED),t.info("Playback Initialized"))}return e={addABRCustomRule:function(e,t,n){w.addAbrCustomRule(e,t,n)},addExternalSubtitle:function(e){e instanceof In.A||t.error("Invalid external subtitle object. Must be an instance of dashjs.ExternalSubtitle"),w.addExternalSubtitle(e)},addRequestInterceptor:function(e){w.addRequestInterceptor(e)},addResponseInterceptor:function(e){w.addResponseInterceptor(e)},addUTCTimingSource:function(e,t){w.addUTCTimingSource(e,t)},attachProtectionController:function(e){_=e},attachSource:Se,attachTTMLRenderingDiv:function(e){if(!K.getElement())throw J;K.setTTMLRenderingDiv(e)},attachView:ve,attachVttRenderingDiv:function(e){if(!K.getElement())throw J;K.setVttRenderingDiv(e)},clearDefaultUTCTimingSources:function(){w.clearDefaultUTCTimingSources()},convertToTimeCode:function(e){e=Math.max(e,0);var t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%3600%60);return(0===t?"":t<10?"0"+t.toString()+":":t.toString()+":")+(n<10?"0"+n.toString():n.toString())+":"+(r<10?"0"+r.toString():r.toString())},destroy:function(){oe(),r.A.deleteSingletonInstances(ne)},duration:function(){if(!l)throw Z;var e=Ee().duration;if(U.getIsDynamic()){var t=L&&L.hasVideoTrack()?g.A.VIDEO:g.A.AUDIO,n=H.getCurrentDVRInfo(t);e=n?n.range.end-n.range.start:0}return e},enableForcedTextStreaming:function(e){return!(!L.getActiveStreamInfo()||!x)&&x.enableForcedTextStreaming(e)},enableText:function(e){var t=L.getActiveStreamInfo();return!(!t||!x)&&x.enableText(t.id,e)},extend:function(e,t,n){r.A.extend(e,t,n,ne)},formatUTC:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=new Date(1e3*e),a=i.toLocaleDateString(t),o=i.toLocaleTimeString(t,{hour12:n});return r?o+" "+a:o},getABRCustomRules:function(){return w.getAbrCustomRules()},getActiveStream:Ie,getAutoPlay:function(){return f},getAvailableBaseUrls:function(){var e=Y.getValue();return e?O.getBaseUrls(e):[]},getAvailableLocations:function(){var e=Y.getValue();if(!e)return[];var t=N.getLocation(e),n=B.getSynthesizedLocationElements(t);return t.concat(n)},getAverageLatency:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g.A.VIDEO,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:NaN;return v?v.getAverageLatency(e,t,n):0},getAverageThroughput:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g.A.VIDEO,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:NaN;return v?v.getAverageThroughput(e,t,n):0},getBufferLength:function(e){var n=[g.A.VIDEO,g.A.AUDIO,g.A.TEXT];if(e)return-1!==n.indexOf(e)?me().getCurrentBufferLevel(e)||NaN:(t.warn("getBufferLength requested for invalid type"),NaN);var r=n.map((function(e){return Te(e).length>0?me().getCurrentBufferLevel(e):Number.MAX_VALUE})).reduce((function(e,t){return Math.min(e,t)}));return r===Number.MAX_VALUE?NaN:r},getCurrentLiveLatency:function(){if(!a)throw te;return l?U.getCurrentLiveLatency():NaN},getCurrentRepresentationForType:function(e){if(!s)throw $;if(e!==g.A.IMAGE&&e!==g.A.VIDEO&&e!==g.A.AUDIO)return null;var t=Ie();if(!t)return null;if(e===g.A.IMAGE){var n=t.getThumbnailController();return n?n.getCurrentTrack():-1}return t.getCurrentRepresentationForType(e)},getCurrentSteeringResponseData:function(){if(B)return B.getCurrentSteeringResponseData()},getCurrentTextTrackIndex:function(){var e=L.getActiveStreamInfo();if(e&&x)return x.getCurrentTrackIdx(e.id)},getCurrentTrackFor:function(e){if(!s)throw $;var t=L.getActiveStreamInfo();return t?T.getCurrentTrackFor(e,t.id):null},getDashAdapter:function(){return N},getDashMetrics:me,getDebug:function(){return ae},getDvrSeekOffset:fe,getDvrWindow:function(){if(!l)throw Z;var e=L&&L.hasVideoTrack()?g.A.VIDEO:g.A.AUDIO,t=H.getCurrentDVRInfo(e);if(!t)return{};var n=0,r=U.getIsDynamic();return r&&(n=t.manifestInfo.availableFrom.getTime()/1e3),{start:t.range.start,end:t.range.end,startAsUtc:r?n+t.range.start:NaN,endAsUtc:r?n+t.range.end:NaN,size:t.range.end-t.range.start}},getExternalSubtitles:function(){w.getExternalSubtitles()},getInitCache:function(){return Mt(ne).getInstance()},getInitialMediaSettingsFor:function(e){if(!a)throw te;return T.getInitialSettings(e)},getLowLatencyModeEnabled:function(){if(!l)throw Z;return U.getLowLatencyModeEnabled()},getManifest:function(){return Y.getValue()},getOfflineController:function(){return De()},getPlaybackRate:function(){return Ee().playbackRate},getProtectionController:function(){return we()},getProtectionData:function(){return L?L.getProtectionData():null},getRawThroughputData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g.A.VIDEO;return v?v.getRawThroughputData(e):[]},getRepresentationsByType:function(e){return ye(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,!0)},getRepresentationsByTypeUnfiltered:function(e){return ye(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,!1)},getSafeAverageThroughput:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g.A.VIDEO,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:NaN;return v?v.getSafeAverageThroughput(e,t,n):0},getSettings:function(){return ie.get()},getSource:function(){if(!n)throw ee;return n},getStreamsFromManifest:function(e){if(!s)throw $;return N.getStreamsInfo(e)},getTTMLRenderingDiv:function(){return K?K.getTTMLRenderingDiv():null},getTargetLiveDelay:function(){if(!l)throw Z;return U.getOriginalLiveDelay()},getTracksFor:Te,getTracksForTypeFromManifest:function(e,t,n){if(!s)throw $;return(n=n||N.getStreamsInfo(t,1)[0])?N.getAllMediaInfoForType(n,e,t):[]},getVersion:ue,getVideoElement:Ee,getVolume:function(){return Ee().volume},getXHRWithCredentialsForType:function(e){return w.getXHRWithCredentialsForType(e)},initialize:function(e,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:NaN;M||(M=(0,st.A)(ne).getInstance()).setConfig({settings:ie,protectionController:_}),D||(D=Sn(ne).getInstance()),M.supportsMediaSource()?(a||(a=!0,y=$o(ne).getInstance(),v||(v=Qo(ne).getInstance()),E||(E=Ae(ne).getInstance()),A||(A=(0,Wr.A)(ne).getInstance()),U||(U=zr(ne).getInstance()),T||(T=Yr(ne).getInstance()),L||(L=Ba(ne).getInstance()),F||(F=Rn(ne).getInstance()),G||(G=vt(ne).getInstance()),k||(k=fi(ne).getInstance()),B||(B=ke(ne).getInstance()),P||(P=pt(ne).getInstance()),N=nn(ne).getInstance(),Y=Mr(ne).getInstance(),V=(0,mt.A)(ne).getInstance(),q=(0,Tt.A)(ne).getInstance(),Q=yt(ne).getInstance(),H=Tn(ne).getInstance({settings:ie}),z=Dt(ne).getInstance({settings:ie}),N.setConfig({constants:g.A,cea608parser:new fo,errHandler:D,BASE64:_e}),O||(O=Je(ne).create()),O.setConfig({adapter:N,contentSteeringController:B}),k.setConfig({adapter:N}),W||(W=oi(ne).getInstance({dashMetrics:H,mediaPlayerModel:C,errHandler:D,baseURLController:O,events:h.A,eventBus:re,debug:ae,boxParser:ot(ne).getInstance(),errors:Ce.A})),T.setConfig({domStorage:z,settings:ie,mediaPlayerModel:C,customParametersModel:w,videoModel:K}),C.setConfig({playbackController:U,serviceDescriptionController:k}),B.setConfig({adapter:N,errHandler:D,dashMetrics:H,mediaPlayerModel:C,manifestModel:Y,serviceDescriptionController:k,throughputController:v,eventBus:re}),pe(),ge(void 0===r||r),De()),e&&ve(e),n&&Se(n,i),t.info("[dash.js "+ue()+"] MediaPlayer has been initialized")):D.error(new je.A(Ce.A.CAPABILITY_MEDIASOURCE_ERROR_CODE,Ce.A.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE))},isDynamic:le,isMuted:function(){return Ee().muted},isPaused:ce,isReady:se,isSeeking:function(){if(!l)throw Z;return U.isSeeking()},isTextEnabled:function(){var e=L.getActiveStreamInfo();return!(!e||!x)&&x.isTextEnabled(e)},off:function(e,t,n){re.off(e,t,n)},on:function(e,t,n,r){re.on(e,t,n,r)},pause:function(){if(!l)throw Z;U.pause()},play:function(){if(!l)throw Z;(!f||ce()&&l)&&U.play(!0)},preload:function(){if(!K.getElement()&&!s){if(!n)throw ee;Oe(m)}},provideThumbnail:function(e,t){if("function"==typeof t)if(e<0)t(null);else{var n=U.getIsDynamic()?fe(e):e,r=L.getStreamForTime(n);if(null!==r){var i=r.getThumbnailController();if(i)return i.provide(n,t);t(null)}else t(null)}},refreshManifest:function(e){if(!a)throw te;if(!se())return e(null,ee);var t=this;if("function"==typeof e){var n=function(r){re.off(h.A.INTERNAL_MANIFEST_LOADED,n,t),r.error?e(null,r.error):e(r.manifest)};re.on(h.A.INTERNAL_MANIFEST_LOADED,n,t)}L.refreshManifest()},registerCertificateRequestFilter:function(e){w.registerCertificateRequestFilter(e)},registerCertificateResponseFilter:function(e){w.registerCertificateResponseFilter(e)},registerCustomCapabilitiesFilter:function(e){w.registerCustomCapabilitiesFilter(e)},registerLicenseRequestFilter:function(e){w.registerLicenseRequestFilter(e)},registerLicenseResponseFilter:function(e){w.registerLicenseResponseFilter(e)},removeABRCustomRule:function(e){w.removeAbrCustomRule(e)},removeAllABRCustomRule:function(){w.removeAllAbrCustomRule()},removeExternalSubtitleById:function(e){w.removeExternalSubtitleById(e)},removeExternalSubtitleByUrl:function(e){w.removeExternalSubtitleByUrl(e)},removeRequestInterceptor:function(e){w.removeRequestInterceptor(e)},removeResponseInterceptor:function(e){w.removeResponseInterceptor(e)},removeUTCTimingSource:function(e,t){w.removeUTCTimingSource(e,t)},reset:oe,resetCustomInitialTrackSelectionFunction:function(){w.resetCustomInitialTrackSelectionFunction(null)},resetSettings:function(){ie.reset()},restoreDefaultUTCTimingSources:pe,retrieveManifest:function(e,t){var n=this;X&&X.resetLoader();var r=Ne(),i=function(){re.off(h.A.INTERNAL_MANIFEST_LOADED,a,n),r.reset(),X=null};X={manifestLoader:r,resetLoader:i};var a=function(e){"function"==typeof t&&(e.error?t(null,e.error):t(e.manifest)),i()};re.on(h.A.INTERNAL_MANIFEST_LOADED,a,this),j.initialize(e),r.load(e)},seek:function(e){if(!l)throw Z;if((0,ze.sq)(e,"number"),isNaN(e))throw g.A.BAD_ARGUMENT_ERROR;e<0&&(e=0);var t=U.getIsDynamic()?fe(e):e,n=Ee();!U.getIsDynamic()&&n.duration&&(t=Math.min(n.duration,t)),U.seek(t,!1,!1,!0)},seekToOriginalLive:function(){l&&le()&&U.seekToOriginalLive()},seekToPresentationTime:function(e){if(!l)throw Z;if((0,ze.sq)(e,"number"),isNaN(e))throw g.A.BAD_ARGUMENT_ERROR;e<0&&(e=0);var t=Ee();if(!U.getIsDynamic()&&t.duration&&(e=Math.min(t.duration,e)),U.getIsDynamic()){var n=L&&L.hasVideoTrack()?g.A.VIDEO:g.A.AUDIO,r=H.getCurrentDVRInfo(n);if(!r)return;(e=de(e,r))<r.range.start&&(e=r.range.start)}U.seek(e,!1,!1,!0)},setAutoPlay:ge,setConfig:function(e){e&&(e.capabilities&&(M=e.capabilities),e.capabilitiesFilter&&(P=e.capabilitiesFilter),e.streamController&&(L=e.streamController),e.textController&&(x=e.textController),e.gapController&&(F=e.gapController),e.throughputController&&(v=e.throughputController),e.playbackController&&(U=e.playbackController),e.serviceDescriptionController&&(k=e.serviceDescriptionController),e.contentSteeringController&&(B=e.contentSteeringController),e.clientDataReportingController&&(Q=e.clientDataReportingController),e.catchupController&&(G=e.catchupController),e.mediaPlayerModel&&(C=e.mediaPlayerModel),e.customParametersModel&&(w=e.customParametersModel),e.abrController&&(E=e.abrController),e.schemeLoaderFactory&&(A=e.schemeLoaderFactory),e.mediaController&&(T=e.mediaController),e.settings&&(ie=e.settings),e.dashMetrics&&(H=e.dashMetrics))},setCurrentTrack:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!s)throw $;!_||_.areKeyIdsUsable(e.normalizedKeyIds)?T.setTrack(e,{noSettingsSave:n}):t.error("Can not switch to track with index ".concat(e.index," because key is not usable"))},setCustomInitialTrackSelectionFunction:function(e){w.setCustomInitialTrackSelectionFunction(e)},setInitialMediaSettingsFor:function(e,n){if(!a)throw te;var r=function(e){var n=ie.get().streaming.defaultSchemeIdUri,r={};function i(e,n,r){var i={};if(n){if(n instanceof Array)throw"Array type not supported for settings!";return n instanceof Object?(i.schemeIdUri=n.schemeIdUri?n.schemeIdUri:"",i.value=n.value?n.value:""):(i.schemeIdUri=r,i.value=n,t.warn("No schemeIdUri provided for "+e+', using default "'+r+'"')),i}return null}return void 0!==e.id&&(r.id=e.id),void 0!==e.lang&&(r.lang=e.lang),isNaN(e.index)||(r.index=e.index),void 0!==e.viewpoint&&(r.viewpoint=i("viewpoint",e.viewpoint,n.viewpoint)),void 0!==e.audioChannelConfiguration&&(r.audioChannelConfiguration=i("audioChannelConfiguration",e.audioChannelConfiguration,n.audioChannelConfiguration)),void 0!==e.role&&null!==e.role&&(r.role=i("role",e.role,n.role),r.role.schemeIdUri===g.A.DASH_ROLE_SCHEME_ID&&"Main"===r.role.value&&(r.role.value=Me.A.MAIN)),void 0!==e.accessibility&&(r.accessibility=i("accessibility",e.accessibility,n.accessibility)),r}(n);T.setInitialSettings(e,r)},setMute:function(e){(0,ze.sq)(e,"boolean"),Ee().muted=e},setPlaybackRate:function(e){Ee().playbackRate=e},setProtectionData:function(e){var t=ts.A.sanitizeProtectionDataCertUrls(e);i=t,L&&L.setProtectionData(i)},setRepresentationForTypeById:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e===g.A.IMAGE||e===g.A.VIDEO||e===g.A.AUDIO){if(!s)throw $;var r=Ie();if(r)if(e===g.A.IMAGE){var i=r.getThumbnailController();i&&i.setTrackById(t)}else{var a=r.getRepresentationForTypeById(e,t);a&&E.manuallySetPlaybackQuality(e,L.getActiveStreamInfo(),a,{forceReplace:n})}}},setRepresentationForTypeByIndex:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e===g.A.IMAGE||e===g.A.VIDEO||e===g.A.AUDIO){if(!s)throw $;var r=Ie();if(r)if(e===g.A.IMAGE){var i=r.getThumbnailController();i&&i.setTrackByIndex(t)}else{var a=r.getRepresentationForTypeByIndex(e,t);a&&E.manuallySetPlaybackQuality(e,L.getActiveStreamInfo(),a,{forceReplace:n})}}},setTextTrack:function(e){if(!l)throw Z;var t=L.getActiveStreamInfo();t&&x&&x.setTextTrack(t.id,e)},setVolume:function(e){if("number"!=typeof e||isNaN(e)||e<0||e>1)throw g.A.BAD_ARGUMENT_ERROR;Ee().volume=e},setXHRWithCredentialsForType:function(e,t){w.setXHRWithCredentialsForType(e,t)},time:he,timeAsUTC:function(){if(!l)throw Z;if(!U.getIsDynamic()||he()<0)return NaN;var e=L&&L.hasVideoTrack()?g.A.VIDEO:g.A.AUDIO,t=H.getCurrentDVRInfo(e);return t?t.manifestInfo.availableFrom.getTime()/1e3+he():0},timeInDvrWindow:function(){if(!l)throw Z;if(!U.getIsDynamic())return he();var e=Ee().currentTime,t=L&&L.hasVideoTrack()?g.A.VIDEO:g.A.AUDIO,n=H.getCurrentDVRInfo(t);return null===n||0===e?0:Math.max(0,e-n.range.start)},trigger:function(e,t,n){re.trigger(e,t,n)},triggerSteeringRequest:function(){if(B)return B.loadSteeringData()},unregisterCertificateRequestFilter:function(e){w.unregisterCertificateRequestFilter(e)},unregisterCertificateResponseFilter:function(e){w.unregisterCertificateResponseFilter(e)},unregisterCustomCapabilitiesFilter:function(e){w.unregisterCustomCapabilitiesFilter(e)},unregisterLicenseRequestFilter:function(e){w.unregisterLicenseRequestFilter(e)},unregisterLicenseResponseFilter:function(e){w.unregisterLicenseResponseFilter(e)},updateSettings:function(e){ie.update(e)},updateSource:function(e){n=e,L.load(n)}},t=ae.getLogger(e),a=!1,l=!1,s=!1,f=!0,m=NaN,_=null,R=null,i=null,N=null,W=null,h.A.extend(p.A),C=Kr(ne).getInstance(),w=(0,_t.A)(ne).getInstance(),K=is(ne).getInstance(),j=es(ne).getInstance(),e}os.__dashjs_factory_name="MediaPlayer";var ss=r.A.getClassFactory(os);ss.events=p.A,ss.errors=Ce.A,r.A.updateClassFactory(os.__dashjs_factory_name,ss);var us=ss},21191:function(e,t,n){"use strict";n(60825);var r=n(85952),i=n(7718),a=n(8591),o=n(4597),s=n(18766);function u(e,t,n){return t=(0,o.A)(t),(0,a.A)(e,c()?Reflect.construct(t,n||[],(0,o.A)(e).constructor):t.apply(e,n))}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}var l=new(function(e){function t(){var e;return(0,i.A)(this,t),(e=u(this,t)).AST_IN_FUTURE="astInFuture",e.BASE_URLS_UPDATED="baseUrlsUpdated",e.BUFFER_EMPTY="bufferStalled",e.BUFFER_LOADED="bufferLoaded",e.BUFFER_LEVEL_STATE_CHANGED="bufferStateChanged",e.BUFFER_LEVEL_UPDATED="bufferLevelUpdated",e.DVB_FONT_DOWNLOAD_ADDED="dvbFontDownloadAdded",e.DVB_FONT_DOWNLOAD_COMPLETE="dvbFontDownloadComplete",e.DVB_FONT_DOWNLOAD_FAILED="dvbFontDownloadFailed",e.DYNAMIC_TO_STATIC="dynamicToStatic",e.ERROR="error",e.FRAGMENT_LOADING_COMPLETED="fragmentLoadingCompleted",e.FRAGMENT_LOADING_PROGRESS="fragmentLoadingProgress",e.FRAGMENT_LOADING_STARTED="fragmentLoadingStarted",e.FRAGMENT_LOADING_ABANDONED="fragmentLoadingAbandoned",e.LOG="log",e.MANIFEST_LOADING_STARTED="manifestLoadingStarted",e.MANIFEST_LOADING_FINISHED="manifestLoadingFinished",e.MANIFEST_LOADED="manifestLoaded",e.METRICS_CHANGED="metricsChanged",e.METRIC_CHANGED="metricChanged",e.METRIC_ADDED="metricAdded",e.METRIC_UPDATED="metricUpdated",e.PERIOD_SWITCH_STARTED="periodSwitchStarted",e.PERIOD_SWITCH_COMPLETED="periodSwitchCompleted",e.QUALITY_CHANGE_REQUESTED="qualityChangeRequested",e.QUALITY_CHANGE_RENDERED="qualityChangeRendered",e.NEW_TRACK_SELECTED="newTrackSelected",e.TRACK_CHANGE_RENDERED="trackChangeRendered",e.STREAM_INITIALIZING="streamInitializing",e.STREAM_UPDATED="streamUpdated",e.STREAM_ACTIVATED="streamActivated",e.STREAM_DEACTIVATED="streamDeactivated",e.STREAM_INITIALIZED="streamInitialized",e.STREAM_TEARDOWN_COMPLETE="streamTeardownComplete",e.TEXT_TRACKS_ADDED="allTextTracksAdded",e.TEXT_TRACK_ADDED="textTrackAdded",e.CUE_ENTER="cueEnter",e.CUE_EXIT="cueExit",e.THROUGHPUT_MEASUREMENT_STORED="throughputMeasurementStored",e.TTML_PARSED="ttmlParsed",e.TTML_TO_PARSE="ttmlToParse",e.CAPTION_RENDERED="captionRendered",e.CAPTION_CONTAINER_RESIZE="captionContainerResize",e.CAN_PLAY="canPlay",e.CAN_PLAY_THROUGH="canPlayThrough",e.PLAYBACK_ENDED="playbackEnded",e.PLAYBACK_ERROR="playbackError",e.PLAYBACK_INITIALIZED="playbackInitialized",e.PLAYBACK_NOT_ALLOWED="playbackNotAllowed",e.PLAYBACK_METADATA_LOADED="playbackMetaDataLoaded",e.PLAYBACK_LOADED_DATA="playbackLoadedData",e.PLAYBACK_PAUSED="playbackPaused",e.PLAYBACK_PLAYING="playbackPlaying",e.PLAYBACK_PROGRESS="playbackProgress",e.PLAYBACK_RATE_CHANGED="playbackRateChanged",e.PLAYBACK_SEEKED="playbackSeeked",e.PLAYBACK_SEEKING="playbackSeeking",e.PLAYBACK_STALLED="playbackStalled",e.PLAYBACK_STARTED="playbackStarted",e.PLAYBACK_TIME_UPDATED="playbackTimeUpdated",e.PLAYBACK_VOLUME_CHANGED="playbackVolumeChanged",e.PLAYBACK_WAITING="playbackWaiting",e.MANIFEST_VALIDITY_CHANGED="manifestValidityChanged",e.EVENT_MODE_ON_START="eventModeOnStart",e.EVENT_MODE_ON_RECEIVE="eventModeOnReceive",e.CONFORMANCE_VIOLATION="conformanceViolation",e.REPRESENTATION_SWITCH="representationSwitch",e.ADAPTATION_SET_REMOVED_NO_CAPABILITIES="adaptationSetRemovedNoCapabilities",e.CONTENT_STEERING_REQUEST_COMPLETED="contentSteeringRequestCompleted",e.INBAND_PRFT="inbandPrft",e.MANAGED_MEDIA_SOURCE_START_STREAMING="managedMediaSourceStartStreaming",e.MANAGED_MEDIA_SOURCE_END_STREAMING="managedMediaSourceEndStreaming",e}return(0,s.A)(t,e),(0,r.A)(t)}(n(47252).A));t.A=l},6882:function(e,t,n){"use strict";var r=n(91975),i=n(78508),a=(n(52675),n(89463),n(2259),n(16280),n(23418),n(74423),n(23792),n(34782),n(26910),n(62010),n(5506),n(79432),n(26099),n(27495),n(90906),n(38781),n(21699),n(47764),n(71761),n(25440),n(62953),n(11392),n(90138)),o=n(63346),s=n(78261),u=n(35212);function c(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return l(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function f(){var e,t,n,a,l=this.context;function f(){var e=function(){if("function"!=typeof a)return null;try{return a()}catch(e){return null}}();return e&&Object.keys(e).length>0?e:n}function d(){var e=f();if(e&&e.version)return parseInt(e.version,10);var n=t.get().streaming.cmcd;return n&&n.version?parseInt(n.version,10):u.A.CMCD_DEFAULT_VERSION}function h(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e&&t){for(var r=t,a=0,o=Object.entries(n);a<o.length;a++){var s=(0,i.A)(o[a],2),u=s[0],c=s[1];r=r.replace("{".concat(u,"}"),c)}for(var l=r.split("."),f=e,d=0;d<l.length;d++){var h=l[d];if(null==f)return;var g=h.match(/^([^\[]+)\[(\d+)\]$/);if(g){var p=(0,i.A)(g,3),m=p[1],E=p[2];if(f=f[m],!Array.isArray(f))return;f=f[parseInt(E,10)]}else f=f[h]}return f}}function g(e){var n,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=o.A[e];if(!s)return void 0!==a.defaultValue?a.defaultValue:void 0;var u=d(),l={settings:t.get(),manifestParams:f()||{}};if(s.version&&!s.version.includes(u))return void 0!==a.defaultValue?a.defaultValue:void 0;var g={};void 0!==a.targetIndex&&(g.targetIndex=a.targetIndex);var p,m="applyParametersFromMpd"===e||null===(n=null===(i=l.settings)||void 0===i||null===(i=i.streaming)||void 0===i||null===(i=i.cmcd)||void 0===i?void 0:i.applyParametersFromMpd)||void 0===n||n,E=(0,r.A)(s.sources).sort((function(e,t){return e.priority-t.priority})),v=c(E);try{for(v.s();!(p=v.n()).done;){var A=p.value;if(m||!A.path.startsWith("manifestParams")){var y=h(l,A.path,g);if(null!=y)return"function"==typeof A.transform?A.transform(y):y}}}catch(e){v.e(e)}finally{v.f()}var T,_=c(E);try{for(_.s();!(T=_.n()).done;){var S=T.value;if((m||!S.path.startsWith("manifestParams"))&&void 0!==S.default)return S.default}}catch(e){_.e(e)}finally{_.f()}return void 0!==a.defaultValue?a.defaultValue:void 0}function p(){if(2!==d())return[];var e=g("eventTargets");return Array.isArray(e)?e:[]}return e={get:g,getEventTarget:function(e){var t=p();return e<0||e>=t.length?null:{get:function(t){return g(t,{targetIndex:e})},has:function(t){return null!=g(t,{targetIndex:e})},index:e,raw:t[e]}},getEventTargets:p,getVersion:function(){return d()},has:function(e){return null!=g(e)},hasManifestParams:function(){var e=f();return!(!e||!e.version)},isEnabled:function(){var e,n=t.get().streaming.cmcd;if(null===(e=null==n?void 0:n.applyParametersFromMpd)||void 0===e||e){var r=f();if(r&&r.version)return!0}return(!n||!1!==n.enabled)&&!0===g("enabled")},reset:function(){n=null,a=null},setManifestParams:function(e){n=e},setManifestParamsProviderFunction:function(e){a=e}},t=(0,s.A)(l).getInstance(),n=null,a=null,e}f.__dashjs_factory_name="CmcdConfigAccessor",t.A=a.A.getSingletonFactory(f)},63346:function(e,t,n){"use strict";var r=n(35212),i={version:{version:[1,2],sources:[{path:"manifestParams.version",priority:1,type:"number"},{path:"settings.streaming.cmcd.version",priority:2,type:"number",default:r.A.CMCD_DEFAULT_VERSION}]},enabled:{version:[1,2],sources:[{path:"settings.streaming.cmcd.enabled",priority:1,type:"boolean",default:!1}]},sessionID:{version:[1,2],sources:[{path:"manifestParams.sessionID",priority:1,type:"string"},{path:"settings.streaming.cmcd.sid",priority:2,type:"string",default:null}]},contentID:{version:[1,2],sources:[{path:"manifestParams.contentID",priority:1,type:"string"},{path:"settings.streaming.cmcd.cid",priority:2,type:"string",default:null}]},mode:{version:[1,2],sources:[{path:"manifestParams.mode",priority:1,type:"string"},{path:"settings.streaming.cmcd.mode",priority:2,type:"string",default:r.A.CMCD_MODE_QUERY}]},rtp:{version:[1,2],sources:[{path:"settings.streaming.cmcd.rtp",priority:1,type:"number",default:null}]},rtpSafetyFactor:{version:[1,2],sources:[{path:"settings.streaming.cmcd.rtpSafetyFactor",priority:1,type:"number",default:5}]},keys:{version:[1,2],sources:[{path:"manifestParams.keys",priority:1,type:"array",transform:function(e){return"string"==typeof e?e.split(" "):e}},{path:"settings.streaming.cmcd.enabledKeys",priority:2,type:"array",default:r.A.CMCD_KEYS}]},includeInRequests:{version:[1,2],sources:[{path:"manifestParams.includeInRequests",priority:1,type:"array",transform:function(e){return"string"==typeof e?e.split(" "):e}},{path:"settings.streaming.cmcd.includeInRequests",priority:2,type:"array",default:["segment","mpd"]}]},applyParametersFromMpd:{version:[1,2],sources:[{path:"settings.streaming.cmcd.applyParametersFromMpd",priority:1,type:"boolean",default:!0}]},eventTargets:{version:[2],sources:[{path:"settings.streaming.cmcd.eventTargets",priority:1,type:"array",default:[]}]},targetEnabled:{version:[2],sources:[{path:"settings.streaming.cmcd.eventTargets[{targetIndex}].enabled",priority:1,type:"boolean",default:!0}]},targetUrl:{version:[2],sources:[{path:"settings.streaming.cmcd.eventTargets[{targetIndex}].url",priority:1,type:"string",default:null}]},targetKeys:{version:[2],sources:[{path:"settings.streaming.cmcd.eventTargets[{targetIndex}].enabledKeys",priority:1,type:"array",default:[]}]},targetEvents:{version:[2],sources:[{path:"settings.streaming.cmcd.eventTargets[{targetIndex}].events",priority:1,type:"array",default:[]}]},targetInterval:{version:[2],sources:[{path:"settings.streaming.cmcd.eventTargets[{targetIndex}].interval",priority:1,type:"number",default:r.A.CMCD_DEFAULT_TIME_INTERVAL}]},targetBatchSize:{version:[2],sources:[{path:"settings.streaming.cmcd.eventTargets[{targetIndex}].batchSize",priority:1,type:"number",default:0}]},targetIncludeInRequests:{version:[2],sources:[{path:"settings.streaming.cmcd.eventTargets[{targetIndex}].includeInRequests",priority:1,type:"array"},{path:"settings.streaming.cmcd.includeInRequests",priority:2,type:"array",default:["segment","mpd"]}]}};t.A=i},35212:function(e,t,n){"use strict";var r=n(18735);t.A={STREAM:"stream",VIDEO:"video",ENHANCEMENT:"enhancement",AUDIO:"audio",TEXT:"text",MUXED:"muxed",IMAGE:"image",STPP:"stpp",TTML:"ttml",VTT:"vtt",WVTT:"wvtt",CONTENT_STEERING:"contentSteering",LIVE_CATCHUP_MODE_DEFAULT:"liveCatchupModeDefault",LIVE_CATCHUP_MODE_LOLP:"liveCatchupModeLoLP",LIVE_CATCHUP_MODE_STEP:"liveCatchupModeStep",MOVING_AVERAGE_SLIDING_WINDOW:"slidingWindow",MOVING_AVERAGE_EWMA:"ewma",BAD_ARGUMENT_ERROR:"Invalid Arguments",MISSING_CONFIG_ERROR:"Missing config parameter(s)",TRACK_SWITCH_MODE_ALWAYS_REPLACE:"alwaysReplace",TRACK_SWITCH_MODE_NEVER_REPLACE:"neverReplace",TRACK_SELECTION_MODE_FIRST_TRACK:"firstTrack",TRACK_SELECTION_MODE_HIGHEST_BITRATE:"highestBitrate",TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY:"highestEfficiency",TRACK_SELECTION_MODE_LOWEST_STARTUP_DELAY:"lowestStartupDelay",TRACK_SELECTION_MODE_WIDEST_RANGE:"widestRange",CMCD_QUERY_KEY:r.GM,CMCD_MODE_QUERY:r.x_.QUERY,CMCD_MODE_HEADERS:r.x_.HEADERS,CMCD_MODE_BODY:"body",CMCD_AVAILABLE_REQUESTS:["segment","mpd","xlink","steering","other"],CMCD_DEFAULT_TIME_INTERVAL:r.mm,CMCD_REPORTING_MODE:r.LA,CMCD_KEYS:r.pv,CMCD_REPORTING_EVENTS:r.WJ,CMCD_PLAYER_STATES:r.I$,CMCD_DEFAULT_VERSION:1,CMCD_DEFAULT_INCLUDE_IN_REQUESTS:"segment",CMCD_CONTENT_TYPE_HEADER:{"Content-Type":"text/cmcd"},INITIALIZE:"initialize",TEXT_SHOWING:"showing",TEXT_HIDDEN:"hidden",TEXT_DISABLED:"disabled",ACCESSIBILITY_CEA608_SCHEME:"urn:scte:dash:cc:cea-608:2015",CC1:"CC1",CC3:"CC3",UTF8:"utf-8",SCHEME_ID_URI:"schemeIdUri",START_TIME:"starttime",SERVICE_DESCRIPTION_DVB_LL_SCHEME:"urn:dvb:dash:lowlatency:scope:2019",SUPPLEMENTAL_PROPERTY_DVB_LL_SCHEME:"urn:dvb:dash:lowlatency:critical:2019",CTA_5004_2023_SCHEME:"urn:mpeg:dash:cta-5004:2023",CTA_5004_2025_SCHEME:"urn:dashif:cta-5004:2025",THUMBNAILS_SCHEME_ID_URIS:["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"],FONT_DOWNLOAD_DVB_SCHEME:"urn:dvb:dash:fontdownload:2014",COLOUR_PRIMARIES_SCHEME_ID_URI:"urn:mpeg:mpegB:cicp:ColourPrimaries",URL_QUERY_INFO_SCHEME:"urn:mpeg:dash:urlparam:2014",EXT_URL_QUERY_INFO_SCHEME:"urn:mpeg:dash:urlparam:2016",ADV_URL_QUERY_INFO_SCHEME:"urn:mpeg:dash:urlparam:2025",URL_QUERY_STATE_PREFIX:/urn:mpeg:dash:state:/,MATRIX_COEFFICIENTS_SCHEME_ID_URI:"urn:mpeg:mpegB:cicp:MatrixCoefficients",TRANSFER_CHARACTERISTICS_SCHEME_ID_URI:"urn:mpeg:mpegB:cicp:TransferCharacteristics",SEGMENT_SEQUENCE_REPRESENTATION_SCHEME_ID_URI:"urn:mpeg:dash:ssr:2023",HDR_METADATA_FORMAT_SCHEME_ID_URI:"urn:dvb:dash:hdr-dmi",HDR_METADATA_FORMAT_VALUES:{ST2094_10:"ST2094-10",SL_HDR2:"SL-HDR2",ST2094_40:"ST2094-40"},MEDIA_CAPABILITIES_API:{COLORGAMUT:{SRGB:"srgb",P3:"p3",REC2020:"rec2020"},TRANSFERFUNCTION:{SRGB:"srgb",PQ:"pq",HLG:"hlg"},HDR_METADATATYPE:{SMPTE_ST_2094_10:"smpteSt2094-10",SLHDR2:"slhdr2",SMPTE_ST_2094_40:"smpteSt2094-40"}},XML:"XML",ARRAY_BUFFER:"ArrayBuffer",DVB_REPORTING_URL:"dvb:reportingUrl",DVB_PROBABILITY:"dvb:probability",OFF_MIMETYPE:"application/font-sfnt",WOFF_MIMETYPE:"application/font-woff",VIDEO_ELEMENT_READY_STATES:{HAVE_NOTHING:0,HAVE_METADATA:1,HAVE_CURRENT_DATA:2,HAVE_FUTURE_DATA:3,HAVE_ENOUGH_DATA:4},FILE_LOADER_TYPES:{FETCH:"fetch_loader",XHR:"xhr_loader"},THROUGHPUT_TYPES:{LATENCY:"throughput_type_latency",BANDWIDTH:"throughput_type_bandwidth"},THROUGHPUT_CALCULATION_MODES:{EWMA:"throughputCalculationModeEwma",ZLEMA:"throughputCalculationModeZlema",ARITHMETIC_MEAN:"throughputCalculationModeArithmeticMean",BYTE_SIZE_WEIGHTED_ARITHMETIC_MEAN:"throughputCalculationModeByteSizeWeightedArithmeticMean",DATE_WEIGHTED_ARITHMETIC_MEAN:"throughputCalculationModeDateWeightedArithmeticMean",HARMONIC_MEAN:"throughputCalculationModeHarmonicMean",BYTE_SIZE_WEIGHTED_HARMONIC_MEAN:"throughputCalculationModeByteSizeWeightedHarmonicMean",DATE_WEIGHTED_HARMONIC_MEAN:"throughputCalculationModeDateWeightedHarmonicMean"},LOW_LATENCY_DOWNLOAD_TIME_CALCULATION_MODE:{MOOF_PARSING:"lowLatencyDownloadTimeCalculationModeMoofParsing",DOWNLOADED_DATA:"lowLatencyDownloadTimeCalculationModeDownloadedData",AAST:"lowLatencyDownloadTimeCalculationModeAast"},RULES_TYPES:{QUALITY_SWITCH_RULES:"qualitySwitchRules",ABANDON_FRAGMENT_RULES:"abandonFragmentRules"},QUALITY_SWITCH_RULES:{BOLA_RULE:"BolaRule",THROUGHPUT_RULE:"ThroughputRule",INSUFFICIENT_BUFFER_RULE:"InsufficientBufferRule",SWITCH_HISTORY_RULE:"SwitchHistoryRule",DROPPED_FRAMES_RULE:"DroppedFramesRule",LEARN_TO_ADAPT_RULE:"L2ARule",LOL_PLUS_RULE:"LoLPRule"},ABANDON_FRAGMENT_RULES:{ABANDON_REQUEST_RULE:"AbandonRequestsRule"},ID3_SCHEME_ID_URI:"https://aomedia.org/emsg/ID3",COMMON_ACCESS_TOKEN_HEADER:"common-access-token",DASH_ROLE_SCHEME_ID:"urn:mpeg:dash:role:2011",CODEC_FAMILIES:{MP3:"mp3",AAC:"aac",AC3:"ac3",EC3:"ec3",DTSX:"dtsx",DTSC:"dtsc",AVC:"avc",HEVC:"hevc"}}},92861:function(e,t){"use strict";t.A={CLEARKEY_KEYSTEM_STRING:"org.w3.clearkey",CLEARKEY_UUID:"e2719d58-a985-b3c9-781a-b030af78d30e",ENCRYPTION_SCHEME_CBCS:"cbcs",ENCRYPTION_SCHEME_CENC:"cenc",FAIRPLAY_KEYSTEM_STRING:"com.apple.fps",FAIRPLAY_UUID:"94ce86fb-07ff-4f43-adb8-93d2fa968ca2",INITIALIZATION_DATA_TYPE_CENC:"cenc",INITIALIZATION_DATA_TYPE_KEYIDS:"keyids",INITIALIZATION_DATA_TYPE_SINF:"sinf",INITIALIZATION_DATA_TYPE_WEBM:"webm",MEDIA_KEY_MESSAGE_TYPES:{LICENSE_REQUEST:"license-request",LICENSE_RENEWAL:"license-renewal",LICENSE_RELEASE:"license-release",INDIVIDUALIZATION_REQUEST:"individualization-request"},MEDIA_KEY_STATUSES:{USABLE:"usable",EXPIRED:"expired",RELEASED:"released",OUTPUT_RESTRICTED:"output-restricted",OUTPUT_DOWNSCALED:"output-downscaled",STATUS_PENDING:"status-pending",INTERNAL_ERROR:"internal-error"},PLAYREADY_KEYSTEM_STRING:"com.microsoft.playready",PLAYREADY_RECOMMENDATION_KEYSTEM_STRING:"com.microsoft.playready.recommendation",PLAYREADY_UUID:"9a04f079-9840-4286-ab92-e65be0885f95",ROBUSTNESS_STRINGS:{WIDEVINE:{SW_SECURE_CRYPTO:"SW_SECURE_CRYPTO",SW_SECURE_DECODE:"SW_SECURE_DECODE",HW_SECURE_CRYPTO:"HW_SECURE_CRYPTO",HW_SECURE_DECODE:"HW_SECURE_DECODE",HW_SECURE_ALL:"HW_SECURE_ALL"}},W3C_CLEARKEY_UUID:"1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",WIDEVINE_KEYSTEM_STRING:"com.widevine.alpha",WIDEVINE_UUID:"edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"}},1234:function(e,t,n){"use strict";var r=n(78508),i=n(50544),a=(n(52675),n(2008),n(74423),n(23792),n(44114),n(18111),n(22489),n(7588),n(18237),n(5506),n(79432),n(83851),n(81278),n(26099),n(3362),n(21699),n(47764),n(42207),n(23500),n(62953),n(55815),n(64979),n(79739),n(3296),n(27208),n(48408),n(14603),n(47566),n(98721),n(78850)),o=n(80913),s=n(90138),u=n(21191),c=n(35212),l=n(87568),f=n(18735),d=n(649),h=n(71613),g=n(63773),p=n(68898),m=n(70893),E=n(6882);function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){(0,i.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function y(){var e,t,n,s,v,y,T,_,S,I,b=this.context,R=(0,a.A)(b).getInstance(),N=(0,d.A)(b).getInstance(),C=(0,i.A)((0,i.A)((0,i.A)((0,i.A)({},u.A.PLAYBACK_INITIALIZED,c.A.CMCD_PLAYER_STATES.STARTING),u.A.PLAYBACK_PAUSED,c.A.CMCD_PLAYER_STATES.PAUSED),u.A.PLAYBACK_ERROR,c.A.CMCD_PLAYER_STATES.FATAL_ERROR),u.A.PLAYBACK_ENDED,c.A.CMCD_PLAYER_STATES.ENDED),w={};function D(e){n&&n.update({sta:e}),k(c.A.CMCD_REPORTING_EVENTS.PLAY_STATE)}function O(){var t,n={version:e.getVersion(),transmissionMode:e.get("mode")===c.A.CMCD_MODE_HEADERS?f.dp:f.PX,enabledKeys:e.get("keys"),eventTargets:(t=e.getEventTargets(),t.reduce((function(t,n,r){var i;if(!G(r))return t;var a=e.getEventTarget(r);return t.push({url:a.get("targetUrl"),events:a.get("targetEvents"),interval:null!==(i=a.get("targetInterval"))&&void 0!==i?i:c.A.CMCD_DEFAULT_TIME_INTERVAL,batchSize:a.get("targetBatchSize")||1,enabledKeys:a.get("targetKeys")}),t}),[]))},r=e.get("sessionID");r&&(n.sid=r);var i=e.get("contentID");return i&&(n.cid=i),new f.tt(n,M)}function M(e){return new Promise((function(t){var n=new h.A;n.url=e.url,n.method=e.method,n.headers=e.headers,n.body=e.body,n.type=l.G.CMCD_EVENT,I.load({request:n,success:function(){return t({status:200})},error:function(e){return t({status:(null==e?void 0:e.status)||500})}})}))}function P(){t.onPeriodSwitchComplete()}function L(){t.onPlaybackStarted()}function x(){t.onPlaybackPlaying(),D(c.A.CMCD_PLAYER_STATES.PLAYING)}function F(e){var t;if((null===(t=e.error)||void 0===t||null===(t=t.data)||void 0===t||null===(t=t.request)||void 0===t?void 0:t.type)!==l.G.CMCD_EVENT){if(n){var r,i,a=(null===(r=e.error)||void 0===r?void 0:r.code)||(null===(i=e.error)||void 0===i||null===(i=i.data)||void 0===i?void 0:i.code);a&&n.update({ec:a})}k(c.A.CMCD_REPORTING_EVENTS.ERROR)}}function U(){var t;S&&n&&(null===(t=e.get("applyParametersFromMpd"))||void 0===t||t)&&e.hasManifestParams()&&(S=!1,n.stop(!0),(n=O()).start())}function k(e){if(n){U();var r=t.getEventModeData(),i=t.calculateMsd();void 0!==i.msd&&n.update(i),n.recordEvent(e,r)}}function B(r){if(n&&G()){U();try{var i,a=t.deriveCmcdDataForRequest(r),s=t.calculateMsd();void 0!==s.msd&&n.update(s);var u=n.createRequestReport(r,a);r.url=u.url,r.headers=u.headers,r.cmcd=(null===(i=u.customData)||void 0===i?void 0:i.cmcd)||{},function(t){var n=e.get("mode"),r={url:t.url,mediaType:t.mediaType,requestType:t.type,cmcdData:t.cmcd,mode:n};if(n===c.A.CMCD_MODE_HEADERS)r.headers=t.headers;else try{var i=new URL(t.url);r.cmcdString=i.searchParams.get(f.GM)||""}catch(e){r.cmcdString=""}R.trigger(o.A.CMCD_DATA_GENERATED,r)}(r)}catch(e){return T.warn(e),null}}}function G(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return null!==n?function(t){if(2!==e.getVersion())return T.warn("CMCD version 2 is required for target configuration"),!1;var n=e.getEventTarget(t),r=n.get("targetEnabled"),i=n.get("targetUrl");return i?r&&i:(T.warn("Target URL is not configured"),!1)}(n)&&function(t){var n=e.getEventTarget(t).get("targetIncludeInRequests");if(!n)return!0;var r=c.A.CMCD_AVAILABLE_REQUESTS,i=n.filter((function(e){return!r.includes(e)}));return i.length===n.length?(T.error("None of the request types are supported."),!1):(i.forEach((function(e){T.warn("request type ".concat(e," is not supported."))})),!0)}(n):(1!==(t=e.getVersion())&&2!==t?(T.error("version parameter must be 1 or 2, got ".concat(t,".")),!1):e.isEnabled())&&function(){if(2===e.getVersion())return!0;var t=e.get("includeInRequests"),n=c.A.CMCD_AVAILABLE_REQUESTS,r=t.filter((function(e){return!n.includes(e)}));return r.length===t.length?(T.error("None of the request types are supported."),!1):(r.forEach((function(e){T.warn("request type ".concat(e," is not supported."))})),!0)}()}function H(e){var r=t.onPlaybackRateChanged(e);n&&r&&n.update(r)}function Y(e){if(t.updateCmcdManifestParamsInCmcdConfigAccessor(),S=!0,n){var r=t.onManifestLoaded(e);n.update(r)}}function V(e){t.onBufferLevelStateChanged(e)}function q(){t.onPlaybackSeeking(),D(c.A.CMCD_PLAYER_STATES.SEEKING)}function K(){t.onPlaybackSeeked()}function j(){if(t.wasPlaying()){var e=t.getLastMediaTypeRequest();t.onRebufferingStarted(e),D(c.A.CMCD_PLAYER_STATES.REBUFFERING)}else D(c.A.CMCD_PLAYER_STATES.WAITING)}function z(e){var r=e.customData.request.type;if(!n||!G()||!t.isIncludedInRequestFilter(r))return e.cmcd=e.customData.request.cmcd,e;var i=e.customData.request;return B(i),A(A({},e),{},{url:i.url,headers:i.headers,cmcd:i.cmcd,customData:A(A({},e.customData),{},{cmcd:i.cmcd})})}function W(e){var r;return(null===(r=e.request)||void 0===r||null===(r=r.customData)||void 0===r||null===(r=r.request)||void 0===r?void 0:r.type)===l.G.CMCD_EVENT||function(e){if(n){U();var r=t.getEventModeData(),i=t.calculateMsd();void 0!==i.msd&&n.update(i);var a={};if(e.headers)try{var o=e.headers["cmsd-static"];o&&(a.cmsds=btoa(o));var s=e.headers["cmsd-dynamic"];s&&(a.cmsdd=btoa(s))}catch(e){T.warn("Failed to base64 encode CMSD headers, ignoring.",e)}try{n.recordResponseReceived(e,A(A({},r),a))}catch(e){T.error(e)}}}(e),e}function Q(){R.off(u.A.PLAYBACK_RATE_CHANGED,H,y),R.off(u.A.MANIFEST_LOADED,Y,y),R.off(u.A.BUFFER_LEVEL_STATE_CHANGED,V,y),R.off(u.A.PLAYBACK_SEEKED,K,y),R.off(u.A.PERIOD_SWITCH_COMPLETED,P,y),R.off(u.A.PLAYBACK_STARTED,L,y),R.off(u.A.MANIFEST_LOADING_STARTED,L,y),R.off(u.A.ERROR,F,y),R.off(u.A.PLAYBACK_PLAYING,x,y),R.off(u.A.PLAYBACK_SEEKING,q,y),R.off(u.A.PLAYBACK_WAITING,j,y),Object.keys(C).forEach((function(e){R.off(e,w[e],y)})),n&&(n.stop(!0),n=null),t.resetInitialSettings()}return t=(0,p.A)(b).getInstance(),e=(0,E.A)(b).getInstance(),y={applyCmcdToRequest:B,getCmcdRequestInterceptors:function(){return[z]},getCmcdResponseReceivedInterceptors:function(){return[W]},getCmcdParametersFromManifest:function(){return t.getCmcdParametersFromManifest()},initialize:function(e){S=!1,function(e){R.on(u.A.PLAYBACK_RATE_CHANGED,H,y),R.on(u.A.MANIFEST_LOADED,Y,y),R.on(u.A.BUFFER_LEVEL_STATE_CHANGED,V,y),R.on(u.A.PLAYBACK_SEEKED,K,y),R.on(u.A.PERIOD_SWITCH_COMPLETED,P,y),e?R.on(u.A.MANIFEST_LOADING_STARTED,L,y):R.on(u.A.PLAYBACK_STARTED,L,y),R.on(u.A.ERROR,F,y)}(e),I||(I=(0,g.A)(b).create({errHandler:v,mediaPlayerModel:_,errors:m.A,dashMetrics:s})),(n=O()).start(),R.on(u.A.PLAYBACK_PLAYING,x,y),R.on(u.A.PLAYBACK_SEEKING,q,y),R.on(u.A.PLAYBACK_WAITING,j,y),Object.entries(C).forEach((function(e){var t=(0,r.A)(e,2),n=t[0],i=t[1];w[n]||(w[n]=function(){return D(i)}),R.on(n,w[n],y)}))},isCmcdEnabled:G,reset:Q,setConfig:function(n){n&&(n.dashMetrics&&(s=n.dashMetrics),n.mediaPlayerModel&&(_=n.mediaPlayerModel),n.errHandler&&(v=n.errHandler),n.urlLoader&&(I=n.urlLoader),n.serviceDescriptionController&&e.setManifestParamsProviderFunction((function(){var e,t=n.serviceDescriptionController.getServiceDescriptionSettings();return(null==t||null===(e=t.clientDataReporting)||void 0===e?void 0:e.cmcdParameters)||null})),t.setConfig(n))}},T=N.getLogger(y),Q(),y}y.__dashjs_factory_name="CmcdController",t.A=s.A.getSingletonFactory(y)},2473:function(e,t,n){"use strict";var r=n(90138),i=n(35212),a=n(47263);function o(){var e,t;function n(){t={}}return e={reset:function(){n()},processResponseHeaders:function(e){if(e&&e.headers&&e.request&&e.request.url){var n=e.headers[i.A.COMMON_ACCESS_TOKEN_HEADER];if(n){var r=a.A.getHostFromUrl(e.request.url);r&&(t[r]=n)}}},getCommonAccessTokenForUrl:function(e){if(!e)return null;var n=a.A.getHostFromUrl(e);return n?t[n]?t[n]:null:void 0}},n(),e}o.__dashjs_factory_name="CommonAccessTokenController",t.A=r.A.getSingletonFactory(o)},45313:function(e,t,n){"use strict";var r=n(91975),i=(n(28706),n(50113),n(74423),n(23792),n(44114),n(18111),n(20116),n(7588),n(26099),n(21699),n(47764),n(23500),n(62953),n(3296),n(27208),n(48408),n(14603),n(47566),n(98721),n(90138)),a=n(47263),o=n(98854),s=n(35212),u=n(87568),c=n(649);function l(){var e,t,n,i=this.context;function l(e,t,n,i,u){var c,l=function(e,t){return(t===o.A.PERIOD?e[o.A.SUPPLEMENTAL_PROPERTY]||[]:[].concat((0,r.A)(e[o.A.ESSENTIAL_PROPERTY]||[]),(0,r.A)(e[o.A.SUPPLEMENTAL_PROPERTY]||[]))).find((function(e){return e.schemeIdUri===s.A.URL_QUERY_INFO_SCHEME&&e.UrlQueryInfo||e.schemeIdUri===s.A.EXT_URL_QUERY_INFO_SCHEME&&e.ExtUrlQueryInfo}))}(t,u);!function(e,t,n,r){n.initialQueryString="";var i="",a=(null==e?void 0:e.ExtUrlQueryInfo)||(null==e?void 0:e.UrlQueryInfo);i=a&&a.queryString?t&&t.length>0?t+"&"+a.queryString:a.queryString:t,"true"===(null==a?void 0:a.useMPDUrlQuery)&&r&&(i=i?i+"&"+r:r),n.initialQueryString=i}(l,i.initialQueryString,e,n),function(e,t,n){var r,i;if(e){var a=(null==e||null===(r=e.ExtUrlQueryInfo)||void 0===r?void 0:r.queryTemplate)||(null==e||null===(i=e.UrlQueryInfo)||void 0===i?void 0:i.queryTemplate)||"";t.finalQueryString=a===o.A.QUERY_PART?null==t?void 0:t.initialQueryString:""}else t.finalQueryString=n}(l,e,i.finalQueryString),e.sameOriginOnly=null==l||null===(c=l.ExtUrlQueryInfo)||void 0===c?void 0:c.sameOriginOnly,e.queryParams=a.A.parseQueryParams(null==e?void 0:e.finalQueryString),e.includeInRequests=function(e,t){var n;return e?null!==(n=e.ExtUrlQueryInfo)&&void 0!==n&&n.includeInRequests?e.ExtUrlQueryInfo.includeInRequests.split(" "):[o.A.SEGMENT_TYPE]:t}(l,i.includeInRequests)}return t=(0,c.A)(i).getInstance().getLogger(e),{getFinalQueryString:function(e){try{if(!n)return null;if(e.type===u.G.MEDIA_SEGMENT_TYPE||e.type===u.G.INIT_SEGMENT_TYPE){var r=e.representation;if(!r)return null;var i=r.adaptation,a=i.period,s=n.period[a.index].adaptation[i.index].representation[r.index],c=new URL(e.url),l=!s.sameOriginOnly||n.origin===c.origin;if(s.includeInRequests.includes(o.A.SEGMENT_TYPE)&&l)return s.queryParams}else if(e.type===u.G.MPD_TYPE){if([o.A.MPD_TYPE,o.A.MPD_PATCH_TYPE].some((function(e){return n.includeInRequests.includes(e)})))return n.queryParams}else if(e.type===u.G.CONTENT_STEERING_TYPE&&n.includeInRequests.includes(o.A.STEERING_TYPE))return n.queryParams}catch(e){return t.error(e),null}},createFinalQueryStrings:function(e){n={origin:new URL(e.url).origin,period:[]};var t=e.url.split("?")[1];l(n,e,t,{initialQueryString:"",includeInRequests:[]},o.A.MPD),e.Period.forEach((function(e){var r={adaptation:[]};l(r,e,t,n,o.A.PERIOD),e.AdaptationSet.forEach((function(e){var n={representation:[]};l(n,e,t,r,o.A.ADAPTATION_SET),e.Representation.forEach((function(e){var r={};l(r,e,t,n,o.A.REPRESENTATION),n.representation.push(r)})),r.adaptation.push(n)})),n.period.push(r)}))}}}l.__dashjs_factory_name="ExtUrlQueryInfoController",t.A=i.A.getSingletonFactory(l)},94469:function(e,t,n){"use strict";n.d(t,{default:function(){return X}});var r=n(85952),i=n(7718),a=(0,r.A)((function e(){(0,i.A)(this,e),this.mpdurl=null,this.errorcode=null,this.terror=null,this.url=null,this.ipaddress=null,this.servicelocation=null}));a.SSL_CONNECTION_FAILED_PREFIX="SSL",a.DNS_RESOLUTION_FAILED="C00",a.HOST_UNREACHABLE="C01",a.CONNECTION_REFUSED="C02",a.CONNECTION_ERROR="C03",a.CORRUPT_MEDIA_ISOBMFF="M00",a.CORRUPT_MEDIA_OTHER="M01",a.BASE_URL_CHANGED="F00",a.BECAME_REPORTER="S00";var o=a,s=n(80913),u=n(90138);function c(e){var t,n,r=(e=e||{}).eventBus,i=e.dashMetrics,a=e.metricsConstants,u=e.events;function c(e){var t=new o;if(n){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.mpdurl||(t.mpdurl=n.originalUrl||n.url),t.terror||(t.terror=new Date),i.addDVBErrors(t)}}function l(e){e.error||(n=e.manifest)}function f(e){c({errorcode:o.BASE_URL_CHANGED,servicelocation:e.entry})}function d(){c({errorcode:o.BECAME_REPORTER})}function h(e){var t;e.metric===a.HTTP_REQUEST&&(0===(t=e.value).responsecode||null==t.responsecode||t.responsecode>=400||t.responsecode<100||t.responsecode>=600)&&c({errorcode:t.responsecode||o.CONNECTION_ERROR,url:t.url,terror:t.tresponse,servicelocation:t._serviceLocation})}function g(e){var t;switch(e.error?e.error.code:0){case MediaError.MEDIA_ERR_NETWORK:t=o.CONNECTION_ERROR;break;case MediaError.MEDIA_ERR_DECODE:t=o.CORRUPT_MEDIA_OTHER;break;default:return}c({errorcode:t})}return t={initialize:function(){r.on(u.MANIFEST_UPDATED,l,t),r.on(u.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,f,t),r.on(u.METRIC_ADDED,h,t),r.on(u.METRIC_UPDATED,h,t),r.on(u.PLAYBACK_ERROR,g,t),r.on(s.A.BECAME_REPORTING_PLAYER,d,t)},reset:function(){r.off(u.MANIFEST_UPDATED,l,t),r.off(u.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,f,t),r.off(u.METRIC_ADDED,h,t),r.off(u.METRIC_UPDATED,h,t),r.off(u.PLAYBACK_ERROR,g,t),r.off(s.A.BECAME_REPORTING_PLAYER,d,t)}}}c.__dashjs_factory_name="DVBErrorsTranslator";var l=u.A.getSingletonFactory(c),f=(n(54554),n(18111),n(7588),n(33110),n(79432),n(26099),n(23500),n(17377));function d(e){e=e||{};var t,n,r=!1,i=this.context,a=e.mediaElement;return t={initialize:function(e){e&&e.length&&(e.forEach((function(e){var t=e.starttime,r=t+e.duration;n.add(t,r)})),r=!!e[0]._useWallClockTime)},reset:function(){n.clear()},isEnabled:function(){var e,t=n.length;if(!t)return!0;e=r?(new Date).getTime()/1e3:a.currentTime;for(var i=0;i<t;i+=1){var o=n.start(i),s=n.end(i);if(o<=e&&e<s)return!0}return!1}},n=(0,f.A)(i).create(),t}d.__dashjs_factory_name="RangeController";var h=u.A.getClassFactory(d);function g(){return{serialise:function e(t){var n,r,i=[],a=[];for(n in t)if(t.hasOwnProperty(n)&&0!==n.indexOf("_")){if(null==(r=t[n])&&(r=""),Array.isArray(r)){if(!r.length)continue;a=[],r.forEach((function(t){var n="Object"!==Object.prototype.toString.call(t).slice(8,-1);a.push(n?t:e(t))})),r=a.map(encodeURIComponent).join(",")}else"string"==typeof r?r=encodeURIComponent(r):r instanceof Date?r=r.toISOString():"number"==typeof r&&(r=Math.round(r));i.push(n+"="+r)}return i.join("&")}}}n(44114),n(13579),n(28706),n(16280),n(48598),n(62062),n(34782),n(61701),n(38781),g.__dashjs_factory_name="MetricSerialiser";var p=u.A.getSingletonFactory(g);function m(){var e,t,n,r=window.crypto||window.msCrypto,i=Uint32Array,a=Math.pow(2,8*i.BYTES_PER_ELEMENT)-1;function o(){r&&(e||(e=new i(10)),r.getRandomValues(e),t=0)}return n={random:function(n,i){var s;return n||(n=0),i||(i=1),r?(t===e.length&&o(),s=e[t]/a,t+=1):s=Math.random(),s*(i-n)+n}},o(),n}n(23792),n(54743),n(16573),n(78100),n(77936),n(61740),n(48140),n(81630),n(72170),n(75044),n(69539),n(31694),n(89955),n(21903),n(91134),n(33206),n(44496),n(66651),n(12887),n(19369),n(66812),n(8995),n(31575),n(36072),n(88747),n(28845),n(29423),n(57301),n(373),n(86614),n(41405),n(37467),n(44732),n(33684),n(79577),m.__dashjs_factory_name="RNG";var E=u.A.getSingletonFactory(m),v=n(51926),A=n(78261);function y(e){var t;e=e||{};var n,r,i,a,o,s,u,c=this.context,l=(0,A.A)(c).getInstance(),f=[],d=e.metricsConstants;function h(){a=!1,o=!1,s=null,u=null}return t={report:function(e,t){Array.isArray(t)||(t=[t]),o&&u.isEnabled()&&t.forEach((function(t){var i=n.serialise(t);e!==d.DVB_ERRORS&&(i="metricname=".concat(e,"&").concat(i)),function(e,t,n){var i=new XMLHttpRequest;i.withCredentials=r.getXHRWithCredentialsForType(d.HTTP_REQUEST_DVB_REPORTING_TYPE);var a=function(){var e=f.indexOf(i);-1!==e&&(f.splice(e,1),!(i.status>=200&&i.status<300)&&(n&&n()))};f.push(i);try{i.open("GET",e),i.onloadend=a,i.onerror=a,i.send()}catch(e){i.onerror()}}(i="".concat(s,"?").concat(i),0,(function(){o=!1}))}))},initialize:function(e,t){var n;if(u=t,!(s=l.get().streaming.dvbReporting.reportingUrl||e.dvbReportingUrl))throw new Error('MPD parameter missing "dvb:reportingUrl" or URL not provided in player settings');a||((n=e.dvbProbability)&&(1e3===n||n/1e3>=i.random())&&(o=!0),a=!0)},reset:function(){h()}},n=p(c).getInstance(),i=E(c).getInstance(),r=(0,v.A)(c).getInstance(),h(),t}y.__dashjs_factory_name="DVBReporting";var T=u.A.getClassFactory(y);function _(e){e=e||{};var t,n={"urn:dvb:dash:reporting:2014":T},r=this.context,i=e.debug?e.debug.getLogger(t):{},a=e.metricsConstants,o=e.mediaPlayerModel||{};return{create:function(e,t){var s;try{(s=n[e.schemeIdUri](r).create({metricsConstants:a,mediaPlayerModel:o})).initialize(e,t)}catch(t){s=null,i.error("ReportingFactory: could not create Reporting with schemeIdUri ".concat(e.schemeIdUri," (").concat(t.message,")"))}return s},register:function(e,t){n[e]=t},unregister:function(e){delete n[e]}}}_.__dashjs_factory_name="ReportingFactory";var S=u.A.getSingletonFactory(_);function I(e){var t=[],n=S(this.context).getInstance(e);return{initialize:function(e,r){e.some((function(e){var i=n.create(e,r);if(i)return t.push(i),!0}))},reset:function(){t.forEach((function(e){return e.reset()})),t=[]},report:function(e,n){t.forEach((function(t){return t.report(e,n)}))}}}I.__dashjs_factory_name="ReportingController";var b=u.A.getClassFactory(I);function R(){return{reconstructFullMetricName:function(e,t,n){var r=e;return t&&(r+="("+t,n&&n.length&&(r+=","+n),r+=")"),r},validateN:function(e){if(!e)throw new Error("missing n");if(isNaN(e))throw new Error("n is NaN");if(e<0)throw new Error("n must be positive");return e}}}n(27495),n(71761),n(18237),R.__dashjs_factory_name="HandlerHelpers";var N=u.A.getSingletonFactory(R);function C(e){var t,n,r,i,a;e=e||{};var o=this.context,s=N(o).getInstance(),u=[],c=e.metricsConstants;function l(){var e=function(){try{return Object.keys(u).map((function(e){return u[e]})).reduce((function(e,t){return e.level<t.level?e:t}))}catch(e){return}}();e&&a!==e.t&&(a=e.t,t.report(r,e))}return{initialize:function(e,a,o){a&&(n=s.validateN(o),t=a,r=s.reconstructFullMetricName(e,o),i=setInterval(l,n))},reset:function(){clearInterval(i),i=null,n=0,t=null,a=null},handleNewMetric:function(e,t,n){e===c.BUFFER_LEVEL&&(t.level<0?delete u[n]:u[n]=t)}}}C.__dashjs_factory_name="BufferLevelHandler";var w=u.A.getClassFactory(C),D=u.A.getClassFactory((function(e){var t,n=(e=e||{}).eventBus,r=e.metricsConstants;function i(){n.off(s.A.METRICS_INITIALISATION_COMPLETE,i,this),n.trigger(s.A.BECAME_REPORTING_PLAYER)}return{initialize:function(e,r){r&&(t=r,n.on(s.A.METRICS_INITIALISATION_COMPLETE,i,this))},reset:function(){t=null},handleNewMetric:function(e,n){e===r.DVB_ERRORS&&t&&t.report(e,n)}}}));function O(e){var t,n,r,i,a;e=e||{};var o=[],s=N(this.context).getInstance(),u=e.metricsConstants;function c(){var e=o;e.length&&t&&t.report(i,e),o=[]}return{initialize:function(e,o,u,l){o&&(n=s.validateN(u),t=o,l&&l.length&&(r=l),i=s.reconstructFullMetricName(e,u,l),a=setInterval(c,n))},reset:function(){clearInterval(a),a=null,n=null,r=null,o=[],t=null},handleNewMetric:function(e,t){e===u.HTTP_REQUEST&&(r&&r!==t.type||o.push(t))}}}O.__dashjs_factory_name="HttpListHandler";var M=u.A.getClassFactory(O);function P(){var e,t;return{initialize:function(n,r){e=n,t=r},reset:function(){t=null,e=void 0},handleNewMetric:function(n,r){n===e&&t&&t.report(e,r)}}}P.__dashjs_factory_name="GenericMetricHandler";var L=u.A.getClassFactory(P);function x(e){var t,n=(e=e||{}).debug?e.debug.getLogger(t):{},r=/([a-zA-Z]*)(\(([0-9]*)(\,\s*([a-zA-Z]*))?\))?/,i=this.context,a={BufferLevel:w,DVBErrors:D,HttpList:M,PlayList:L,RepSwitchList:L,TcpList:L};return{create:function(t,o){var s,u=t.match(r);if(u){try{(s=a[u[1]](i).create({eventBus:e.eventBus,metricsConstants:e.metricsConstants})).initialize(u[1],o,u[3],u[5])}catch(e){s=null,n.error("MetricsHandlerFactory: Could not create handler for type ".concat(u[1]," with args ").concat(u[3],", ").concat(u[5]," (").concat(e.message,")"))}return s}},register:function(e,t){a[e]=t},unregister:function(e){delete a[e]}}}x.__dashjs_factory_name="MetricsHandlerFactory";var F=u.A.getSingletonFactory(x);function U(e){e=e||{};var t,n=[],r=this.context,i=e.eventBus,a=e.events,o=F(r).getInstance({debug:e.debug,eventBus:e.eventBus,metricsConstants:e.metricsConstants});function s(e){n.forEach((function(t){t.handleNewMetric(e.metric,e.value,e.mediaType)}))}return t={initialize:function(e,r){e.split(",").forEach((function(e,t,i){var a;if(-1!==e.indexOf("(")&&-1===e.indexOf(")")){var s=i[t+1];s&&-1===s.indexOf("(")&&-1!==s.indexOf(")")&&(e+=","+s,delete i[t+1])}(a=o.create(e,r))&&n.push(a)})),i.on(a.METRIC_ADDED,s,t),i.on(a.METRIC_UPDATED,s,t)},reset:function(){i.off(a.METRIC_ADDED,s,t),i.off(a.METRIC_UPDATED,s,t),n.forEach((function(e){return e.reset()})),n=[]}}}U.__dashjs_factory_name="MetricsHandlersController";var k=u.A.getClassFactory(U);function B(e){var t,n,r;e=e||{};var i=this.context;function a(){t&&t.reset(),n&&n.reset(),r&&r.reset()}return{initialize:function(o){try{(r=h(i).create({mediaElement:e.mediaElement})).initialize(o.Range),(n=b(i).create({debug:e.debug,metricsConstants:e.metricsConstants,mediaPlayerModel:e.mediaPlayerModel})).initialize(o.Reporting,r),(t=k(i).create({debug:e.debug,eventBus:e.eventBus,metricsConstants:e.metricsConstants,events:e.events})).initialize(o.metrics,n)}catch(e){throw a(),e}},reset:a}}B.__dashjs_factory_name="MetricsController";var G=u.A.getClassFactory(B),H=(0,r.A)((function e(){(0,i.A)(this,e),this.metrics="",this.Range=[],this.Reporting=[]})),Y=(0,r.A)((function e(){(0,i.A)(this,e),this.starttime=0,this.duration=1/0,this._useWallClockTime=!1})),V=(0,r.A)((function e(){(0,i.A)(this,e),this.schemeIdUri="",this.value="",this.dvbReportingUrl="",this.dvbProbability=1e3}));function q(e){var t=(e=e||{}).adapter,n=e.constants;return{getMetrics:function(e){var r=[];return e&&e.Metrics&&e.Metrics.forEach((function(i){var a=new H,o=t.getIsDynamic(e);i.hasOwnProperty("metrics")&&(a.metrics=i.metrics,i.Range&&i.Range.forEach((function(r){var i=new Y;i.starttime=function(e,r,i){var a,o,s=0;return r?s=t.getAvailabilityStartTime(e)/1e3:(a=t.getRegularPeriods(e)).length&&(s=a[0].start),o=s,i&&i.hasOwnProperty(n.START_TIME)&&(o+=i.starttime),o}(e,o,r),r.hasOwnProperty("duration")?i.duration=r.duration:i.duration=t.getDuration(e),i._useWallClockTime=o,a.Range.push(i)})),i.Reporting&&(i.Reporting.forEach((function(e){var t=new V;e.hasOwnProperty(n.SCHEME_ID_URI)&&(t.schemeIdUri=e.schemeIdUri,e.hasOwnProperty("value")&&(t.value=e.value),e.hasOwnProperty(n.DVB_REPORTING_URL)&&(t.dvbReportingUrl=e[n.DVB_REPORTING_URL]),e.hasOwnProperty(n.DVB_PROBABILITY)&&(t.dvbProbability=e[n.DVB_PROBABILITY]),a.Reporting.push(t))})),r.push(a)))})),r}}}q.__dashjs_factory_name="ManifestParsing";var K=u.A.getSingletonFactory(q);function j(e){var t;e=e||{};var n={},r=this.context,i=e.eventBus,a=e.events;function o(t){if(!t.error){var a=Object.keys(n);K(r).getInstance({adapter:e.adapter,constants:e.constants}).getMetrics(t.manifest).forEach((function(t){var i=JSON.stringify(t);if(n.hasOwnProperty(i))a.splice(i,1);else try{var o=G(r).create(e);o.initialize(t),n[i]=o}catch(e){}})),a.forEach((function(e){n[e].reset(),delete n[e]})),i.trigger(s.A.METRICS_INITIALISATION_COMPLETE)}}function u(){Object.keys(n).forEach((function(e){n[e].reset()})),n={}}return t={reset:function(){i.off(a.MANIFEST_UPDATED,o,t),i.off(a.STREAM_TEARDOWN_COMPLETE,u,t)}},i.on(a.MANIFEST_UPDATED,o,t),i.on(a.STREAM_TEARDOWN_COMPLETE,u,t),t}j.__dashjs_factory_name="MetricsCollectionController";var z=u.A.getClassFactory(j);function W(){var e=this.context;return{createMetricsReporting:function(t){return l(e).getInstance({eventBus:t.eventBus,dashMetrics:t.dashMetrics,metricsConstants:t.metricsConstants,events:t.events}).initialize(),z(e).create(t)},getReportingFactory:function(){return S(e).getInstance()},getMetricsHandlerFactory:function(){return F(e).getInstance()}}}W.__dashjs_factory_name="MetricsReporting";var Q=u.A.getClassFactory(W);Q.events=s.A,u.A.updateClassFactory(W.__dashjs_factory_name,Q);var X=Q},80913:function(e,t,n){"use strict";n(60825);var r=n(85952),i=n(7718),a=n(8591),o=n(4597),s=n(18766);function u(e,t,n){return t=(0,o.A)(t),(0,a.A)(e,c()?Reflect.construct(t,n||[],(0,o.A)(e).constructor):t.apply(e,n))}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}var l=new(function(e){function t(){var e;return(0,i.A)(this,t),(e=u(this,t)).METRICS_INITIALISATION_COMPLETE="internal_metricsReportingInitialized",e.BECAME_REPORTING_PLAYER="internal_becameReportingPlayer",e.CMCD_DATA_GENERATED="cmcdDataGenerated",e}return(0,s.A)(t,e),(0,r.A)(t)}(n(47252).A));t.A=l},68898:function(e,t,n){"use strict";var r=n(91975),i=n(50544),a=(n(52675),n(89463),n(2259),n(16280),n(2008),n(50113),n(74423),n(23418),n(23792),n(62062),n(44114),n(34782),n(62010),n(18111),n(22489),n(20116),n(7588),n(61701),n(18237),n(69085),n(79432),n(83851),n(81278),n(26099),n(27495),n(90906),n(38781),n(47764),n(23500),n(62953),n(21699),n(18735)),o=n(87568),s=n(21191),u=n(47263),c=n(35212),l=n(90138),f=n(79302),d=n(6882);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){(0,i.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var m=(0,i.A)((0,i.A)((0,i.A)((0,i.A)((0,i.A)((0,i.A)({},o.G.INIT_SEGMENT_TYPE,"segment"),o.G.MEDIA_SEGMENT_TYPE,"segment"),o.G.XLINK_EXPANSION_TYPE,"xlink"),o.G.MPD_TYPE,"mpd"),o.G.CONTENT_STEERING_TYPE,"steering"),o.G.OTHER_TYPE,"other");function E(){var e,t,n,i,l,h,E,v,A,y,T,_,S,I,b,R,N={},C={},w=this.context;function D(){E=(0,d.A)(w).getInstance(),V()}function O(e){return null!=e&&!isNaN(e)&&isFinite(e)}function M(e,t){var n=[];return O(e)&&n.push((0,a.gz)(e,{v:!0})),O(t)&&n.push((0,a.gz)(t,{a:!0})),n.length>0?n:null}function P(e,n){var r;L(n);var o,s=Y(n),l=function(e){try{return parseInt(e.bandwidth/1e3)}catch(e){return null}}(e),f=function(e){try{return isNaN(e.duration)?NaN:Math.round(1e3*e.duration)}catch(e){return null}}(e),d=B(n),h=function(e){try{var n=i?i.getPlaybackRate():1,r=t.getCurrentBufferLevel(e);return isNaN(n)||isNaN(r)?null:100*parseInt(r/n*10)}catch(e){return null}}(n),g=G(n),m=x(null===(r=e.representation)||void 0===r?void 0:r.mediaInfo),v=k(n),_=F(n),S=function(e){if(I&&0!==I.length){var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return p(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}(I);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.getType()===e)return r.probeNextRequest()}}catch(e){n.e(e)}finally{n.f()}}}(n);n===c.A.VIDEO&&(o=a.hU.VIDEO),n===c.A.AUDIO&&(o=a.hU.AUDIO),e.mediaType===c.A.ENHANCEMENT&&(o=a.hU.OTHER),n===c.A.TEXT&&(o="application/mp4"===e.representation.mediaInfo.mimeType?a.hU.TIMED_TEXT:a.hU.CAPTION);var b=E.has("rtp")?E.get("rtp"):function(e){try{var t=i.getPlaybackRate();t||(t=1);var n=e.bandwidth,r=e.mediaType,a=e.representation,o=e.duration;if(!a.mediaInfo)return NaN;var s=G(r);0===s&&(s=500);var u=n*o/1e3/(s/t/1e3),c=E.get("rtpSafetyFactor",{defaultValue:5});return 100*(parseInt(u*c/100)+1)}catch(e){return NaN}}(e);if(isNaN(b)||(s.rtp=b),S&&e.url!==S.url){var R=u.A.getRelativeUrl(e.url,S.url),N=S.range?{r:S.range}:void 0;s.nor=[(0,a.gz)(R,N)]}if(l){var w=n===c.A.VIDEO?l:null,D=n===c.A.AUDIO?l:null;s.br=M(w,D)||[(0,a.gz)(l,{})]}if(o&&(s.ot=o),isNaN(f)||(s.d=f),!isNaN(d)){var O=n===c.A.VIDEO?d:null,P=n===c.A.AUDIO?d:null;s.mtp=M(O,P)||[(0,a.gz)(d,{})]}if(isNaN(h)||(s.dl=h),!isNaN(g)){var U=n===c.A.VIDEO?g:null,H=n===c.A.AUDIO?g:null;s.bl=M(U,H)||[(0,a.gz)(g,{})]}if(!isNaN(m)&&isFinite(m)){var V=n===c.A.VIDEO?m:null,q=n===c.A.AUDIO?m:null;s.tb=M(V,q)||[(0,a.gz)(m,{})]}if(null!==v&&!isNaN(v)){var K=n===c.A.VIDEO?v:null,j=n===c.A.AUDIO?v:null;s.tpb=M(K,j)||[(0,a.gz)(v,{})]}if(null!==_&&!isNaN(_)){var W=n===c.A.VIDEO?_:null,Q=n===c.A.AUDIO?_:null;s.pb=M(W,Q)||[(0,a.gz)(_,{})]}if(y[n]&&(s.bs=!0,y[n]=!1),C[n]){var X=n===c.A.VIDEO?C[n]:null,$=n===c.A.AUDIO?C[n]:null;s.bsd=M(X,$)||[(0,a.gz)(C[n],{})],delete C[n]}return!A[n]&&T[n]||(s.su=!0,A[n]=!1,T[n]=!0),Object.assign(s,z()),s}function L(e){T.hasOwnProperty(e)||(T[e]=!1),A.hasOwnProperty(e)||(A[e]=!1),y.hasOwnProperty(e)||(y[e]=!1)}function x(e){try{var t=l.getPossibleVoRepresentationsFilteredBySettings(e).map((function(e){return e.bitrateInKbit}));return Math.max.apply(Math,(0,r.A)(t))}catch(e){return null}}function F(e){try{var t;if(!I||0===I.length)return null;var n=I.find((function(t){return t.getType()===e})),r=null==n||null===(t=n.getRepresentationController())||void 0===t||null===(t=t.getCurrentRepresentation())||void 0===t?void 0:t.bitrateInKbit;return void 0===r||isNaN(r)?null:Math.round(r)}catch(e){return null}}function U(e){if(!I||0===I.length)return null;var t=I.find((function(t){return t.getType()===e}));if(!t)return null;var n=x(t.getMediaInfo());return isFinite(n)&&n>0?n:null}function k(e){try{if(!I||0===I.length)return null;var t=I.find((function(t){return t.getType()===e}));if(t){var n=x(t.getMediaInfo());return isFinite(n)&&n>0?n:null}return null}catch(e){return null}}function B(e){try{return 100*parseInt(h.getSafeAverageThroughput(e)/100)}catch(e){return null}}function G(e){try{var n=t.getCurrentBufferLevel(e);return isNaN(n)?null:100*parseInt(10*n)}catch(e){return null}}function H(e){null!=N[e]&&(C[e]=Date.now()-N[e],delete N[e])}function Y(e){var n={},r=1e3*i.getCurrentLiveLatency();if(isNaN(r)||(n.ltc=r),"undefined"!=typeof document&&document.hidden&&(n.bg=!0),e&&function(e){return e===c.A.VIDEO||e===c.A.AUDIO||e===c.A.OTHER}(e)){var a,o=null===(a=t.getCurrentDroppedFrames())||void 0===a?void 0:a.droppedFrames;o>0&&(n.df=o)}return n}function V(){y={},A={},T={},S=!1,v=void 0,_=void 0,N={},C={},b=void 0,R=void 0,q()}function q(){if(i){var e=i.getStreamController();if(e&&"function"==typeof e.getActiveStream){var t=e.getActiveStream();t&&(I=t.getStreamProcessors())}}}function K(){var e={};if(n){var t=n.getServiceDescriptionSettings();t.clientDataReporting&&t.clientDataReporting.cmcdParameters&&(e=t.clientDataReporting.cmcdParameters)}return e}function j(e,t){var n=null!=t?t:E.get("includeInRequests"),r=m[e];return void 0!==r&&n.includes(r)}function z(){var e,t={},n=null===(e=i.getStreamController())||void 0===e?void 0:e.getActiveStream();if(!n)return t;var a=n.getCurrentRepresentationForType(c.A.VIDEO),o=n.getCurrentRepresentationForType(c.A.AUDIO),s=a?a.bitrateInKbit:0,u=o?o.bitrateInKbit:0,l=M(s>0?Math.round(s):null,u>0?Math.round(u):null);l&&(t.ab=l);var f=n.getRepresentationsByType(c.A.VIDEO)||[],d=n.getRepresentationsByType(c.A.AUDIO)||[],h=f.reduce((function(e,t){return Math.max(e,t.bitrateInKbit)}),0),g=d.reduce((function(e,t){return Math.max(e,t.bitrateInKbit)}),0),p=M(h>0?Math.round(h):null,g>0?Math.round(g):null);p&&(t.tab=p);var m=f.length>0?Math.min.apply(Math,(0,r.A)(f.map((function(e){return e.bitrateInKbit})))):0,E=d.length>0?Math.min.apply(Math,(0,r.A)(d.map((function(e){return e.bitrateInKbit})))):0,v=M(m>0?Math.round(m):null,E>0?Math.round(E):null);return v&&(t.lab=v),t}return e={calculateMsd:function(){var e={},t=_?Date.now()-_:null;return null===t||isNaN(t)||(e.msd=t),e},deriveCmcdDataForRequest:function(e){try{if(e.type,(n=e.mediaType)!==c.A.VIDEO&&n!==c.A.AUDIO||v&&v!==c.A.AUDIO||(v=n),j(e.type)){if(e.type===o.G.MPD_TYPE)return(t=Y()).ot=a.hU.MANIFEST,t;if(e.type===o.G.MEDIA_SEGMENT_TYPE)return L(e.mediaType),P(e,e.mediaType);if(e.type===o.G.INIT_SEGMENT_TYPE)return function(){var e=Y();return e.ot=a.hU.INIT,e.su=!0,e}();if(e.type===o.G.OTHER_TYPE||e.type===o.G.XLINK_EXPANSION_TYPE)return function(){var e=Y();return e.ot=a.hU.OTHER,e}();if(e.type===o.G.LICENSE)return function(){var e=Y();return e.ot=a.hU.KEY,e}();if(e.type===o.G.CONTENT_STEERING_TYPE)return function(e){var t=v?P(e,v):Y();return t.ot=a.hU.OTHER,t}(e)}return{}}catch(e){return null}var t,n},getCmcdParametersFromManifest:K,getEventModeData:function(){var e,t;return g(g(g(g(g(g(g({},Y()),z()),function(){var e,t={},n=null===(e=i.getStreamController())||void 0===e?void 0:e.getActiveStream();if(!n)return t;var r=n.getCurrentRepresentationForType(c.A.VIDEO),a=n.getCurrentRepresentationForType(c.A.AUDIO),o=M(r?Math.round(r.bitrateInKbit):null,a?Math.round(a.bitrateInKbit):null);return o&&(t.br=o),t}()),(e={},(t=M(G(c.A.VIDEO),G(c.A.AUDIO)))&&(e.bl=t),e)),function(){var e={},t=M(B(c.A.VIDEO),B(c.A.AUDIO));return t&&(e.mtp=t),e}()),function(){var e={},t=M(F(c.A.VIDEO),F(c.A.AUDIO));return t&&(e.pb=t),e}()),function(){var e={},t=M(U(c.A.VIDEO),U(c.A.AUDIO));t&&(e.tb=t);var n=M(k(c.A.VIDEO),k(c.A.AUDIO));return n&&(e.tpb=n),e}())},getLastMediaTypeRequest:function(){return v},isIncludedInRequestFilter:j,onBufferLevelStateChanged:function(e){try{e.state&&e.mediaType&&e.state===s.A.BUFFER_EMPTY&&(y[e.mediaType]||(y[e.mediaType]=!0),A[e.mediaType]||(A[e.mediaType]=!0))}catch(e){}},onManifestLoaded:function(e){try{var t=(0,f.A)(w).getInstance().getIsDynamic(e.data);return b="".concat(t?a.YM.LIVE:a.YM.VOD),R=e.protocol&&"MSS"===e.protocol?"".concat(a.xq.SMOOTH):"".concat(a.xq.DASH),{st:b,sf:R}}catch(e){return{}}},onPeriodSwitchComplete:function(){q()},onPlaybackPlaying:function(){for(var e in N)N.hasOwnProperty(e)&&H(e)},onPlaybackRateChanged:function(e){return void 0!==e.playbackRate?{pr:e.playbackRate}:null},onPlaybackSeeked:function(){for(var e in S=!1,y)y.hasOwnProperty(e)&&(y[e]=!0);for(var t in A)A.hasOwnProperty(t)&&(A[t]=!0)},onPlaybackSeeking:function(){S=!0},onPlaybackStarted:function(){_||(_=Date.now())},onRebufferingCompleted:H,onRebufferingStarted:function(e){e&&!N[e]&&(N[e]=Date.now())},reset:function(){V()},resetInitialSettings:V,setConfig:function(e){e&&(e.abrController&&(l=e.abrController),e.dashMetrics&&(t=e.dashMetrics),e.playbackController&&(i=e.playbackController),e.throughputController&&(h=e.throughputController),e.serviceDescriptionController&&(n=e.serviceDescriptionController))},setup:D,updateCmcdManifestParamsInCmcdConfigAccessor:function(){var e=K();E&&Object.keys(e).length>0?E.setManifestParams(e):E&&E.setManifestParams(null)},wasPlaying:function(){return!S&&_}},D(),e}E.__dashjs_factory_name="CmcdModel",t.A=l.A.getSingletonFactory(E)},6066:function(e,t,n){"use strict";n(74423),n(18111),n(7588),n(69085),n(79432),n(26099),n(23500);var r=n(90138),i=n(78850),a=n(43621),o=n(649),s=n(11103),u=s.Pb.toLowerCase(),c=s.uu.toLowerCase(),l=["mb","st","sf","v"],f="stream",d={video:s.Nw.VIDEO,audio:s.Nw.AUDIO,text:s.Nw.TIMED_TEXT,stream:f};function h(){var e,t,n,r,h=this.context,g=(0,i.A)(h).getInstance();function p(){n={},r={}}function m(e){e&&Object.keys(e).forEach((function(t){l.includes(t)||delete e[t]}))}function E(e){try{return(0,s.aD)(e)}catch(e){t.error("Failed to parse CMSD-Static response header value:",e)}}function v(e){try{var n=(0,s.nt)(e),r=n[n.length-1];return(null==r?void 0:r.params)||{}}catch(e){return t.error("Failed to parse CMSD-Dynamic response header value:",e),{}}}function A(e){return d[e]||s.Nw.OTHER}function y(e,t,i){var a=e===s.Pb?n:r,o=a[t]||{},u=a[f]||{};return o[i]||u[i]}return e={setConfig:function(){},initialize:function(){},reset:function(){p()},parseResponseHeaders:function(e,t){var i=null,o=null;for(var s in e){var l=e[s];switch(s){case u:i=E(l),g.trigger(a.A.CMSD_STATIC_HEADER,i);break;case c:o||(o=v(l))}}var d=f;return i&&i.ot?d=i.ot:t&&(d=A(t)),m(n[d]),m(r[d]),i&&(n[d]=Object.assign(n[d]||{},i)),o&&(r[d]=Object.assign(r[d]||{},o)),{static:i,dynamic:o}},getMaxBitrate:function(e){var t=A(e);return y(s.uu,t,"mb")||-1},getEstimatedThroughput:function(e){var t=A(e);return y(s.uu,t,"etp")||null},getResponseDelay:function(e){var t=A(e);return y(s.uu,t,"rd")||null},getRoundTripTime:function(e){var t=A(e);return y(s.uu,t,"rtt")||null}},t=(0,o.A)(h).getInstance().getLogger(e),p(),e}h.__dashjs_factory_name="CmsdModel",t.A=r.A.getSingletonFactory(h)},51926:function(e,t,n){"use strict";n(23792),n(44114),n(54554),n(18111),n(7588),n(13579),n(79432),n(26099),n(31415),n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698),n(47764),n(23500),n(62953);var r=n(5717),i=n(90138),a=n(78261),o=n(70656),s=n(35212),u=n(1234),c=n(15560);function l(){var e,t,n,i,l,f,d,h,g,p,m,E,v,A,y=this.context,T=(0,a.A)(y).getInstance();function _(){f=[],g=[],d=[],h=[],p=[],v=[],m=null,t=[],i=A.getCmcdRequestInterceptors(),l=A.getCmcdResponseReceivedInterceptors(),E=new Set}function S(e,t){var n=-1;e.some((function(e,r){if(e===t)return n=r,!0})),n<0||e.splice(n,1)}function I(e){var t;for(t=0;t<v.length;t++)if(v[t].rulename===e)return t;return-1}function b(e,t){var n=!1;return E.forEach((function(r){r[e]===t&&(n=!0)})),n}function R(e,n){N(e,n);var i=new r.A;i.schemeIdUri=e,i.value=n,t.push(i)}function N(e,n){(0,o.sq)(e,"string"),(0,o.sq)(n,"string"),t.forEach((function(r,i){r.schemeIdUri===e&&r.value===n&&t.splice(i,1)}))}return e={addAbrCustomRule:function(e,t,n){if("string"!=typeof e||e!==s.A.RULES_TYPES.ABANDON_FRAGMENT_RULES&&e!==s.A.RULES_TYPES.QUALITY_SWITCH_RULES||"string"!=typeof t)throw s.A.BAD_ARGUMENT_ERROR;var r=I(t);-1===r?v.push({type:e,rulename:t,rule:n}):(v[r].type=e,v[r].rule=n)},addExternalSubtitle:function(e){if(e&&void 0!==e.id&&e.url&&e.language&&e.mimeType&&void 0!==e.bandwidth){var t=new c.A(e);b("url",t.url)||b("id",t.id)||E.add(t)}},addRequestInterceptor:function(e){i.push(e)},addResponseInterceptor:function(e){l.push(e)},addUTCTimingSource:R,clearDefaultUTCTimingSources:function(){t=[]},getAbrCustomRules:function(){return v},getCertificateRequestFilters:function(){return d},getCertificateResponseFilters:function(){return h},getCustomCapabilitiesFilters:function(){return p},getCustomInitialTrackSelectionFunction:function(){return m},getExternalSubtitles:function(){return E},getLicenseRequestFilters:function(){return f},getLicenseResponseFilters:function(){return g},getRequestInterceptors:function(){return i},getResponseInterceptors:function(){return l},getUTCTimingSources:function(){return t},getXHRWithCredentialsForType:function(e){var t=n[e];return void 0===t?n.default:t},registerCertificateRequestFilter:function(e){d.push(e)},registerCertificateResponseFilter:function(e){h.push(e)},registerCustomCapabilitiesFilter:function(e){p.push(e)},registerLicenseRequestFilter:function(e){f.push(e)},registerLicenseResponseFilter:function(e){g.push(e)},removeAbrCustomRule:function(e){if(e){var t=I(e);-1!==t&&v.splice(t,1)}else v=[]},removeAllAbrCustomRule:function(){v=[]},removeExternalSubtitleById:function(e){E.forEach((function(t){t.id===e&&E.delete(t)}))},removeExternalSubtitleByUrl:function(e){E.forEach((function(t){t.url===e&&E.delete(t)}))},removeRequestInterceptor:function(e){S(i,e)},removeResponseInterceptor:function(e){S(l,e)},removeUTCTimingSource:N,reset:function(){_()},resetCustomInitialTrackSelectionFunction:function(){m=null},resetPlaybackSessionSpecificSettings:function(){E=new Set},restoreDefaultUTCTimingSources:function(){var e=T.get().streaming.utcSynchronization.defaultTimingSource;R(e.scheme,e.value)},setConfig:function(){},setCustomInitialTrackSelectionFunction:function(e){m=e},setXHRWithCredentialsForType:function e(t,r){t?n[t]=!!r:Object.keys(n).forEach((function(t){e(t,r)}))},unregisterCertificateRequestFilter:function(e){S(d,e)},unregisterCertificateResponseFilter:function(e){S(h,e)},unregisterCustomCapabilitiesFilter:function(e){S(p,e)},unregisterLicenseRequestFilter:function(e){S(f,e)},unregisterLicenseResponseFilter:function(e){S(g,e)}},n={default:!1},A=(0,u.A)(y).getInstance(),_(),e}l.__dashjs_factory_name="CustomParametersModel",t.A=i.A.getSingletonFactory(l)},61244:function(e,t,n){"use strict";n(52675),n(89463),n(2259),n(16280),n(28706),n(2008),n(23418),n(23792),n(44114),n(34782),n(54743),n(16573),n(78100),n(77936),n(62010),n(18111),n(22489),n(7588),n(26099),n(3362),n(27495),n(90906),n(38781),n(47764),n(21489),n(48140),n(81630),n(72170),n(75044),n(69539),n(31694),n(89955),n(21903),n(91134),n(33206),n(44496),n(66651),n(12887),n(19369),n(66812),n(8995),n(31575),n(36072),n(88747),n(28845),n(29423),n(57301),n(373),n(86614),n(41405),n(37467),n(44732),n(33684),n(79577),n(41549),n(49797),n(49631),n(35623),n(23500),n(62953);var r=n(90138),i=n(78261),a=n(35212),o=n(649);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u(){var e,t,n,r=this.context,u=(0,i.A)(r).getInstance();function c(e,t,n){e.customData.reader.read().then(n).catch((function(){l(e)}))}function l(e){e.customData.onloadend&&e.customData.onloadend()}function f(){return"undefined"!=typeof performance&&"function"==typeof performance.now?performance.now():Date.now()}function d(){if(this.customData.abortController)this.customData.abortController.abort();else if(this.customData.reader)try{this.customData.reader.cancel(),this.onabort()}catch(e){}}function h(e,t){try{if((e=e.filter((function(n){return n.bytes>t/4/e.length}))).length>1){var n=0,r=(e[e.length-1].timestamp-e[0].timestamp)/e.length;return e.forEach((function(t,i){var a=e[i+1];if(a){var o=a.timestamp-t.timestamp;n+=o<r?o:0}})),n}return null}catch(e){return null}}function g(e,t){return 8*e/t}return n=(0,o.A)(r).getInstance().getLogger(e),{abort:d,calculateDownloadedTime:h,load:function(e,r){var i=function(e){var t=new Headers;if(e.headers)for(var n in e.headers){var r=e.headers[n];r&&t.append(n,r)}return t}(e),o=function(e){var t;return"function"==typeof window.AbortController&&(t=new AbortController,e.customData.abortController=t,t.signal.onabort=e.customData.onabort),e.customData.abort=d.bind(e),t}(e),p=function(e,t,n){return new Request(e.url,{method:e.method,headers:t,credentials:e.credentials,signal:n?n.signal:void 0})}(e,i,o);fetch(p).then((function(i){!function(e,r,i){!function(e,t){e.status=t.status,e.statusText=t.statusText,e.url=t.url;var n,r={},i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return s(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){u=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(u)throw a}}}}(t.headers.keys());try{for(i.s();!(n=i.n()).done;){var a=n.value;r[a]=t.headers.get(a)}}catch(e){i.e(e)}finally{i.f()}e.headers=r}(i,e);var o=0,l=!1,d=new Uint8Array,p=0;r.customData.reader=e.body.getReader();var m=[],E=[],v=[],A=!0,y=u.get().streaming.abr.throughput.lowLatencyDownloadTimeCalculationMode,T=function(e){var s=e.value;e.done?function(){if(d){var e=(t=null,y===a.A.LOW_LATENCY_DOWNLOAD_TIME_CALCULATION_MODE.MOOF_PARSING?(s=function(e,t){try{var r,i;if(r=e.slice(0,-1),i=t.slice(0,-1),r.length!==i.length&&n.warn("[FetchLoader] Moof and Mdat data arrays have different lengths. Moof: ".concat(r.length,", Mdat: ").concat(i.length)),r.length<=1)return null;for(var a=[],o=0,s=0,u=0;u<r.length;u++)if(r[u]&&i[u]){var c=i[u].timestamp-r[u].timestamp;if(c>1){var l=g(i[u].bytes,c);a.push(l),s=0}else{0===s&&(s=r[u].timestamp,o=0);var f=i[u].timestamp-s;if(f>1){var d=g(o+=i[u].bytes,f);a.push(d),s=0}else o+=i[u].bytes}}return a.length>0?a.reduce((function(e,t){return e+t}),0)/a.length:null}catch(e){return null}}(E,v),t=s?8*o/s:null):y===a.A.LOW_LATENCY_DOWNLOAD_TIME_CALCULATION_MODE.DOWNLOADED_DATA&&(t=h(m,o)),t);r.customData.onprogress({loaded:o,total:o,lengthComputable:!0,time:e}),i.data=d.buffer}var t,s;r.customData.onloadend()}():(s&&s.length>0&&function(e){d=function(e,t){if(0===e.length)return t;var n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}(d,e),o+=e.length,m.push({timestamp:f(),bytes:e.length}),y===a.A.LOW_LATENCY_DOWNLOAD_TIME_CALCULATION_MODE.MOOF_PARSING&&A&&t.findLastTopIsoBoxCompleted(["moof"],d,p).found&&(A=!1,E.push({timestamp:f()}));var n=t.findLastTopIsoBoxCompleted(["moov","mdat"],d,p);n.found?function(e){var t=function(e){var t;return e===d.length?(t=d,d=new Uint8Array):(t=new Uint8Array(d.subarray(0,e)),d=d.subarray(e)),t}(e.startOffsetOfLastFoundTargetBox+e.sizeOfLastFoundTargetBox);y!==a.A.LOW_LATENCY_DOWNLOAD_TIME_CALCULATION_MODE.MOOF_PARSING||A||(A=!0,v.push({timestamp:f(),bytes:t.length})),r.customData.onprogress({data:t.buffer,lengthComputable:!1,noTrace:!0}),p=0}(n):function(e){p=e.startOffsetOfLastCompletedBox+e.sizeOfLastCompletedBox,l||(r.customData.onprogress({lengthComputable:!1,noTrace:!0}),l=!0)}(n)}(s),c(r,0,T))};c(r,0,T)}(i,e,r)})).catch((function(){l(e)}))},reset:function(){},setConfig:function(e){t=e.boxParser}}}u.__dashjs_factory_name="FetchLoader";var c=r.A.getClassFactory(u);t.A=c},80868:function(e,t,n){"use strict";var r=n(50544),i=(n(16280),n(44114),n(54554),n(62010),n(18111),n(7588),n(18237),n(9868),n(26099),n(3362),n(23500),n(99838)),a=n(61244),o=n(87568),s=n(90138),u=n(11944),c=n(6066),l=n(47263),f=n(649),d=n(78850),h=n(43621),g=n(78261),p=n(35212),m=n(51926),E=n(2473),v=n(45313),A=n(90447),y=n(5099);function T(e){e=e||{};var t,n,s,T,_,S,I,b,R,N,C,w,D=this.context,O=e.errHandler,M=e.dashMetrics,P=e.mediaPlayerModel,L=e.boxParser,x=e.errors,F=(0,d.A)(D).getInstance(),U=(0,g.A)(D).getInstance();function k(e,t){var r,c,f,d,g,m,E,v=function(){H()},x=function(t){var n=new Date;r&&(r=!1,(!t.lengthComputable||t.lengthComputable&&t.total!==t.loaded)&&(j.firstByteDate=n,E.resourceTiming.responseStart=n.getTime())),t.lengthComputable&&(j.bytesLoaded=E.length=t.loaded,j.bytesTotal=E.resourceTiming.encodedBodySize=t.total,E.length=t.total,E.resourceTiming.encodedBodySize=t.loaded),t.noTrace||(z.push({s:f,d:t.time?t.time:n.getTime()-f.getTime(),b:[t.loaded?t.loaded-d:0],t:t.throughput}),j.traces=z,f=n,d=t.loaded),g&&(clearTimeout(g),g=null),U.get().streaming.fragmentRequestProgressTimeout>0&&(g=setTimeout((function(){w.warn("Abort request "+m.url+" due to progress timeout"),X.abort(m),v()}),U.get().streaming.fragmentRequestProgressTimeout)),e.progress&&t&&e.progress(t)},B=function(){H(!0)},G=function(e){var t;if(e.lengthComputable){var n=e.loaded/e.total*100;t="Request timeout: loaded: "+e.loaded+", out of: "+e.total+" : "+n.toFixed(3)+"% Completed"}else t="Request timeout: non-computable download size";w.warn(t)},H=function(){var r,i,a=arguments.length>0&&void 0!==arguments[0]&&arguments[0];-1!==n.indexOf(m)&&n.splice(n.indexOf(m),1),g&&(clearTimeout(g),g=null),N.processResponseHeaders(E),Y(),V(),(r=E,i=R.getResponseInterceptors(),i?i.reduce((function(e,t){return e.then((function(e){return t(e)}))}),Promise.resolve(r)):Promise.resolve(r)).then((function(n){if(function(e,t,n){var r=e.customData.request,i=U.get().streaming.cmsd&&U.get().streaming.cmsd.enabled?S.parseResponseHeaders(t.headers,r.mediaType):null;M.addHttpRequest(r,t.url,t.status,t.headers,n,i)}(m,E=n,z),a)e.abort&&e.abort(j);else{j.type===o.G.MPD_TYPE&&(M.addManifestUpdate(j),F.trigger(h.A.MANIFEST_LOADING_FINISHED,{requestObject:j}));var r=!!E.data||j.method===o.G.POST;if(E.status>=200&&E.status<=299&&r)e.success&&e.success(E.data,E.statusText,E.url),e.complete&&e.complete(j,E.statusText);else{try{404===E.status&&U.get().streaming.utcSynchronization.enableBackgroundSyncAfterSegmentDownloadError&&j.type===o.G.MEDIA_SEGMENT_TYPE&&P.getRetryAttemptsForType(o.G.MEDIA_SEGMENT_TYPE)===t&&F.trigger(h.A.ATTEMPT_BACKGROUND_SYNC)}catch(e){}K()}}}))},Y=function(){j.startDate=c,j.endDate=new Date,j.firstByteDate=j.firstByteDate||c},V=function(){E.resourceTiming.responseEnd=performance.now(),E.resourceTiming.duration=E.resourceTiming.responseEnd-E.resourceTiming.startTime,function(e,t){var n,r;if(U.get().streaming.abr.throughput.useResourceTimingApi&&"undefined"!=typeof performance&&!e.range){var i=null===(n=(r=performance).getEntriesByType)||void 0===n?void 0:n.call(r,"resource");if(!(void 0===i||i.length<=0)){for(var a=0,o=null;a<i.length;){if(i[a].name===e.url){o=i[a];break}a+=1}(function(e){return e&&!isNaN(e.responseStart)&&e.responseStart>0&&!isNaN(e.responseEnd)&&e.responseEnd>0&&!isNaN(e.transferSize)&&e.transferSize>0})(o)&&(e.customData.request.resourceTimingValues=o,t.resourceTiming.startTime=o.startTime,t.resourceTiming.encodedBodySize=o.encodedBodySize,t.resourceTiming.responseStart=o.responseStart,t.resourceTiming.responseEnd=o.responseEnd,t.resourceTiming.duration=o.duration)}}}(m,E)},q=function(e,t,n){return new Promise((function(r){(function(e){var t=R.getRequestInterceptors();return t?t.reduce((function(e,t){return e.then((function(e){return t(e)}))}),Promise.resolve(e)):Promise.resolve(e)})(t).then((function(i){t=i,n.request=t,t.customData.onloadend=v,t.customData.onprogress=x,t.customData.onabort=B,t.customData.ontimeout=G,n.resourceTiming.startTime=performance.now(),e.load(t,n),r()}))}))},K=function(){if(t>0){t--,e&&e.request&&(e.request.retryAttempts+=1);var n={config:e};T.push(n),n.timeout=setTimeout((function(){-1!==T.indexOf(n)&&(T.splice(T.indexOf(n),1),k(e,t))}),P.getRetryIntervalsForType(j.type))}else{if(j.type===o.G.MSS_FRAGMENT_INFO_SEGMENT_TYPE)return;O.error(new u.A(_[j.type],j.url+" is not available",{request:j,response:E})),e.error&&e.error(j,"error",E.statusText,E),e.complete&&e.complete(j,E.statusText)}},j=e.request,z=[];if(j.bytesLoaded=NaN,j.bytesTotal=NaN,j.firstByteDate=null,j.traces=[],r=!0,c=new Date,f=c,d=0,g=null,!M||!O)throw new Error("config object is not correct or missing");var W,Q=function(e){var t,n;return!e.isPartialSegmentRequest&&e.hasOwnProperty("availabilityTimeComplete")&&!1===e.availabilityTimeComplete&&window.fetch&&"arraybuffer"===e.responseType&&e.type===o.G.MEDIA_SEGMENT_TYPE?(b||(b=(0,a.A)(D).create()).setConfig({dashMetrics:M,boxParser:L}),t=b,n=p.A.FILE_LOADER_TYPES.FETCH):(I||(I=(0,i.A)(D).create()),t=I,n=p.A.FILE_LOADER_TYPES.XHR),{loader:t,fileLoaderType:n}}(j),X=Q.loader;j.fileLoaderType=Q.fileLoaderType,j.headers=j.headers||{},0===(W=j).retryAttempts&&function(e){var t=C.getFinalQueryString(e);t&&(e.url=l.A.addAdditionalQueryParameterToUrl(e.url,t))}(W),function(e){if(e.queryParams){var t=[];for(var n in e.queryParams)t.push({key:n,value:e.queryParams[n]});e.url=l.A.addAdditionalQueryParameterToUrl(e.url,t)}}(W),function(e){var t=N.getCommonAccessTokenForUrl(e.url);t&&(e.headers[p.A.COMMON_ACCESS_TOKEN_HEADER]=t)}(W),j.range&&(j.headers.Range="bytes="+j.range);var $=R.getXHRWithCredentialsForType(j.type);m=new A.A({url:j.url,method:j.method||o.G.GET,responseType:j.responseType,headers:j.headers,credentials:$?"include":"omit",timeout:function(e){return e.type===o.G.MPD_TYPE?U.get().streaming.manifestRequestTimeout||0:((t=e)&&t.type===o.G.INIT_SEGMENT_TYPE||t.type===o.G.INDEX_SEGMENT_TYPE||t.type===o.G.MEDIA_SEGMENT_TYPE||t.type===o.G.BITSTREAM_SWITCHING_SEGMENT_TYPE||t.type===o.G.MSS_FRAGMENT_INFO_SEGMENT_TYPE)&&U.get().streaming.fragmentRequestTimeout||0;var t}(j),body:j.body,customData:{request:j}}),E=new y.A({request:m,resourceTiming:{startTime:performance.now(),encodedBodySize:0},status:0});var Z=(new Date).getTime();if(isNaN(j.delayLoadingTime)||Z>=j.delayLoadingTime)return n.push(m),q(X,m,E);var J={httpRequest:m,httpResponse:E};return s.push(J),J.delayTimeout=setTimeout((function(){if(-1!==s.indexOf(J)){s.splice(s.indexOf(J),1);try{c=new Date,f=c,n.push(J.httpRequest),q(X,J.httpRequest,J.httpResponse)}catch(e){J.httpRequest.onloadend()}}}),j.delayLoadingTime-Z),Promise.resolve()}return t={abort:function(){T.forEach((function(e){clearTimeout(e.timeout),e.config.request&&e.config.abort&&e.config.abort(e.config.request)})),T=[],s.forEach((function(e){return clearTimeout(e.delayTimeout)})),s=[],n.forEach((function(e){var t=e.customData;t&&(t.request&&t.request.type===o.G.MSS_FRAGMENT_INFO_SEGMENT_TYPE||(t.onloadend=t.onprogress=void 0,t.abort&&t.abort()))})),n=[]},load:function(e){return e.request?k(e,P.getRetryAttemptsForType(e.request.type)):(e.error&&e.error(e.request,"error"),Promise.resolve())},reset:function(){n=[],s=[],T=[],I&&I.reset(),b&&b.reset(),I=null,b=null},resetInitialSettings:function(){I&&I.resetInitialSettings()},setConfig:function(e){e&&(e.commonAccessTokenController&&(N=e.commonAccessTokenController),e.extUrlQueryInfoController&&(C=e.extUrlQueryInfoController))}},w=(0,f.A)(D).getInstance().getLogger(t),n=[],s=[],T=[],S=(0,c.A)(D).getInstance(),R=(0,m.A)(D).getInstance(),N=(0,E.A)(D).getInstance(),C=(0,v.A)(D).getInstance(),_=(0,r.A)((0,r.A)((0,r.A)((0,r.A)((0,r.A)((0,r.A)((0,r.A)({},o.G.MPD_TYPE,x.DOWNLOAD_ERROR_ID_MANIFEST_CODE),o.G.XLINK_EXPANSION_TYPE,x.DOWNLOAD_ERROR_ID_XLINK_CODE),o.G.INIT_SEGMENT_TYPE,x.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE),o.G.MEDIA_SEGMENT_TYPE,x.DOWNLOAD_ERROR_ID_CONTENT_CODE),o.G.INDEX_SEGMENT_TYPE,x.DOWNLOAD_ERROR_ID_CONTENT_CODE),o.G.BITSTREAM_SWITCHING_SEGMENT_TYPE,x.DOWNLOAD_ERROR_ID_CONTENT_CODE),o.G.OTHER_TYPE,x.DOWNLOAD_ERROR_ID_CONTENT_CODE),t}T.__dashjs_factory_name="HTTPLoader";var _=s.A.getClassFactory(T);t.A=_},1721:function(e,t,n){"use strict";n(11392);var r=n(90138),i=n(80868);function a(){var e;function t(){e={}}function n(){t()}return n(),{getLoader:function(t){for(var n in e)if(e.hasOwnProperty(n)&&t.startsWith(n))return e[n];return i.A},registerLoader:function(t,n){e[t]=n},unregisterLoader:function(t){e[t]&&delete e[t]},unregisterAllLoader:t,reset:n}}a.__dashjs_factory_name="SchemeLoaderFactory";var o=r.A.getSingletonFactory(a);t.A=o},63773:function(e,t,n){"use strict";var r=n(90138),i=n(1721);function a(e){e=e||{};var t,n,r=this.context;return t=(0,i.A)(r).getInstance(),{abort:function(){n&&n.abort()},load:function(i){if(!n){var a=t.getLoader(i&&i.request?i.request.url:null);n=a(r).create({errHandler:e.errHandler,mediaPlayerModel:e.mediaPlayerModel,dashMetrics:e.dashMetrics,boxParser:e.boxParser?e.boxParser:null,constants:e.constants?e.constants:null,dashConstants:e.dashConstants?e.dashConstants:null,urlUtils:e.urlUtils?e.urlUtils:null,errors:e.errors})}n.load(i)},reset:function(){t&&(t.reset(),t=null),n&&"function"==typeof n.reset&&n.reset(),n=null},resetInitialSettings:function(){n&&"function"==typeof n.resetInitialSettings&&n.resetInitialSettings()}}}a.__dashjs_factory_name="URLLoader";var o=r.A.getClassFactory(a);t.A=o},99838:function(e,t,n){"use strict";var r=n(90138),i=n(47263);function a(){var e;function t(){e&&(e.onloadend=e.onerror=e.onprogress=e.onload=null,e.abort(),e.onabort=e.ontimeout=null,e=null)}return{load:function(n,r){if(e=null,(e=new XMLHttpRequest).open(n.method,n.url,!0),n.responseType&&(e.responseType=n.responseType),n.headers)for(var a in n.headers){var o=n.headers[a];o&&e.setRequestHeader(a,o)}e.withCredentials="include"===n.credentials,e.timeout=n.timeout,e.onload=function(){r.url=this.responseURL,r.status=this.status,r.statusText=this.statusText,r.headers=i.A.parseHttpHeaders(this.getAllResponseHeaders()),r.data=this.response},n.customData&&(e.onloadend=n.customData.onloadend,e.onprogress=n.customData.onprogress,e.onabort=n.customData.onabort,e.ontimeout=n.customData.ontimeout);var s=n.body||null;return e.send(s),n.customData.abort=t.bind(this),!0},abort:t,getXhr:function(){return e},reset:function(){t()},resetInitialSettings:function(){t()}}}a.__dashjs_factory_name="XHRLoader";var o=r.A.getClassFactory(a);t.A=o},27037:function(e,t,n){"use strict";n.d(t,{default:function(){return Ne}}),n(79432);var r=n(91975),i=n(34299),a=(n(16280),n(2008),n(74423),n(23792),n(44114),n(34782),n(26910),n(54743),n(16573),n(78100),n(77936),n(62010),n(18111),n(22489),n(7588),n(18237),n(13579),n(33110),n(36033),n(26099),n(3362),n(47764),n(21489),n(48140),n(81630),n(72170),n(75044),n(69539),n(31694),n(89955),n(21903),n(91134),n(33206),n(44496),n(66651),n(12887),n(19369),n(66812),n(8995),n(31575),n(36072),n(88747),n(28845),n(29423),n(57301),n(373),n(86614),n(41405),n(37467),n(44732),n(33684),n(79577),n(41549),n(49797),n(49631),n(35623),n(23500),n(62953),n(7718)),o=n(85952),s=(n(62062),n(61701),n(27495),n(38781),n(21699),n(71761),n(25440),n(98854)),u=n(92861),c={prefixes:["clearkey","dashif","ck"]},l=function(){function e(){(0,a.A)(this,e)}return(0,o.A)(e,null,[{key:"findMp4ProtectionElement",value:function(e){for(var t=null,n=0;n<e.length;++n){var r=e[n];r.schemeIdUri&&r.schemeIdUri.toLowerCase()===s.A.MP4_PROTECTION_SCHEME&&r.value&&(r.value.toLowerCase()===u.A.ENCRYPTION_SCHEME_CENC||r.value.toLowerCase()===u.A.ENCRYPTION_SCHEME_CBCS)&&(t=r)}return t}},{key:"getPSSHData",value:function(e){var t=8,n=new DataView(e),r=n.getUint8(t);return t+=20,r>0&&(t+=4+16*n.getUint32(t)),t+=4,e.slice(t)}},{key:"getPSSHForKeySystem",value:function(t,n){var r=e.parsePSSHList(n);return t&&r.hasOwnProperty(t.uuid.toLowerCase())?r[t.uuid.toLowerCase()]:null}},{key:"parseInitDataFromContentProtection",value:function(e,t){return"pssh"in e&&e.pssh?(e.pssh.__text=e.pssh.__text.replace(/\r?\n|\r/g,"").replace(/\s+/g,""),t.decodeArray(e.pssh.__text).buffer):null}},{key:"parsePSSHList",value:function(e){if(null==e)return[];for(var t=new DataView(e.buffer||e),n={},r=0;;){var i,a,o=void 0,s=r;if(r>=t.buffer.byteLength)break;if(i=r+t.getUint32(r),r+=4,1886614376===t.getUint32(r))if(r+=4,0===(a=t.getUint8(r))||1===a){r++,r+=3,o="";var u=void 0,c=void 0;for(u=0;u<4;u++)o+=1===(c=t.getUint8(r+u).toString(16)).length?"0"+c:c;for(r+=4,o+="-",u=0;u<2;u++)o+=1===(c=t.getUint8(r+u).toString(16)).length?"0"+c:c;for(r+=2,o+="-",u=0;u<2;u++)o+=1===(c=t.getUint8(r+u).toString(16)).length?"0"+c:c;for(r+=2,o+="-",u=0;u<2;u++)o+=1===(c=t.getUint8(r+u).toString(16)).length?"0"+c:c;for(r+=2,o+="-",u=0;u<6;u++)o+=1===(c=t.getUint8(r+u).toString(16)).length?"0"+c:c;r+=6,r+=4,n[o=o.toLowerCase()]=t.buffer.slice(s,i),r=i}else r=i;else r=i}return n}},{key:"getLicenseServerUrlFromMediaInfo",value:function(e,t){try{if(!e||0===e.length)return null;for(var n=0,r=null;n<e.length&&!r;){var i=e[n];if(i&&i.contentProtection&&i.contentProtection.length>0){var a=i.contentProtection.filter((function(e){return e.schemeIdUri&&e.schemeIdUri===t}));if(a&&a.length>0)for(var o=0;o<a.length&&!r;){var s=a[o];s.laUrl&&s.laUrl.__prefix&&c.prefixes.includes(s.laUrl.__prefix)&&s.laUrl.__text&&(r=s.laUrl.__text),o+=1}}n+=1}return r}catch(e){return null}}},{key:"hexKidToBufferSource",value:function(e){var t=e.replace(/-/g,"");return new Uint8Array(t.match(/[\da-f]{2}/gi).map((function(e){return parseInt(e,16)}))).buffer}}])}(),f=(0,o.A)((function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(0,a.A)(this,e),this.contentType=t,this.robustness=n,this.encryptionScheme=r})),d=f,h=(0,o.A)((function e(t,n,r,i,o,s){(0,a.A)(this,e),this.initDataTypes=s&&s.length>0?s:[u.A.INITIALIZATION_DATA_TYPE_CENC],t&&t.length&&(this.audioCapabilities=t),n&&n.length&&(this.videoCapabilities=n),this.distinctiveIdentifier=r,this.persistentState=i,this.sessionTypes=o})),g=n(21923),p=n(11944),m=(0,o.A)((function e(t,n,r,i,o,s,u,c){(0,a.A)(this,e),this.url=t,this.method=n,this.responseType=r,this.headers=i,this.withCredentials=o,this.messageType=s,this.sessionId=u,this.data=c})),E=(0,o.A)((function e(t,n,r){(0,a.A)(this,e),this.url=t,this.headers=n,this.data=r})),v=n(87568),A=n(41349),y=n(47263),T=n(90138),_=(0,o.A)((function e(t,n,r){(0,a.A)(this,e),this.url=t,this.method="GET",this.responseType="arraybuffer",this.headers=n,this.body=null,this.withCredentials=r})),S=(0,o.A)((function e(t,n,r){(0,a.A)(this,e),this.url=t,this.headers=n,this.data=r}));function I(e){var t,n,a,o,s,c,f,T,I,b,R,N,C,w,D=(e=e||{}).BASE64,O=e.cmcdController,M=e.constants,P=e.customParametersModel,L=e.debug,x=e.eventBus,F=e.events,U=e.protectionKeyController,k=e.settings,B=e.protectionModel,G=[];function H(){if(!(x&&x.hasOwnProperty("on")&&U&&U.hasOwnProperty("getSupportedKeySystemMetadataFromContentProtection")))throw new Error("Missing config parameter(s)")}function Y(e,n){C||s?C&&(b?b.then((function(){j()})):j()):function(e,n){if(!s){var r;s=!0;var i,a=function(e){for(var t=[],n=0;n<e.length;n++){var r=z(e[n]);t.push({ks:e[n].ks,configs:[r],protData:e[n].protData})}return t}(e=(r=e).sort((function(e,n){return(t&&t[e.ks.systemString]&&t[e.ks.systemString].priority>=0?t[e.ks.systemString].priority:r.length)-(t&&t[n.ks.systemString]&&t[n.ks.systemString].priority>=0?t[n.ks.systemString].priority:r.length)})));B.requestKeySystemAccess(a).then((function(e){return function(e){var t=e&&e.selectedSystemString?e.selectedSystemString:e.keySystem.systemString;return T.info("DRM: KeySystem Access Granted for system string ("+t+")! Selecting key system..."),B.selectKeySystem(e)}(i=e.data)})).then((function(e){!function(e,t){try{C=e,s=!1,x.trigger(F.KEY_SYSTEM_SELECTED,{data:t});var n=X(C);n&&n.serverCertificate&&n.serverCertificate.length>0&&B.setServerCertificate(D.decodeArray(n.serverCertificate).buffer),C.systemString===u.A.FAIRPLAY_KEYSTEM_STRING?b=V().then((function(){b=null,j()})).catch((function(e){T.warn("DRM: Certificate acquisition failed for FairPlay: "+(e&&e.message?e.message:e)+". Proceeding anyway."),b=null,j()})):(V().catch((function(e){T.error(e)})),j())}catch(e){T.error(e)}}(e,i)})).catch((function(e){!function(e,t){C=null,s=!1,t||x.trigger(F.KEY_SYSTEM_SELECTED,{data:null,error:new p.A(g.A.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,g.A.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+"Error selecting key system! -- "+e.error)})}(e,n)}))}}(e,n)}function V(){if(!C)return Promise.resolve();var e=C.systemString,t=n.get(e);if(t&&(t.applied||t.inProgress))return Promise.resolve();var r=function(){var e=[],t=X(C);return t&&Array.isArray(t.certUrls)&&t.certUrls.length&&t.certUrls.forEach((function(t){e.push(t)})),I.forEach((function(t){t&&t.contentProtection&&t.contentProtection.forEach((function(t){t&&Array.isArray(t.certUrls)&&t.certUrls.length&&t.schemeIdUri.toLowerCase()===C.schemeIdURI&&t.certUrls.forEach((function(t){e.push(t)}))}))})),A.A.dedupeCertUrls(e)}();if(!r.length)return T.debug("DRM: No Certificate Server URLs found for "+e+". Skipping certificate acquisition."),Promise.resolve();T.debug("DRM: Found "+r.length+" certificate candidate(s) for "+e+". Starting acquisition.");var i=X(C)||{},a=t||{applied:!1,inProgress:!0,attempts:0};return a.inProgress=!0,n.set(e,a),q(r,0,i,e,a)}function q(e,t,n,r,i){if(t>=e.length)return function(e,t){return e.inProgress=!1,e.error=e.error||"All certificate candidates failed",T.warn("DRM: All certificate candidates failed for "+t+"."),Promise.reject(new Error(e.error))}(i,r);var a=e[t],o=isNaN(k.get().streaming.retryAttempts[v.G.LICENSE_CERTIFICATE])?3:k.get().streaming.retryAttempts[v.G.LICENSE_CERTIFICATE];return T.debug("DRM: Attempting certificate download ("+(t+1)+"/"+e.length+") url="+a.url),function(e,t){var n=P.getCertificateRequestFilters(),r=!1;t&&"boolean"==typeof t.withCredentials&&(r=t.withCredentials);var i={};t&&ie(i,t.httpRequestHeaders);var a=new _(e.url,i,r);return oe(n,a).then((function(){return a}))}(a,n).then((function(e){return K(e,n,o)})).then((function(e){return function(e,t,n,r){if(!e||!e.byteLength)throw new Error("Empty certificate response");return r.urlUsed=t.url,r.buffer=e,function(e,t,n){return new Promise((function(r,i){try{var a=B.setServerCertificate(e);a&&"function"==typeof a.then?a.then((function(e){r("boolean"!=typeof e||e)})).catch((function(e){n.error=e&&e.message?e.message:e,i(e)})):r(!0)}catch(e){n.error=e&&e.message?e.message:e,T.warn("DRM: setServerCertificate threw for "+t+": "+n.error),i(e)}}))}(e,n,r).then((function(e){if(!e)throw new Error("CDM rejected certificate");r.applied=!0,r.inProgress=!1}))}(e,a,r,i)})).then((function(){!function(e,t,n){var r=e.certType?" certType="+e.certType:"";T.info("DRM: Server certificate applied successfully from "+n.urlUsed+r+" for "+t+".")}(a,r,i)})).catch((function(o){return i.attempts++,i.lastError=o&&o.message?o.message:o,T.warn("DRM: Certificate attempt failed ("+a.url+"): "+i.lastError),q(e,t+1,n,r,i)}))}function K(e,t,n){return new Promise((function(r,i){var a=new XMLHttpRequest;a.open(e.method,e.url,!0),a.responseType=e.responseType;var o=t&&!isNaN(t.httpTimeout)?t.httpTimeout:8e3;o>0&&(a.timeout=o),a.withCredentials=e.withCredentials;for(var s=0,u=Object.keys(e.headers);s<u.length;s++){var c=u[s];a.setRequestHeader(c,e.headers[c])}var l=function(a){if(n>0){var o=n-1,s=isNaN(k.get().streaming.retryIntervals[v.G.LICENSE_CERTIFICATE])?500:k.get().streaming.retryIntervals[v.G.LICENSE_CERTIFICATE];T.debug("DRM: Certificate request failed ("+a+"). Retrying... remaining="+o),setTimeout((function(){K(e,t,o).then(r).catch(i)}),s)}else i(new Error(a))};a.onload=function(){var e=this;if(this.status>=200&&this.status<=299){var t=y.A.parseHttpHeaders(a.getAllResponseHeaders?a.getAllResponseHeaders():null);oe(P.getCertificateResponseFilters(),new S(a.responseURL,t,this.response)).then((function(){r(e.response)})).catch((function(){r(e.response)}))}else l("HTTP "+this.status)},a.onerror=function(){l("network error")},a.ontimeout=function(){l("timeout")},a.onabort=function(){l("aborted")};try{a.send(e.body)}catch(e){i(e)}}))}function j(){for(var e,t=0;t<R.length;t++)for(e=0;e<R[t].length;e++)if(C===R[t][e].ks){n=R[t][e],U.isClearKey(C)&&function(e){if(e.protData&&e.protData.hasOwnProperty("clearkeys")&&0!==Object.keys(e.protData.clearkeys).length){var t={kids:Object.keys(e.protData.clearkeys)};e.initData=(new TextEncoder).encode(JSON.stringify(t))}}(n),n.sessionId?W(n):null!==n.initData&&Q(n);break}var n;R=[]}function z(e){var t=e.protData,n=[],r=[],i=u.A.INITIALIZATION_DATA_TYPE_CENC;e.ks&&e.ks.systemString===u.A.FAIRPLAY_KEYSTEM_STRING&&(i=u.A.INITIALIZATION_DATA_TYPE_SINF);var a=t&&t.initDataTypes&&t.initDataTypes.length>0?t.initDataTypes:[i],o=t&&t.audioRobustness&&t.audioRobustness.length>0?t.audioRobustness:N,s=t&&t.videoRobustness&&t.videoRobustness.length>0?t.videoRobustness:N,c=e.sessionType,l=t&&t.distinctiveIdentifier?t.distinctiveIdentifier:"optional",f=t&&t.persistentState?t.persistentState:"temporary"===c?"optional":"required",g=e.ks&&e.ks.systemString===u.A.FAIRPLAY_KEYSTEM_STRING?u.A.ENCRYPTION_SCHEME_CBCS:void 0;return I.forEach((function(e){e.type===M.AUDIO?n.push(new d(e.codec,o,g)):e.type===M.VIDEO&&r.push(new d(e.codec,s,g))})),new h(n,r,l,f,[c],a)}function W(e){H(),B.loadKeySession(e)}function Q(e){if(!e||!function(e){if(!e)return!1;try{for(var t=B.getSessionTokens(),n=0;n<t.length;n++)if(t[n].getKeyId()===e)return!0;return!1}catch(e){return!1}}(e.keyId)){!function(){if(k){var e=k.get().streaming.protection.keepProtectionMediaKeys,t=k.get().streaming.protection.keepProtectionMediaKeysMaximumOpenSessions;if(!("number"!=typeof t||t<=0))if(e){if(B&&"function"==typeof B.getSessionTokens){var n=B.getSessionTokens()||[];if(!(n.length<t)){var r=n[0];r&&(T.info("DRM: Maximum number of open MediaKeySessions reached ("+t+"), closing oldest session."),Z(r))}}}else T.warn("DRM: keepProtectionMediaKeysMaximumOpenSessions is set to "+t+", but keepProtectionMediaKeys is not enabled. Therefore, keepProtectionMediaKeysMaximumOpenSessions will be ignored.")}}();var t=l.getPSSHForKeySystem(C,e?e.initData:null);if(t){if($(t))return;try{e.initData=t,B.createKeySession(e)}catch(e){x.trigger(F.KEY_SESSION_CREATED,{data:null,error:new p.A(g.A.KEY_SESSION_CREATED_ERROR_CODE,g.A.KEY_SESSION_CREATED_ERROR_MESSAGE+e.message)})}}else e&&e.initData?B.createKeySession(e):x.trigger(F.KEY_SESSION_CREATED,{data:null,error:new p.A(g.A.KEY_SESSION_CREATED_ERROR_CODE,g.A.KEY_SESSION_CREATED_ERROR_MESSAGE+"Selected key system is "+(C?C.systemString:null)+". needkey/encrypted event contains no initData corresponding to that key system!")})}}function X(e){if(e){var n=e.systemString;if(t)return n in t?t[n]:null}return null}function $(e){if(!e)return!1;try{for(var t=B.getAllInitData(),n=0;n<t.length;n++)if(U.initDataEquals(e,t[n]))return T.debug("DRM: Ignoring initData because we have already seen it!"),!0;return!1}catch(e){return!1}}function Z(e){H(),B.closeKeySession(e)}function J(e){H(),e?(B.setMediaElement(e),x.on(F.NEED_KEY,se,a)):null===e&&(B.setMediaElement(e),x.off(F.NEED_KEY,se,a))}function ee(e){T.debug("DRM: onKeyMessage");var t=e.data;x.trigger(F.KEY_MESSAGE,{data:t});var n=t.messageType?t.messageType:u.A.MEDIA_KEY_MESSAGE_TYPES.LICENSE_REQUEST,r=t.message,a=t.sessionToken,o=X(C),s=U.getLicenseServerModelInstance(C,o,n),c={sessionToken:a,messageType:n};if(r&&0!==r.byteLength){if(!s)return T.debug("DRM: License server request not required for this message (type = "+e.data.messageType+"). Session ID = "+a.getSessionId()),void te(c);if(U.isClearKey(C)){var f=U.processClearKeyLicenseRequest(C,o,r);if(f&&f.keyPairs&&f.keyPairs.length>0)return T.debug("DRM: ClearKey license request handled by application!"),te(c),void B.updateKeySession(a,f)}!function(e,t,n){var r=e.sessionToken,a=e.messageType?e.messageType:u.A.MEDIA_KEY_MESSAGE_TYPES.LICENSE_REQUEST,o={sessionToken:r,messageType:a},s=C?C.systemString:null,c=function(e,t,n,r,a){var o=null,s=r.message;if(e&&e.serverURL){var u=e.serverURL;"string"==typeof u&&""!==u?o=u:"object"===(0,i.A)(u)&&u.hasOwnProperty(t)&&(o=u[t])}else if(e&&e.laURL&&""!==e.laURL)o=e.laURL;else if(!(o=l.getLicenseServerUrlFromMediaInfo(I,C.schemeIdURI))&&!U.isClearKey(C)){var c=l.getPSSHData(n.initData);(o=C.getLicenseServerURLFromInitData(c))||(o=r.laURL)}return o=a.getServerURLFromMessage(o,s,t)}(n,a,r,e,t);if(c){var f={},d=!1;n&&ie(f,n.httpRequestHeaders);var h=e.message;ie(f,C.getRequestHeadersFromMessage(h)),Object.keys(f).forEach((function(e){"authorization"===e.toLowerCase()&&(d=!0)})),n&&"boolean"==typeof n.withCredentials&&(d=n.withCredentials);var A=function(e){if(B)if(e.status>=200&&e.status<=299){var n=y.A.parseHttpHeaders(e.getAllResponseHeaders?e.getAllResponseHeaders():null),i=new E(e.responseURL,n,e.response);oe(P.getLicenseResponseFilters(),i).then((function(){var n=t.getLicenseMessage(i.data,s,a);null!==n?(te(o),B.updateKeySession(r,n)):ae(e,o,s,a,t)}))}else ae(e,o,s,a,t)},T=function(e){te(o,new p.A(g.A.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,g.A.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+s+' update, XHR aborted. status is "'+e.statusText+'" ('+e.status+"), readyState is "+e.readyState))},_=function(e){te(o,new p.A(g.A.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,g.A.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+s+' update, XHR error. status is "'+e.statusText+'" ('+e.status+"), readyState is "+e.readyState))},S=C.getLicenseRequestFromMessage(h),b=t.getHTTPMethod(a),R=t.getResponseType(s,a),N=n&&!isNaN(n.httpTimeout)?n.httpTimeout:8e3,w=r.getSessionId()||null,D=new m(c,b,R,f,d,a,w,S),O=isNaN(k.get().streaming.retryAttempts[v.G.LICENSE])?3:k.get().streaming.retryAttempts[v.G.LICENSE];oe(P.getLicenseRequestFilters(),D).then((function(){ne(D,O,N,A,T,_)}))}else te(o,new p.A(g.A.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE,g.A.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE))}(t,s,o)}else te(c,new p.A(g.A.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE,g.A.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE))}function te(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;x.trigger(F.LICENSE_REQUEST_COMPLETE,{data:e,error:t})}function ne(e,t,n,r,i,a){var o=new XMLHttpRequest,s={url:e.url,type:v.G.LICENSE,method:e.method,headers:e.headers||{}};for(var u in O.applyCmcdToRequest(s),e.url=s.url,e.headers=s.headers,o.open(e.method,e.url,!0),o.responseType=e.responseType,o.withCredentials=e.withCredentials,n>0&&(o.timeout=n),e.headers)o.setRequestHeader(u,e.headers[u]);var l=function(){t--;var o=isNaN(k.get().streaming.retryIntervals[v.G.LICENSE])?1e3:k.get().streaming.retryIntervals[v.G.LICENSE];c=setTimeout((function(){ne(e,t,n,r,i,a)}),o)};o.onload=function(){f=null,this.status>=200&&this.status<=299||t<=0?r(this):(T.warn("License request failed ("+this.status+"). Retrying it... Pending retries: "+t),l())},o.ontimeout=o.onerror=function(){f=null,t<=0?a(this):(T.warn("License request network request failed . Retrying it... Pending retries: "+t),l())},o.onabort=function(){i(this)},x.trigger(F.LICENSE_REQUEST_SENDING,{url:e.url,headers:e.headers,payload:e.data,sessionId:e.sessionId}),f=o,o.send(e.data)}function re(){f&&(f.onloadend=f.onerror=f.onprogress=void 0,f.abort(),f=null),c&&(clearTimeout(c),c=null)}function ie(e,t){if(t)for(var n in t)e[n]=t[n]}function ae(e,t,n,r,i){var a="NONE",o=null;e.response&&(a=i.getErrorResponse(e.response,n,r),o={serverResponse:e.response||null,responseCode:e.status||null,responseText:e.statusText||null}),te(t,new p.A(g.A.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,g.A.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+n+' update, XHR complete. status is "'+e.statusText+'" ('+e.status+"), readyState is "+e.readyState+". Response is "+a,o))}function oe(e,t){return e?e.reduce((function(e,n){return e.then((function(){return n(t)}))}),Promise.resolve()):Promise.resolve()}function se(e,n){if(!k.get().streaming.protection.ignoreEmeEncryptedEvent)if(T.debug("DRM: onNeedKey"),e.key.initDataType===u.A.INITIALIZATION_DATA_TYPE_CENC||e.key.initDataType===u.A.INITIALIZATION_DATA_TYPE_SINF)if(0===I.length&&(T.warn("DRM: onNeedKey called before initializeForMedia, wait until initialized"),(n=void 0===n?1:n+1)<5))G.push(setTimeout((function(){se(e,n)}),500));else{var r=e.key.initData;ArrayBuffer.isView(r)&&(r=r.buffer);var i,a=e.key.initDataType===u.A.INITIALIZATION_DATA_TYPE_SINF;if(C){var o=a?r:l.getPSSHForKeySystem(C,r);if(o&&$(o))return}T.debug("DRM: initData:",String.fromCharCode.apply(null,new Uint8Array(r))),0!==(i=a?U.getSupportedKeySystemMetadataForSinf(r,t,w):U.getSupportedKeySystemMetadataFromSegmentPssh(r,t,w)).length?function(e){R.push(e),Y(e,!1)}(i):T.debug("DRM: Received needkey event with initData, but we don't support any of the key systems!")}else T.warn("DRM: Only 'cenc' and 'sinf' initData are supported! Ignoring initData of type: "+e.key.initDataType)}function ue(e,t){if(e.size<=0)return!1;if(t.size>0&&(0,r.A)(e).every((function(e){var n=t.get(e);return void 0!==n&&""!==n})))return!0;var n=B.getSessionTokens();if(n&&n.length>0){var i=n.filter((function(t){return(0,r.A)(e).includes(t.normalizedKeyId)}));if(i.some((function(e){return!e.hasTriggeredKeyStatusMapUpdate}))||0===i.length)return!1}return!k.get().streaming.protection.ignoreKeyStatuses&&e&&e.size>0&&t&&t.size>0}return a={areKeyIdsExpired:function(e){try{return!!ue(e,o)&&(0,r.A)(e).every((function(e){return o.get(e)===u.A.MEDIA_KEY_STATUSES.EXPIRED}))}catch(e){return T.error(e),!1}},areKeyIdsUsable:function(e){try{return!ue(e,o)||(0,r.A)(e).some((function(e){var t=o.get(e);return t&&t!==u.A.MEDIA_KEY_STATUSES.INTERNAL_ERROR&&t!==u.A.MEDIA_KEY_STATUSES.OUTPUT_RESTRICTED}))}catch(e){return T.error(e),!0}},clearMediaInfoArray:function(){I=[]},closeKeySession:Z,createKeySession:Q,getKeySystems:function(){return U?U.getKeySystems():[]},getProtectionData:function(){return t},getSupportedKeySystemMetadataFromContentProtection:function(e){return H(),U.getSupportedKeySystemMetadataFromContentProtection(e,t,w)},handleKeySystemFromManifest:function(){if(I&&0!==I.length){var e=[];I.forEach((function(n){var r=U.getSupportedKeySystemMetadataFromContentProtection(n.contentProtection,t,w);r.length>0&&(0===e.length&&(e=r),R.push(r))})),e&&e.length>0&&Y(e,!0)}},initializeForMedia:function(e){if(!e)throw new Error("mediaInfo can not be null or undefined");H(),I.push(e)},loadKeySession:W,removeKeySession:function(e){H(),B.removeKeySession(e)},reset:function(){x.off(F.INTERNAL_KEY_MESSAGE,ee,a),H(),re(),J(null),C=null,s=!1,o=new Map,n=new Map,B&&(B.reset(),B=null),G.forEach((function(e){return clearTimeout(e)})),G=[],I=[],R=[]},setKeySystems:function(e){U&&U.setKeySystems(e)},setMediaElement:J,setProtectionData:function(e){t=e,U.setProtectionData(e)},setRobustnessLevel:function(e){N=e},setServerCertificate:function(e){return H(),B.setServerCertificate(e)},setSessionType:function(e){w=e},stop:function(){re(),B&&B.stop()},updateKeyStatusesMap:function(e){try{if(!e||!e.sessionToken||!e.parsedKeyStatuses)return;e.sessionToken.hasTriggeredKeyStatusMapUpdate=!0;var t=e.parsedKeyStatuses,n=y.A.parseUserAgent(),r=n&&n.browser&&n.browser.name&&"edge"===n.browser.name.toLowerCase();t.forEach((function(e){var t,n,i,a,s;r&&C.uuid===u.A.PLAYREADY_UUID&&e.keyId&&16===e.keyId.byteLength&&(t=e.keyId,i=(n=y.A.bufferSourceToDataView(t)).getUint32(0,!0),a=n.getUint16(4,!0),s=n.getUint16(6,!0),n.setUint32(0,i,!1),n.setUint16(4,a,!1),n.setUint16(6,s,!1));var c=y.A.bufferSourceToHex(e.keyId).slice(0,32);c&&""!==c&&o.set(c,e.status)})),x.trigger(F.KEY_STATUSES_MAP_UPDATED,{keyStatusMap:o})}catch(e){T.error(e)}}},T=L.getLogger(a),R=[],I=[],w="temporary",N="",f=null,c=null,o=new Map,n=new Map,b=null,x.on(F.INTERNAL_KEY_MESSAGE,ee,a),a}I.__dashjs_factory_name="ProtectionController";var b=T.A.getClassFactory(I),R=(n(23418),n(48598),n(68156),n(58335),n(2945),n(55815),n(64979),n(79739),n(42207),(0,o.A)((function e(t,n){(0,a.A)(this,e),this.keyID=t,this.key=n}))),N=function(){return(0,o.A)((function e(t,n){if((0,a.A)(this,e),n&&"persistent"!==n&&"temporary"!==n)throw new Error("Invalid ClearKey key set type! Must be one of 'persistent' or 'temporary'");this.keyPairs=t,this.type=n}),[{key:"toJWK",value:function(){var e,t=this.keyPairs.length,n={keys:[]};for(e=0;e<t;e++){var r={kty:"oct",alg:"A128KW",kid:this.keyPairs[e].keyID,k:this.keyPairs[e].key};n.keys.push(r)}this.type&&(n.type=this.type);var i=JSON.stringify(n),a=i.length,o=new ArrayBuffer(a),s=new Uint8Array(o);for(e=0;e<a;e++)s[e]=i.charCodeAt(e);return o}}])}(),C=u.A.CLEARKEY_UUID,w=u.A.CLEARKEY_KEYSTEM_STRING,D="urn:uuid:"+C;function O(e){var t=(e=e||{}).BASE64;return{uuid:C,schemeIdURI:D,systemString:w,getInitData:function(e,n){try{var r=l.parseInitDataFromContentProtection(e,t);if(!r&&n){var i={kids:[function(e){try{var t=e.replace(/-/g,"");return(t=btoa(t.match(/\w{2}/g).map((function(e){return String.fromCharCode(parseInt(e,16))})).join(""))).replace(/=/g,"").replace(/\//g,"_").replace(/\+/g,"-")}catch(e){return null}}(n.cencDefaultKid)]};r=(new TextEncoder).encode(JSON.stringify(i))}return r}catch(e){return null}},getRequestHeadersFromMessage:function(){return{"Content-Type":"application/json"}},getLicenseRequestFromMessage:function(e){return JSON.stringify(JSON.parse(String.fromCharCode.apply(null,new Uint8Array(e))))},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null},getClearKeysFromProtectionData:function(e,t){var n=null;if(e){for(var r=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(t))),i=[],a=0;a<r.kids.length;a++){var o=r.kids[a],s=e.clearkeys&&e.clearkeys.hasOwnProperty(o)?e.clearkeys[o]:null;if(!s)throw new Error("DRM: ClearKey keyID ("+o+") is not known!");i.push(new R(o,s))}n=new N(i)}return n}}}O.__dashjs_factory_name="KeySystemClearKey";var M=T.A.getSingletonFactory(O),P=u.A.W3C_CLEARKEY_UUID,L=u.A.CLEARKEY_KEYSTEM_STRING,x="urn:uuid:"+P;function F(e){var t,n=e.BASE64,r=e.debug.getLogger(t);return{uuid:P,schemeIdURI:x,systemString:L,getInitData:function(e){return l.parseInitDataFromContentProtection(e,n)},getRequestHeadersFromMessage:function(){return null},getLicenseRequestFromMessage:function(e){return new Uint8Array(e)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null},getClearKeysFromProtectionData:function(e,t){var n=null;if(e){for(var i=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(t))),a=[],o=0;o<i.kids.length;o++){var s=i.kids[o],u=e.clearkeys&&e.clearkeys.hasOwnProperty(s)?e.clearkeys[s]:null;if(!u)throw new Error("DRM: ClearKey keyID ("+s+") is not known!");a.push(new R(s,u))}n=new N(a),r.warn("ClearKey schemeIdURI is using W3C Common PSSH systemID (1077efec-c0b2-4d02-ace3-3c1e52e2fb4b) in Content Protection. See DASH-IF IOP v4.1 section 7.6.2.4")}return n}}}F.__dashjs_factory_name="KeySystemW3CClearKey";var U=T.A.getSingletonFactory(F),k=u.A.WIDEVINE_UUID,B=u.A.WIDEVINE_KEYSTEM_STRING,G="urn:uuid:"+k;function H(e){var t=(e=e||{}).BASE64;return{uuid:k,schemeIdURI:G,systemString:B,getInitData:function(e){return l.parseInitDataFromContentProtection(e,t)},getRequestHeadersFromMessage:function(){return null},getLicenseRequestFromMessage:function(e){return new Uint8Array(e)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null}}}H.__dashjs_factory_name="KeySystemWidevine";var Y=T.A.getSingletonFactory(H),V=(n(3690),u.A.PLAYREADY_UUID),q=u.A.PLAYREADY_KEYSTEM_STRING,K="urn:uuid:"+V;function j(e){var t="utf-16",n=(e=e||{}).BASE64,r=e.settings;function i(){if(!n||!n.hasOwnProperty("decodeArray")||!n.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")}return{uuid:V,schemeIdURI:K,systemString:q,getInitData:function(e){var t,r,a,o,s,u=new Uint8Array([112,115,115,104,0,0,0,0]),c=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),f=0,d=null;if(i(),!e)return null;if("pssh"in e&&e.pssh)return l.parseInitDataFromContentProtection(e,n);if("pro"in e&&e.pro)d=n.decodeArray(e.pro.__text);else{if(!("prheader"in e)||!e.prheader)return null;d=n.decodeArray(e.prheader.__text)}return t=d.length,r=4+u.length+c.length+4+t,a=new ArrayBuffer(r),o=new Uint8Array(a),(s=new DataView(a)).setUint32(f,r),f+=4,o.set(u,f),f+=u.length,o.set(c,f),f+=c.length,s.setUint32(f,t),f+=4,o.set(d,f),f+=t,o.buffer},getRequestHeadersFromMessage:function(e){var n,i,a={},o=new DOMParser;if(r&&r.get().streaming.protection.detectPlayreadyMessageFormat&&"utf-16"===t&&e&&e.byteLength%2==1)return a["Content-Type"]="text/xml; charset=utf-8",a;var s="utf-16"===t?new Uint16Array(e):new Uint8Array(e);n=String.fromCharCode.apply(null,s);for(var u=(i=o.parseFromString(n,"application/xml")).getElementsByTagName("name"),c=i.getElementsByTagName("value"),l=0;l<u.length;l++)a[u[l].childNodes[0].nodeValue]=c[l].childNodes[0].nodeValue;return a.hasOwnProperty("Content")&&(a["Content-Type"]=a.Content,delete a.Content),a.hasOwnProperty("Content-Type")||(a["Content-Type"]="text/xml; charset=utf-8"),a},getLicenseRequestFromMessage:function(e){var a=null,o=new DOMParser;if(r&&r.get().streaming.protection.detectPlayreadyMessageFormat&&"utf-16"===t&&e&&e.byteLength%2==1)return e;var s="utf-16"===t?new Uint16Array(e):new Uint8Array(e);i();var u=String.fromCharCode.apply(null,s),c=o.parseFromString(u,"application/xml");if(!c.getElementsByTagName("PlayReadyKeyMessage")[0])return e;var l=c.getElementsByTagName("Challenge")[0].childNodes[0].nodeValue;return l&&(a=n.decode(l)),a},getLicenseServerURLFromInitData:function(e){if(e)for(var t=new DataView(e),n=t.getUint16(4,!0),r=6,i=new DOMParser,a=0;a<n;a++){var o=t.getUint16(r,!0);r+=2;var s=t.getUint16(r,!0);if(r+=2,1===o){var u=e.slice(r,r+s),c=String.fromCharCode.apply(null,new Uint16Array(u)),l=i.parseFromString(c,"application/xml");if(l.getElementsByTagName("LA_URL")[0]){var f=l.getElementsByTagName("LA_URL")[0].childNodes[0].nodeValue;if(f)return f}if(l.getElementsByTagName("LUI_URL")[0]){var d=l.getElementsByTagName("LUI_URL")[0].childNodes[0].nodeValue;if(d)return d}}else r+=s}return null},getCDMData:function(e){var t,r,a,o;if(i(),!e)return null;for(t=[],o=0;o<e.length;++o)t.push(e.charCodeAt(o)),t.push(0);for(t=String.fromCharCode.apply(null,t),t=n.encode(t),r='<PlayReadyCDMData type="LicenseAcquisition"><LicenseAcquisition version="1.0" Proactive="false"><CustomData encoding="base64encoded">%CUSTOMDATA%</CustomData></LicenseAcquisition></PlayReadyCDMData>'.replace("%CUSTOMDATA%",t),a=[],o=0;o<r.length;++o)a.push(r.charCodeAt(o)),a.push(0);return new Uint8Array(a).buffer},setPlayReadyMessageFormat:function(e){if("utf-8"!==e&&"utf-16"!==e)throw new Error('Specified message format is not one of "utf-8" or "utf-16"');t=e}}}j.__dashjs_factory_name="KeySystemPlayReady";var z=T.A.getSingletonFactory(j),W=u.A.FAIRPLAY_UUID,Q=u.A.FAIRPLAY_KEYSTEM_STRING,X="urn:uuid:"+W;function $(){return{uuid:W,schemeIdURI:X,systemString:Q,getInitData:function(){return null},getRequestHeadersFromMessage:function(){return{"Content-Type":"application/octet-stream"}},getLicenseRequestFromMessage:function(e){return new Uint8Array(e)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null}}}$.__dashjs_factory_name="KeySystemFairPlay";var Z=T.A.getSingletonFactory($);function J(e){var t=(e=e||{}).BASE64,n={};return n[u.A.WIDEVINE_KEYSTEM_STRING]={responseType:"json",getLicenseMessage:function(e){return t.decodeArray(e.license)},getErrorResponse:function(e){return e}},n[u.A.PLAYREADY_KEYSTEM_STRING]={responseType:"arraybuffer",getLicenseMessage:function(e){return e},getErrorResponse:function(e){return String.fromCharCode.apply(null,new Uint8Array(e))}},{getServerURLFromMessage:function(e){return e},getHTTPMethod:function(){return"POST"},getResponseType:function(e){return n[e].responseType},getLicenseMessage:function(e,r){return function(){if(!t||!t.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")}(),n[r].getLicenseMessage(e)},getErrorResponse:function(e,t){return n[t].getErrorResponse(e)}}}J.__dashjs_factory_name="DRMToday";var ee=T.A.getSingletonFactory(J);function te(){var e="http://schemas.xmlsoap.org/soap/envelope/";function t(e){var t=String.fromCharCode.apply(null,new Uint8Array(e));return decodeURIComponent(escape(t))}function n(n){if(window.DOMParser){var r=t(n),i=(new window.DOMParser).parseFromString(r,"text/xml"),a=i?i.getElementsByTagNameNS(e,"Envelope")[0]:null,o=a?a.getElementsByTagNameNS(e,"Body")[0]:null;if(o&&o.getElementsByTagNameNS(e,"Fault")[0])return null}return n}function r(n){var r="",i="",a="",o=-1,s=-1;if(window.DOMParser){var u=t(n),c=(new window.DOMParser).parseFromString(u,"text/xml"),l=c?c.getElementsByTagNameNS(e,"Envelope")[0]:null,f=l?l.getElementsByTagNameNS(e,"Body")[0]:null,d=f?f.getElementsByTagNameNS(e,"Fault")[0]:null,h=d?d.getElementsByTagName("detail")[0]:null,g=h?h.getElementsByTagName("Exception")[0]:null,p=null;if(null===d)return u;r=(p=d.getElementsByTagName("faultstring")[0].firstChild)?p.nodeValue:null,null!==g&&(i=(p=g.getElementsByTagName("StatusCode")[0])?p.firstChild.nodeValue:null,o=(a=(p=g.getElementsByTagName("Message")[0])?p.firstChild.nodeValue:null)?a.lastIndexOf("[")+1:-1,s=a?a.indexOf("]"):-1,a=a?a.substring(o,s):"")}var m="code: ".concat(i,", name: ").concat(r);return a&&(m+=", message: ".concat(a)),m}return{getServerURLFromMessage:function(e){return e},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"arraybuffer"},getLicenseMessage:function(e){return n.call(this,e)},getErrorResponse:function(e){return r.call(this,e)}}}n(28706),te.__dashjs_factory_name="PlayReady";var ne=T.A.getSingletonFactory(te);function re(){return{getServerURLFromMessage:function(e){return e},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"arraybuffer"},getLicenseMessage:function(e){return e},getErrorResponse:function(e){return String.fromCharCode.apply(null,new Uint8Array(e))}}}re.__dashjs_factory_name="Widevine";var ie=T.A.getSingletonFactory(re);function ae(){function e(e){for(var t=atob(e),n=new Uint8Array(t.length),r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n.buffer}return{getErrorResponse:function(e){return String.fromCharCode.apply(null,new Uint8Array(e))},getHTTPMethod:function(){return"POST"},getLicenseMessage:function(t){if(!t||!t.byteLength)return t;var n;try{n=String.fromCharCode.apply(null,new Uint8Array(t))}catch(e){for(var r=new Uint8Array(t),i="",a=0;a<r.length;a++)i+=String.fromCharCode(r[a]);n=i}if(!n)return t;if("<ckc>"===(n=n.trim()).substr(0,5)&&"</ckc>"===n.substr(-6))return e(n.slice(5,-6));try{var o=JSON.parse(n),s=o.ckc||o.CkcMessage||o.License;if(s)return e(s)}catch(e){}return/^[A-Za-z0-9+/\r\n]+=*$/.test(n)&&n.length>0?e(n):t},getResponseType:function(){return"arraybuffer"},getServerURLFromMessage:function(e){return e}}}n(90906),n(42762),ae.__dashjs_factory_name="FairPlay";var oe=T.A.getSingletonFactory(ae);function se(){return{getServerURLFromMessage:function(e){return e},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"json"},getLicenseMessage:function(e){if(!e.hasOwnProperty("keys"))return null;for(var t=[],n=0;n<e.keys.length;n++){var r=e.keys[n],i=r.kid.replace(/=/g,""),a=r.k.replace(/=/g,"");t.push(new R(i,a))}return new N(t)},getErrorResponse:function(e){return String.fromCharCode.apply(null,new Uint8Array(e))}}}se.__dashjs_factory_name="ClearKey";var ue=T.A.getSingletonFactory(se),ce=(0,o.A)((function e(t){(0,a.A)(this,e),this.ks=t.ks,this.keyId=t.keyId,this.initData=t.initData,this.protData=t.protData,this.cdmData=t.cdmData,this.sessionId=t.sessionId,this.sessionType=t.sessionType}));function le(){var e,t,n,r,i,a,o,s,c=this.context;function f(e){for(var t=0;t<r.length;t++)if(r[t].systemString===e)return r[t];return null}function d(e,t){return t&&e in t?t[e]:null}function h(e,t){return e&&e.sessionId?e.sessionId:t&&t.sessionId?t.sessionId:null}function g(e,t){return e&&e.sessionType?e.sessionType:t}return e={getKeySystemBySystemString:f,getKeySystems:function(){return r},getLicenseServerModelInstance:function(e,t,n){if(n===u.A.MEDIA_KEY_MESSAGE_TYPES.LICENSE_RELEASE||n===u.A.MEDIA_KEY_MESSAGE_TYPES.INDIVIDUALIZATION_REQUEST)return null;var r=null;return t&&t.hasOwnProperty("drmtoday")?r=ee(c).getInstance({BASE64:i}):e.systemString===u.A.WIDEVINE_KEYSTEM_STRING?r=ie(c).getInstance():e.systemString===u.A.FAIRPLAY_KEYSTEM_STRING?r=oe(c).getInstance():e.systemString===u.A.PLAYREADY_KEYSTEM_STRING?r=ne(c).getInstance():e.systemString===u.A.CLEARKEY_KEYSTEM_STRING&&(r=ue(c).getInstance()),r},getSupportedKeySystemMetadataForSinf:function(e,t,n){var r=f(u.A.FAIRPLAY_KEYSTEM_STRING);if(!r)return[];var i=function(e){if(!e||e.byteLength<12)return null;var t;try{var n=String.fromCharCode.apply(null,new Uint8Array(e)),r=JSON.parse(n);if(r.sinf&&r.sinf.length>0){var i=atob(r.sinf[0]);t=new Uint8Array(i.length);for(var a=0;a<i.length;a++)t[a]=i.charCodeAt(a)}}catch(n){t=new Uint8Array(e)}if(!t||t.length<12)return null;for(var o=0;o<t.length-28;o++)if(116===t[o]&&101===t[o+1]&&110===t[o+2]&&99===t[o+3]){var s=o+12;if(s+16>t.length)return null;var u=t.subarray(s,s+16),c=Array.from(u).map((function(e){return e.toString(16).padStart(2,"0")})).join("");return c.slice(0,8)+"-"+c.slice(8,12)+"-"+c.slice(12,16)+"-"+c.slice(16,20)+"-"+c.slice(20,32)}return null}(e),a=t&&t[u.A.FAIRPLAY_KEYSTEM_STRING]||null;return[{ks:r,keyId:i,initData:e,protData:a,cdmData:r.getCDMData(a?a.cdmData:null),sessionType:n}]},getSupportedKeySystemMetadataFromContentProtection:function(e,t,n){var i,a,o,s,u=[];if(!e||!e.length)return u;var c=l.findMp4ProtectionElement(e);for(o=0;o<r.length;o++){var f=d((a=r[o]).systemString,t);for(s=0;s<e.length;s++)if((i=e[s]).schemeIdUri.toLowerCase()===a.schemeIdURI){var p=a.getInitData(i,c),m=new ce({ks:r[o],keyId:i.keyId,initData:p,protData:f,cdmData:a.getCDMData(f?f.cdmData:null),sessionId:h(f,i),sessionType:g(f,n)});f?u.unshift(m):u.push(m)}}return u},getSupportedKeySystemMetadataFromSegmentPssh:function(e,t,n){for(var i,a=[],o=l.parsePSSHList(e),s=0;s<r.length;++s){var u=d((i=r[s]).systemString,t);i.uuid in o&&a.push({ks:i,initData:o[i.uuid],protData:u,cdmData:i.getCDMData(u?u.cdmData:null),sessionId:h(u),sessionType:g(u,n)})}return a},initDataEquals:function(e,t){if(e.byteLength===t.byteLength){for(var n=new Uint8Array(e),r=new Uint8Array(t),i=0;i<n.length;i++)if(n[i]!==r[i])return!1;return!0}return!1},initialize:function(){var e;r=[],e=z(c).getInstance({BASE64:i,settings:a}),r.push(e),e=Y(c).getInstance({BASE64:i}),r.push(e),e=Z(c).getInstance(),r.push(e),e=M(c).getInstance({BASE64:i}),r.push(e),o=e,e=U(c).getInstance({BASE64:i,debug:t}),r.push(e),s=e},isClearKey:function(e){return e===o||e===s},processClearKeyLicenseRequest:function(e,t,r){try{return e.getClearKeysFromProtectionData(t,r)}catch(e){return n.error("Failed to retrieve clearkeys from ProtectionData"),null}},setConfig:function(r){r&&(r.debug&&(t=r.debug,n=t.getLogger(e)),r.BASE64&&(i=r.BASE64),r.settings&&(a=r.settings))},setKeySystems:function(e){r=e},setProtectionData:function(e){for(var t,n,i=0;i<r.length;i++){var a=r[i];a.hasOwnProperty("init")&&a.init((t=a.systemString,n=void 0,n=null,e&&(n=t in e?e[t]:null),n))}}}}le.__dashjs_factory_name="ProtectionKeyController";var fe=T.A.getSingletonFactory(le),de=n(70445),he=(n(54554),(0,o.A)((function e(t,n){(0,a.A)(this,e),this.initData=t,this.initDataType=n}))),ge=(0,o.A)((function e(t,n,r,i){(0,a.A)(this,e),this.sessionToken=t,this.message=n,this.defaultURL=r,this.messageType=i||u.A.MEDIA_KEY_MESSAGE_TYPES.LICENSE_REQUEST})),pe=(0,o.A)((function e(t,n){(0,a.A)(this,e),this.keySystem=t,this.ksConfiguration=n,this.nativeMediaKeySystemAccessObject=null,this.selectedSystemString=null})),me={};function Ee(e){e=e||{};var t,n,r,i,a,o,s,c,l=this.context,f=e.eventBus,d=e.events,h=e.debug;function m(e,t,n,r){if(void 0===navigator.requestMediaKeySystemAccess||"function"!=typeof navigator.requestMediaKeySystemAccess){var i="Insecure origins are not allowed";return f.trigger(d.KEY_SYSTEM_ACCESS_COMPLETE,{error:i}),void r({error:i})}var a=e[t].protData&&e[t].protData.systemStringPriority?e[t].protData.systemStringPriority:null,o=e[t].configs,s=e[t].ks,u=s.systemString;(function(e,t){return new Promise((function(n,r){E(e,t,0,n,r)}))})(a||(me[u]?me[u]:[u]),o).then((function(e){var t=e&&e.nativeMediaKeySystemAccessObject&&"function"==typeof e.nativeMediaKeySystemAccessObject.getConfiguration?e.nativeMediaKeySystemAccessObject.getConfiguration():null,r=new pe(s,t);r.selectedSystemString=e.selectedSystemString,r.nativeMediaKeySystemAccessObject=e.nativeMediaKeySystemAccessObject,f.trigger(d.KEY_SYSTEM_ACCESS_COMPLETE,{data:r}),n({data:r})})).catch((function(i){if(t+1<e.length)m(e,t+1,n,r);else{var a="Key system access denied! ";f.trigger(d.KEY_SYSTEM_ACCESS_COMPLETE,{error:a+i.message}),r({error:a+i.message})}}))}function E(e,t,r,i,a){var o=e[r];n.debug("Requesting key system access for system string ".concat(o)),navigator.requestMediaKeySystemAccess(o,t).then((function(e){i({nativeMediaKeySystemAccessObject:e,selectedSystemString:o})})).catch((function(n){r+1<e.length?E(e,t,r+1,i,a):a(n)}))}function v(e){if(!e||!e.session)return Promise.resolve;var t=e.session;return t.removeEventListener("keystatuseschange",e),t.removeEventListener("message",e),t.close()}function A(e){for(var t=0;t<o.length;t++)if(o[t]===e){o.splice(t,1);break}}function y(e,t){var r={session:e,keyId:t.keyId,normalizedKeyId:t&&t.keyId&&"string"==typeof t.keyId?t.keyId.replace(/-/g,"").toLowerCase():"",initData:t.initData,sessionId:t.sessionId,sessionType:t.sessionType,hasTriggeredKeyStatusMapUpdate:!1,handleEvent:function(e){switch(e.type){case"keystatuseschange":this._onKeyStatusesChange(e);break;case"message":this._onKeyMessage(e)}},_onKeyStatusesChange:function(e){f.trigger(d.KEY_STATUSES_CHANGED,{data:this});var t=[];e.target.keyStatuses.forEach((function(){t.push(T(arguments))})),f.trigger(d.INTERNAL_KEY_STATUSES_CHANGED,{parsedKeyStatuses:t,sessionToken:r})},_onKeyMessage:function(e){var t=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;f.trigger(d.INTERNAL_KEY_MESSAGE,{data:new ge(this,t,void 0,e.messageType)})},getKeyId:function(){return this.keyId},getSessionId:function(){return e.sessionId},getSessionType:function(){return this.sessionType},getExpirationTime:function(){return e.expiration},getKeyStatuses:function(){return e.keyStatuses},getUsable:function(){var t=!1;return e.keyStatuses.forEach((function(){T(arguments).status===u.A.MEDIA_KEY_STATUSES.USABLE&&(t=!0)})),t}};return e.addEventListener("keystatuseschange",r),e.addEventListener("message",r),e.closed.then((function(){A(r),n.debug("DRM: Session closed. SessionID = "+r.getSessionId()),f.trigger(d.KEY_SESSION_CLOSED,{data:r.getSessionId()})})),o.push(r),r}function T(e){var t,n;return e&&e.length>0&&(e[0]&&("string"==typeof e[0]?t=e[0]:n=e[0]),e[1]&&("string"==typeof e[1]?t=e[1]:n=e[1])),{status:t,keyId:n}}return t={closeKeySession:function(e){v(e).catch((function(t){A(e),f.trigger(d.KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+e.getSessionId()+") "+t.name})}))},createKeySession:function(e){if(!r||!a)throw new Error("Can not create sessions until you have selected a key system");var t,i=a.createSession(e.sessionType),o=y(i,e);t=r.systemString===u.A.CLEARKEY_KEYSTEM_STRING&&(e.initData||e.protData&&e.protData.clearkeys)?u.A.INITIALIZATION_DATA_TYPE_KEYIDS:r.systemString===u.A.FAIRPLAY_KEYSTEM_STRING?u.A.INITIALIZATION_DATA_TYPE_SINF:u.A.INITIALIZATION_DATA_TYPE_CENC,i.generateRequest(t,e.initData).then((function(){n.debug("DRM: Session created. SessionID = "+o.getSessionId()),f.trigger(d.KEY_SESSION_CREATED,{data:o})})).catch((function(e){A(o),f.trigger(d.KEY_SESSION_CREATED,{data:null,error:new p.A(g.A.KEY_SESSION_CREATED_ERROR_CODE,g.A.KEY_SESSION_CREATED_ERROR_MESSAGE+"Error generating key request -- "+e.name)})}))},getAllInitData:function(){for(var e=[],t=0;t<o.length;t++)o[t].initData&&e.push(o[t].initData);return e},getSessionTokens:function(){return o},loadKeySession:function(e){if(!r||!a)throw new Error("Can not load sessions until you have selected a key system");for(var t=e.sessionId,i=0;i<o.length;i++)if(t===o[i].sessionId)return void n.warn("DRM: Ignoring session ID because we have already seen it!");var s=a.createSession(e.sessionType),u=y(s,e);u.hasTriggeredKeyStatusMapUpdate=!0,s.load(t).then((function(e){e?(n.debug("DRM: Session loaded. SessionID = "+u.getSessionId()),f.trigger(d.KEY_SESSION_CREATED,{data:u})):(A(u),f.trigger(d.KEY_SESSION_CREATED,{data:null,error:new p.A(g.A.KEY_SESSION_CREATED_ERROR_CODE,g.A.KEY_SESSION_CREATED_ERROR_MESSAGE+"Could not load session! Invalid Session ID ("+t+")")}))})).catch((function(e){A(u),f.trigger(d.KEY_SESSION_CREATED,{data:null,error:new p.A(g.A.KEY_SESSION_CREATED_ERROR_CODE,g.A.KEY_SESSION_CREATED_ERROR_MESSAGE+"Could not load session ("+t+")! "+e.name)})}))},removeKeySession:function(e){e.session.remove().then((function(){n.debug("DRM: Session removed. SessionID = "+e.getSessionId()),f.trigger(d.KEY_SESSION_REMOVED,{data:e.getSessionId()})}),(function(t){f.trigger(d.KEY_SESSION_REMOVED,{data:null,error:"Error removing session ("+e.getSessionId()+"). "+t.name})}))},requestKeySystemAccess:function(e){return new Promise((function(t,n){m(e,0,t,n)}))},reset:function(){var e,t=o.length;if(0!==t)for(var n=function(e){A(e),0===o.length&&(i?(i.removeEventListener("encrypted",s),i.setMediaKeys(null).then((function(){f.trigger(d.TEARDOWN_COMPLETE)}))):f.trigger(d.TEARDOWN_COMPLETE))},r=0;r<t;r++)!function(t){v(e),n(t)}(e=o[r]);else f.trigger(d.TEARDOWN_COMPLETE)},selectKeySystem:function(e){return new Promise((function(t,n){e.nativeMediaKeySystemAccessObject.createMediaKeys().then((function(t){return r=e.keySystem,a=t,i?i.setMediaKeys(a):Promise.resolve()})).then((function(){t(r)})).catch((function(){n({error:"Error selecting keys system ("+e.keySystem.systemString+")! Could not create MediaKeys -- TODO"})}))}))},setMediaElement:function(e){i!==e&&(i&&(i.removeEventListener("encrypted",s),i.setMediaKeys&&i.setMediaKeys(null)),(i=e)&&(i.addEventListener("encrypted",s),i.setMediaKeys&&a&&i.setMediaKeys(a)))},setServerCertificate:function(e){return new Promise((function(t,r){a.setServerCertificate(e).then((function(){n.info("DRM: License server certificate successfully updated."),f.trigger(d.SERVER_CERTIFICATE_UPDATED),t()})).catch((function(e){r(e),f.trigger(d.SERVER_CERTIFICATE_UPDATED,{error:new p.A(g.A.SERVER_CERTIFICATE_UPDATED_ERROR_CODE,g.A.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE+e.name)})}))}))},stop:function(){for(var e,t=0;t<o.length;t++)(e=o[t]).getUsable()||(v(e),A(e))},updateKeySession:function(e,t){var n=e.session;c.isClearKey(r)&&(t=t.toJWK()),n.update(t).then((function(){f.trigger(d.KEY_SESSION_UPDATED)})).catch((function(t){f.trigger(d.KEY_ERROR,{error:new p.A(g.A.MEDIA_KEYERR_CODE,"Error sending update() message! "+t.name,e)})}))}},n=h.getLogger(t),r=null,i=null,a=null,o=[],c=fe(l).getInstance(),s={handleEvent:function(e){if("encrypted"===e.type&&e.initData){var t=ArrayBuffer.isView(e.initData)?e.initData.buffer:e.initData;f.trigger(d.NEED_KEY,{key:new he(t,e.initDataType)})}}},t}me[u.A.PLAYREADY_KEYSTEM_STRING]=[u.A.PLAYREADY_KEYSTEM_STRING,u.A.PLAYREADY_RECOMMENDATION_KEYSTEM_STRING],me[u.A.WIDEVINE_KEYSTEM_STRING]=[u.A.WIDEVINE_KEYSTEM_STRING],me[u.A.FAIRPLAY_KEYSTEM_STRING]=[u.A.FAIRPLAY_KEYSTEM_STRING],me[u.A.CLEARKEY_KEYSTEM_STRING]=[u.A.CLEARKEY_KEYSTEM_STRING],Ee.__dashjs_factory_name="DefaultProtectionModel";var ve=T.A.getClassFactory(Ee);function Ae(e){e=e||{};var t,n,r,i,a,o,s,c,l,f=this.context,d=e.eventBus,m=e.events,E=e.debug,v=e.api;function A(){try{for(var e=0;e<s.length;e++)y(s[e]);r&&r.removeEventListener(v.needkey,c),d.trigger(m.TEARDOWN_COMPLETE)}catch(e){d.trigger(m.TEARDOWN_COMPLETE,{error:"Error tearing down key sessions and MediaKeys! -- "+e.message})}}function y(e){var t=e.session;t.removeEventListener(v.error,e),t.removeEventListener(v.message,e),t.removeEventListener(v.ready,e),t.removeEventListener(v.close,e);for(var n=0;n<s.length;n++)if(s[n]===e){s.splice(n,1);break}t[v.release]()}function T(){var e=null,t=function(){r.removeEventListener("loadedmetadata",e),r[v.setMediaKeys](a),d.trigger(m.VIDEO_ELEMENT_SELECTED)};r.readyState>=1?t():(e=t.bind(this),r.addEventListener("loadedmetadata",e))}return t={getAllInitData:function(){for(var e=[],t=0;t<s.length;t++)e.push(s[t].initData);return e},getSessionTokens:function(){return s},requestKeySystemAccess:function(e){return new Promise((function(t,n){for(var r=!1,i=0;i<e.length;i++)for(var a=e[i].ks.systemString,o=e[i].configs,s=null,u=null,c=0;c<o.length;c++){var f=o[c].audioCapabilities,g=o[c].videoCapabilities;if(f&&0!==f.length){s=[];for(var p=0;p<f.length;p++)window[v.MediaKeys].isTypeSupported(a,f[p].contentType)&&s.push(f[p])}if(g&&0!==g.length){u=[];for(var E=0;E<g.length;E++)window[v.MediaKeys].isTypeSupported(a,g[E].contentType)&&u.push(g[E])}if(!(!s&&!u||s&&0===s.length||u&&0===u.length)){r=!0;var A=new h(s,u),y=l.getKeySystemBySystemString(a),T=new pe(y,A);d.trigger(m.KEY_SYSTEM_ACCESS_COMPLETE,{data:T}),t({data:T});break}}if(!r){var _="Key system access denied! -- No valid audio/video content configurations detected!";d.trigger(m.KEY_SYSTEM_ACCESS_COMPLETE,{error:_}),n({error:_})}}))},selectKeySystem:function(e){return new Promise((function(t,n){try{a=e.mediaKeys=new window[v.MediaKeys](e.keySystem.systemString),i=e.keySystem,o=e,r&&T(),t(i)}catch(e){n({error:"Error selecting keys system ("+i.systemString+")! Could not create MediaKeys -- TODO"})}}))},setMediaElement:function(e){r!==e&&(r&&r.removeEventListener(v.needkey,c),(r=e)&&(r.addEventListener(v.needkey,c),a&&T()))},createKeySession:function(e){if(!i||!a||!o)throw new Error("Can not create sessions until you have selected a key system");var t=null;if(o.ksConfiguration.videoCapabilities&&o.ksConfiguration.videoCapabilities.length>0&&(t=o.ksConfiguration.videoCapabilities[0]),null===t&&o.ksConfiguration.audioCapabilities&&o.ksConfiguration.audioCapabilities.length>0&&(t=o.ksConfiguration.audioCapabilities[0]),null===t)throw new Error("Can not create sessions for unknown content types.");var r=t.contentType,u=a.createSession(r,new Uint8Array(e.initData),e.cdmData?new Uint8Array(e.cdmData):null),c=function(e,t){return{session:e,keyId:t.keyId,normalizedKeyId:t&&t.keyId&&"string"==typeof t.keyId?t.keyId.replace(/-/g,"").toLowerCase():"",initData:t.initData,hasTriggeredKeyStatusMapUpdate:!1,getKeyId:function(){return this.keyId},getSessionId:function(){return this.session.sessionId},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"},getKeyStatuses:function(){return{size:0,has:function(){return!1},get:function(){}}},handleEvent:function(e){switch(e.type){case v.error:d.trigger(m.KEY_ERROR,{error:new p.A(g.A.MEDIA_KEYERR_CODE,"KeyError",this)});break;case v.message:var t=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;d.trigger(m.INTERNAL_KEY_MESSAGE,{data:new ge(this,t,e.destinationURL)});break;case v.ready:n.debug("DRM: Key added."),d.trigger(m.KEY_ADDED);break;case v.close:n.debug("DRM: Session closed. SessionID = "+this.getSessionId()),d.trigger(m.KEY_SESSION_CLOSED,{data:this.getSessionId()})}}}}(u,e);u.addEventListener(v.error,c),u.addEventListener(v.message,c),u.addEventListener(v.ready,c),u.addEventListener(v.close,c),s.push(c),n.debug("DRM: Session created. SessionID = "+c.getSessionId()),d.trigger(m.KEY_SESSION_CREATED,{data:c})},updateKeySession:function(e,t){var n=e.session;l.isClearKey(i)?n.update(new Uint8Array(t.toJWK())):n.update(new Uint8Array(t)),d.trigger(m.KEY_SESSION_UPDATED)},closeKeySession:y,setServerCertificate:function(){return Promise.resolve()},loadKeySession:function(){},removeKeySession:function(){},stop:A,reset:A},n=E.getLogger(t),r=null,i=null,a=null,o=null,s=[],l=fe(f).getInstance(),c={handleEvent:function(e){if(e.type===v.needkey&&e.initData){var t=ArrayBuffer.isView(e.initData)?e.initData.buffer:e.initData;d.trigger(m.NEED_KEY,{key:new he(t,u.A.INITIALIZATION_DATA_TYPE_CENC)})}}},t}Ae.__dashjs_factory_name="ProtectionModel_3Feb2014";var ye=T.A.getClassFactory(Ae);function Te(e){e=e||{};var t,n,r,i,a,o,s,c,l,f=this.context,d=e.eventBus,m=e.events,E=e.debug,v=e.api,A=e.errHandler;function y(){r&&S();for(var e=0;e<s.length;e++)T(s[e]);d.trigger(m.TEARDOWN_COMPLETE)}function T(e){try{r[v.cancelKeyRequest](i.systemString,e.sessionId)}catch(t){d.trigger(m.KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+e.sessionId+") "+t.message})}}function _(e,t){if(t&&e){for(var n=e.length,r=0;r<n;r++)if(e[r].sessionId==t)return e[r];return null}return null}function S(){r.removeEventListener(v.keyerror,l),r.removeEventListener(v.needkey,l),r.removeEventListener(v.keymessage,l),r.removeEventListener(v.keyadded,l)}return t={getAllInitData:function(){for(var e=[],t=0;t<o.length;t++)e.push(o[t].initData);for(var n=0;n<s.length;n++)e.push(s[n].initData);return e},getSessionTokens:function(){return s.concat(o)},requestKeySystemAccess:function(e){return new Promise((function(t,n){var i=r;i||(i=document.createElement("video"));for(var o=!1,s=0;s<e.length;s++)for(var u=e[s].ks.systemString,c=e[s].configs,l=null,f=0;f<c.length;f++){var g=c[f].videoCapabilities;if(g&&0!==g.length){l=[];for(var p=0;p<g.length;p++)""!==i.canPlayType(g[p].contentType,u)&&l.push(g[p])}if(l&&(!l||0!==l.length)){o=!0;var E=new h(null,l),v=a.getKeySystemBySystemString(u),A=new pe(v,E);d.trigger(m.KEY_SYSTEM_ACCESS_COMPLETE,{data:A}),t({data:A});break}}if(!o){var y="Key system access denied! -- No valid audio/video content configurations detected!";d.trigger(m.KEY_SYSTEM_ACCESS_COMPLETE,{error:y}),n({error:y})}}))},selectKeySystem:function(e){return i=e.keySystem,Promise.resolve(i)},setMediaElement:function(e){if(r!==e){if(r){S();for(var t=0;t<s.length;t++)T(s[t]);s=[]}(r=e)&&(r.addEventListener(v.keyerror,l),r.addEventListener(v.needkey,l),r.addEventListener(v.keymessage,l),r.addEventListener(v.keyadded,l),d.trigger(m.VIDEO_ELEMENT_SELECTED))}},createKeySession:function(e){if(!i)throw new Error("Can not create sessions until you have selected a key system");if(c||0===s.length){var t={sessionId:null,keyId:e.keyId,normalizedKeyId:e&&e.keyId&&"string"==typeof e.keyId?e.keyId.replace(/-/g,"").toLowerCase():"",initData:e.initData,hasTriggeredKeyStatusMapUpdate:!1,getKeyId:function(){return this.keyId},getSessionId:function(){return this.sessionId},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"},getKeyStatuses:function(){return{size:0,has:function(){return!1},get:function(){}}}};return o.push(t),r[v.generateKeyRequest](i.systemString,new Uint8Array(e.initData)),t}throw new Error("Multiple sessions not allowed!")},updateKeySession:function(e,t){var n=e.sessionId;if(a.isClearKey(i))for(var o=0;o<t.keyPairs.length;o++)r[v.addKey](i.systemString,t.keyPairs[o].key,t.keyPairs[o].keyID,n);else r[v.addKey](i.systemString,new Uint8Array(t),new Uint8Array(e.initData),n);d.trigger(m.KEY_SESSION_UPDATED)},closeKeySession:T,setServerCertificate:function(){return Promise.resolve()},loadKeySession:function(){},removeKeySession:function(){},stop:y,reset:y},n=E.getLogger(t),r=null,i=null,o=[],s=[],a=fe(f).getInstance(),l={handleEvent:function(e){var t=null;switch(e.type){case v.needkey:var r=ArrayBuffer.isView(e.initData)?e.initData.buffer:e.initData;d.trigger(m.NEED_KEY,{key:new he(r,u.A.INITIALIZATION_DATA_TYPE_CENC)});break;case v.keyerror:if((t=_(s,e.sessionId))||(t=_(o,e.sessionId)),t){var i=g.A.MEDIA_KEYERR_CODE,a="";switch(e.errorCode.code){case 1:i=g.A.MEDIA_KEYERR_UNKNOWN_CODE,a+="MEDIA_KEYERR_UNKNOWN - "+g.A.MEDIA_KEYERR_UNKNOWN_MESSAGE;break;case 2:i=g.A.MEDIA_KEYERR_CLIENT_CODE,a+="MEDIA_KEYERR_CLIENT - "+g.A.MEDIA_KEYERR_CLIENT_MESSAGE;break;case 3:i=g.A.MEDIA_KEYERR_SERVICE_CODE,a+="MEDIA_KEYERR_SERVICE - "+g.A.MEDIA_KEYERR_SERVICE_MESSAGE;break;case 4:i=g.A.MEDIA_KEYERR_OUTPUT_CODE,a+="MEDIA_KEYERR_OUTPUT - "+g.A.MEDIA_KEYERR_OUTPUT_MESSAGE;break;case 5:i=g.A.MEDIA_KEYERR_HARDWARECHANGE_CODE,a+="MEDIA_KEYERR_HARDWARECHANGE - "+g.A.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE;break;case 6:i=g.A.MEDIA_KEYERR_DOMAIN_CODE,a+="MEDIA_KEYERR_DOMAIN - "+g.A.MEDIA_KEYERR_DOMAIN_MESSAGE}a+=" System Code = "+e.systemCode,d.trigger(m.KEY_ERROR,{error:new p.A(i,a,t)})}else n.error("No session token found for key error");break;case v.keyadded:(t=_(s,e.sessionId))||(t=_(o,e.sessionId)),t?(n.debug("DRM: Key added."),d.trigger(m.KEY_ADDED,{data:t})):n.debug("No session token found for key added");break;case v.keymessage:if((c=null!==e.sessionId&&void 0!==e.sessionId)?!(t=_(s,e.sessionId))&&o.length>0&&(t=o.shift(),s.push(t),t.sessionId=e.sessionId,d.trigger(m.KEY_SESSION_CREATED,{data:t})):o.length>0&&(t=o.shift(),s.push(t),0!==o.length&&A.error(new p.A(g.A.MEDIA_KEY_MESSAGE_ERROR_CODE,g.A.MEDIA_KEY_MESSAGE_ERROR_MESSAGE))),t){var l=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;t.keyMessage=l,d.trigger(m.INTERNAL_KEY_MESSAGE,{data:new ge(t,l,e.defaultURL)})}else n.warn("No session token found for key message")}}},t}Te.__dashjs_factory_name="ProtectionModel_01b";var _e=T.A.getClassFactory(Te),Se=[{generateKeyRequest:"generateKeyRequest",addKey:"addKey",cancelKeyRequest:"cancelKeyRequest",needkey:"needkey",keyerror:"keyerror",keyadded:"keyadded",keymessage:"keymessage"},{generateKeyRequest:"webkitGenerateKeyRequest",addKey:"webkitAddKey",cancelKeyRequest:"webkitCancelKeyRequest",needkey:"webkitneedkey",keyerror:"webkitkeyerror",keyadded:"webkitkeyadded",keymessage:"webkitkeymessage"}],Ie=[{setMediaKeys:"setMediaKeys",MediaKeys:"MediaKeys",release:"close",needkey:"needkey",error:"keyerror",message:"keymessage",ready:"keyadded",close:"keyclose"},{setMediaKeys:"msSetMediaKeys",MediaKeys:"MSMediaKeys",release:"close",needkey:"msneedkey",error:"mskeyerror",message:"mskeymessage",ready:"mskeyadded",close:"mskeyclose"}];function be(){var e,t=this.context;function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];if("function"==typeof e[r[Object.keys(r)[0]]])return r}return null}return e={createProtectionSystem:function(r){var i=null,a=fe(t).getInstance();a.setConfig({debug:r.debug,BASE64:r.BASE64,settings:r.settings}),a.initialize();var o=function(r){var i=r.debug,a=i.getLogger(e),o=r.eventBus,s=r.errHandler,u=r.videoModel?r.videoModel.getElement():null;return u&&void 0===u.onencrypted||u&&void 0===u.mediaKeys?n(u,Ie)?(a.info("EME detected on this user agent! (ProtectionModel_3Feb2014)"),ye(t).create({debug:i,eventBus:o,events:r.events,api:n(u,Ie)})):n(u,Se)?(a.info("EME detected on this user agent! (ProtectionModel_01b)"),_e(t).create({debug:i,eventBus:o,errHandler:s,events:r.events,api:n(u,Se)})):(a.warn("No supported version of EME detected on this user agent! - Attempts to play encrypted content will fail!"),null):(a.info("EME detected on this user agent! (DefaultProtectionModel"),ve(t).create({debug:i,eventBus:o,events:r.events}))}(r);return o&&(i=b(t).create({BASE64:r.BASE64,cmcdController:r.cmcdController,constants:r.constants,customParametersModel:r.customParametersModel,debug:r.debug,eventBus:r.eventBus,events:r.events,protectionKeyController:a,protectionModel:o,settings:r.settings}),r.capabilities.setEncryptedMediaSupported(!0)),i}}}be.__dashjs_factory_name="Protection";var Re=T.A.getClassFactory(be);Re.events=de.A,Re.errors=g.A,T.A.updateClassFactory(be.__dashjs_factory_name,Re);var Ne=Re},70445:function(e,t,n){"use strict";n(60825);var r=n(85952),i=n(7718),a=n(8591),o=n(4597),s=n(18766);function u(e,t,n){return t=(0,o.A)(t),(0,a.A)(e,c()?Reflect.construct(t,n||[],(0,o.A)(e).constructor):t.apply(e,n))}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}var l=new(function(e){function t(){var e;return(0,i.A)(this,t),(e=u(this,t)).INTERNAL_KEY_MESSAGE="internalKeyMessage",e.INTERNAL_KEY_STATUSES_CHANGED="internalkeyStatusesChanged",e.KEY_ADDED="public_keyAdded",e.KEY_ERROR="public_keyError",e.KEY_MESSAGE="public_keyMessage",e.KEY_SESSION_CLOSED="public_keySessionClosed",e.KEY_SESSION_CREATED="public_keySessionCreated",e.KEY_SESSION_REMOVED="public_keySessionRemoved",e.KEY_STATUSES_CHANGED="public_keyStatusesChanged",e.KEY_STATUSES_MAP_UPDATED="keyStatusesMapUpdated",e.KEY_SYSTEM_ACCESS_COMPLETE="public_keySystemAccessComplete",e.KEY_SYSTEM_SELECTED="public_keySystemSelected",e.LICENSE_REQUEST_COMPLETE="public_licenseRequestComplete",e.LICENSE_REQUEST_SENDING="public_licenseRequestSending",e.NEED_KEY="needkey",e.PROTECTION_CREATED="public_protectioncreated",e.PROTECTION_DESTROYED="public_protectiondestroyed",e.SERVER_CERTIFICATE_UPDATED="serverCertificateUpdated",e.TEARDOWN_COMPLETE="protectionTeardownComplete",e.VIDEO_ELEMENT_SELECTED="videoElementSelected",e.KEY_SESSION_UPDATED="public_keySessionUpdated",e}return(0,s.A)(t,e),(0,r.A)(t)}(n(47252).A));t.A=l},21923:function(e,t,n){"use strict";n(60825);var r=n(85952),i=n(7718),a=n(8591),o=n(4597),s=n(18766);function u(e,t,n){return t=(0,o.A)(t),(0,a.A)(e,c()?Reflect.construct(t,n||[],(0,o.A)(e).constructor):t.apply(e,n))}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}var l=new(function(e){function t(){var e;return(0,i.A)(this,t),(e=u(this,t)).MEDIA_KEYERR_CODE=100,e.MEDIA_KEYERR_UNKNOWN_CODE=101,e.MEDIA_KEYERR_CLIENT_CODE=102,e.MEDIA_KEYERR_SERVICE_CODE=103,e.MEDIA_KEYERR_OUTPUT_CODE=104,e.MEDIA_KEYERR_HARDWARECHANGE_CODE=105,e.MEDIA_KEYERR_DOMAIN_CODE=106,e.MEDIA_KEY_MESSAGE_ERROR_CODE=107,e.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE=108,e.SERVER_CERTIFICATE_UPDATED_ERROR_CODE=109,e.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE=110,e.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE=111,e.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE=112,e.KEY_SESSION_CREATED_ERROR_CODE=113,e.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE=114,e.MEDIA_KEYERR_UNKNOWN_MESSAGE="An unspecified error occurred. This value is used for errors that don't match any of the other codes.",e.MEDIA_KEYERR_CLIENT_MESSAGE="The Key System could not be installed or updated.",e.MEDIA_KEYERR_SERVICE_MESSAGE="The message passed into update indicated an error from the license service.",e.MEDIA_KEYERR_OUTPUT_MESSAGE="There is no available output device with the required characteristics for the content protection system.",e.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE="A hardware configuration change caused a content protection error.",e.MEDIA_KEYERR_DOMAIN_MESSAGE="An error occurred in a multi-device domain licensing configuration. The most common error is a failure to join the domain.",e.MEDIA_KEY_MESSAGE_ERROR_MESSAGE="Multiple key sessions were creates with a user-agent that does not support sessionIDs!! Unpredictable behavior ahead!",e.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE="DRM: Empty key message from CDM",e.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE="Error updating server certificate -- ",e.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE="DRM: KeyStatusChange error! -- License has expired",e.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE="DRM: No license server URL specified!",e.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE="DRM: KeySystem Access Denied! -- ",e.KEY_SESSION_CREATED_ERROR_MESSAGE="DRM: unable to create session! --",e.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE="DRM: licenser error! --",e}return(0,s.A)(t,e),(0,r.A)(t)}(n(78748).A));t.A=l},94246:function(e,t,n){"use strict";var r=n(90138),i={DEFAULT:.5,STRONG:1,WEAK:0};function a(e,t,n,r){var a,o;return o=i.DEFAULT,(a=n)!==i.DEFAULT&&a!==i.STRONG&&a!==i.WEAK||(o=a),{representation:void 0===e?null:e,reason:void 0===t?null:t,rule:void 0===r?null:r,priority:o}}a.__dashjs_factory_name="SwitchRequest";var o=r.A.getClassFactory(a);o.NO_CHANGE=null,o.PRIORITY=i,r.A.updateClassFactory(a.__dashjs_factory_name,o),t.A=o},30559:function(e,t,n){"use strict";n.d(t,{a:function(){return d}});var r=n(91975),i=n(50544),a=(n(52675),n(2008),n(50113),n(74423),n(23792),n(62062),n(44114),n(18111),n(22489),n(20116),n(7588),n(61701),n(13579),n(26099),n(83851),n(81278),n(79432),n(3362),n(96167),n(21699),n(47764),n(23500),n(62953),n(90138)),o=n(35212),s=n(92861),u=n(7393),c=n(649);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){(0,i.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(){var e="ManagedMediaSource"in window,t="WebKitMediaSource"in window,n="MediaSource"in window;return e||t||n}function h(){var e,t,n,i,a,l,h=this.context,g=(0,u.A)(h).getInstance();function p(e,t){var n;t===o.A.VIDEO?n=function(e){var t={video:{}};return e?(e.width&&(t.video.width=e.width),e.height&&(t.video.height=e.height),e.framerate&&(t.video.framerate=parseFloat(e.framerate)),e.hdrMetadataType&&(t.video.hdrMetadataType=e.hdrMetadataType),e.colorGamut&&(t.video.colorGamut=e.colorGamut),e.transferFunction&&(t.video.transferFunction=e.transferFunction),t):t}(e):t===o.A.AUDIO&&(n=function(e){var t={audio:{}};return e.samplerate&&(t.audio.samplerate=e.samplerate),e.channels&&(t.audio.channels=e.channels),t}(e)),n[t].contentType=e.codec,n[t].bitrate=parseInt(e.bitrate),n.type="media-source";var r=e.codec;return e.width&&e.height&&(r+=';width="'+e.width+'";height="'+e.height+'"'),n.mediaSourceCodecString=r,function(e,t,n){if(!t||!t.keySystemsMetadata||0===t.keySystemsMetadata.length)return[e];var r=[];return t.keySystemsMetadata.forEach((function(t){if(t.ks){var i=t.protData&&t.protData.systemStringPriority?t.protData.systemStringPriority:null,a=t.ks.systemString;(i||[a]).forEach((function(i){var a=f({},e);a.keySystemConfiguration={},i&&(a.keySystemConfiguration.keySystem=i);var u="";t.ks.systemString===s.A.WIDEVINE_KEYSTEM_STRING&&(u=s.A.ROBUSTNESS_STRINGS.WIDEVINE.SW_SECURE_CRYPTO);var c=t.protData,l=c&&c.audioRobustness&&c.audioRobustness.length>0?c.audioRobustness:u,d=c&&c.videoRobustness&&c.videoRobustness.length>0?c.videoRobustness:u;n===o.A.AUDIO?a.keySystemConfiguration[n]={robustness:l}:n===o.A.VIDEO&&(a.keySystemConfiguration[n]={robustness:d}),r.push(a)}))}else r.push(f({},e))})),r}(n,e,t)}function m(e){return t.get().streaming.enhancement.codecs.some((function(t){return e.includes(t)}))}function E(e){if(i&&0!==i.length&&e)return i.find((function(t){var n=v(e,t,o.A.AUDIO),r=v(e,t,o.A.VIDEO),i=v(e,t,"keySystemConfiguration");return n&&r&&i}))}function v(e,t,n){return!e[n]&&!t[n]||!(!e[n]||!t[n])&&g.areEqual(e[n],t[n])}function A(e,t){var n;return(n=e=e.filter((function(e){return!(e.schemeIdUri&&t.some((function(t){return t.schemeIdUri===e.schemeIdUri})))}))).push.apply(n,(0,r.A)(t)),e}return e={areKeyIdsExpired:function(e){return!!(n&&e&&e.normalizedKeyIds&&0!==e.normalizedKeyIds.size)&&n.areKeyIdsExpired(e.normalizedKeyIds)},areKeyIdsUsable:function(e){return!(n&&e&&e.normalizedKeyIds&&0!==e.normalizedKeyIds.size)||n.areKeyIdsUsable(e.normalizedKeyIds)},isCodecSupportedBasedOnTestedConfigurations:function(e,t){if(!e||!e.codec||!1===e.isSupported)return!1;var n=p(e,t).map((function(e){return E(e)})).filter((function(e){return null!=e}));return!(n&&n.length>0)||function(e){return e.some((function(e){return e&&e.decodingInfo&&e.decodingInfo.supported}))}(n)},isProtectionCompatible:function(e,t){return!t||!(!e.isEncrypted&&t.isEncrypted)},runCodecSupportCheck:function(e,n){if(n!==o.A.AUDIO&&n!==o.A.VIDEO)return Promise.resolve();if(t.get().streaming.enhancement.enabled&&m(e.codec))return i=i.filter((function(e){return!m(e.mediaSourceCodecString)})),Promise.resolve(!0);var r=p(e,n);return function(e,n){return t.get().streaming.capabilities.useMediaCapabilitiesApi&&navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo&&(e.codec&&n===o.A.AUDIO||n===o.A.VIDEO&&e.codec&&e.width&&e.height&&e.bitrate&&e.framerate)}(e,n)?function(e){return new Promise((function(t){if(e&&0!==e.length){var n=e.map((function(e){return function(e){return new Promise((function(t){E(e)?t():navigator.mediaCapabilities.decodingInfo(e).then((function(n){e.decodingInfo=n,i.push(e),t()})).catch((function(n){e.decodingInfo={supported:!1},i.push(e),l.error(n),t()}))}))}(e)}));Promise.allSettled(n).then((function(){t()})).catch((function(e){l.error(e),t()}))}else t()}))}(r):(function(e){if(e&&e.length){var t=e[0];if(!E(t)){var n={supported:!1};("ManagedMediaSource"in window&&ManagedMediaSource.isTypeSupported(t.mediaSourceCodecString)||"MediaSource"in window&&MediaSource.isTypeSupported(t.mediaSourceCodecString)||"WebKitMediaSource"in window&&WebKitMediaSource.isTypeSupported(t.mediaSourceCodecString))&&(n.supported=!0),t.decodingInfo=n,i.push(t)}}}(r),Promise.resolve())},setConfig:function(e){e&&(e.settings&&(t=e.settings),e.protectionController&&(n=e.protectionController))},setEncryptedMediaSupported:function(e){a=e},setProtectionController:function(e){n=e},supportsChangeType:function(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType},supportsEncryptedMedia:function(){return a},supportsEssentialProperty:function(e){var n=t.get().streaming.capabilities.supportedEssentialProperties;t.get().streaming.capabilities.useMediaCapabilitiesApi&&t.get().streaming.capabilities.filterVideoColorimetryEssentialProperties&&(n=A(n,[{schemeIdUri:o.A.COLOUR_PRIMARIES_SCHEME_ID_URI},{schemeIdUri:o.A.MATRIX_COEFFICIENTS_SCHEME_ID_URI},{schemeIdUri:o.A.TRANSFER_CHARACTERISTICS_SCHEME_ID_URI}])),t.get().streaming.capabilities.useMediaCapabilitiesApi&&t.get().streaming.capabilities.filterHDRMetadataFormatEssentialProperties&&(n=A(n,[{schemeIdUri:o.A.HDR_METADATA_FORMAT_SCHEME_ID_URI}]));try{return e.inArray(n)}catch(e){return!0}},supportsMediaSource:d},a=!1,i=[],l=(0,c.A)(h).getInstance().getLogger(e),e}h.__dashjs_factory_name="Capabilities",t.A=a.A.getSingletonFactory(h)},41349:function(e,t,n){"use strict";var r=n(34299);function i(e){return e?(Array.isArray(e)?e:[e]).map((function(e){if(!e)return null;if("string"==typeof e){var t=e.trim();return t?{url:t,certType:null}:null}if("object"===(0,r.A)(e)){var n=(e.__text||e.text||"").trim();n||"string"!=typeof e.url||(n=e.url.trim());var i=e.certType||e["@certType"]||null;return i&&"string"==typeof i?""===(i=i.trim())&&(i=null):i=null,n?{url:n,certType:i}:null}return null})).filter(Boolean):[]}function a(e){if(!Array.isArray(e)||0===e.length)return[];for(var t=new Set,n=[],r=0;r<e.length;r++){var i=e[r];if(i&&i.url){var a=i.url+"||"+(i.certType||"");t.has(a)||(t.add(a),n.push(i))}}return n}n(2008),n(23792),n(62062),n(44114),n(18111),n(22489),n(7588),n(61701),n(79432),n(26099),n(31415),n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698),n(47764),n(42762),n(23500),n(62953),t.A={normalizeCertUrls:i,dedupeCertUrls:a,sanitizeProtectionDataCertUrls:function(e){return e&&"object"===(0,r.A)(e)&&Object.keys(e).forEach((function(t){var n=e[t];n&&Array.isArray(n.certUrls)&&(n.certUrls=a(i(n.certUrls)))})),e}}},17377:function(e,t,n){"use strict";n(54554);var r=n(90138),i=n(70656);function a(){return{customTimeRangeArray:[],length:0,add:function(e,t){var n;for(n=0;n<this.customTimeRangeArray.length&&e>this.customTimeRangeArray[n].start;n++);for(this.customTimeRangeArray.splice(n,0,{start:e,end:t}),n=0;n<this.customTimeRangeArray.length-1;n++)this.mergeRanges(n,n+1)&&n--;this.length=this.customTimeRangeArray.length},clear:function(){this.customTimeRangeArray=[],this.length=0},remove:function(e,t){for(var n=0;n<this.customTimeRangeArray.length;n++)if(e<=this.customTimeRangeArray[n].start&&t>=this.customTimeRangeArray[n].end)this.customTimeRangeArray.splice(n,1),n--;else{if(e>this.customTimeRangeArray[n].start&&t<this.customTimeRangeArray[n].end){this.customTimeRangeArray.splice(n+1,0,{start:t,end:this.customTimeRangeArray[n].end}),this.customTimeRangeArray[n].end=e;break}e>this.customTimeRangeArray[n].start&&e<this.customTimeRangeArray[n].end?this.customTimeRangeArray[n].end=e:t>this.customTimeRangeArray[n].start&&t<this.customTimeRangeArray[n].end&&(this.customTimeRangeArray[n].start=t)}this.length=this.customTimeRangeArray.length},mergeRanges:function(e,t){var n=this.customTimeRangeArray[e],r=this.customTimeRangeArray[t];return n.start<=r.start&&r.start<=n.end&&n.end<=r.end?(n.end=r.end,this.customTimeRangeArray.splice(t,1),!0):r.start<=n.start&&n.start<=r.end&&r.end<=n.end?(n.start=r.start,this.customTimeRangeArray.splice(t,1),!0):r.start<=n.start&&n.start<=r.end&&n.end<=r.end?(this.customTimeRangeArray.splice(e,1),!0):n.start<=r.start&&r.start<=n.end&&r.end<=n.end&&(this.customTimeRangeArray.splice(t,1),!0)},start:function(e){return(0,i.zQ)(e),e>=this.customTimeRangeArray.length||e<0?NaN:this.customTimeRangeArray[e].start},end:function(e){return(0,i.zQ)(e),e>=this.customTimeRangeArray.length||e<0?NaN:this.customTimeRangeArray[e].end}}}a.__dashjs_factory_name="CustomTimeRanges",t.A=r.A.getClassFactory(a)},9026:function(e,t,n){"use strict";n(23792),n(48598),n(26099),n(27495),n(90906),n(38781),n(47764),n(71761),n(62953),n(3296),n(27208),n(48408),n(14603),n(47566),n(98721);var r=n(90138);function i(){var e,t=/^[a-z][a-z0-9+\-_.]*:/i,n=/^https?:\/\//i,r=/^https:\/\//i,i=/^([a-z][a-z0-9+\-_.]*:\/\/[^\/]+)\/?/i,a=function(e,t){try{return new window.URL(e,t).toString()}catch(t){return e}},o=function(e,t){var n=s;if(!t)return e;if(!l(e))return e;f(e)&&(n=u),d(e)&&(n=c);var r=n(t),i="/"!==r.charAt(r.length-1)&&"/"!==e.charAt(0)?"/":"";return[r,e].join(i)};function s(e){var t=e.indexOf("/"),n=e.lastIndexOf("/");return-1!==t?n===t+1?e:(-1!==e.indexOf("?")&&(e=e.substring(0,e.indexOf("?"))),e.substring(0,n+1)):""}function u(e){var t=e.match(i);return t?t[1]:""}function c(e){var n=e.match(t);return n?n[0]:""}function l(e){return!t.test(e)}function f(e){return l(e)&&"/"===e.charAt(0)}function d(e){return 0===e.indexOf("//")}return function(){try{new window.URL("x","http://y"),e=a}catch(e){}finally{e=e||o}}(),{parseBaseUrl:s,parseOrigin:u,parseScheme:c,isRelative:l,isPathAbsolute:f,isSchemeRelative:d,isHTTPURL:function(e){return n.test(e)},isHTTPS:function(e){return r.test(e)},removeHostname:function(e){return/^(?:\w+\:\/\/)?([^\/]+)(.*)$/.exec(e)[2].substring(1)},resolve:function(t,n){return e(t,n)}}}i.__dashjs_factory_name="DefaultURLUtils",t.A=r.A.getSingletonFactory(i)},7393:function(e,t,n){"use strict";var r=n(90138),i=n(37316);function a(){return{areEqual:function(e,t){return i(e,t)}}}a.__dashjs_factory_name="ObjectUtils",t.A=r.A.getSingletonFactory(a)},70656:function(e,t,n){"use strict";n.d(t,{sq:function(){return a},zQ:function(){return o}});var r=n(34299),i=n(35212);function a(e,t){if((0,r.A)(e)!==t)throw i.A.BAD_ARGUMENT_ERROR}function o(e){if(null===e||isNaN(e)||e%1!=0)throw i.A.BAD_ARGUMENT_ERROR+" : argument is not an integer"}},46503:function(e,t,n){"use strict";n(44114),n(27495),n(90906);var r=n(90138),i=n(9026);function a(){var e,t=[],n=this.context;function r(n,r,i){var a=function(n){var r;for(r=0;r<t.length;r++)if(t[r].regex.test(n))return t[r].utils;return e}(i||r);return a&&"function"==typeof a[n]?a[n](r,i):e[n](r,i)}return e=(0,i.A)(n).getInstance(),{registerUrlRegex:function(e,n){t.push({regex:e,utils:n})},parseBaseUrl:function(e){return r("parseBaseUrl",e)},parseOrigin:function(e){return r("parseOrigin",e)},parseScheme:function(e){return r("parseScheme",e)},isRelative:function(e){return r("isRelative",e)},isPathAbsolute:function(e){return r("isPathAbsolute",e)},isSchemeRelative:function(e){return r("isSchemeRelative",e)},isHTTPURL:function(e){return r("isHTTPURL",e)},isHTTPS:function(e){return r("isHTTPS",e)},removeHostname:function(e){return r("removeHostname",e)},resolve:function(e,t){return r("resolve",e,t)}}}a.__dashjs_factory_name="URLUtils";var o=r.A.getSingletonFactory(a);t.A=o},71613:function(e,t,n){"use strict";n(60825);var r=n(85952),i=n(7718),a=n(8591),o=n(4597),s=n(18766);function u(e,t,n){return t=(0,o.A)(t),(0,a.A)(e,c()?Reflect.construct(t,n||[],(0,o.A)(e).constructor):t.apply(e,n))}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}var l=function(e){function t(e){var n;return(0,i.A)(this,t),(n=u(this,t)).method=e||null,n}return(0,s.A)(t,e),(0,r.A)(t)}(n(72842).A);t.A=l},90447:function(e,t,n){"use strict";var r=n(85952),i=n(7718),a=(0,r.A)((function e(t){(0,i.A)(this,e),this.url=t.url,this.method=t.method,this.body=void 0!==t.body?t.body:null,this.responseType=void 0!==t.responseType?t.responseType:null,this.headers=void 0!==t.headers?t.headers:{},this.credentials=void 0!==t.credentials?t.credentials:null,this.mode=void 0!==t.mode?t.mode:null,this.timeout=void 0!==t.timeout?t.timeout:0,this.customData=void 0!==t.customData?t.customData:{}}));t.A=a},5099:function(e,t,n){"use strict";var r=n(85952),i=n(7718),a=(0,r.A)((function e(t){(0,i.A)(this,e),this.request=t.request,this.url=void 0!==t.url?t.url:null,this.redirected=void 0!==t.redirected&&t.redirected,this.status=void 0!==t.status?t.status:null,this.statusText=void 0!==t.statusText?t.statusText:"",this.type=void 0!==t.type?t.type:"",this.headers=void 0!==t.headers?t.headers:{},this.data=void 0!==t.data?t.data:null,this.resourceTiming=void 0!==t.resourceTiming?t.resourceTiming:null}));t.A=a},11944:function(e,t,n){"use strict";var r=n(85952),i=n(7718),a=(0,r.A)((function e(t,n,r){(0,i.A)(this,e),this.code=t||null,this.message=n||null,this.data=r||null}));t.A=a},15560:function(e,t,n){"use strict";var r=n(7718),i=n(85952),a=n(98854),o=function(){return(0,i.A)((function e(t){(0,r.A)(this,e),this.id=t.id,this.url=t.url,this.language=t.language,this.mimeType=t.mimeType,this.bandwidth=t.bandwidth,this.periodId=t.periodId||null}),[{key:"serializeToMpdParserFormat",value:function(){return{tagName:a.A.ADAPTATION_SET,mimeType:this.mimeType,lang:this.language,Representation:[{tagName:a.A.REPRESENTATION,id:this.id,bandwidth:this.bandwidth,BaseURL:[{tagName:a.A.BASE_URL,__text:this.url}],mimeType:this.mimeType}]}}}])}();t.A=o},72842:function(e,t,n){"use strict";var r=n(7718),i=n(85952),a=n(87568),o=function(){return(0,i.A)((function e(t){(0,r.A)(this,e),this.action=e.ACTION_DOWNLOAD,this.availabilityEndTime=null,this.availabilityStartTime=null,this.bandwidth=NaN,this.bytesLoaded=NaN,this.bytesTotal=NaN,this.delayLoadingTime=NaN,this.duration=NaN,this.endDate=null,this.firstByteDate=null,this.index=NaN,this.isPartialSegmentRequest=!1,this.mediaStartTime=NaN,this.mediaType=null,this.presentationStartTime=NaN,this.range=null,this.representation=null,this.responseType="arraybuffer",this.retryAttempts=0,this.serviceLocation=null,this.startDate=null,this.startTime=NaN,this.timescale=NaN,this.type=null,this.url=t||null,this.wallStartTime=null}),[{key:"isInitializationRequest",value:function(){return this.type&&this.type===a.G.INIT_SEGMENT_TYPE}},{key:"setInfo",value:function(e){this.type=e&&e.init?a.G.INIT_SEGMENT_TYPE:a.G.MEDIA_SEGMENT_TYPE,this.url=e&&e.url?e.url:null,this.range=e&&e.range?e.range.start+"-"+e.range.end:null,this.mediaType=e&&e.mediaType?e.mediaType:null,this.representation=e&&e.representation?e.representation:null}}])}();o.ACTION_DOWNLOAD="download",o.ACTION_COMPLETE="complete",t.A=o},87568:function(e,t,n){"use strict";n.d(t,{G:function(){return a},N:function(){return o}});var r=n(85952),i=n(7718),a=(0,r.A)((function e(){(0,i.A)(this,e),this.tcpid=null,this.type=null,this.url=null,this.actualurl=null,this.range=null,this.trequest=null,this.tresponse=null,this.responsecode=null,this.interval=null,this.trace=[],this.cmsd=null,this._stream=null,this._tfinish=null,this._mediaduration=null,this._responseHeaders=null,this._serviceLocation=null,this._fileLoaderType=null,this._resourceTimingValues=null})),o=(0,r.A)((function e(){(0,i.A)(this,e),this.s=null,this.d=null,this.b=[]}));a.BITSTREAM_SWITCHING_SEGMENT_TYPE="BitstreamSwitchingSegment",a.CONTENT_STEERING_TYPE="ContentSteering",a.DVB_REPORTING_TYPE="DVBReporting",a.GET="GET",a.POST="POST",a.HEAD="HEAD",a.INDEX_SEGMENT_TYPE="IndexSegment",a.INIT_SEGMENT_TYPE="InitializationSegment",a.LICENSE="license",a.LICENSE_CERTIFICATE="licenseCertificate",a.MEDIA_SEGMENT_TYPE="MediaSegment",a.MPD_TYPE="MPD",a.MSS_FRAGMENT_INFO_SEGMENT_TYPE="FragmentInfoSegment",a.CMCD_EVENT="CmcdEvent",a.OTHER_TYPE="other",a.XLINK_EXPANSION_TYPE="XLinkExpansion"}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var r={};return function(){"use strict";n.d(r,{default:function(){return d}}),n(95393);var e=n(94469),t=n(27037),i=(n(2008),n(44114),n(34782),n(62010),n(18111),n(22489),n(26099),n(27495),n(90906),n(19839)),a=function(){var e,t="application/dash+xml";function n(n,r,a){if(!n||!/^VIDEO$/i.test(n.nodeName))return null;if(n._dashjs_player)return n._dashjs_player;var o,s=n.id||n.name||"video element";if(!(r=r||[].slice.call(n.querySelectorAll("source")).filter((function(e){return e.type==t}))[0])&&n.src)(r=document.createElement("source")).src=n.src;else if(!r&&!n.src)return null;return a=a||{},(o=(0,i.A)(a).create()).initialize(n,r.src,n.autoplay),e||(e=o.getDebug().getLogger()),e.debug("Converted "+s+" to dash.js player and added content: "+r.src),n._dashjs_player=o,o}function r(e){return/^VIDEO$/i.test(e.nodeName)?e:r(e.parentNode)}return{create:n,createAll:function(e,i){var a=[];e=e||"[data-dashjs-player]";for(var o=(i=i||document).querySelectorAll(e),s=0;s<o.length;s++){var u=n(o[s],null);a.push(u)}for(var c=i.querySelectorAll('source[type="'+t+'"]'),l=0;l<c.length;l++){var f=n(r(c[l]),null);a.push(f)}return a}}}();if("undefined"!=typeof window&&window){var o;function h(){window.removeEventListener("load",h),a.createAll()}function g(){window.dashjs&&(window.clearInterval(o),a.createAll())}(!window.dashjs||!window.dashjs.skipAutoCreate)&&window.addEventListener&&("complete"===window.document.readyState?window.dashjs?a.createAll():o=window.setInterval(g,500):window.addEventListener("load",h))}var s=a,u=n(649),c=n(35212),l=n(30559),f=n(15560);dashjs.Protection=t.default,dashjs.MetricsReporting=e.default,dashjs.MediaPlayerFactory=s,dashjs.Debug=u.A,dashjs.supportsMediaSource=l.a,dashjs.Constants=c.A,dashjs.ExternalSubtitle=f.A;var d=dashjs}(),r.default}()}));
//# sourceMappingURL=dash.all.min.js.map