dashjs-webos5
Version:
dash.js fork targeting webOS 5 and Chromium 68 compatibility, with adjustments for webos 3 and 4
2 lines • 1.11 MB
JavaScript
/*! For license information please see dash.all.min.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.dashjs=e():t.dashjs=e()}(self,(function(){return function(){var t={7267:function(t,e,n){"use strict";n(6280),n(5276),n(3792),n(4114),n(6573),n(8100),n(7936),n(6099),n(1489),n(8140),n(1630),n(2170),n(5044),n(1920),n(1694),n(9955),n(1903),n(1134),n(3206),n(4496),n(6651),n(2887),n(9369),n(6812),n(8995),n(1575),n(6072),n(8747),n(8845),n(9423),n(7301),n(373),n(1405),n(7467),n(4732),n(3684),n(9577),e.byteLength=function(t){var e=s(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,r=s(t),o=r[0],l=r[1],u=new i(function(t,e,n){return 3*(e+n)/4-n}(0,o,l)),c=0,f=l>0?o-4:o;for(n=0;n<f;n+=4)e=a[t.charCodeAt(n)]<<18|a[t.charCodeAt(n+1)]<<12|a[t.charCodeAt(n+2)]<<6|a[t.charCodeAt(n+3)],u[c++]=e>>16&255,u[c++]=e>>8&255,u[c++]=255&e;return 2===l&&(e=a[t.charCodeAt(n)]<<2|a[t.charCodeAt(n+1)]>>4,u[c++]=255&e),1===l&&(e=a[t.charCodeAt(n)]<<10|a[t.charCodeAt(n+1)]<<4|a[t.charCodeAt(n+2)]>>2,u[c++]=e>>8&255,u[c++]=255&e),u},e.fromByteArray=function(t){for(var e,n=t.length,a=n%3,i=[],o=16383,l=0,s=n-a;l<s;l+=o)i.push(u(t,l,l+o>s?s:l+o));return 1===a?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===a&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),i.join("")};for(var r=[],a=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0;l<64;++l)r[l]=o[l],a[o.charCodeAt(l)]=l;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function u(t,e,n){for(var a,i,o=[],l=e;l<n;l+=3)a=(t[l]<<16&16711680)+(t[l+1]<<8&65280)+(255&t[l+2]),o.push(r[(i=a)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},44:function(t,e,n){"use strict";n(2675),n(9463),n(5700),n(6280),n(8706),n(6835),n(3771),n(4423),n(5276),n(3792),n(8921),n(4114),n(4782),n(6573),n(8100),n(7936),n(9572),n(2892),n(6099),n(7495),n(8781),n(1699),n(5440),n(2762),n(1489),n(8140),n(1630),n(2170),n(5044),n(1920),n(1694),n(9955),n(1903),n(1134),n(3206),n(4496),n(6651),n(2887),n(9369),n(6812),n(8995),n(1575),n(6072),n(8747),n(8845),n(9423),n(7301),n(373),n(1405),n(7467),n(4732),n(3684),n(9577);var r=n(7267),a=n(7986),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=function(t){return+t!=t&&(t=0),s.alloc(+t)},e.INSPECT_MAX_BYTES=50;var o=2147483647;function l(t){if(t>o)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,s.prototype),e}function s(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return f(t)}return u(t,e,n)}function u(t,e,n){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!s.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var n=0|p(t,e),r=l(n),a=r.write(t,e);return a!==n&&(r=r.slice(0,a)),r}(t,e);if(ArrayBuffer.isView(t))return function(t){if(B(t,Uint8Array)){var e=new Uint8Array(t);return g(e.buffer,e.byteOffset,e.byteLength)}return d(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(B(t,ArrayBuffer)||t&&B(t.buffer,ArrayBuffer))return g(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(B(t,SharedArrayBuffer)||t&&B(t.buffer,SharedArrayBuffer)))return g(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return s.from(r,e,n);var a=function(t){if(s.isBuffer(t)){var e=0|m(t.length),n=l(e);return 0===n.length||t.copy(n,0,0,e),n}return void 0!==t.length?"number"!=typeof t.length||q(t.length)?l(0):d(t):"Buffer"===t.type&&Array.isArray(t.data)?d(t.data):void 0}(t);if(a)return a;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return s.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function c(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function f(t){return c(t),l(t<0?0:0|m(t))}function d(t){for(var e=t.length<0?0:0|m(t.length),n=l(e),r=0;r<e;r+=1)n[r]=255&t[r];return n}function g(t,e,n){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;return r=void 0===e&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,e):new Uint8Array(t,e,n),Object.setPrototypeOf(r,s.prototype),r}function m(t){if(t>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function p(t,e){if(s.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||B(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var a=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(t).length;default:if(a)return r?-1:F(t).length;e=(""+e).toLowerCase(),a=!0}}function h(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,e,n);case"utf8":case"utf-8":return I(this,e,n);case"ascii":return R(this,e,n);case"latin1":case"binary":return N(this,e,n);case"base64":return S(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function v(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function y(t,e,n,r,a){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),q(n=+n)&&(n=a?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(a)return-1;n=t.length-1}else if(n<0){if(!a)return-1;n=0}if("string"==typeof e&&(e=s.from(e,r)),s.isBuffer(e))return 0===e.length?-1:b(t,e,n,r,a);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):b(t,[e],n,r,a);throw new TypeError("val must be string, number or Buffer")}function b(t,e,n,r,a){var i,o=1,l=t.length,s=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;o=2,l/=2,s/=2,n/=2}function u(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(a){var c=-1;for(i=n;i<l;i++)if(u(t,i)===u(e,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===s)return c*o}else-1!==c&&(i-=i-c),c=-1}else for(n+s>l&&(n=l-s),i=n;i>=0;i--){for(var f=!0,d=0;d<s;d++)if(u(t,i+d)!==u(e,d)){f=!1;break}if(f)return i}return-1}function E(t,e,n,r){n=Number(n)||0;var a=t.length-n;r?(r=Number(r))>a&&(r=a):r=a;var i=e.length;r>i/2&&(r=i/2);for(var o=0;o<r;++o){var l=parseInt(e.substr(2*o,2),16);if(q(l))return o;t[n+o]=l}return o}function A(t,e,n,r){return j(F(e,t.length-n),t,n,r)}function _(t,e,n,r){return j(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function T(t,e,n,r){return j(U(e),t,n,r)}function w(t,e,n,r){return j(function(t,e){for(var n,r,a,i=[],o=0;o<t.length&&!((e-=2)<0);++o)r=(n=t.charCodeAt(o))>>8,a=n%256,i.push(a),i.push(r);return i}(e,t.length-n),t,n,r)}function S(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function I(t,e,n){n=Math.min(t.length,n);for(var r=[],a=e;a<n;){var i,o,l,s,u=t[a],c=null,f=u>239?4:u>223?3:u>191?2:1;if(a+f<=n)switch(f){case 1:u<128&&(c=u);break;case 2:128==(192&(i=t[a+1]))&&(s=(31&u)<<6|63&i)>127&&(c=s);break;case 3:i=t[a+1],o=t[a+2],128==(192&i)&&128==(192&o)&&(s=(15&u)<<12|(63&i)<<6|63&o)>2047&&(s<55296||s>57343)&&(c=s);break;case 4:i=t[a+1],o=t[a+2],l=t[a+3],128==(192&i)&&128==(192&o)&&128==(192&l)&&(s=(15&u)<<18|(63&i)<<12|(63&o)<<6|63&l)>65535&&s<1114112&&(c=s)}null===c?(c=65533,f=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),a+=f}return function(t){var e=t.length;if(e<=k)return String.fromCharCode.apply(String,t);for(var n="",r=0;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=k));return n}(r)}e.kMaxLength=o,s.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),s.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(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(t,e,n){return u(t,e,n)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(t,e,n){return function(t,e,n){return c(t),t<=0?l(t):void 0!==e?"string"==typeof n?l(t).fill(e,n):l(t).fill(e):l(t)}(t,e,n)},s.allocUnsafe=function(t){return f(t)},s.allocUnsafeSlow=function(t){return f(t)},s.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==s.prototype},s.compare=function(t,e){if(B(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),B(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var n=t.length,r=e.length,a=0,i=Math.min(n,r);a<i;++a)if(t[a]!==e[a]){n=t[a],r=e[a];break}return n<r?-1:r<n?1:0},s.isEncoding=function(t){switch(String(t).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}},s.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=s.allocUnsafe(e),a=0;for(n=0;n<t.length;++n){var i=t[n];if(B(i,Uint8Array))a+i.length>r.length?s.from(i).copy(r,a):Uint8Array.prototype.set.call(r,i,a);else{if(!s.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(r,a)}a+=i.length}return r},s.byteLength=p,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)v(this,e,e+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)v(this,e,e+3),v(this,e+1,e+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)v(this,e,e+7),v(this,e+1,e+6),v(this,e+2,e+5),v(this,e+3,e+4);return this},s.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?I(this,0,t):h.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},i&&(s.prototype[i]=s.prototype.inspect),s.prototype.compare=function(t,e,n,r,a){if(B(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===a&&(a=this.length),e<0||n>t.length||r<0||a>this.length)throw new RangeError("out of range index");if(r>=a&&e>=n)return 0;if(r>=a)return-1;if(e>=n)return 1;if(this===t)return 0;for(var i=(a>>>=0)-(r>>>=0),o=(n>>>=0)-(e>>>=0),l=Math.min(i,o),u=this.slice(r,a),c=t.slice(e,n),f=0;f<l;++f)if(u[f]!==c[f]){i=u[f],o=c[f];break}return i<o?-1:o<i?1:0},s.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},s.prototype.indexOf=function(t,e,n){return y(this,t,e,n,!0)},s.prototype.lastIndexOf=function(t,e,n){return y(this,t,e,n,!1)},s.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var a=this.length-e;if((void 0===n||n>a)&&(n=a),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return E(this,t,e,n);case"utf8":case"utf-8":return A(this,t,e,n);case"ascii":case"latin1":case"binary":return _(this,t,e,n);case"base64":return T(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function R(t,e,n){var r="";n=Math.min(t.length,n);for(var a=e;a<n;++a)r+=String.fromCharCode(127&t[a]);return r}function N(t,e,n){var r="";n=Math.min(t.length,n);for(var a=e;a<n;++a)r+=String.fromCharCode(t[a]);return r}function x(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var a="",i=e;i<n;++i)a+=G[t[i]];return a}function C(t,e,n){for(var r=t.slice(e,n),a="",i=0;i<r.length-1;i+=2)a+=String.fromCharCode(r[i]+256*r[i+1]);return a}function D(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function O(t,e,n,r,a,i){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>a||e<i)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function M(t,e,n,r,a,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function z(t,e,n,r,i){return e=+e,n>>>=0,i||M(t,0,n,4),a.write(t,e,n,r,23,4),n+4}function P(t,e,n,r,i){return e=+e,n>>>=0,i||M(t,0,n,8),a.write(t,e,n,r,52,8),n+8}s.prototype.slice=function(t,e){var n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);var r=this.subarray(t,e);return Object.setPrototypeOf(r,s.prototype),r},s.prototype.readUintLE=s.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||D(t,e,this.length);for(var r=this[t],a=1,i=0;++i<e&&(a*=256);)r+=this[t+i]*a;return r},s.prototype.readUintBE=s.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||D(t,e,this.length);for(var r=this[t+--e],a=1;e>0&&(a*=256);)r+=this[t+--e]*a;return r},s.prototype.readUint8=s.prototype.readUInt8=function(t,e){return t>>>=0,e||D(t,1,this.length),this[t]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(t,e){return t>>>=0,e||D(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(t,e){return t>>>=0,e||D(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(t,e){return t>>>=0,e||D(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(t,e){return t>>>=0,e||D(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||D(t,e,this.length);for(var r=this[t],a=1,i=0;++i<e&&(a*=256);)r+=this[t+i]*a;return r>=(a*=128)&&(r-=Math.pow(2,8*e)),r},s.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||D(t,e,this.length);for(var r=e,a=1,i=this[t+--r];r>0&&(a*=256);)i+=this[t+--r]*a;return i>=(a*=128)&&(i-=Math.pow(2,8*e)),i},s.prototype.readInt8=function(t,e){return t>>>=0,e||D(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){t>>>=0,e||D(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(t,e){t>>>=0,e||D(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(t,e){return t>>>=0,e||D(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t>>>=0,e||D(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return t>>>=0,e||D(t,4,this.length),a.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t>>>=0,e||D(t,4,this.length),a.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t>>>=0,e||D(t,8,this.length),a.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t>>>=0,e||D(t,8,this.length),a.read(this,t,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||O(this,t,e,n,Math.pow(2,8*n)-1,0);var a=1,i=0;for(this[e]=255&t;++i<n&&(a*=256);)this[e+i]=t/a&255;return e+n},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||O(this,t,e,n,Math.pow(2,8*n)-1,0);var a=n-1,i=1;for(this[e+a]=255&t;--a>=0&&(i*=256);)this[e+a]=t/i&255;return e+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||O(this,t,e,1,255,0),this[e]=255&t,e+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||O(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||O(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||O(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||O(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){var a=Math.pow(2,8*n-1);O(this,t,e,n,a-1,-a)}var i=0,o=1,l=0;for(this[e]=255&t;++i<n&&(o*=256);)t<0&&0===l&&0!==this[e+i-1]&&(l=1),this[e+i]=(t/o|0)-l&255;return e+n},s.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){var a=Math.pow(2,8*n-1);O(this,t,e,n,a-1,-a)}var i=n-1,o=1,l=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===l&&0!==this[e+i+1]&&(l=1),this[e+i]=(t/o|0)-l&255;return e+n},s.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||O(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||O(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||O(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||O(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||O(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeFloatLE=function(t,e,n){return z(this,t,e,!0,n)},s.prototype.writeFloatBE=function(t,e,n){return z(this,t,e,!1,n)},s.prototype.writeDoubleLE=function(t,e,n){return P(this,t,e,!0,n)},s.prototype.writeDoubleBE=function(t,e,n){return P(this,t,e,!1,n)},s.prototype.copy=function(t,e,n,r){if(!s.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<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),t.length-e<r-n&&(r=t.length-e+n);var a=r-n;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,n,r):Uint8Array.prototype.set.call(t,this.subarray(n,r),e),a},s.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=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&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===t.length){var a=t.charCodeAt(0);("utf8"===r&&a<128||"latin1"===r)&&(t=a)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var i;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i<n;++i)this[i]=t;else{var o=s.isBuffer(t)?t:s.from(t,r),l=o.length;if(0===l)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<n-e;++i)this[i+e]=o[i%l]}return this};var L=/[^+/0-9A-Za-z-_]/g;function F(t,e){var n;e=e||1/0;for(var r=t.length,a=null,i=[],o=0;o<r;++o){if((n=t.charCodeAt(o))>55295&&n<57344){if(!a){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(o+1===r){(e-=3)>-1&&i.push(239,191,189);continue}a=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),a=n;continue}n=65536+(a-55296<<10|n-56320)}else a&&(e-=3)>-1&&i.push(239,191,189);if(a=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function U(t){return r.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(L,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function j(t,e,n,r){for(var a=0;a<r&&!(a+n>=e.length||a>=t.length);++a)e[a+n]=t[a];return a}function B(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function q(t){return t!=t}var G=function(){for(var t="0123456789abcdef",e=new Array(256),n=0;n<16;++n)for(var r=16*n,a=0;a<16;++a)e[r+a]=t[n]+t[a];return e}()},6877:function(t,e,n){n(5276),n(3792),n(4114),n(4554),n(6573),n(8100),n(7936),n(6099),n(9479),n(1489),n(8140),n(1630),n(2170),n(5044),n(1920),n(1694),n(9955),n(1903),n(1134),n(3206),n(4496),n(6651),n(2887),n(9369),n(6812),n(8995),n(1575),n(6072),n(8747),n(8845),n(9423),n(7301),n(373),n(1405),n(7467),n(4732),n(3684),n(9577);var r={parseBuffer:function(t){return new a(t).parse()},addBoxProcessor:function(t,e){"string"==typeof t&&"function"==typeof e&&(i.prototype._boxProcessors[t]=e)},createFile:function(){return new a},createBox:function(t,e,n){var r=i.create(t);return e&&e.append(r,n),r},createFullBox:function(t,e,n){var a=r.createBox(t,e,n);return a.version=0,a.flags=0,a},Utils:{}};r.Utils.dataViewToString=function(t,e){var n=e||"utf-8";if("undefined"!=typeof TextDecoder)return new TextDecoder(n).decode(t);var r=[],a=0;if("utf-8"===n)for(;a<t.byteLength;){var i=t.getUint8(a++);i<128||(i<224?(i=(31&i)<<6,i|=63&t.getUint8(a++)):i<240?(i=(15&i)<<12,i|=(63&t.getUint8(a++))<<6,i|=63&t.getUint8(a++)):(i=(7&i)<<18,i|=(63&t.getUint8(a++))<<12,i|=(63&t.getUint8(a++))<<6,i|=63&t.getUint8(a++))),r.push(String.fromCharCode(i))}else for(;a<t.byteLength;)r.push(String.fromCharCode(t.getUint8(a++)));return r.join("")},r.Utils.utf8ToByteArray=function(t){var e,n;if("undefined"!=typeof TextEncoder)e=(new TextEncoder).encode(t);else for(e=[],n=0;n<t.length;++n){var r=t.charCodeAt(n);r<128?e.push(r):r<2048?(e.push(192|r>>6),e.push(128|63&r)):r<65536?(e.push(224|r>>12),e.push(128|63&r>>6),e.push(128|63&r)):(e.push(240|r>>18),e.push(128|63&r>>12),e.push(128|63&r>>6),e.push(128|63&r))}return e},r.Utils.appendBox=function(t,e,n){if(e._offset=t._cursor.offset,e._root=t._root?t._root:t,e._raw=t._raw,e._parent=t,-1!==n)if(null!=n){var r,a=-1;if("number"==typeof n)a=n;else{if("string"==typeof n)r=n;else{if("object"!=typeof n||!n.type)return void t.boxes.push(e);r=n.type}for(var i=0;i<t.boxes.length;i++)if(r===t.boxes[i].type){a=i+1;break}}t.boxes.splice(a,0,e)}else t.boxes.push(e)},e.parseBuffer=r.parseBuffer,e.addBoxProcessor=r.addBoxProcessor,e.createFile=r.createFile,e.createBox=r.createBox,e.createFullBox=r.createFullBox,e.Utils=r.Utils,r.Cursor=function(t){this.offset=void 0===t?0:t};var a=function(t){this._cursor=new r.Cursor,this.boxes=[],t&&(this._raw=new DataView(t))};a.prototype.fetch=function(t){var e=this.fetchAll(t,!0);return e.length?e[0]:null},a.prototype.fetchAll=function(t,e){var n=[];return a._sweep.call(this,t,n,e),n},a.prototype.parse=function(){for(this._cursor.offset=0,this.boxes=[];this._cursor.offset<this._raw.byteLength;){var t=i.parse(this);if(void 0===t.type)break;this.boxes.push(t)}return this},a._sweep=function(t,e,n){for(var r in this.type&&this.type==t&&e.push(this),this.boxes){if(e.length&&n)return;a._sweep.call(this.boxes[r],t,e,n)}},a.prototype.write=function(){var t,e=0;for(t=0;t<this.boxes.length;t++)e+=this.boxes[t].getLength(!1);var n=new Uint8Array(e);for(this._rawo=new DataView(n.buffer),this.bytes=n,this._cursor.offset=0,t=0;t<this.boxes.length;t++)this.boxes[t].write();return n.buffer},a.prototype.append=function(t,e){r.Utils.appendBox(this,t,e)};var i=function(){this._cursor=new r.Cursor};i.parse=function(t){var e=new i;return e._offset=t._cursor.offset,e._root=t._root?t._root:t,e._raw=t._raw,e._parent=t,e._parseBox(),t._cursor.offset=e._raw.byteOffset+e._raw.byteLength,e},i.create=function(t){var e=new i;return e.type=t,e.boxes=[],e},i.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"],i.prototype._boxProcessors={},i.prototype._procField=function(t,e,n){this._parsing?this[t]=this._readField(e,n):this._writeField(e,n,this[t])},i.prototype._procFieldArray=function(t,e,n,r){var a;if(this._parsing)for(this[t]=[],a=0;a<e;a++)this[t][a]=this._readField(n,r);else for(a=0;a<this[t].length;a++)this._writeField(n,r,this[t][a])},i.prototype._procFullBox=function(){this._procField("version","uint",8),this._procField("flags","uint",24)},i.prototype._procEntries=function(t,e,n){var r;if(this._parsing)for(this[t]=[],r=0;r<e;r++)this[t].push({}),n.call(this,this[t][r]);else for(r=0;r<e;r++)n.call(this,this[t][r])},i.prototype._procSubEntries=function(t,e,n,r){var a;if(this._parsing)for(t[e]=[],a=0;a<n;a++)t[e].push({}),r.call(this,t[e][a]);else for(a=0;a<n;a++)r.call(this,t[e][a])},i.prototype._procEntryField=function(t,e,n,r){this._parsing?t[e]=this._readField(n,r):this._writeField(n,r,t[e])},i.prototype._procSubBoxes=function(t,e){var n;if(this._parsing)for(this[t]=[],n=0;n<e;n++)this[t].push(i.parse(this));else for(n=0;n<e;n++)this._rawo?this[t][n].write():this.size+=this[t][n].getLength()},i.prototype._readField=function(t,e){switch(t){case"uint":return this._readUint(e);case"int":return this._readInt(e);case"template":return this._readTemplate(e);case"string":return-1===e?this._readTerminatedString():this._readString(e);case"data":return this._readData(e);case"utf8":return this._readUTF8String();case"utf8string":return this._readUTF8TerminatedString();default:return-1}},i.prototype._readInt=function(t){var e=null,n=this._cursor.offset-this._raw.byteOffset;switch(t){case 8:e=this._raw.getInt8(n);break;case 16:e=this._raw.getInt16(n);break;case 32:e=this._raw.getInt32(n);break;case 64:var r=this._raw.getInt32(n),a=this._raw.getInt32(n+4);e=r*Math.pow(2,32)+a}return this._cursor.offset+=t>>3,e},i.prototype._readUint=function(t){var e,n,r=null,a=this._cursor.offset-this._raw.byteOffset;switch(t){case 8:r=this._raw.getUint8(a);break;case 16:r=this._raw.getUint16(a);break;case 24:r=((e=this._raw.getUint16(a))<<8)+(n=this._raw.getUint8(a+2));break;case 32:r=this._raw.getUint32(a);break;case 64:e=this._raw.getUint32(a),n=this._raw.getUint32(a+4),r=e*Math.pow(2,32)+n}return this._cursor.offset+=t>>3,r},i.prototype._readString=function(t){for(var e="",n=0;n<t;n++){var r=this._readUint(8);e+=String.fromCharCode(r)}return e},i.prototype._readTemplate=function(t){return this._readUint(t/2)+this._readUint(t/2)/Math.pow(2,t/2)},i.prototype._readTerminatedString=function(){for(var t="";this._cursor.offset-this._offset<this._raw.byteLength;){var e=this._readUint(8);if(0===e)break;t+=String.fromCharCode(e)}return t},i.prototype._readData=function(t){var e=t>0?t:this._raw.byteLength-(this._cursor.offset-this._offset);if(e>0){var n=new Uint8Array(this._raw.buffer,this._cursor.offset,e);return this._cursor.offset+=e,n}return null},i.prototype._readUTF8String=function(){var t=this._raw.byteLength-(this._cursor.offset-this._offset),e=null;return t>0&&(e=new DataView(this._raw.buffer,this._cursor.offset,t),this._cursor.offset+=t),e?r.Utils.dataViewToString(e):e},i.prototype._readUTF8TerminatedString=function(){var t=this._raw.byteLength-(this._cursor.offset-this._offset),e=null;if(t>0){var n;for(e=new DataView(this._raw.buffer,this._cursor.offset,t),n=0;n<t&&0!==e.getUint8(n);n++);e=new DataView(this._raw.buffer,this._cursor.offset,n),this._cursor.offset+=Math.min(n+1,t)}return e?r.Utils.dataViewToString(e):e},i.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())}},i.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},i.prototype._parseContainerBox=function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(i.parse(this))},i.prototype.append=function(t,e){r.Utils.appendBox(this,t,e)},i.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 t=0;t<this.boxes.length;t++)this.size+=this.boxes[t].getLength();return this._data&&this._writeData(this._data),this.size},i.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 t=0;t<this.boxes.length;t++)this.boxes[t].write();return this._data&&this._writeData(this._data),this._parent._cursor.offset+=this.size,this.size},i.prototype._writeInt=function(t,e){if(this._rawo){var n=this._cursor.offset-this._rawo.byteOffset;switch(t){case 8:this._rawo.setInt8(n,e);break;case 16:this._rawo.setInt16(n,e);break;case 32:this._rawo.setInt32(n,e);break;case 64:var r=Math.floor(e/Math.pow(2,32)),a=e-r*Math.pow(2,32);this._rawo.setUint32(n,r),this._rawo.setUint32(n+4,a)}this._cursor.offset+=t>>3}else this.size+=t>>3},i.prototype._writeUint=function(t,e){if(this._rawo){var n,r,a=this._cursor.offset-this._rawo.byteOffset;switch(t){case 8:this._rawo.setUint8(a,e);break;case 16:this._rawo.setUint16(a,e);break;case 24:n=(16776960&e)>>8,r=255&e,this._rawo.setUint16(a,n),this._rawo.setUint8(a+2,r);break;case 32:this._rawo.setUint32(a,e);break;case 64:r=e-(n=Math.floor(e/Math.pow(2,32)))*Math.pow(2,32),this._rawo.setUint32(a,n),this._rawo.setUint32(a+4,r)}this._cursor.offset+=t>>3}else this.size+=t>>3},i.prototype._writeString=function(t,e){for(var n=0;n<t;n++)this._writeUint(8,e.charCodeAt(n))},i.prototype._writeTerminatedString=function(t){if(0!==t.length){for(var e=0;e<t.length;e++)this._writeUint(8,t.charCodeAt(e));this._writeUint(8,0)}},i.prototype._writeTemplate=function(t,e){var n=Math.floor(e),r=(e-n)*Math.pow(2,t/2);this._writeUint(t/2,n),this._writeUint(t/2,r)},i.prototype._writeData=function(t){if(t)if(this._rawo){if(t instanceof Array){for(var e=this._cursor.offset-this._rawo.byteOffset,n=0;n<t.length;n++)this._rawo.setInt8(e+n,t[n]);this._cursor.offset+=t.length}t instanceof Uint8Array&&(this._root.bytes.set(t,this._cursor.offset),this._cursor.offset+=t.length)}else this.size+=t.length},i.prototype._writeUTF8String=function(t){var e=r.Utils.utf8ToByteArray(t);if(this._rawo)for(var n=new DataView(this._rawo.buffer,this._cursor.offset,e.length),a=0;a<e.length;a++)n.setUint8(a,e[a]);else this.size+=e.length},i.prototype._writeField=function(t,e,n){switch(t){case"uint":this._writeUint(e,n);break;case"int":this._writeInt(e,n);break;case"template":this._writeTemplate(e,n);break;case"string":-1==e?this._writeTerminatedString(n):this._writeString(e,n);break;case"data":this._writeData(n);break;case"utf8":this._writeUTF8String(n)}},i.prototype._boxProcessors.ardi=function(){this._procFullBox(),this._procField("audio_rendering_indication","uint",8)},i.prototype._boxProcessors.avc1=i.prototype._boxProcessors.avc2=i.prototype._boxProcessors.avc3=i.prototype._boxProcessors.avc4=i.prototype._boxProcessors.hvc1=i.prototype._boxProcessors.hev1=i.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)},i.prototype._boxProcessors.ctts=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(t){this._procEntryField(t,"sample_count","uint",32),this._procEntryField(t,"sample_offset",1===this.version?"int":"uint",32)}))},i.prototype._boxProcessors.dref=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},i.prototype._boxProcessors.elng=function(){this._procFullBox(),this._procField("extended_language","utf8string")},i.prototype._boxProcessors.elst=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(t){this._procEntryField(t,"segment_duration","uint",1===this.version?64:32),this._procEntryField(t,"media_time","int",1===this.version?64:32),this._procEntryField(t,"media_rate_integer","int",16),this._procEntryField(t,"media_rate_fraction","int",16)}))},i.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)},i.prototype._boxProcessors.free=i.prototype._boxProcessors.skip=function(){this._procField("data","data",-1)},i.prototype._boxProcessors.frma=function(){this._procField("data_format","uint",32)},i.prototype._boxProcessors.ftyp=i.prototype._boxProcessors.styp=function(){this._procField("major_brand","string",4),this._procField("minor_version","uint",32);var t=-1;this._parsing&&(t=(this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset))/4),this._procFieldArray("compatible_brands",t,"string",4)},i.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)},i.prototype._boxProcessors.imda=function(){this._procField("imda_identifier","uint",32),this._procField("data","data",-1)},i.prototype._boxProcessors.kind=function(){this._procFullBox(),this._procField("schemeURI","utf8string"),this._procField("value","utf8string")},i.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")},i.prototype._boxProcessors.mdat=function(){this._procField("data","data",-1)},i.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)},i.prototype._boxProcessors.mehd=function(){this._procFullBox(),this._procField("fragment_duration","uint",1==this.version?64:32)},i.prototype._boxProcessors.meta=function(){this._procFullBox()},i.prototype._boxProcessors.mfhd=function(){this._procFullBox(),this._procField("sequence_number","uint",32)},i.prototype._boxProcessors.mfro=function(){this._procFullBox(),this._procField("mfra_size","uint",32)},i.prototype._boxProcessors.mp4a=i.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)},i.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)},i.prototype._boxProcessors.payl=function(){this._procField("cue_text","utf8")},i.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)},i.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(t){this._procEntryField(t,"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")},i.prototype._boxProcessors.pssh=function(){this._procFullBox(),this._procFieldArray("SystemID",16,"uint",8),this._procField("DataSize","uint",32),this._procFieldArray("Data",this.DataSize,"uint",8)},i.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)},i.prototype._boxProcessors.sdtp=function(){this._procFullBox();var t=-1;this._parsing&&(t=this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset)),this._procFieldArray("sample_dependency_table",t,"uint",8)},i.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(t){this._parsing||(t.reference=(1&t.reference_type)<<31,t.reference|=2147483647&t.referenced_size,t.sap=(1&t.starts_with_SAP)<<31,t.sap|=(3&t.SAP_type)<<28,t.sap|=268435455&t.SAP_delta_time),this._procEntryField(t,"reference","uint",32),this._procEntryField(t,"subsegment_duration","uint",32),this._procEntryField(t,"sap","uint",32),this._parsing&&(t.reference_type=t.reference>>31&1,t.referenced_size=2147483647&t.reference,t.starts_with_SAP=t.sap>>31&1,t.SAP_type=t.sap>>28&7,t.SAP_delta_time=268435455&t.sap)}))},i.prototype._boxProcessors.smhd=function(){this._procFullBox(),this._procField("balance","uint",16),this._procField("reserved","uint",16)},i.prototype._boxProcessors.ssix=function(){this._procFullBox(),this._procField("subsegment_count","uint",32),this._procEntries("subsegments",this.subsegment_count,(function(t){this._procEntryField(t,"ranges_count","uint",32),this._procSubEntries(t,"ranges",t.ranges_count,(function(t){this._procEntryField(t,"level","uint",8),this._procEntryField(t,"range_size","uint",24)}))}))},i.prototype._boxProcessors.stsd=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},i.prototype._boxProcessors.sttg=function(){this._procField("settings","utf8")},i.prototype._boxProcessors.stts=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(t){this._procEntryField(t,"sample_count","uint",32),this._procEntryField(t,"sample_delta","uint",32)}))},i.prototype._boxProcessors.subs=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(t){this._procEntryField(t,"sample_delta","uint",32),this._procEntryField(t,"subsample_count","uint",16),this._procSubEntries(t,"subsamples",t.subsample_count,(function(t){this._procEntryField(t,"subsample_size","uint",1===this.version?32:16),this._procEntryField(t,"subsample_priority","uint",8),this._procEntryField(t,"discardable","uint",8),this._procEntryField(t,"codec_specific_parameters","uint",32)}))}))},i.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)},i.prototype._boxProcessors.tfdt=function(){this._procFullBox(),this._procField("baseMediaDecodeTime","uint",1==this.version?64:32)},i.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)},i.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(t){this._procEntryField(t,"time","uint",1===this.version?64:32),this._procEntryField(t,"moof_offset","uint",1===this.version?64:32),this._procEntryField(t,"traf_number","uint",8*(this.length_size_of_traf_num+1)),this._procEntryField(t,"trun_number","uint",8*(this.length_size_of_trun_num+1)),this._procEntryField(t,"sample_number","uint",8*(this.length_size_of_sample_num+1))}))},i.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)},i.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)},i.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(t){256&this.flags&&this._procEntryField(t,"sample_duration","uint",32),512&this.flags&&this._procEntryField(t,"sample_size","uint",32),1024&this.flags&&this._procEntryField(t,"sample_flags","uint",32),2048&this.flags&&this._procEntryField(t,"sample_composition_time_offset",1===this.version?"int":"uint",32)}))},i.prototype._boxProcessors["url "]=i.prototype._boxProcessors["urn "]=function(){this._procFullBox(),"urn "===this.type&&this._procField("name","string",-1),this._procField("location","string",-1)},i.prototype._boxProcessors.vlab=function(){this._procField("source_label","utf8")},i.prototype._boxProcessors.vmhd=function(){this._procFullBox(),this._procField("graphicsmode","uint",16),this._procFieldArray("opcolor",3,"uint",16)},i.prototype._boxProcessors.vttC=function(){this._procField("config","utf8")},i.prototype._boxProcessors.vtte=function(){}},9826:function(t,e,n){"use strict";n(2675),n(6280),n(8706),n(4114),n(4782),n(3609),n(1480),n(875),n(9432),n(6099),n(3362),n(9796),n(1137),n(5472);var r,a="object"==typeof Reflect?Reflect:null,i=a&&"function"==typeof a.apply?a.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};r=a&&"function"==typeof a.ownKeys?a.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var o=Number.isNaN||function(t){return t!=t};function l(){l.init.call(this)}t.exports=l,t.exports.once=function(t,e){return new Promise((function(n,r){function a(n){t.removeListener(e,i),r(n)}function i(){"function"==typeof t.removeListener&&t.removeListener("error",a),n([].slice.call(arguments))}v(t,e,i,{once:!0}),"error"!==e&&function(t,e){"function"==typeof t.on&&v(t,"error",e,{once:!0})}(t,a)}))},l.EventEmitter=l,l.prototype._events=void 0,l.prototype._eventsCount=0,l.prototype._maxListeners=void 0;